473,803 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

spawnv throws exception under Windows XP

I've been trying to start a particular external program from Python
using os.spawnv(). This works perfectly under Linux but under
Windows, it first runs the program, then throws an OSError exception
with the tuple (0, 'Error'):
spawnv(P_WAIT, 'c:/mctools/bin/mc', ['mc']) Archelon Tool Driver 3.09 2005/02/16
No input file was given.
[correct output snipped]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: (0, 'Error')


If I understand the error correctly, the zero is the errno value, so
it's throwing an exception to warn me that the program worked
correctly.

Running a trivial program that was compiled with the same compiler
(mingw) as "mc" worked fine.

This is Python 2.4.3, the standard Windows binaries at python.org,
BTW.

Has anyone experienced this problem before? Does anyone know what's
going on or if there's a workaround?

Thanks in advance,
--Chris
--
Chris Reuter http://www.blit.ca
"Fortunatel y, in my life, I have grown very good at convincing myself that
horrified looks are actually looks of affection. This makes dates much
easier." --Jeff Vogel, <20************ *************** @mb-cu.aol.com>
May 16 '06 #1
0 1006

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

Similar topics

0
1678
by: nushin | last post by:
Greetings, I am running RedHat 7.3 and trying to spawn a hello.py program from hello_driver.py by using spawn*( ) API, as a P_NOWAIT : os.spawnv(os.P_NOWAIT,'/usr/bin/python',('python hello.py >/dev/null &')) and when i check the process state code of hello.py by: ps -aux
3
10816
by: nushin | last post by:
Try to launch a test program that prints hello world for a minute or so using, spawnv( ) or spawnl( ). Check to see the process state code that the program is running. I am using RedHat Linux 7.3 and Python 2.2.2 and i see that the program is either launched as Zombie state using spawnv(), or running in State "S" sleep in spawnl( ). Here's the sample code that launches my program: os.spawnv(os.P_NOWAIT,'/usr/bin/python',('python...
1
4777
by: nushin | last post by:
If you do not null out the output of your parent process that launches a child process by os.spawnv( ) in P_NOWAIT mode, you will see that your child process is launched *synchronously* instead of asynchronously. This is a bug! Here's a code sample: In your parent.py file, call child.py as os.spawnv(os.P_NOWAIT,'/usr/bin/python',('python', 'child.py'))
0
1644
by: surya | last post by:
Hi, I am using Assembly.LoadFrom within a web service to load assemblies from a web site. This web site is in the same machine where I am running the web service. The Assembly.LoadFrom(httpsite) method throws a file not found exception. I used the same code within a windows based application on the same machine and it worked, so if the windows based application can load the assembly why can't the web service find the same? I have been...
0
6472
by: IamIan | last post by:
I've had to migrate back to Python 2.1 and am now trying to use os.spawnv to get around a memory leak (either in Python or ArcGIS or both) in a geoprocessing script. This script (Second Script) gets each Ascii file in the workspace, converts it to a raster, sets the spatial reference, and hillshades it. The script works on its own. In the Main Script I can successfully pass parameters in a list, but no geoprocessing is ever initiated...
3
1682
by: IamIan | last post by:
I am using os.spawnv in Python 2.1 to do some geoprocessing in a subroutine/process. Everything works great, except when the processing is done the subroutine just waits for a couple minutes before closing itself and returning to the main script. I have tried using sys.exit() and exit() but these aren't doing anything. What is the proper way to terminate this subroutine upon completion, rather than waiting? Thank you.
2
1198
by: Fabio Chelly | last post by:
Hi, I have a command line that works fine when I execute it directly: c:\\curl.exe -T c:\\upload.txt -u login:pwd ftp://ftp-myurl --ftp-ssl But when I try to use os.spawnv to excute it from my python code, it doesn't work at all. Here is my code: exe = "c:\\curl.exe"
8
1974
by: Henrik Lied | last post by:
Hi there! I'm trying to convert a video in a background process. The scenario I'm after: 1. The user uploads a video 2. The video is saved in my media directory, and the database is populated with the references 3. The video gets converted to FLV - but the user shouldn't have to wait around for this to happen
2
4559
by: bevis | last post by:
I'm new to sql server and mysql but this seems like it should be a pretty straight forward jdbc connection. But I have spent almost 2 days just trying to get a jdbc connection. Please help if you can. I'm using Eclipse 3.2.2 and I have installed mysql-connector-java-5.0.6-bin.jar. I am trying to connect to SQL Enterprise Manager version 8.0 innstall on a Windows 2003 Server Enterprise Edition. I have been able to successfully test...
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10309
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.