[Tutor] Problem with complex strings as key for a shelve-Dictionary

2009-09-06 Thread markus kossner
Dear all, I have a Problem with complex strings as keys in a shelve Object: #!/usr/bin/python import shelve test=shelve.open('testshelve') test={ 'CCN1c2c2/C(=C2/S/C(=N\c3ccc(Cl)cc3)N(C)C2=O)C1=O':int(0), 'CN1/C(=N\c2ccc(Cl)cc2)S/C(=C2\C(=O)Nc3c32)C1=O':int(20),

Re: [Tutor] mapping/filtering a sequence

2009-09-06 Thread kevin parks
I actually find the map biz easier to get my head around than the list comp. I guess this makes it another good reason for me to be happy that map is apparently staying in after nearly being depreciated. I generally prefer list comp in every instance, but the idea of an if else construct

Re: [Tutor] how to read and transmit/send only section of the image (sub-image)

2009-09-06 Thread Kent Johnson
On Sat, Sep 5, 2009 at 10:52 AM, Jojo Mwebaze jojo.mweb...@gmail.com wrote: oooh that will be helpful,  kindly point me to how i can begin with getting a sub-image that has the same width as the original. That will be my starting point. I don't know the details of FITS format, but I imagine it

[Tutor] Simple Game

2009-09-06 Thread Corey Richardson
So far, I can use tuples/lists/dictionary's, and define some functions, and a bit of other things. Would it be hard for me to make a simple text rpg game? Or is there something else I should know before I try that. ___ Tutor maillist -

[Tutor] Pack/Unpack hacking

2009-09-06 Thread Tino Dai
Hi All, Hope the people in the US are having a nice Labor Day! I am looking for the source code for the pack/unpack functions found in the struct package. As of this email, I have tried a strings on the struct.pyc file. The inspection of the pyc file was hoping that I could find a stub to the

Re: [Tutor] Pack/Unpack hacking

2009-09-06 Thread Lucas Prado Melo
On Sun, Sep 6, 2009 at 3:20 PM, Tino Dai obe...@gmail.com wrote: Hi All, Hope the people in the US are having a nice Labor Day! I am looking for the source code for the pack/unpack functions found in the struct package. As of this email, I have tried a strings on the struct.pyc file.

[Tutor] A basic question

2009-09-06 Thread sharon
I have been trying how to get a any python program to run by clicking on the icon. I keep reading on the internet make it executable: chmod a+x try_python.py Where do I actually put the above expression so that it will work everytime. If I then sent this try_python.py to someone else with

Re: [Tutor] Pack/Unpack hacking

2009-09-06 Thread Tim Golden
Hope the people in the US are having a nice Labor Day! I am looking for the source code for the pack/unpack functions found in the struct package. As of this email, I have tried a strings on the struct.pyc file. The inspection of the pyc file was hoping that I could find a stub to the source.

Re: [Tutor] Pack/Unpack hacking

2009-09-06 Thread Kent Johnson
On Sun, Sep 6, 2009 at 2:20 PM, Tino Dai obe...@gmail.com wrote: Hi All,     Hope the people in the US are having a nice Labor Day! I am looking for the source code for the pack/unpack functions found in the struct package. As of this email, I have tried a strings on the struct.pyc file.

Re: [Tutor] A basic question

2009-09-06 Thread Lucas Prado Melo
On Thu, Aug 6, 2009 at 4:20 PM, sharon dilly...@gmail.com wrote: I have been trying how to get a any python program to run by clicking on the icon. I keep reading on the internet make it executable: chmod a+x try_python.py Did you write: #!/usr/bin/env python at the first line of the file

Re: [Tutor] A basic question

2009-09-06 Thread Alan Gauld
sharon dilly...@gmail.com wrote I have been trying how to get a any python program to run by clicking on the icon. I keep reading on the internet make it executable: chmod a+x try_python.py You do this in a console window, at a bash prompt. You also need to add the shebang line at the

Re: [Tutor] Simple Game

2009-09-06 Thread Alan Gauld
Corey Richardson kb1...@aim.com wrote So far, I can use tuples/lists/dictionary's, and define some functions, and a bit of other things. Would it be hard for me to make a simple text rpg game? Or is there something else I should know before I try that. No idea about rpg because I've never

Re: [Tutor] Help deciding between python and ruby

2009-09-06 Thread Luke Paireepinart
On Sun, Sep 6, 2009 at 10:21 AM, kevin parks k...@mac.com wrote: Well, the only thing more annoying than off topic discussion is meta discussion on lists and folks passing judgement on other people's posts (ie. you should have x, your should not have Y... I shouldn't have this second

Re: [Tutor] how to read and transmit/send only section of the image (sub-image)

2009-09-06 Thread Jojo Mwebaze
thanks a lot . cheers Johnson On Sun, Sep 6, 2009 at 4:23 PM, Kent Johnson ken...@tds.net wrote: On Sat, Sep 5, 2009 at 10:52 AM, Jojo Mwebaze jojo.mweb...@gmail.com wrote: oooh that will be helpful, kindly point me to how i can begin with getting a sub-image that has the same width

Re: [Tutor] Tutor Digest, Vol 67, Issue 22

2009-09-06 Thread Corey Richardson
Corey Richardson kb1...@aim.com wrote So far, I can use tuples/lists/dictionary's, and define some functions, and a bit of other things. Would it be hard for me to make a simple text rpg game? Or is there something else I should know before I try that. No idea about rpg because

Re: [Tutor] Tutor Digest, Vol 67, Issue 22

2009-09-06 Thread Luke Paireepinart
Ummm, whats a branch? Haha, I know loops, but not branches. A branch changes the program flow based on a condition. Example: x = int(raw_input(Please enter a number!)) if x 10: print Your number was greater than 10! else: print Your number was less than or equal to 10!

Re: [Tutor] Help deciding between python and ruby

2009-09-06 Thread Alan Gauld
Luke Paireepinart rabidpoob...@gmail.com wrote I agree, but I can see how some people don't like it. It's similar to the Java vs. C++ debate I guess, Java is forced OO and C++ is optional. While this is a genuine complaint for Java I have to be fair and say that Ruby does a good job of

Re: [Tutor] Tutor Digest, Vol 67, Issue 22

2009-09-06 Thread Alan Gauld
Corey Richardson kb1...@aim.com wrote then you can program anything since sequences, loops and branches are all that are necessary to program anything! Ummm, whats a branch? Haha, I know loops, but not branches. Branches are if/else statements and case statements and jump or goto