Re: [Tutor] my text adventure

2005-12-03 Thread Dan Lowe
On Dec 3, 2005, at 9:40 PM, david wrote: sorry i forgot a subject line. i have looked at the pickle module and was able to pickle world. but i can't figure how to restore everything.import pickledef save_game(state, filename):    file = open(filename, 'w')    pickle.dump(state, file)    file.cl

Re: [Tutor] my text adventure

2005-12-03 Thread david
sorry i forgot a subject line. i have looked at the pickle module and was able to pickle world. but i can't figure how to restore everything. - Original Message - From: david To: tutor@python.org Sent: Saturday, December 03, 2005 8:36 PM Subject: [Tutor] (no subje

[Tutor] (no subject)

2005-12-03 Thread david
hello again. i think my dig function is working correctly now. any input on how to save and restore all the rooms and descriptions? thanks for helping.   import sysimport string   world = {}   class Room:    def __init__(self,coords):    self.contents = []    self.description = ''  

Re: [Tutor] Printing regular expression match

2005-12-03 Thread Srinivas Iyyer
Hi Danny, thanks for your email. In the example I've shown, there are no odd elements except for character case. In the real case I have a list of 100 gene names for Humans. The human gene names are conventioanlly represented in higher cases (eg.DDX3X). However, NCBI's gene_info dataset the

Re: [Tutor] Command line arguments passing

2005-12-03 Thread Danny Yoo
> > My question is: when invoking a program with, let's say, a filename > > containing spaces as a parameter: > > > > myprog -file "Long name" > > > > What does sys.argv hold in this case? I am specifically interested in > > whether argv[2]=="\"Long" or argv[2]=="Long name", Hi Vlad, What you'

Re: [Tutor] Printing regular expression match

2005-12-03 Thread Danny Yoo
On Sat, 3 Dec 2005, Srinivas Iyyer wrote: > >>> a > ['apple', 'boy', 'boy', 'apple'] > > >>> b > ['Apple', 'BOY', 'APPLE-231'] > > >>> for i in a: > pat = re.compile(i,re.IGNORECASE) > for m in b: > if pat.match(m): > print m Hi Srinivas, We may

Re: [Tutor] Command line arguments passing

2005-12-03 Thread Christopher Arndt
Vlad Popescu schrieb: > Hi there, everyone; first time poster! Sorry if this isn't very closely > related to Python, but I have encountered the issue while trying to > learn Python, so I guess I can just ask here. > > My question is: when invoking a program with, let's say, a filename > containing

[Tutor] Command line arguments passing

2005-12-03 Thread Vlad Popescu
Hi there, everyone; first time poster! Sorry if this isn't very closely related to Python, but I have encountered the issue while trying to learn Python, so I guess I can just ask here. My question is: when invoking a program with, let's say, a filename containing spaces as a parameter: myprog -f

[Tutor] Printing regular expression match

2005-12-03 Thread Srinivas Iyyer
Dear group, I have two lists: >>> a ['apple', 'boy', 'boy', 'apple'] >>> b ['Apple', 'BOY', 'APPLE-231'] >>> for i in a: pat = re.compile(i,re.IGNORECASE) for m in b: if pat.match(m): print m Apple APPLE-231 BOY

Re: [Tutor] tkFileDialog bug on windows

2005-12-03 Thread Michael Lange
On Fri, 2 Dec 2005 16:58:26 -0800 Fred Lionetti <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I may have found a strange bug with tkFileDialog, and I'm wondering if > anyone has a workaround for the problem. It happens when you have a > button (or any other clickable widget) directly behind the

Re: [Tutor] Is it a good idea to use TKInter to change my password program into a GUI?

2005-12-03 Thread Michael Lange
On Fri, 2 Dec 2005 15:20:43 -0700 "Nathan Pinno" <[EMAIL PROTECTED]> wrote: > I like the Toolkit, is there anywhere where there is a how to use it? > A good place to look for Tkinter resources is the wiki: There is a number of links to Tkinter documentatio

Re: [Tutor] Request For Suggestions

2005-12-03 Thread Ismael Garrido
Basem Narmok wrote: >Hi all, > >I am planning to make a Python CD for advocating Python, and I need your >suggestions about this, the objective is to build a CD that contains the >basic material for Python beginner (e.g. Python 2.4.2 for different >platforms) with some advocating material (e.g.