All Questions
Tagged with programming python
10 questions
0
votes
0
answers
327
views
Execute shell commands ubuntu in Python
I'm currently studying Automation and Python programming. I just want to know how I would go about executing a Linux command in Python. The commands I want to execute are:
install = os.system("...
3
votes
2
answers
11k
views
Is there something similar or like "pass" in python in bash/shell programming?
I sometimes need a command like pass in Python in my bash scripts.
Like:
if grep something
then
pass
else
code
fi
In Python you have:
>>> for element in a:
... if not element:
....
0
votes
1
answer
3k
views
How to pass argv arguments to a C program using a file or python script in linux?
I used to be able to pass input to C program by first writing a python script and using pipe to send it to the C program as an input
or write the output of python script to a file and just doing r &...
3
votes
1
answer
650
views
How to organize 3rd-party libraries for Python?
I am new in Python. I want to install many 3rd-party libraries (I think they are also called packages?) like, for example, "AstroPy". But I am not sure where the new source code will be stored (I mean,...
-2
votes
1
answer
97
views
Remove the gap pattern from files [closed]
I want to remove gaps (-). if gap found continuous >10 in all >Tem at the same position then remove the all gaps and also remove the sequences or gap from the query at the same position which are in ...
-1
votes
1
answer
117
views
How Mount a datastore on linux in python [closed]
I need to mount xyz/pqr/ datastore on my linux mychine for in my python script.
0
votes
1
answer
105
views
Auto execute a program that plays music
as mentionned above, I would like to execute a programme that plays music at certain hour automatically. I tried using crontab but no outcome. This is what I put in crontab: 8 15 30 3 4 python ...
0
votes
1
answer
639
views
Possible to replace string if match string in two files? [closed]
i am aware of this doable by sed but only limited to one string
let me explain let better, lets say in file 1 we got something like this
tom,123456789
steve,1478321
jon,315457
and in the second file ...
1
vote
1
answer
802
views
`man` pages for languages other than C (e.g, python, R, javascript, etc)?
man pages are a phenomenal resource while programming in C on Linux. While looking at someone else's code, if you see something foreign you can immediate research it in another terminal with
$ man 3 ...
1
vote
0
answers
233
views
Passing a parameter to a dstat plugin
I wrote a simple plugin (dstat_externalBackup.py) for dstat to monitor the filesystem free space and placed it in /usr/share/dstat and it works as intended.
€ dstat --externalBackup 3600
extern
free ...