473,698 Members | 2,180 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 1419
"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
8214
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
8601
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
9156
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...
1
8892
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
8860
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
7716
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
6518
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
4365
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...
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
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.