Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9727

Re: Encode and Get

From A Retey <awnl@gmx-topmail.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Encode and Get
Date 2012-04-21 04:29 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jmtd3m$sg9$1@smc.vnet.net> (permalink)
References <jmri6t$l9m$1@smc.vnet.net>

Show all headers | View raw


Hi,
>
> i wrote a notebook, and then encoded it using
>
> Encode["plaintext.nb", "codetext.nb", "password"].
>
> i then tried decoding it using
>
> Get["codetext.nb", "password"].
>
> The decoded notebook does not look like the original notebook, and will no
> longer run.
>
> what is wrong?

Encode only is meant to be used with plain text package files (*.m). 
What you Get with what you do is just the raw notebook expression, as it 
is saved to file (a notebook file is a valid Mathematica expression 
after all, which you can check by opening such a file with a text 
editor). You can recover the notebook with:

NotebookPut[Get["codetext.nb", "password"]]

Nevertheless, Encode is really not meant to be used like that. What are 
you trying to achieve?

hth,

albert

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Encode and Get "Michael B. Heaney" <mheaney@alum.mit.edu> - 2012-04-20 11:44 +0000
  Re: Encode and Get David Bailey <dave@removedbailey.co.uk> - 2012-04-21 04:34 +0000
  Re: Encode and Get A Retey <awnl@gmx-topmail.de> - 2012-04-21 04:29 +0000

csiph-web