> win32api.GenerateConsoleCtrlEvent(win32con.CTRL_C_EVENT, pgid)
How do you determine the value of 'pgid'?
--
http://mail.python.org/mailman/listinfo/python-list
>
> > 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
> 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
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
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
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
> 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
-
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
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
>
> You might be interested in workingenv.py/virtualenv.py
>
Thanks! That looks promising.
-T
--
http://mail.python.org/mailman/listinfo/python-list
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
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
> >>> foobar = "HI!"
> >>> x = 'foo'
> >>> y = 'bar'
> >>> print eval(x+y)
> HI!
Great! Thanks.
-T
--
http://mail.python.org/mailman/listinfo/python-list
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
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'
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
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
> 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
> 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
>
> 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
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
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
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
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
>
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
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
> &
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
27 matches
Mail list logo