473,698 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

run runs away

Nx
Hello

I think my question is how to make
the script wait until it returns from a call to run()
Here is a code snippet:

# next lines calls python2.4 32 bit version
# from a script running in python2.3 64 bit version
run("python2.4" , "dbviewmaster.p y")
# I want the following only to run after
# running of python2.4 has finished
self.textBrowse r1.reload
f = open(self.DBMET A,'r')
for self.getline in f.readlines():
self.textBrowse r1.append(self. getline)
f.close()

Thanks for any hints how to do that.
Nx
Nov 29 '05 #1
3 1418
"run" is not the name of a Python built-in function. That leaves
everyone but you somewhat in the dark about why it does or does not wait
for the created process to complete.

If you want a function that starts a new process and waits for it to
complete, you probably want to use os.spawnv(os.P_ WAIT, ...).

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDjHRGJd0 1MZaTXX0RAnIBAJ 0c9YQ5tH2SWBhFX USqbFNpknh56ACf fC7a
6c3NOMZizEHbgLw xwXiPSic=
=8oy3
-----END PGP SIGNATURE-----

Nov 29 '05 #2
"Nx" wrote:
Here is a code snippet:

# next lines calls python2.4 32 bit version
# from a script running in python2.3 64 bit version
run("python2.4" , "dbviewmaster.p y")
# I want the following only to run after
# running of python2.4 has finished
self.textBrowse r1.reload
f = open(self.DBMET A,'r')
for self.getline in f.readlines():
self.textBrowse r1.append(self. getline)
f.close()

Thanks for any hints how to do that.


what's "run" ?
run("python2.4" , "dbviewmaster.p y")

Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'run' is not defined

</F>

Nov 29 '05 #3
Nx
Thanks for your reply !

I now realize , that the run() used in this
code stems from a def , which actually wraps
os.spawnv(os.P_ WAIT, ...) in
a way that eliminates waiting....

I like this newsgroup as there are always
people who are less stumped than oneself.

Nx
Nov 30 '05 #4

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

Similar topics

4
3837
by: Jacek Dziedzic | last post by:
Hi! First of all, I hope my problem is not too loosely tied to the "standard C++" that is the topic of this group. I have some code that exhibits a strange behaviour: on one computer, where I compile with g++-3.2 it compiles and works fine, on another computer, whether I compile with g++-3.0 or g++-2.95 (unfortunately 3.2 is not available) it crashes with a segmentation violation on runtime.
15
7577
by: Trevor Lango | last post by:
I want to be able to cast away the constness of a private member variable in a member function of a class. I have the private data member declared as follows: const double x; I have an overloaded assignment operator implemented as follows: Point &Point::operator=( const Point *somePoint )
2
8213
by: Mrs Howl | last post by:
I have a query that just reads one table and appends to an output table, one-for-one. No criteria. It's not a Total query (i.e. no group by). It normally run run in minutes, but gets horribly slowed down because five of my output fields are text fields and the expression that gets appended is a user-defined function I wrote which is very simple (just a few lines long). Here's the code of my function: Public Function tformat(num As...
1
1280
by: Greg Merideth | last post by:
I have a custom service running under win2k3 that grabs performance data and stores it into a sql database. I've noticed on occasion when the data gathering stops, using the sysinternals process explorer that the open handles of the process rocket from the usual 120+ to around 3-4,000 and every few seconds the handles increase into oblivion unless I kill the process. Using my own xml logger, I've pinned the code that causes the run away...
5
2352
by: Patrick Vanden Driessche | last post by:
Hi All, I'm currently writing an in-house Form validation framework (WinForms) which is based on 'Component'-inheriting object. So basically, I have a small hierarchy. FormValidator +-- ControlValidator +--ValidationRule
6
1311
by: windandwaves | last post by:
Hi Gurus I have the following JS: var lin1 = document.getElementById('amui'); lin1.onclick = OWi(getimagename(mouseOvers.src)); the onclick command executes straight away (before I click on the amui element). What can I do about this? I dont understand it at all...
1
1149
by: Larry O'Brien | last post by:
I've been writing an image-processing app that, sure enough, speeds up nicely when I put some "#pragma omp parallel for"s in it. When I look at Perfmon in Debug mode, both processors peg at 100% -- very nice. But when I switch to Release, one processor pegs and the other stays at ~40%, just as if the OpenMP had been disabled. Thoughts? TIA, Larry http://www.knowing.net
10
8325
by: gh | last post by:
I have a short JS program that runs fine from the command line: #!/usr/bin/java org.mozilla.javascript.tools.shell.Main print("Hello World"); I saved it as HelloWorld.js. (It's the shabang that makes it a JavaScript program, not the .js.) However, if I start it from Safari or Firefox, I get the following message in the log:
1
1761
by: mbentler | last post by:
I have the following function: Public Function GetDays() As Variant 'Determine the number of days on an insurance policy Dim dteStart As Variant Dim dteEnd As Variant Dim VarDays As Variant Dim Insurance As Variant
7
1537
by: Just_a_fan | last post by:
I have a program which runs fine here (created in VB9). I publish it to my web site for download & install. It runs on some computers (one or two) but not others. When it does not run, it causes a reporting and submission window to pop up. It seems something is missing. This program was converted from a VB6 original piece. Unfortunately, I started on the .NET path just a couple of weeks after getting this app going. I have...
0
8667
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
9148
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9012
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
8853
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
7708
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
6515
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
5857
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
4357
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...
1
3034
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.