Re: Beginners question

2009-07-17 Thread gabrielmonnerat
nohics nohics wrote: When defining your class methods, you /must/ explicitly list self as the first argument for each method, including __init__. When you call a method of an ancestor class from within your class, you /must/ include the self argument. But when you call your class method from o

Re: Beginners question

2009-07-17 Thread gabrielmonnerat
Ronn Ross wrote: How do you define a global variable in a class. I tried this with do success: class ClassName: global_var = 1 def some_methos(): print global_var This doesn't work. What am I doing wrong? You need pass "self" to the function and "global_var" needs be called

Re: problem with subprocess

2009-07-10 Thread gabrielmonnerat
gabrielmonnerat wrote: Hi all, I need start a openoffice in Xvfb, but when I call with the DISPLAY occurs this error: [r...@localhost oood]# Xvfb :99 -screen 0 1024x768x24 & In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin') Out[9]: 0 In [10]: subprocess.call(&#x

problem with subprocess

2009-07-10 Thread gabrielmonnerat
Hi all, I need start a openoffice in Xvfb, but when I call with the DISPLAY occurs this error: [r...@localhost oood]# Xvfb :99 -screen 0 1024x768x24 & In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin') Out[9]: 0 In [10]: subprocess.call('DISPLAY=:99 /opt/ooo-dev3/program/soffice.bi