Re: [Tutor] python interpreter vs bat file

2009-07-19 Thread bob gailer
Dinesh B Vadhia wrote: 1. Run Python Programs with Batch file Python programs run from a Windows XP batch file (test.bat) in a CMD window initiated from Windows Explorer. All programs except one execute successfully which stops with a memory error but batch file continues to execute other Py

Re: [Tutor] python interpreter vs bat file

2009-07-19 Thread Dinesh B Vadhia
1. Run Python Programs with Batch file Python programs run from a Windows XP batch file (test.bat) in a CMD window initiated from Windows Explorer. All programs except one execute successfully which stops with a memory error but batch file continues to execute other Python programs (as it shou

[Tutor] UnicodeEncodeError

2009-07-19 Thread gpo
I'm doing a simple excercise in reading a file, and printing each line. However, I'm getting this error. The file is a windows txt file, ecoded in ANSI(ascii). I don't understand why Pythin is displaying a Unicode error. Here is my script: f=open('I:\\PythonScripts\\statement.txt') for line

Re: [Tutor] UnicodeEncodeError

2009-07-19 Thread Mark Tolonen
"gpo" wrote in message news:24554280.p...@talk.nabble.com... I'm doing a simple excercise in reading a file, and printing each line. However, I'm getting this error. The file is a windows txt file, ecoded in ANSI(ascii). I don't understand why Pythin is displaying a Unicode error. Here i

Re: [Tutor] python interpreter vs bat file

2009-07-19 Thread Dave Kuhlman
On Sun, Jul 19, 2009 at 05:40:41AM -0700, Dinesh B Vadhia wrote: > >1. Run Python Programs with Batch file > >Python programs run from a Windows XP batch file (test.bat) in a CMD >window initiated from Windows Explorer. All programs except one >execute successfully which stops w

[Tutor] hitting a wall (not a collision detection question :P)

2009-07-19 Thread Michael
I have virtually no background in programming. I'm currently teaching myself python using the following books: Beginning Python - From Novice to Professional by Magnus Lie Hetland Beginning Python by Peter Norton et. al. Making Use of Python by Rashi Gupta Learning Python  by Mark Lutz as well a

Re: [Tutor] python interpreter vs bat file

2009-07-19 Thread Dinesh B Vadhia
Hi Dave Sorry, I wasn't being obtuse. Here is more info: 1. Run Python Programs with Batch file - OS (correction): Windows 64-bit Vista SP2 - Python 2.5.4 64 bit (AMD64) - The Python programs run from a Windows batch file (test.bat) in a CMD window initiated from Windows Explorer. All program

Re: [Tutor] hitting a wall (not a collision detection question :P)

2009-07-19 Thread David
Michael wrote: I have virtually no background in programming.. I'm currently teaching myself python using the following books: Beginning Python - From Novice to Professional by Magnus Lie Hetland Beginning Python by Peter Norton et. al. Making Use of Python by Rashi Gupta Learning Python by Ma

Re: [Tutor] hitting a wall (not a collision detection question :P)

2009-07-19 Thread Luke Paireepinart
> Ultimately, my goal is to delve into pygame and make some games and maybe > some multimedia applications. I'd like my first project to be an old-school > style RPG (e.g. Final Fantasy), as something with such simple graphics and > interface would be a good benchmark of where I want to go from the

Re: [Tutor] python interpreter vs bat file

2009-07-19 Thread Alan Gauld
"Dinesh B Vadhia" wrote Bob Gailer suggested running the Python programs individually in CMD one after the other. This is sensible but my test programs run for days and the full suite of programs take longer. OK, But it can't take longer than in IDLE? Or even in the bat file. So you can

Re: [Tutor] hitting a wall (not a collision detection question :P)

2009-07-19 Thread Alan Gauld
"Michael" wrote ...everything up to functions vs. methods and the basics of classes and OOP. This is where I'm hitting a wall. It's at this point the all the books go off in different directions OK, First thing is don;t worry about it, you are far from alone. Many, Many programmers (even long

Re: [Tutor] UnicodeEncodeError

2009-07-19 Thread Alan Gauld
"Mark Tolonen" wrote ... I see you are using Python 3.1. ... You can also use a shell that supports the full Unicode character set such as Idle or PythonWin instead of the console. As a matter of interest - and somewhat off topic - does anyone know if there is a Python 3 (3.0 or 3.1) versi

[Tutor] Using insert method on a list matrix

2009-07-19 Thread Raj Medhekar
I would like to know how I could use the insert method in a List matrix eg. for the matrix below M=[[1,2,3], [3,2,1], [4,3,2]] if wanted to insert the string 'pod' in list [0] before [1] in list [0] in M using the built in method insert How would I go about doing this? I've tried may List Comp

Re: [Tutor] Using insert method on a list matrix

2009-07-19 Thread Ken Oliver
try  M[0].insert(0, 'pod')-Original Message- From: Raj Medhekar Sent: Jul 19, 2009 7:12 PM To: Python Tutor Subject: [Tutor] Using insert method on a list matrix I would like to know how I could use the insert method in a List matrix eg. for the matrix belowM=[[1,2,3], [3,2,1], [4,3,2]]i

Re: [Tutor] UnicodeEncodeError

2009-07-19 Thread Mark Tolonen
"Alan Gauld" wrote in message news:h407ah$lc...@ger.gmane.org... "Mark Tolonen" wrote ... I see you are using Python 3.1. ... You can also use a shell that supports the full Unicode character set such as Idle or PythonWin instead of the console. As a matter of interest - and somewhat o

Re: [Tutor] hitting a wall (not a collision detection question :P)

2009-07-19 Thread Che M
So, I'm just wondering what I should be doing at this point. Sorry for the vague question, but I'm pretty lost right now and this is about as specific as I can be. Thanks in advance for any help. Michae I started from scratch a 3 years ago and my advice would be: - Accept confusion. Marinate

Re: [Tutor] reading complex data types from text file

2009-07-19 Thread Chris Castillo
okay so I figured my program out. I am posting the final version so if someone else is having problems with something like this it may benefit the community. (comments are included to help those who might not understand the code) -