10 More Discussions You Might Find Interesting
1. Programming
So I have this basic script, see below
import subprocess
import shlex
command = "gcloud projects list"
subprocess.check_output(shlex.split(command))
subprocess.check_call(shlex.split(command))
The subprocess.check_call(shlex.split(command)) actually return what I expect. It returns... (6 Replies)
Discussion started by: scj2012
6 Replies
2. Programming
I am using python 3.4. Below is the exception I am getting-
Traceback (most recent call last):
File "./oop.py", line 20, in <module>
y = DerivedClass("Manu")
File "./oop.py", line 15, in __init__
super().__init__(self,value)
TypeError: __init__() takes 2 positional arguments but... (2 Replies)
Discussion started by: Tanu
2 Replies
3. Shell Programming and Scripting
Here is my test code
process = sp.Popen( + ,
bufsize=1,
universal_newlines=True,
stdout=sp.PIPE, stderr=sp.STDOUT,
cwd=src_home)
output, _ =... (2 Replies)
Discussion started by: ezee
2 Replies
4. Shell Programming and Scripting
All,
I have a basic buzz program written in python with return function. If i change return with print,it works fine but i want to know whats wrong with return statement.Can anyone help me whats wrong with this
#!/usr/bin/python
def div4and6(s,e):
for i in range(s,e+1):
if... (5 Replies)
Discussion started by: oky
5 Replies
5. Shell Programming and Scripting
Hi guys,
I'm learning python and perl and i was trying to run from python a perl script using the subprocess module.
I have an issue that i don't understand regarding this.
I run this code:
#!/usr/bin/python
import subprocess
p2 = subprocess.Popen(,stdout=subprocess.PIPE)
output2 =... (2 Replies)
Discussion started by: capitanui
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to run a shell script using subprocess in python.
I can run simple script with arguments using subprocess.But I am not able to embed xterm in subrocess command.
#!/usr/bin/python
import subprocess
subprocess.call()
Above code gives me error.
Please help me in... (2 Replies)
Discussion started by: diehard
2 Replies
7. Shell Programming and Scripting
I need to run this command using python subprocess module (notice I'm using only variables):
cmd = TESTPATH + ' -s ' + serviceName + ' -r ' + rdir + \
' -m ' + masterAcct + ' -p ' + persona + ' -P ' + passwd (3 Replies)
Discussion started by: erick_tuk
3 Replies
8. AIX
Hi Guys,
Just a question about subprocesses.. Lately one of our servers has started to throw out the following error:
SYSTEM ERROR: Too many subprocesses, cannot fork. Errno=12
We've already increased the threshold twice. Its now up to 8000 and the swap space has also been increased. We... (6 Replies)
Discussion started by: Jazmania
6 Replies
9. Shell Programming and Scripting
Hi,
I am having a trivial doubt. Please see the below pipeline code sequence.
command1 | (command 2; commend 3)
I am aware that the command that follows pipe will run in the sub shell by the Unix kernel. But how about here? Since these set of commands are grouped under "parantheses", will... (6 Replies)
Discussion started by: royalibrahim
6 Replies
10. Shell Programming and Scripting
Hello I'm writing a web server in python(obelisk-http.sourceforge.net)
and I'm having a greeat problem with POST method it like that
When someone make a POST request to the server it must open the executable(perl/python/.exe/elf) and send to the STANDART in (stdin) the request and get the... (2 Replies)
Discussion started by: sendai
2 Replies
APPROX-IMPORT(8) System Manager's Manual APPROX-IMPORT(8)
NAME
approx-import - copy local .deb files into the approx cache
SYNOPSIS
approx-import [OPTION]... file.deb ...
DESCRIPTION
approx-import copies local .deb files, such as those found in /var/cache/apt/archives, into the approx(8) cache.
It does so by computing the MD5 checksum of each argument. If it matches a package in one of the Packages files in the approx(8) cache,
then the file is copied to the appropriate location in the cache.
Note that all Packages files must be scanned, regardless of how many .deb files are being imported, and this process may take several min-
utes.
The approx-import command must be run by the superuser or the approx(8) user.
OPTIONS
-c file, --config file
Specify an additional configuration file. May be used multiple times.
-s, --simulate
Process files but do not actually copy them into the cache.
-q, --quiet
Don't print the names of files that are imported.
-v, --verbose
Print the disposition of each file.
EXAMPLES
To import packages from the local apt(8) cache:
approx-import /var/cache/apt/archives/*.deb
To import packages from another proxy's cache:
find other-cache -name "*.deb" | xargs approx-import
(where other-cache is the pathname of the other proxy's cache directory)
FILES
/etc/approx/approx.conf
Configuration file for approx and related programs.
/var/cache/approx
Default cache directory for archive files.
SEE ALSO
approx.conf(5), approx(8)
AUTHOR
Eric Cooper <ecc@cmu.edu>
June 2010 APPROX-IMPORT(8)