[Tutor] [tutor] Scrollbars around the image

2008-01-31 Thread Varsha Purohit
Hi All, I have made a simple panel where i am loading an image from the folder. I have a button named zoomin. When i press this button a pair of horizontal and vertical scrollbars should appear on the image panel nearby image. so that we can see the zoomed image properly. I am trying to use wx.

Re: [Tutor] creating a nested dictionary

2008-01-31 Thread Kent Johnson
Ricardo Aráoz wrote: > These solutions sometimes may have unexpected behavior. > class recursivedefaultdict(defaultdict): > def __init__(self): > self.default_factory = type(self) > d = recursivedefaultdict() > d['pepe']['jose']['juan'] = 25 > d['pepe']['jose'] = 25 Presumably you mea

Re: [Tutor] creating a nested dictionary

2008-01-31 Thread Ricardo Aráoz
Kent Johnson wrote: > Remco Gerlich wrote: >> I can't think of a really good generalization, one that will work for >> all depths. That's the sort of thing you use Lisp, combinators and lots >> of coffee for. Perhaps later today. > > Some nice solutions here: > http://groups.google.com/group/com

Re: [Tutor] How to compare the first line from multiple files

2008-01-31 Thread bob gailer
Michael Langford wrote: > You should checkout os.listdir() > > http://docs.python.org/lib/os-file-dir.html > Which will give you a list of the filenames. Then (pseudo-code): open the first file, read its first line and save that in a variable loop thru the rest of the filenames open eac

[Tutor] How to compare the first line from multiple files

2008-01-31 Thread Sorghum Crow
How to compare the first line from multiple files Greetings, I'm new on the forum and relatively new to Python. I have been tasked at work with checking some files for consistency. What I need to do is verify that the first lines of a group of text files are identical. The files are all in th

Re: [Tutor] How to compare the first line from multiple files

2008-01-31 Thread Shawn Milochik
-Original Message- From: Sorghum Crow <[EMAIL PROTECTED]> To: tutor@python.org Subject: [Tutor] How to compare the first line from multiple files Date: Thu, 31 Jan 2008 14:19:55 -0500 How to compare the first line from multiple files Greetings, I'm new on the forum and relatively new t

Re: [Tutor] How to compare the first line from multiple files

2008-01-31 Thread Michael Langford
You should checkout os.listdir() http://docs.python.org/lib/os-file-dir.html On Jan 31, 2008 2:19 PM, Sorghum Crow <[EMAIL PROTECTED]> wrote: > How to compare the first line from multiple files > > Greetings, > > I'm new on the forum and relatively new to Python. I have been tasked > at work wit

Re: [Tutor] Please comment on

2008-01-31 Thread Eric Brunson
I think the page is a little busy, but relatively clean overall. I don't like the popup that makes me interact with the page when I load it. Is that what you were looking for or would you like to be a little more specific? pee one wrote: > Please comment on > http://aspn.activestate.com/ASPN

[Tutor] Please comment on

2008-01-31 Thread pee one
Please comment on http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/543267 Thank you. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to use freeze for making executable python file in linux

2008-01-31 Thread Alan Gauld
"brindly sujith" <[EMAIL PROTECTED]> wrote > if yes...plz tell me how to use freeze > > whether i need to install something or its default in python Googling 'python freeze' for tutorials etc Its not a library module but a utility that usually comes with Python on supported platforms. Try se

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread Alan Gauld
"bhaaluu" <[EMAIL PROTECTED]> wrote > Try it. I'll even send the code that is working in GWBASIC > to you if you think you can get it working in QBasic. Please do, I've not found anything from GWBASIC that didn't work in QBASIC - in fact I use a GWBASIC reference book when writing QBASIC. >

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread bhaaluu
On Jan 31, 2008 3:19 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "bhaaluu" <[EMAIL PROTECTED]> wrote > > > how to program a TAG in Python. My goal is to code > > the game in POOP > > POOP Python Object Oriented Programming 8^D > > > I fixed enough typos in two of the games in the book > > to

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread Alan Gauld
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote >> POOP >> > Python Object-Oriented Programming. Aah! Obvious really. Except - in what way is POOP different to any other kind of OOP? Nobody talks abot JOOP or COOP or SOOP or LOOP or BOOP or... you could go on for hours! Although JOOP used to b

Re: [Tutor] how to use freeze for making executable python file in linux

2008-01-31 Thread Alan Gauld
"brindly sujith" <[EMAIL PROTECTED]> wrote > can i use freeze to make my python program > into executable in linux Since you have picked up on Freeze I'll assume Luke was right and that you don't really want to make your program executable but that you want to create a self contained file that

Re: [Tutor] appending to a list

2008-01-31 Thread Alan Gauld
"David Bear" <[EMAIL PROTECTED]> wrote >I want to return a tuple from a function. I want to append the second > element of that tupple to a list. For example > > mylist = [] > def somefunc(): > return(3.14, 'some string') > > somenum, mylist.append(??) somefunc() > > obviously, the syntax doesn'

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread Alan Gauld
"bhaaluu" <[EMAIL PROTECTED]> wrote > others are mentioned. Hartnell talks about the > pre-computer gamers who recreated historical battles, > who later went on and developed Dungeon & Dragons > type games and RPGs (another genre of gaming that > I know nothing about). Later, those games were >

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread Luke Paireepinart
Alan Gauld wrote: > "bhaaluu" <[EMAIL PROTECTED]> wrote > > >> how to program a TAG in Python. My goal is to code >> the game in POOP >> > > POOP > Python Object-Oriented Programming. You really should try to be less funny. I totally didn't read your e-mail seriously cause I was l

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread Alan Gauld
"bhaaluu" <[EMAIL PROTECTED]> wrote > how to program a TAG in Python. My goal is to code > the game in POOP POOP > I fixed enough typos in two of the games in the book > to get them running in a GWBASIC interpreter on an > old 286 DOS computer. Why not run it on a modern computer under QB