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 should).
2. Run Python Programs with Python Interpreter Fire up Python Interpreter, open .py program, Run. When the program with the memory error in 1. is run independently as in 2. it works. Dinesh -------------------------------------------------------------------------------- Message: 4 Date: Sun, 19 Jul 2009 07:18:08 +0100 From: "Alan Gauld" <alan.ga...@btinternet.com> To: tutor@python.org Subject: Re: [Tutor] python interpreter vs bat file Message-ID: <h3udr2$f8...@ger.gmane.org> Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original "Dinesh B Vadhia" <dineshbvad...@hotmail.com> wrote > Not much more information available. > Have a batch file (eg. 'test.bat') with entries: > > python "program a.py" > python "program b.py" > python "program c.py" > > One of the programs (eg. 'program c.py') fails with a > memory error when performing a pickle.dump: > > Traceback (most recent call last): > ... > File "....py", line 176, in pickleObject > pickle.dump(self, f, 2) > MemoryError > > When the programs are run in the same order from the > Python interpreter there are no memory errors. Can you elaborate on how you run the programs. It looks like an environmental issue so we need to know exactly what you are doing. How do you run the bat file? How do you run the programs "from the Python interpreter" Are you using Windows Explorer or a CMD wondow? or the Start->Run dialog etc? Which folders are you starting from in each case? > This has happened before and it seems odd behavior. So how did you fix it before? I've never seen or heard of this before. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor