Re: [Tutor] python interpreter vs bat file

2009-07-18 Thread Alan Gauld
"Dinesh B Vadhia" 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 (mos

Re: [Tutor] python interpreter vs bat file

2009-07-18 Thread Dinesh B Vadhia
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" python "program e.py" ... One of the programs (eg. 'program c.py') fails with a memory error when performing a pickle.dump: Traceback (most r

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

2009-07-18 Thread Chris Castillo
so could I also replace the score of each bowler (key value) in the dictionary with a new key such as "below average" or "above average" according to each if-elif-else structure and then write to a text file in the following format? Jim Above Average SueBelow Average BobPerfect score

Re: [Tutor] python interpreter vs bat file

2009-07-18 Thread Jeff Johnson
Need more information. Python works on Windows as good as anything else. Maybe even better. Dinesh B Vadhia wrote: During recent program testing, I ran a few Python programs from a Windows XP batch file which causes a memory error for one of the programs. If I run the same set of programs f

Re: [Tutor] python interpreter vs bat file

2009-07-18 Thread Alan Gauld
"Dinesh B Vadhia" wrote During recent program testing, I ran a few Python programs from a Windows XP batch file which causes a memory error for one of the programs. If I run the same set of programs from the Python interpreter no memory error occurs. Any idea why this might be? I'm not sure

[Tutor] python interpreter vs bat file

2009-07-18 Thread Dinesh B Vadhia
During recent program testing, I ran a few Python programs from a Windows XP batch file which causes a memory error for one of the programs. If I run the same set of programs from the Python interpreter no memory error occurs. Any idea why this might be? Dinesh ___

Re: [Tutor] Very wierd namespace problem

2009-07-18 Thread Tycho Andersen
On Fri, Jul 17, 2009 at 12:02 PM, Kent Johnson wrote: > Names beginning with __ are 'mangled' to make them sort of secret. > This is a feature: > http://docs.python.org/reference/expressions.html#index-889 Just to add a bit, this interpreter session may be enlightening: >>> class a: ... def _

Re: [Tutor] Help with % conversion to output colour

2009-07-18 Thread bob gailer
Cassandra Peachey wrote: Hi, I'm working on an assignment that requires the user RGB requested output to create a colour block in fractional steps. I'm pretty much down to the last bit, however, I've hit a road block in that my percentages are not showing as a colour block but as the ta

Re: [Tutor] weather scraping with Beautiful Soup

2009-07-18 Thread Michiel Overtoom
Sander Sweers wrote: 2009/7/18 Che M : table = soup.find("table","dataTable tm10") #find the table tbody = table.find("tbody") #find the table's body You can do this in one step. tbody = soup.find('tbody') Yeah, but what if the document contains multiple tables, and you w

[Tutor] Help with % conversion to output colour

2009-07-18 Thread Cassandra Peachey
Hi, I'm working on an assignment that requires the user RGB requested output to create a colour block in fractional steps.  I'm pretty much down to the last bit, however, I've hit a road block in that my percentages are not showing as a colour block but as the tag percentages. Any su

Re: [Tutor] weather scraping with Beautiful Soup

2009-07-18 Thread Sander Sweers
2009/7/18 Che M : > table = soup.find("table","dataTable tm10")  #find the table > tbody = table.find("tbody")  #find the table's body You can do this in one step. tbody = soup.find('tbody') Greets Sander ___ Tutor maillist - Tutor@py

Re: [Tutor] how to join two different files

2009-07-18 Thread wesley chun
on a related note, there is a module called fileinput that doesn't do what you (the OP) need for this particular problem, but it is one to keep in mind for the future as there may be a situation for which it is the right tool. it doesn't get a lot of buzz but can come in handy -- for me, it was in

Re: [Tutor] how to join two different files

2009-07-18 Thread wesley chun
>> Thankyou sir it is working.but one more thing i want to ask that if my >> file will have entries like:--- >> >> fileA and fileB >> 12         10 >> 13         12 >> 14 >> 15 >> >> means if their no. of entries will not match then how to combine them(both >> input files have more than one col

Re: [Tutor] how to join two different files

2009-07-18 Thread Rich Lovely
2009/7/18 : > Thankyou sir it is working.but one more thing i want to ask that if my > file will have entries like:--- > > fileA and fileB > 12         10 > 13         12 > 14 > 15 > > means if their no. of entries will not match then how to combine them(both > input files have more than one c