473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Python+Expect+Win32 = Not Possible?

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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).

TIA,
-T

Sep 13 '07 #1
7 1813
On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.comwrote:
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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).

TIA,
-T
I had planned on using telnet to do the same thing on windows. I
don't think I ever proved it, but I'm pretty sure it will work.

http://aspn.activestate.com/ASPN/Coo...n/Recipe/52228

~Sean

Sep 13 '07 #2
On Sep 13, 1:42 am, half.ital...@gmail.com wrote:
On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.comwrote:
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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).
TIA,
-T

I had planned on using telnet to do the same thing on windows. I
don't think I ever proved it, but I'm pretty sure it will work.
Thanks, Sean. The problem is that telnet is generally disabled on
most hosts nowadays.
>
http://aspn.activestate.com/ASPN/Coo...n/Recipe/52228

~Sean

Sep 13 '07 #3
On Sep 13, 12:27 am, gamename <namesagame-use...@yahoo.comwrote:
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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).

TIA,
-T
You could try this link: http://www.activestate.com/Products/.../features.plex
and see if that gives you what you need.

Luck!
-J

Sep 13 '07 #4
gamename wrote:
On Sep 13, 1:42 am, half.ital...@gmail.com wrote:
>On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.comwrote:
>>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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).
TIA,
-T
I had planned on using telnet to do the same thing on windows. I
don't think I ever proved it, but I'm pretty sure it will work.

Thanks, Sean. The problem is that telnet is generally disabled on
most hosts nowadays.
I'm not sure whether the need you describe above "start a
couple [of] processes, wait for each to say 'done' and
then quit (or timeout...)" is *all* of your requirements
or just an example. And are these processes running on
remote machines? Or just locally?

Depending on those things, maybe there are other ways
to do what you want under Windows?

(I've checked back through the archives and I can't find
any earlier posts describing the requirement more clearly).

TJG
Sep 13 '07 #5
On Sep 13, 4:18 am, Tim Golden <m...@timgolden.me.ukwrote:
gamename wrote:
On Sep 13, 1:42 am, half.ital...@gmail.com wrote:
On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.comwrote:
>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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).
TIA,
-T
I had planned on using telnet to do the same thing on windows. I
don't think I ever proved it, but I'm pretty sure it will work.
Thanks, Sean. The problem is that telnet is generally disabled on
most hosts nowadays.

I'm not sure whether the need you describe above "start a
couple [of] processes, wait for each to say 'done' and
then quit (or timeout...)" is *all* of your requirements
or just an example. And are these processes running on
remote machines? Or just locally?
Good question. That's part of the requirements. The rest are: The
processes need to be async (i.e. the script doesn't stop while waiting
for the process to complete). They also need some kind of timeout
mechanism so that the processes don't run forever. All processes are
local.
Depending on those things, maybe there are other ways
to do what you want under Windows?

(I've checked back through the archives and I can't find
any earlier posts describing the requirement more clearly).

TJG

Sep 13 '07 #6
On Sep 13, 4:51 am, Philem <jimrtho...@gmail.comwrote:
On Sep 13, 12:27 am, gamename <namesagame-use...@yahoo.comwrote:
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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).
TIA,
-T

You could try this link:http://www.activestate.com/Products/.../features.plex
and see if that gives you what you need.
It absolutely gives me what I need. But the requirement is to use
Python specifically. :) Tcl is a great language, but not an option in
this case.
>
Luck!
-J

Sep 13 '07 #7
In article <11**********************@57g2000hsv.googlegroups. com>,
gamename <na***************@yahoo.comwrote:
>On Sep 13, 1:42 am, half.ital...@gmail.com wrote:
>On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.comwrote:
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 I'm trying to do is start a couple processes, wait for each to say
"done" on stdout and then quit (or timeout if something went wrong).
TIA,
-T

I had planned on using telnet to do the same thing on windows. I
don't think I ever proved it, but I'm pretty sure it will work.

Thanks, Sean. The problem is that telnet is generally disabled on
most hosts nowadays.
Sep 15 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jane Austine | last post by:
I need to control a command line program via python. I first tried popen2 and 3 but I couldn't find a way to talk to the subprocess interactively; that is, read some and then write some, and...
9
by: Jeff Wagner | last post by:
Is there an Expect-like module for Python that is cross platform and, for the most part, does what Expect does? A number of years ago, I wrote some Tcl scripts using Expect for automation. I am...
0
by: Charles Krug | last post by:
Hello Bruces: I've created a logging class. The interface from Python's PoV works like this: X = myLogger() # Creates an instance X("some user", "some process", "A message to be logged") ...
3
by: stuart_white_ | last post by:
I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the new version of Python seems to be running correctly, I can't seem access the help from the interpreter. On Python 2.3.3...
44
by: jiang.haiyun | last post by:
Now i began to learn GUI programming. There are so many choices of GUI in the python world, wxPython, pyGTK, PyQT, Tkinter, .etc, it's difficult for a novice to decide, however. Can you draw a...
12
by: Jack | last post by:
Since the full installation of Python (from either the standard installer or ActiveState installer) is too big for my intended use, I'd like to build a custom distribution of Python for Windows...
9
by: Larry Hale | last post by:
I've heard tell of a Python binding for libmagic (file(1) *nixy command; see http://darwinsys.com/file/). Generally, has anybody built this and worked with it under Windows? The only thing I've...
3
by: Siegfried Heintze | last post by:
I need to understand some User32.dll functions and I'm making an elaborate GUI so I can easily experiment with different parameters. This is taking a long time. I'm new to python and I'm thinking...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.