Problems with code

2009-03-30 Thread Zach Goscha
Hi, I am trying to call an unbound method (Map.Background) but getting the following error: TypeError: unbound method background() must be called with Map instance as first argument (got nothing instead) Here is some of the code(not completed) Thanks in Advance - Zach Code: class

Re: Problems with code

2009-03-30 Thread Chris Rebert
2009/3/30 Zach Goscha zta...@gmail.com: Hi, I am trying to call an unbound method (Map.Background) but getting the following error:  TypeError: unbound method background() must be called with Map instance as first argument (got nothing instead) Here is some of the code(not completed)

Re: Problems with code

2009-03-30 Thread Albert Hopkins
On Mon, 2009-03-30 at 11:05 -0500, Zach Goscha wrote: Hi, I am trying to call an unbound method (Map.Background) but getting the following error: TypeError: unbound method background() must be called with Map instance as first argument (got nothing instead) Here is some of the

Re: strange problems with code generation

2006-12-02 Thread [EMAIL PROTECTED]
It is left over from the example I stold it from, I remove it and see if that helps. Dennis Lee Bieber wrote: On 1 Dec 2006 17:24:18 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] declaimed the following in comp.lang.python: data = sys2.stdin.readlines() And what do you expect to

Re: strange problems with code generation

2006-12-02 Thread [EMAIL PROTECTED]
I changed that and the writelines and I am very close now. thanks. Dennis Lee Bieber wrote: On 1 Dec 2006 17:24:18 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] declaimed the following in comp.lang.python: data = sys2.stdin.readlines() And what do you expect to read from stdin? Do

strange problems with code generation

2006-12-01 Thread [EMAIL PROTECTED]
I am writing out zero byte files with this (using python 2.5). I have no idea why I am having that problem, I am also looking for an example of readlines where I can choose a number of lines say lines 12 to 14 and then write them back to disk. any help would be apreaceted. import sys as sys2

Re: strange problems with code generation

2006-12-01 Thread John Machin
[EMAIL PROTECTED] wrote: I am writing out zero byte files with this (using python 2.5). I have no idea why I am having that problem Which output file(s) do you mean, temp.orc or temp.sco or both? Two possible causes outlined below. I am also looking for an example of readlines where I can

Re: strange problems with code generation

2006-12-01 Thread [EMAIL PROTECTED]
John Machin wrote: [EMAIL PROTECTED] wrote: I am writing out zero byte files with this (using python 2.5). I have no idea why I am having that problem Which output file(s) do you mean, temp.orc or temp.sco or both? Two possible causes outlined below. I am also looking for an example

Re: strange problems with code generation

2006-12-01 Thread John Machin
You say I am sure the readlines code is crashing it. I can't imagine how you can be sure of anything, but yes, it is a possibility that sys.stdin.readlines() might behave strangely when called from a GUI kit. Why from sys.stdin anyway? You have two *known* definite problems (not closing your

Re: strange problems with code generation

2006-12-01 Thread [EMAIL PROTECTED]
I never see anything from print(data). The example I tried to adapt using readlines may be a little old or something. I did close all the files to prevent problems when I figure out what is wrong with what I have. John Machin wrote: You say I am sure the readlines code is crashing it. I