473,765 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with "os.spawnle(os. P_NOWAIT,'C:\in fo.exe')"

hi all

i tried running a exe file info.exe from the spawnle cmd, its running
fine from the interactive mode, but when i try to run the same info.exe
file from a python file, its giving me the following error:

############### ############### ############### ############### ##
Traceback (most recent call last):
File "C:\Documen ts and Settings\shivay ogimath_dc\Desk top\network.py" ,
line 56,
in ?

os.spawnle(os.P _NOWAIT,'C:\inf o.exe')

File "C:\Python23\Li b\site-packages\wmi.py ", line 263, in __getattr__
raise AttributeError, attribute
AttributeError: spawnle
############### ############### ############### ############### ####

Could u please help in removing this error.
thanks for the help

regards

Dec 16 '05 #1
2 2518
mu*******@yahoo .com write;
i tried running a exe file info.exe from the spawnle cmd, its running
fine from the interactive mode, but when i try to run the same info.exe
file from a python file, its giving me the following error:

############### ############### ############### ############### ##
Traceback (most recent call last):
File "C:\Documen ts and Settings\shivay ogimath_dc\Desk top\network.py" ,
line 56,
in ?

os.spawnle(os.P _NOWAIT,'C:\inf o.exe')

File "C:\Python23\Li b\site-packages\wmi.py ", line 263, in __getattr__
raise AttributeError, attribute
AttributeError: spawnle
############### ############### ############### ############### ####

Could u please help in removing this error.


if "os.spawnle " gives you an attribute error in a module that's installed under
site-packages, it's likely that you've overwritten the name "os" in your code.

as an emergeny fix, add "import os" to the line just before os.spawnle.

(if you're lucky, this will break the code that overwrote the "os" name, so
you can fix that...)

</F>

Dec 16 '05 #2
Ya Thanks Fredrik,

i had overwritten the os in my code indeed, now its working fine.

thanks a lot for that
regards

Dec 16 '05 #3

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

Similar topics

0
1674
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
6
3948
by: Luc Saffre | last post by:
Hello, I had a strange problem when freezing (using either py2exe or McMillan installer) a script that imports reportlab (which imports PIL (which imports FixTk))). - Python 2.3.3c (also with Python 2.3) - PIL 1.1.4 - Installer or py2exe : latest versions.
1
1795
by: questioner | last post by:
Hi folks, Id appreciate if you can help: I want to start an exe which takes as an argument filename. What I tried was: os.spawnl(os.P_NOWAIT,('processor.exe'),'filename.ext')) I also tried: os.execl(r'DRIVE:\WINNT\system32\cmd.exe',
99
6234
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a small or mid-sized business. http://groups-beta.google.com/group/microsoft.public.msdn.general/browse_thread/thread/9d7e8f9a00c1c7da/459ca99eb0e7c328?q=%22Proposed+MSDN+subscription+changes%22&rnum=1#459ca99eb0e7c328 Damn! To be that...
1
1802
by: New MSSQL DBA | last post by:
hi all, have anyone else met with the following problem. we've got a SQL2000SP3a on a 2 active-active node clusters of W2K3, this cluster in using AD. I've found that whenever I use Enterprise Manager on my local computer to register the above instance, it will constantly produce "Failed login for <Domain>\<DomainUser>" errors in the Windows Security Log of the database server machine. There's no failed login in the SQL error log and...
7
2021
by: ~neil~ | last post by:
hello I'm fairly new to the language, and my problem is I'm trying to write a program to run a command from the DOS prompt "C:>". I don't know all the functions in "C", however there are a few under the header file "process.h" that could be used, but I'm not really sure what they mean. I only know them by their name <prototype declaration>. I don't understand the arguments that are passed down to these functions, is why I'm seeking help...
22
3304
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to load DLL (aspnet_isapi.dll)." Of course the dll is able to be found, it's still in the framework directory and for grins I even put it in my service's local directory. This is apparantly server 2003 not allowing asp.net to be run if IIS was not...
10
3735
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server Error in '/QuickStartv20' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file
0
9566
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...
1
9946
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8830
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
7371
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
6646
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5272
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
5413
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3921
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
3
2800
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.