On Thu, Mar 14, 2013 at 4:37 AM, Steven D'Aprano
wrote:
> 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, !c
- 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 g
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
- Original Message -
> On Mon, 11 Mar 2013 11:19:49 +0100, Jean-Michel Pichavant wrote:
>
> [...]
> > While your point about security is fair, the others aren't. Pickle
> > uses
> > by default an ascii representation of the data, it's readable and
> > writeable.
> >
> > import pickle
> >
On Mon, 11 Mar 2013 11:19:49 +0100, Jean-Michel Pichavant wrote:
[...]
> While your point about security is fair, the others aren't. Pickle uses
> by default an ascii representation of the data, it's readable and
> writeable.
>
> import pickle
> a = 758
> pickle.dump(a, open('test.pickle', 'w'))
- Original Message -
> On Fri, 01 Mar 2013 11:19:22 +0100, Jean-Michel Pichavant wrote:
>
> > - Original Message -
> >> So i have a variable called funds that i want to store the value
> >> of
> >> even after the program is exited. My funds variable holds the
> >> total
> >> valu
On Fri, 01 Mar 2013 11:19:22 +0100, Jean-Michel Pichavant wrote:
> - Original Message -
>> So i have a variable called funds that i want to store the value of
>> even after the program is exited. My funds variable holds the total
>> value of funds i have. I add a certain number of funds ea
In article <51315957$0$30001$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Fri, 01 Mar 2013 07:42:38 -0700, Michael Torrie wrote:
>
> > Another solution is to use a database system. Either SQLite
> > (file-based) or something server-based like PosgreSQL or MariaDB.
>
> The
>> Installing and running a database for a single integer is like using a
>> using a bulldozer for moving your keyboard half an inch to the left.
I'd like to see that sometime XD
-Modulok-
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 01 Mar 2013 07:42:38 -0700, Michael Torrie wrote:
> Another solution is to use a database system. Either SQLite
> (file-based) or something server-based like PosgreSQL or MariaDB.
The data in this case is a single integer value. Installing and running a
database for a single integer is
On 03/01/2013 03:19 AM, Jean-Michel Pichavant wrote:
> I would serialize the data.
>
> http://docs.python.org/2/library/pickle.html
>
> funds=5 pickle.dump(funds, 'funds.pickle')
>
> # to reload funds:
>
> funds = pickle.load('funds.pickle')
>
>
> The good thing with pickle is that it seriali
- Original Message -
> So i have a variable called funds that i want to store the value of
> even after the program is exited. My funds variable holds the total
> value of funds i have. I add a certain number of funds each time i
> run the program by entering how much i want to add. How wou
On 02/28/2013 10:35 PM, eli m wrote:
So i have a variable called funds that i want to store the value of even after the program is
exited. My funds variable holds the total value of funds i have. I add a
certain number of funds each time i run the program by entering how much
i want to add. Ho
On Thu, 28 Feb 2013 19:35:57 -0800, eli m wrote:
> So i have a variable called funds that i want to store the value of even
> after the program is exited. My funds variable holds the total value of
> funds i have. I add a certain number of funds each time i run the
> program by entering how much i
So i have a variable called funds that i want to store the value of even after
the program is exited. My funds variable holds the total value of funds i have.
I add a certain number of funds each time i run the program by entering how
much i want to add. How would i store the funds variable to k
15 matches
Mail list logo