Problems with import

2007-12-04 Thread alexLIGO
Hi, I have some problems when importing a library. Suppose I have a directory /home/user/pythonlib/package in which I have a python- library called test.py. Now I want to import that, so I put the following directory into the PYTHONPATH: /home/user/pythonlib and in my main python script I put: fr

Re: Save/Store whole class (or another object) in a file

2006-10-25 Thread alexLIGO
Hi, Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > thanks for the reply,but unfortunately this does not work with the type > > of classes I am dealing with. When trying to pickle the class I get the > > following error: > > > > File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex

Re: Save/Store whole class (or another object) in a file

2006-10-18 Thread alexLIGO
Hi, thanks for the reply,but unfortunately this does not work with the type of classes I am dealing with. When trying to pickle the class I get the following error: File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex raise TypeError("a class that defines __slots__ without " TypeErr

Save/Store whole class (or another object) in a file

2006-10-17 Thread alexLIGO
Hi, is it possible in python (with/without matplotlib, numpy etc) to store a whole class with its data into a file, instead it to reconstruct every time again? So is there an analogous to the matlab functions load/save available? Thanks Alex -- http://mail.python.org/mailman/listinfo/python-l

Re: How to get the output from os.system() into a variable?

2005-10-05 Thread alexLIGO
Hi, thank you very much for your tipps. I get it to work! Alexander -- http://mail.python.org/mailman/listinfo/python-list

How to get the output from os.system() into a variable?

2005-10-05 Thread alexLIGO
Hi, I would like to execute some command in python on the bash, e.g. os.system('globus-job-run mike4.cct.lsu.edu/jobmanager-pbs -l /bin/date') and want the result of the output in a vector, so something like: result=python_command(' command_on_the_bash ') Is that possible? And how to do that?

visit_decref: Assertion `gc->gc.gc_refs != 0' failed.

2005-09-05 Thread alexLIGO
Hi, I got this error when trying to execute the following python command with in a C module: Py_BuildValue Do anyone have any idea what this error is about? And does anyone have any idea how to debug a python script? Thanks Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with os.system

2005-09-02 Thread alexLIGO
No I read some other data files that has been created by the other program. I am not interested in the stdout or err of that program... -- http://mail.python.org/mailman/listinfo/python-list

Problems with os.system

2005-09-02 Thread alexLIGO
Hi, I am trying to run a python script that executes several other programs on the bash (under linux) and reads some of the output of those programs. This works fine for a couple of os.system() calls, but then it does not work anymore. os.system() returns always -1, but when executing exactly the