Re: Sending Cntrl-C ??

2008-04-30 Thread gamename
> win32api.GenerateConsoleCtrlEvent(win32con.CTRL_C_EVENT, pgid) How do you determine the value of 'pgid'? -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending Cntrl-C ??

2008-04-30 Thread gamename
> > > No, Windows doesn't support the same, rich set of signal as Unix OSes. > > True but irrelevant to the question. > To the OP: you can download the pywin32 package from sourceforge, and use > win32api.GenerateConsoleCtrlEvent(win32con.CTRL_C_EVENT, pgid) > or call the same function using ctypes

Re: Sending Cntrl-C ??

2008-04-29 Thread gamename
> import os > import signal > import subprocess > > popen = subprocess(...) > os.kill(popen.pid, signal.SIGINT) > > Or with Python 2.6+: > > popen.send_signal(signal.SIGINT) Thanks, Christian. Would that work on win32 as well? -T -- http://mail.python.org/mailman/listinfo/python-list

Sending Cntrl-C ??

2008-04-29 Thread gamename
Hi, I really like this recipe for controlling subprocesses: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 However, I can't figure out how I can send the equivalent of "Cntrl-C" to the subprocess. How can that be done? TIA, -T -- http://mail.python.org/mailman/listinfo/python-li

Re: Not Sure This Can Be Done...

2008-04-09 Thread gamename
Hi, In hopes it may help someone else, here's what I ended up doing: 1) Add this to to point to your local 'tools' directory: import site # the python tools dir is at "../../tools/python" site.addsitedir('..'+os.sep+'..'+os.sep+'tools'+os.sep +'python') 2) In the

Re: Not Sure This Can Be Done...

2008-04-05 Thread gamename
ys.path, insert it after sys.path[0]. > > /Jean Brouwers > > On Apr 1, 1:57 pm, gamename <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I generally have several copies of the same development environment > > checked out from cvs at any one time. Each developme

Re: Not Sure This Can Be Done...

2008-04-01 Thread gamename
> Use virtualenv to create a local python, and activate that when > developing for that branch. Thanks for the suggestion, but that's the problem: having to activate it. Isn't there some way to simply have the local script look at a specified dir rather than starting a virtual environment? -T -

Not Sure This Can Be Done...

2008-04-01 Thread gamename
Hi, I generally have several copies of the same development environment checked out from cvs at any one time. Each development tree has a 'tools' dir containing python modules. Scattered in different places in the tree are various python scripts. What I want to do is force my scripts to always

Win32+Cygwin+ActiveState Python+SCons

2008-01-10 Thread gamename
Hi, I just installed scons on win32 that has cygwin but uses ActiveState python. If I do "import SCons", the lib isn't found. The win32 installer seemed very complete, but the scons lib doesn't seem to be in any dir python knows about. Is there another install step I need to do? TIA, -T -- http

Re: Cloning Environments

2008-01-03 Thread gamename
> > You might be interested in workingenv.py/virtualenv.py > Thanks! That looks promising. -T -- http://mail.python.org/mailman/listinfo/python-list

Cloning Environments

2008-01-02 Thread gamename
Hi, I have several machines running Linux (mostly fedora6) and Windows (mostly XP). I'm thinking of using easy_install to create as uniform an environment as possible for all of them. Cloning the environment, to put it another way. Is there a good example somewhere showing how to do this? I'm ne

2.5.1 rpms?

2007-12-21 Thread gamename
Hi, Where can I find python 2.5.1 rpm's for redhat9 and fedora6/7? Thanks, -T -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent of TCL's "subst" ?

2007-11-17 Thread gamename
> >>> foobar = "HI!" > >>> x = 'foo' > >>> y = 'bar' > >>> print eval(x+y) > HI! Great! Thanks. -T -- http://mail.python.org/mailman/listinfo/python-list

Equivalent of TCL's "subst" ?

2007-11-13 Thread gamename
Hi, In TCL, you can do things like: set foobar "HI!" set x foo set y bar subst $$x$y HI! Is there a way to do this type of evaluation in python? TIA, -T -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes & Wrapping Complex Datatypes

2007-10-16 Thread gamename
On Oct 16, 6:52 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 16 Oct 2007 06:47:06 -0700, gamename wrote: > > I've just started using ctypes and so far, its great. But I'm running > > to some problems with complex datatypes. I'

ctypes & Wrapping Complex Datatypes

2007-10-16 Thread gamename
Hi, I've just started using ctypes and so far, its great. But I'm running to some problems with complex datatypes. I'm not sure how to wrap something like this: /* This defines the Handle type in a header file. I don't think this needs wrapping, its just to show the handle definition for co

ctypes & Wrapping Complex Datatypes

2007-10-16 Thread gamename
Hi, I've just started using ctypes and so far, its great. But I'm running to some problems with complex datatypes. I'm not sure how to wrap something like this: /* This defines the Handle type in a header file. I don't think this needs wrapping, its just to show the handle definition for co

Re: C Source Code Generator For Test Cases

2007-10-03 Thread gamename
> You might want to look at COG (http://www.nedbatchelder.com/code/ > cog/). It might be helpful to you. I really enjoy using it and keep > finding things to use it with. Thanks Mike. I agree. COG looks really promising. -T -- http://mail.python.org/mailman/listinfo/python-list

Re: C Source Code Generator For Test Cases

2007-09-29 Thread gamename
> Instead of reading the testcase tables and generating source for test > routines you simply can do the tests right away. > Can't. :( This is for an embedded system. I need to create source (in C) on one machine and then compile on others. The only thing that I can be certain of is an ANSI co

Re: C Source Code Generator For Test Cases

2007-09-28 Thread gamename
> > How about using c-types to access your C-stuff to test, and use python + the > testcase-tables to invoke that? > Sure, that's possible. But the source code for tests (once all the parms are read) still needs to be generated. Calling the lib from python or from C, there still needs to be a wa

C Source Code Generator For Test Cases

2007-09-28 Thread gamename
Hi, Can anyone recommend a good method of using python to generate c source code? I have tables of test cases to use as input to a process which would generate the test's source code. The Cheetah tool looks interesting. Has anyone used it? Any other suggestions? TIA, -T -- http://mail.pytho

Re: Python+Expect+Win32 = Not Possible?

2007-09-13 Thread gamename
On Sep 13, 4:51 am, Philem <[EMAIL PROTECTED]> wrote: > On Sep 13, 12:27 am, gamename <[EMAIL PROTECTED]> wrote: > > > Hi, > > > Is it still the case there is no practical Expect-like module for > > win32? I know that cygwin can support pexpect, but that isn

Re: Python+Expect+Win32 = Not Possible?

2007-09-13 Thread gamename
On Sep 13, 4:18 am, Tim Golden <[EMAIL PROTECTED]> wrote: > gamename wrote: > > On Sep 13, 1:42 am, [EMAIL PROTECTED] wrote: > >> On Sep 12, 9:27 pm, gamename <[EMAIL PROTECTED]> wrote: > > >>> Hi, > >>> Is it still the case there is no

Re: Python+Expect+Win32 = Not Possible?

2007-09-13 Thread gamename
On Sep 13, 1:42 am, [EMAIL PROTECTED] wrote: > On Sep 12, 9:27 pm, gamename <[EMAIL PROTECTED]> wrote: > > > Hi, > > > Is it still the case there is no practical Expect-like module for > > win32? I know that cygwin can support pexpect, but that isn't an >

Python+Expect+Win32 = Not Possible?

2007-09-12 Thread gamename
Hi, Is it still the case there is no practical Expect-like module for win32? I know that cygwin can support pexpect, but that isn't an option here --- I have to use a native win32 Python version. Are there alternatives, or is it simply not an option to replicate Expect on win32 with python? All

Re: Renaming or Overloading In Python

2007-03-19 Thread gamename
On Mar 18, 4:57 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > gamename <[EMAIL PROTECTED]> wrote: > > Hi, > > > I'm a recent convert from TCL. One of the more powerful aspects of > > TCL is the ability to rename a function at will (generally for testing > &

Renaming or Overloading In Python

2007-03-18 Thread gamename
Hi, I'm a recent convert from TCL. One of the more powerful aspects of TCL is the ability to rename a function at will (generally for testing purposes). Example from the tcl doc: rename ::source ::theRealSource set sourceCount 0 proc ::source args { global sourceCount puts "called sourc