473,734 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running a script within a loop

1 New Member
Hello,

I have a basic question. I would like to make running Arc.py several times with different input (R0.arg)and output (V0.art)
The idea is to repeat the command like this:

Arc.py R0.arg V0.art
Arc.py R1.arg V1.art
Arc.py R2.arg V2.art
Arc.py R3.arg V3.art
Arc.py R4.arg V4.art
Arc.py R#.arg V#.art
...
..
.
until #=1000.

Could you help me, please?
Jun 28 '12 #1
1 1788
dwblas
626 Recognized Expert Contributor
If you want to run the program from another Python program, see the info on subprocess.call.
Jul 5 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1670
by: runes | last post by:
Is it a more pythonic way of finding the name of the running script than these? from os import sep from sys import argv print argv.split(sep) # or print locals().split(sep) # or
2
2888
by: Joe | last post by:
I¹ve got a bunch of email addresses in a mysql table. I need a php script that will loop the results of a selection and format them so I can put them in a php mail() function. I¹m not too swift with php ... would this be a simple script to code? Any help would be appreciated.
7
1439
by: markturansky | last post by:
I'd like to dynamically find and invoke a method in a Python CGI. In javascript, the running script is 'this' (Python's 'self'), except that 'self' is not defined. I want to do this: var m = this; //where the method name is passed via an http variable m(); //this invokes a method in javascript
2
1197
by: Rvo | last post by:
I have written an application that manipulates files, while doing so the program is running in a loop and any actions on the GUI will not get any response. When I try to stop the processing of the files trough the GUI by clicking on a button this will not be done. The action connected to the stop-button is to set a boolean to "true" in the loop which processes the files I check contiuously for the boolean becomming true and if so exit...
7
5077
by: gmax2006 | last post by:
Hi, I use RedHat linux. How can I find where exactly the current python script is running? I use this code: #test.py import os,sys
0
901
by: mhodkin | last post by:
Is there a way to run a script within the editor of pyalamode? Or does one need to open and run the saved .py file?
1
1244
by: Sean Farrow | last post by:
Hi: Is there any way to obtain the full path to the currently running script under win32? I am using the pythonw.exe file is that helps. Sean.
8
3563
by: grikdog | last post by:
How to I capture stdout output from a system call and pipe it back into my running script? system "echo foobar"; # how to continue here with "foobar" in stdin ?? ... I can fake it with pipes and additional scripts, but that seems like overkill.
4
1823
by: Bullitt | last post by:
Hey, I have a problem with a small program that I want to make. It's a script that keeps running by using a Do While loop. I want to stop the script when a certain key is pressed. But the problem is that the keypress sub isn't working because the other sub keeps running. Is there a way of doing this, or is there someone who knows how to replace the do while with the use of a timer or someting, so that I can make a pause between every run of...
2
4751
by: gintrado | last post by:
I am very new to Python I'm trying to run a python script from within another python script. I can run the script from a unix command line by typing: nohup python script.py password > /tmp/outfile.log 2>&1 & Or, I can put that command in a shell script and run it by typing: ./script.sh Both work great. However I don't know how to put either the command or the shell script in a python.py script and get it to run from there. Let me...
0
9449
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
9310
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...
1
9236
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
9182
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...
1
6735
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
6031
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
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.