[Tutor] 2.5 to 2.4 problem with Int

2007-09-12 Thread John
I've written a program which calculates areas of grid cells distributed over the globe. It works fine with Python 2.5, however, when I run it with 2.4(the Enthon edition) I get the following error: OverflowError: long int too large to convert to int It occurs on this line: for ix in range(nx):

[Tutor] printing value returning from a Class

2007-09-12 Thread Varsha Purohit
Hello friends,, I have a problem in displaying data which i have invoked from class. City is the name of the class which i havent displayed here. There is another script using that class. It has a function name setCities which takes a text file as argument. Text file contains name of the

Re: [Tutor] editTextFile.py

2007-09-12 Thread Luke Paireepinart
Christopher Spears wrote: > I created a script that opens an existing text file, > allows the user to write over the original contents, > and then save the file. The original contents are > then saved in a separate file. Here is the script: > > #!/usr/bin/python > > 'editTextFile.py -- write over

Re: [Tutor] Classes: global name not defined

2007-09-12 Thread Alan Gauld
"Ara Kooser" <[EMAIL PROTECTED]> wrote > File "/Users/ara/Documents/yeast/oop_yeast_nocaps.py", line 87, in > >first_instance.print_world() > File "/Users/ara/Documents/yeast/oop_yeast_nocaps.py", line 40, in > print_world >m, n = world['dimensions'] > NameError: global name 'world'

[Tutor] editTextFile.py

2007-09-12 Thread Christopher Spears
I created a script that opens an existing text file, allows the user to write over the original contents, and then save the file. The original contents are then saved in a separate file. Here is the script: #!/usr/bin/python 'editTextFile.py -- write over contents of existing text file' import

[Tutor] Classes: global name not defined

2007-09-12 Thread Ara Kooser
So taking the advice given my John, Kent, and Michael I reworked the program and created a class for world. I was able to solve the first several errors that came up as a I moved functions into class methods but this one stumps me. The error I am getting is: Traceback (most recent call last):

Re: [Tutor] Image Analysis

2007-09-12 Thread Bill Campbell
On Wed, Sep 12, 2007, Kent Johnson wrote: >Bill Campbell wrote: >> Most mailing lists limit the size >> of messages to 40k or less. > >On this list large messages go to moderation. I think I was so >captivated with the images that I forgot about the size. A better way to >present this would be to

Re: [Tutor] Would an emulator be possible in Python?

2007-09-12 Thread Alan Gauld
"Andy" <[EMAIL PROTECTED]> wrote > prove me wrong. I have decided that I would like to try and write > an > emulator, I'm going to start out with a couple of simpler systems > like > the Chip 8 and maybe a well documented arcade game but I would like > to > do an NES emulator eventually. That'

Re: [Tutor] Tutor Digest, Vol 43, Issue 36

2007-09-12 Thread Alan Gauld
"chinni" <[EMAIL PROTECTED]> wrote > But u all told that cronjob and at inbuilt features of UNIX but > every time > ihave to manually go and change the version.i can't The first question to answer is why not? If you can't do it manually you probably can't get a script to do it either! Assuming i

Re: [Tutor] interpreted or compiled?

2007-09-12 Thread Alan Gauld
"Michael" <[EMAIL PROTECTED]> wrote > As a new Python user I was curious if you can run Python without the > environment, ie make it an executable? There are two separate issues here. First: Can you make executable Python scripts? Yes, see Sam's response re py2exe etc Second: Can you run Pytho

Re: [Tutor] Image Analysis

2007-09-12 Thread Alan Gauld
"wormwood_3" <[EMAIL PROTECTED]> wrote > Could not find it. The searchable interface at ActiveState's site > does not have it, > and I don't know of any way to search the zipped archives... I use the gmane news inteface, I dunno about Eike, but its possible the problem lies in gmane's interfac

Re: [Tutor] Making a python script to feed files into anotherpythonscript

2007-09-12 Thread Alan Gauld
"Ashley Booth" <[EMAIL PROTECTED]> wrote > John- I was not sure what you meant by "command line". I took what > you > said quite literally and created this: > > indir = raw_input('input directory path ') # asks for input > directory > script1 = raw_input('python script path ') # asks for path t

Re: [Tutor] Would an emulator be possible in Python?

2007-09-12 Thread Kent Johnson
Andy wrote: > Ok, I'm pretty sure the answer is no but I'm hoping that someone will > prove me wrong. I have decided that I would like to try and write an > emulator, I'm going to start out with a couple of simpler systems like > the Chip 8 and maybe a well documented arcade game but I would like

[Tutor] Would an emulator be possible in Python?

2007-09-12 Thread Andy
Ok, I'm pretty sure the answer is no but I'm hoping that someone will prove me wrong. I have decided that I would like to try and write an emulator, I'm going to start out with a couple of simpler systems like the Chip 8 and maybe a well documented arcade game but I would like to do an NES emulato

[Tutor] Making a python script to feed files into another pythonscript

2007-09-12 Thread Ashley Booth
Unfortunately I was confused by both responses I received. I have only been working with Python for a week, so everything is new. Thanks for your patience. John- I was not sure what you meant by "command line". I took what you said quite literally and created this: indir = raw_input('input direct

Re: [Tutor] Tutor Digest, Vol 43, Issue 36

2007-09-12 Thread Tom Tucker
Comments below. On 9/12/07, chinni <[EMAIL PROTECTED]> wrote: > > Hi, > Thanx for Responding for the Query. > The actual Output what i want is my python script has to change the > version number(degrade) in plist file.and automatically change the time to > 25 hrs more from present time cause my pr

Re: [Tutor] Image Analysis

2007-09-12 Thread Eike Welk
On Wednesday 12 September 2007 05:09, Dave Kuhlman wrote: > Please do not stuff 1 MB emails in my mailbox. Either (1) post the > images on the Web and provide a link or (2) ask before emailing > large attachments. Sorry! I guess I'm spoiled by my ADSL connection. I did not know that the limit is

Re: [Tutor] Image Analysis

2007-09-12 Thread Eike Welk
On Wednesday 12 September 2007 15:43, wormwood_3 wrote: > Eike, if you would be able to send me your post, even just to my > address and not the tutor list, I would greatly appreciate it! > Seems it had some neat things in it. I've sent it to your e-mail address ([EMAIL PROTECTED]). __

Re: [Tutor] Tutor Digest, Vol 43, Issue 36

2007-09-12 Thread chinni
Hi, Thanx for Responding for the Query. The actual Output what i want is my python script has to change the version number(degrade) in plist file.and automatically change the time to 25 hrs more from present time cause my product will check for updates for every 25hrs. But u all told that cronjob a

Re: [Tutor] interpreted or compiled?

2007-09-12 Thread Michael
wormwood_3 wrote: > Michael, > > The most common method I know of to do this is py2exe: http://www.py2exe.org/ > This lets you turn scripts into executable Windows programs. > > A different, and perhaps better, method is PyInstaller: > http://pyinstaller.python-hosting.com/ This creates executa

Re: [Tutor] interpreted or compiled?

2007-09-12 Thread wormwood_3
Michael, The most common method I know of to do this is py2exe: http://www.py2exe.org/ This lets you turn scripts into executable Windows programs. A different, and perhaps better, method is PyInstaller: http://pyinstaller.python-hosting.com/ This creates executables for Windows and Linux.

Re: [Tutor] Image Analysis

2007-09-12 Thread Kent Johnson
wormwood_3 wrote: > Could not find it. The searchable interface at ActiveState's site does not > have it, and I don't know of any way to search the zipped archives... There is a plaintext archive at http://mail.python.org/pipermail/tutor/ Here is the post you want though without the attachments:

[Tutor] interpreted or compiled?

2007-09-12 Thread Michael
Hi As a new Python user I was curious if you can run Python without the environment, ie make it an executable? Thanks Michael ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Image Analysis

2007-09-12 Thread wormwood_3
Could not find it. The searchable interface at ActiveState's site does not have it, and I don't know of any way to search the zipped archives... Eike, if you would be able to send me your post, even just to my address and not the tutor list, I would greatly appreciate it! Seems it had some neat

Re: [Tutor] calling class instances in functions

2007-09-12 Thread Michael Langford
I too am a little confused what exactly you're going for, but here is a shot at the two things I think you could be asking for: If you're trying to create a world where you have it populated with several different types of cells at different coordinates, and you'd like to make it so the user can s

Re: [Tutor] Image Analysis

2007-09-12 Thread wormwood_3
Very strange. This is the second time that I know of in the last month that I have not received some emails from the list. I did not get the message Eike Welk sent out. Checking archives... - Original Message From: Dave Kuhlman <[EMAIL PROTECTED]> To: tutor@python.org Sent: Tuesday, Se

Re: [Tutor] Unicode question

2007-09-12 Thread János Juhász
Dear Kent, thanks for your respond. It is clear now. > As a mnemonic I think of Unicode as pure unencoded data. (This is *not* > accurate, it is a memory aid!) Then it's easy to remember that decode() > removes encoding == convert to Unicode, encode() adds encoding == > convert from Unicode. So

Re: [Tutor] calling class instances in functions

2007-09-12 Thread Kent Johnson
Ara Kooser wrote: Your question is not very clear but I made some guesses below. > zz = raw_iput("What kind of yeast cell do you want to add? > Options:GoodYeast") > #Here I want to call this instace of GoodYeast from yeast_cell.py So you want the user to input the name of a class

Re: [Tutor] Image Analysis

2007-09-12 Thread Kent Johnson
Bill Campbell wrote: > Most mailing lists limit the size > of messages to 40k or less. On this list large messages go to moderation. I think I was so captivated with the images that I forgot about the size. A better way to present this would be to put the images on a web site and reference them

Re: [Tutor] calling class instances in functions

2007-09-12 Thread Alan Gauld
"Ara Kooser" <[EMAIL PROTECTED]> wrote > In the main program at the function def add_yeast(world): I want to > instance the class GoodYeast and have the global variable @ change > to > G on the world. I tried just creating an instance but that did not > go > over so well. "did no go over so we