D. Hartley gmail.com> writes:
> So the .dump command is, in effect, saving the file, correct? which
> takes the object you're saving (in my case it would be
> high_scorelist), and ("filename",". what is the "w" ?) Why does
> the temp file you're saving into end in .pik?
Pickling simply conv
Diana Hawksworth optusnet.com.au> writes:
> I have been trying to trap a string entry by raising an exception. The code
follows - but the exception is
> never raised. What am I doing wrong?
I've snipped the code that is irrelevant to this question.
> try:
> self.guess = int(self.num
Hi
I have wrestled with a problem since last weeks knapsack discussion.
This is what i want, but i cant get it into a program.
I have a sorted list (for example):
aList = [10,9,8,7,6,5,4,3,2,1]
I have a max value (for example):
maxValue=11
I have another
Chris Smith wrote:
high = [(1000,"Denise"), (945,"Denise"), (883,"Denise"),
(823,"Grant"), (779,"Aaron"), (702,"Pete"),
(555,"Tom"), (443,"Tom"), (442,"Robin"), (404,"Pete")]
for score, who in high:
col1 = str(score).rjust(10)
col2 = who.rjust(20).replace('
Andrei wrote:
Pickling is also very useful when combined with the bsddb module, because you
get a fast database which functions very much like a dictionary, and in which
you can put anything you like, as long as you pickle it first.
import bsddb
mydb = bsddb.btopen('game.db')
mydb['highscores'] =
Hi everyone
I recently switch to Linux Red Hat AS 3.0 because I have to make a daemon to run in this OS and I'm having a few problems
I've struggle to replace Python 2.2(machine default) to 2.3.4 (tough but could)
Now I want to program a GUI with Tkinter but when I put the sentence from TKin
Klas Marteleur wrote:
Hi
I have wrestled with a problem since last weeks knapsack discussion.
This is what i want, but i cant get it into a program.
I have a sorted list (for example):
aList = [10,9,8,7,6,5,4,3,2,1]
I have a max value (for example):
maxValue
Pickling simply converts an object to a string (unpickling does the
opposite,
convert a string to an object). The dump() function writes the generated
string
directly to a file, but you can use the dumps() function to get the
generated
string as such and do something else with it (e.g. put it in
> Now my question is how do you keep people from just loading
> the high score file with whatever scores they want?
> This is not to disparage a simple (and probably very useful)
> high score file. It is just something that I have been thinking
> about doing myself for quite a while, but I can ne
Hi everyone
Sorry to bother you again but I don't know where else to go
I recently switch to Linux Red Hat AS 3.0 because I have to make a daemon to run in this OS and I'm having a few problems
I've struggle to replace Python 2.2(machine default) to 2.3.4 (tough but could)
Now I want to p
I have written a script that is available at:
https://sourceforge.net/projects/rtf2xml/
This script has gotten about 1600 downloads and I have not got many
bug complaints. However, recently I got the bug complaint listed
below.
This bug--if it is one--seems to be related to the person't version
I think he may need to install python-devel.
> I have written a script that is available at:
>
> https://sourceforge.net/projects/rtf2xml/
>
> This script has gotten about 1600 downloads and I have not got many
> bug complaints. However, recently I got the bug complaint listed
> below.
>
> This bu
On Sat, Apr 16, 2005 at 12:58:33PM -0400, Paul Tremblay wrote:
> I have written a script that is available at:
>
> https://sourceforge.net/projects/rtf2xml/
>
> This script has gotten about 1600 downloads and I have not got many
> bug complaints. However, recently I got the bug complaint listed
>
Greetings all,
I hope someone can help me.
I have two modules, both define the same set of classes (with differing
implementations) and a number of utility functions that use those classes.
The utility functions are identical (the differences I need are abstracted
in the classes), so they
Just curious. Googling for 'python "dis module" convert "another
language" ' only got two hits. So maybe no one is trying it? I was
just daydreaming about a native python compiler, and wondered how
feasible it would be.
Alan
___
Tutor maillist - Tutor
Nigel Rowe wrote:
I have two modules, both define the same set of classes (with differing
implementations) and a number of utility functions that use those classes.
The utility functions are identical (the differences I need are abstracted
in the classes), so they are cut'n'pasted into both files.
> From: "Brian van den Broek" <[EMAIL PROTECTED]>
> To: "Diana Hawksworth" <[EMAIL PROTECTED]>
> Cc:
> Sent: Saturday, April 16, 2005 3:14 PM
> Subject: Re: [Tutor] exceptions
> > Diana Hawksworth said unto the world upon 2005-04-15 22:25:
> > > Hello list,
> > >
Alberto Troiano wrote:
Hi everyone
Sorry to bother you again but I don't know where else to go
I recently switch to Linux Red Hat AS 3.0 because I have to make a
daemon to run in this OS and I'm having a few problems
I've struggle to replace Python 2.2(machine default) to 2.3.4 (tough but
c
On Sat, Apr 16, 2005, joe_schmoe wrote:
>Alberto Troiano wrote:
>>Hi everyone
>>
>>Sorry to bother you again but I don't know where else to go
>>
>>I recently switch to Linux Red Hat AS 3.0 because I have to make a
>>daemon to run in this OS and I'm having a few problems
>>
>>I've struggle to r
Kent Johnson wrote:
> Nigel Rowe wrote:
>> I have two modules, both define the same set of classes (with differing
>> implementations) and a number of utility functions that use those
>> classes.
>>
>> The utility functions are identical (the differences I need are
>> abstracted in the classes),
Lee Harr hotmail.com> writes:
> Now my question is how do you keep people from just loading
> the high score file with whatever scores they want?
I'd say this is impossible particularly with Python, because cheaters could
always look in the source and find out whatever you're doing to the scores
Nigel Rowe xoxy.net> writes:
> >> I have two modules, both define the same set of classes (with differing
> >> implementations) and a number of utility functions that use those
> >> classes.
> >> The utility functions are identical (the differences I need are
> >> abstracted in the classes), so t
Hi Denise,
Are you using Pygame?On 4/15/05, D. Hartley <[EMAIL PROTECTED]> wrote:
Another quick question:I can pause and unpause the little game I created, and I have agraphic to display over top of the game screen when it is paused,which tells the user which key to press to unpause, right? It's
Just curious. Googling for 'python "dis module" convert "another
language" ' only got two hits. So maybe no one is trying it? I was
just daydreaming about a native python compiler, and wondered how
feasible it would be.
Well, from the way I understand the google search works, you would have to
hit
>> Just curious. Googling for 'python "dis module" convert "another
>> language" ' only got two hits. So maybe no one is trying it? I was
>> just daydreaming about a native python compiler, and wondered how
>> feasible it would be.
> I hope that your true google search string doesn't contain the t
25 matches
Mail list logo