473,383 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Set ulimit when using subprocess.Popen?

Hi, all,

anybody has an idea on how to set ulimit (-v in my case, linux) for
process started using subprocess.Popen?

--
Jarek Zgoda
Skype: jzgoda | GTalk: zg***@jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)
Jan 28 '08 #1
3 7495


Jarek Zgoda napisa³(a):
Hi, all,

anybody has an idea on how to set ulimit (-v in my case, linux) for
process started using subprocess.Popen?
What about:

from subprocess import call
call('ulimit -v 1000 && ulimit -v && ls', shell=True)

HTH,
Rob
Jan 28 '08 #2
Rob Wolfe napisa³(a):
>
Jarek Zgoda napisa³(a):
>Hi, all,

anybody has an idea on how to set ulimit (-v in my case, linux) for
process started using subprocess.Popen?

What about:

from subprocess import call
call('ulimit -v 1000 && ulimit -v && ls', shell=True)
subprocess.Popen('ulimit -v 1024; ls', shell=True) works perfect.

Unfortunately, the nature of ulimit impacts deadly my application when
the limit is reached, so this knowledge is of no help in my case. ;)

--
Jarek Zgoda
Skype: jzgoda | GTalk: zg***@jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)
Jan 28 '08 #3


Jarek Zgoda napisał(a):
Rob Wolfe napisa�(a):

Jarek Zgoda napisa�(a):
Hi, all,

anybody has an idea on how to set ulimit (-v in my case, linux) for
process started using subprocess.Popen?
What about:

from subprocess import call
call('ulimit -v 1000 && ulimit -v && ls', shell=True)

subprocess.Popen('ulimit -v 1024; ls', shell=True) works perfect.

Unfortunately, the nature of ulimit impacts deadly my application when
the limit is reached, so this knowledge is of no help in my case. ;)
Use "ulimit -v unlimited" then.

RW

Jan 28 '08 #4

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

Similar topics

3
by: Darren Dale | last post by:
I'm a developer on the matplotlib project, and I am having trouble with the subprocess module on windows (Python 2.4.2 on winXP). No trouble to report with linux. I need to use _subprocess instead...
3
by: madpython | last post by:
playing with subprocess.Popen on Windows I stumbled into the following problem: Python 2.4.3 (#69, Mar 29 2006, 17:35:34) IDLE 1.1.3 >>> import subprocess >>>...
9
by: Clodoaldo Pinto Neto | last post by:
Output from the shell: $ set | grep IFS IFS=$' \t\n' Output from subprocess.Popen(): "IFS=' \t\n" Both outputs for comparison:
13
by: bayer.justin | last post by:
Hi, I am trying to communicate with a subprocess via the subprocess module. Consider the following example: <subprocess.Popen object at 0x729f0> Here hey is immediately print to stdout of...
12
by: Eric_Dexter | last post by:
I am trying to modify a programming example and I am coming up with two problems... first is that I can't seem to pass along the arguments to the external command (I have been able to do that with...
1
by: sven _ | last post by:
Keywords: subprocess stdout stderr unbuffered pty tty pexpect flush setvbuf I'm trying to find a solution to <URL:http://bugs.python.org/issue1241>. In short: unless specifically told not to,...
25
by: Jeremy Banks | last post by:
Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the...
9
by: erikcw | last post by:
Hi, I have a cgi script where users are uploading large files for processing. I want to launch a subprocess to process the file so the user doesn't have to wait for the page to load. What is...
3
by: Evan | last post by:
Hello - i'm trying to call subprocess.popen on the 'command-based' function in linux. When I run the command from the shell, like so: goset -f ' "%s %s" name addr ' file_name it works fine...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.