Is there an elegant way to dir() module from inside?

2006-08-24 Thread volcano
I am looking for a way to discover which classes a module contains from "inside". I am building a testing class that should, when instatntiated within any module, locate certain classes within the containing module. Words of wisdom? Anybody? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there an elegant way to dir() module from inside?

2006-08-24 Thread volcano
Sion Arrowsmith wrote: > volcano <[EMAIL PROTECTED]> wrote: > >I am looking for a way to discover which classes a module contains from > >"inside". I am building a testing class that should, when instatntiated > >within any module, locate certain classes with

Formatting device from a script on Windows

2006-09-19 Thread volcano
Hello, folks! Script I am creating has to format a device - USB flash drive. I have tried using regular DOS "format" through "os.system" - did not work well, because DOS format requires input from user. And the script should run without user interference. I have taken a look at ActivePython "win32.

Re: Formatting device from a script on Windows

2006-09-19 Thread volcano
weir wrote: > this may help, you need ctypes module. > > ## > from ctypes import * > > fm = windll.LoadLibrary('fmifs.dll') > > def myFmtCallback(command, modifier, arg): > print command > return 1 # TRUE > > FMT_CB_FUNC = WINFUNCTYPE(c_int, c_int, c_int, c_voi

Re: Formatting device from a script on Windows

2006-09-19 Thread volcano
OK, it worked. Obviosly, quick format was a bad choice. Thanks a lot for your help! Mark -- http://mail.python.org/mailman/listinfo/python-list

Running Python script from C++ code(.NET)

2006-09-23 Thread volcano
Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling - nada, just stupid,primitive, straightforward call. And while there is a lot of help on embedding, I c

Re: Running Python script from C++ code(.NET)

2006-09-23 Thread volcano
Gerard Flanagan wrote: > volcano wrote: > > Hello, folks! > > A trivial question - I have a working Python script that I have to > > invoke from C++ code. No fancy stuff - just run the whole script with > > its parameters. No callbacks, no signalling - nada

Re: Running Python script from C++ code(.NET)

2006-09-23 Thread volcano
Gerard Flanagan wrote: > volcano wrote: > > Gerard Flanagan wrote: > > > volcano wrote: > > > > Hello, folks! > > > > A trivial question - I have a working Python script that I have to > > > > invoke from C++ code. No fancy stuff - jus

Re: Running Python script from C++ code(.NET)

2006-09-26 Thread volcano
volcano wrote: > Hello, folks! > A trivial question - I have a working Python script that I have to > invoke from C++ code. No fancy stuff - just run the whole script with > its parameters. No callbacks, no signalling - nada, just > stupid,primitive, straightforward call. > >

How to access an absolute address through Python?

2007-02-11 Thread volcano
Can it be done, and if yes - how? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to access an absolute address through Python?

2007-02-11 Thread volcano
On Feb 11, 2:21 pm, Maël Benjamin Mettler <[EMAIL PROTECTED]> wrote: > volcano schrieb: > > > Can it be done, and if yes - how? > > Define address. Are you talking about URLs? File paths? Postal > addresses? Memory addresses? Whatever addresses? > I'm afraid the

Re: How to access an absolute address through Python?

2007-02-11 Thread volcano
On Feb 11, 2:46 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, volcano wrote: > > On Feb 11, 2:21 pm, Maël Benjamin Mettler <[EMAIL PROTECTED]> wrote: > >> volcano schrieb: > > >> > Can it be done, a

Re: How to access an absolute address through Python?

2007-02-11 Thread volcano
On Feb 11, 3:46 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > volcano wrote: > > On Feb 11, 2:46 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > [...] > >> What's your goal? What do you expect at the memory address you want to > &

How to couple pyunit with GUI?

2006-05-17 Thread volcano
I am desperately looking for an info how to combine a testing application with decent GUI interface - the way most xUnits do. I believe I have seen something about using Tkinter, but I do not remember - where. I am working on a complex testing application built over unittest module, and I need GUI

Re: How to couple pyunit with GUI?

2006-05-18 Thread volcano
Miki, toda, but it did not work for me. BTW, I have forgotten to mention - the implementation I develop should be multi-platform.If anything else comes to you mind - I'll be more than gateful to hear. Regards, Mark -- http://mail.python.org/mailman/listinfo/python-list

Getting return code for a Python script invoked from a Linux shell script

2009-09-23 Thread volcano
Hi, folks, I have a Python script that is invoked by a shell script. I uses sys.exit() with a parameter within python. The calling script is using this line to get the return code: exit_code = !$ but it fails to get it. What's wrong here? (I am no Linux guru) Thanks in advance Mark -- http://ma

Re: Getting return code for a Python script invoked from a Linux shell script

2009-09-23 Thread volcano
On Sep 23, 8:01 pm, Donn wrote: > On Wednesday 23 September 2009 18:51:29 volcano wrote:> exit_code = !$ > > I think it's $? to get the code. > \d > -- > home:http://otherwise.relics.co.za/ > 2D vector animation :https://savannah.nongnu.org/projects/