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


Groups > comp.lang.python > #41191

Re: Store a variable permanently

Date 2013-03-13 19:47 +0100
From Jean-Michel Pichavant <jeanmichel@sequans.com>
Subject Re: Store a variable permanently
Newsgroups comp.lang.python
Message-ID <mailman.3269.1363200454.2939.python-list@python.org> (permalink)

Show all headers | View raw


----- Original Message -----
> On Tue, 12 Mar 2013 12:54:11 +0100, Jean-Michel Pichavant wrote:
> 
> >> > import pickle
> >> > a = 758
> >> > pickle.dump(a, open('test.pickle', 'w'))
> >> > !cat test.pickle
> >> > I758
> >> > .
> >> 
> >> 
> >> What is that? It's not Python code, !cat test.pickle gives a
> >> syntax
> >> error.
> > 
> > It's a IPython shell session, !cat test.pickle writes the content
> > of
> > that file to stdout. But I have the feeling you already know that
> > ;)
> 
> Actually, no, I don't use IPython and am not familiar with it.
> 
> 
> --
> Steven

Well, slightly off topic, but you should give it a try. It's the python shell, just better.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Store a variable permanently Jean-Michel Pichavant <jeanmichel@sequans.com> - 2013-03-13 19:47 +0100

csiph-web