Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.
0
votes
1answer
14 views
How to script ranger to copy a file to another directory via python
ranger is a command line file manager that can be extended with python. The commands.py file contains examples of the built in commands:
https://github.com/ranger/ranger/blob/master/ranger/config/...
1
vote
2answers
41 views
Send “enter key” to python script from bash
I am trying to automate my ubuntu setup with a bash script and got the following problem:
I want the script to automatically send a enter keystroke, when running umake ide eclipse (this installs ...
0
votes
0answers
15 views
python + escape for loop [migrated]
in my linux machine I have python script , and the relevant lines are:
for cont in tmp:
allConts.append(cont[0])
how to change add the rule - that for loop will escape to do ...
0
votes
0answers
11 views
Problem with pyLoad: Fatal Python error: Couldn't create autoTLSkey mapping [on hold]
After running pyload on my Debian 3.14 shared server, I get this error:
Fatal Python error: Couldn't create autoTLSkey mapping
Here is the full log:
python pyLoadCore.py
17.01.2017 22:20:56 INFO ...
1
vote
0answers
13 views
Help! Failed to start uWSGI Emperor service
Hello am creating a django application using nginx as my server with uwsgi. However when i entered my domain or ip address to access my site. I got an 502 BAD GATEWAY ERROR. So I decided to look at my ...
1
vote
1answer
31 views
Get the Debian version of the sources of a Python package
What is the most easy/intuitive way to get code for some Python package that is distributed with Debian if I am not on Debian (no apt-get here)?
For example, there was a bug with pip on Debian and I ...
1
vote
0answers
15 views
ConfigParser.NoSectionError: No section: 'general' when trying to add a repository
When I try to sudo add-apt-repository <any>, I get this error:
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
...
1
vote
0answers
21 views
How to generate a nmap HTML report with python?
Given an .xml output file from a nmap scan, how would you suggest to generate an html report from this file?
nmap proposes the following utility with shell (reference):
xsltproc
xsltproc <nmap-...
-2
votes
0answers
14 views
python error name not defined [migrated]
I am following https://www.analyticsvidhya.com/blog/2014/12/image-processing-python-basics/ to practice image processing.
I am writing the code in an incremental way and checking if everything goes ...
-1
votes
0answers
5 views
Error in setting environment for image processing [closed]
I am following
https://www.scipy.org/install.html
to install the required packages to practice image processing using python. I have received the following error (see attached image) during the ...
1
vote
1answer
21 views
running portable python3 under wine
Installing python under wine generally means running a graphical installer, but I don't have that option, so instead I download Windows x86-64 embedded zip file from Python 3.6.0 and unpack it.
...
0
votes
0answers
17 views
TypeError running a Python script [migrated]
When I try to run this Python script, the following happens:
$ python mlp_training.py
Loading training data...
(0, 38400)
(0, 4)
Loading image duration: 0.000199834
Training MLP ...
Traceback (most ...
1
vote
2answers
33 views
Path Variable and script's shebang will not run correct version of python
Problem Statement:
A bash script is being used to create a new screen session for each name from a list of names. At every name, a python script is run using that name as an input. The bash script ...
0
votes
0answers
10 views
How to install plugins in Eclipse without sudo/root?
I have eclipse installed by admin in a Unix OpenSuse machine, but the dropins folder has only read access for me(users). Is there a way to install plugins and use it in this Eclipse by users, without ...
2
votes
1answer
48 views
Creating a systemd service for Flask via nginx
I'm running a Flask application on a server via nginx. I want to create a systemd file and here's what I have:
[Unit]
Description=my123 website
After=syslog.target
Requires=postgresql.service
[...
0
votes
0answers
19 views
Error in installing conedy python package (dependency libboost-iostreams)
I tried to install conedy python package from dep file. I got the following error:
sudo dpkg -i sudo dpkg -i python-conedy_0.264_amd64.deb
**edited**
(Reading database ... 361868 files and ...
-2
votes
1answer
37 views
“Cut off” the link between the terminal and a command
I have created the pycharm command, but I have a little issue. When I execute the command, pycharm opened, but it stayed related to the terminal. I mean if I close the terminal, pycharm will ...
0
votes
0answers
23 views
How to communicate with `crontab -l` to find a certain task? [duplicate]
I have a few tasks in cron and I want to programmatically read one of them: I have a web application and I want to display the frequence of a certain task in that web application. The web application ...
1
vote
0answers
34 views
mkdosfs to format dashcam SD card FAT32 with 32kb cluster size
I am trying to write a script to reformat a dashcam SD card, as is recommended by the manufacturer. I can do this on a windows system with a simple python script, a snippet here:
...
fm = windll....
0
votes
0answers
19 views
Postfix dovecot email unable to connect via my python flask app to send transaction emails
I send up a simple python flask web app on a server at ip address 123.12.123.12 and I also set up an email server at 321.32.321.32. I can send emails from the server if I run a simple python script
...
1
vote
1answer
25 views
Python script output in the wrong directory when called from cron
The script /blah/script.py has -rwxr-xr-x 1 root root permissions and ownership. The script is:
#!/usr/bin/python
with open('blahblah', 'w') as f:
f.write('hello')
With crontab -e, I tried:...
-1
votes
1answer
58 views
Bash as float calculator
I have used this to write a function that calculates floating-point numbers.
mt (){
echo "$1" | bc -l | awk '{printf "%f", $0}'
echo ' '
}
This works great, but I was wondering if there is a way to ...
0
votes
0answers
23 views
I/O Error: [Errno 10] No Child Processes when trying pip install
I'm trying to install mysql for python and my pip command isn't working.
Here's my command:
pip install mysql-python
Here's the output:
File "/usr/bin/pip", line 9, in <module> ...
1
vote
0answers
21 views
generating git commit info with rubber (for LaTeX, Debian)
I'm using the rubber program (in Python, from Lauchpad) to process a LaTeX document (thru pdflatex called by rubber -d) on Debian/Sid/Linux (the document is some H2020 European R&D proposal). I ...
1
vote
1answer
38 views
Runnning a python script on a socket with ncat?
I want to make a python script run on a socket of server in LAN. I wrote a number guessing script and i want to make it run on socket for other clients to play with it by connecting to port (say 1234)....
1
vote
1answer
9 views
webvirt authentication
I am using webvirt in order to play with a web page and have a quick access to my VMs (qemu setup). My problem is that when I try to open a console for any of my guest domains, in the server side I ...
3
votes
1answer
24 views
how to invoke awscli from pip install?
Having installed the AWS CLI with pip install --user awscli what's the syntaxt to invoke awscli? It's listed here:
thufir@doge:~$
thufir@doge:~$ pip list
DEPRECATION: The default format will switch ...
0
votes
0answers
28 views
System dependencies broken after installation of compiled .deb with checkinstall
I downloaded Python 3.5.2's source code and created a .deb package via checkinstall. I followed this guide: https://help.ubuntu.com/community/CompilingSoftware
After the manual installation of this ....
0
votes
1answer
26 views
Read text lines between two strings
I am writing a small text book of Problems, Electronics engineering stream, in LaTeX. It has a long list of small part files for each chapter. In this each problem is separated by LaTeX environment ...
0
votes
0answers
11 views
how to extract particular text using python [migrated]
I have one variable having value
ServerC=WebSphere:cell=abc,cluster=Cluster1+WebSphere:cell=abc,cluster=Cluster2
I want only all Cluster values in another variable
I am trying to use
clusterN = ...
1
vote
0answers
76 views
Running a command on a new terminal window through Python
I would like to open a new terminal using any method (subprocess, etc.) through my original Python script with a following command -- ls -- and keep it minimized so it won't appear on my screen, but ...
8
votes
4answers
3k views
How to install Python 3.6?
I'd like to install the latest Python, which is 3.6 at the time of this post. However, the repository is saying that Python 3.4.2 is the newest version.
I've tried:
sudo apt-get update
sudo apt-get ...
0
votes
1answer
18 views
How do I install an .rpm that fails with an error about an .so file not being found from Python 2.6?
When I try to install cloudera-manager-agent 5.7 from an .rpm I get an error. The error says that a dependency has not been met because yum could not find libpython2.6.so.1.0(64bit). I would expect ...
0
votes
1answer
46 views
Can Python 2.6.6 work with CentOS 7.3?
I expect to be able to use Python 2.6.6. with CentOS 7.3. If that is not a reasonable expectation, please say so. My goal is to use an .so file associated with Python 2.6.6. I downgraded Python ...
1
vote
0answers
77 views
How to fix error: “symbol lookup error: /usr/local/lib/libQt5DBus.so.5: undefined symbol”?
I was using GNS3 network simulator fine for a while & then after few days
When I start GNS3 Network Simulator, it is giving out following error, not sure what caused this.
$ sudo gns3
GNS3 GUI ...
1
vote
1answer
107 views
Fedora 25 Workstation : Anaconda throws Traceback error during installation
I'm trying to install Fedora 25 Workstation on Lenovo Ideapad.
Using VMWare Player with 20GB HDD space, 2GB RAM, 2 Processor core.
Installation goes fine till stage 2 where Anaconda tries to create ...
1
vote
1answer
27 views
python one liner + compare numbers
please advice what is wrong with my syntax ( I use it in my bash script )
export CALC=3.4373
python -c 'print CALC > 2.2'
Traceback (most recent call last):
File "<string>", line 1, in ?
...
0
votes
0answers
91 views
Shared library libgcrypt found in system python but not in Anaconda environment
I'd like to use the lxml.html module in python3.5. When running my system python, I can do import lxml.html successfully. When I issue the same command in an Anaconda environment, I receive ...
0
votes
0answers
42 views
sparc-sun-solaris2.10/bin/as: unrecognized option `-m32'
I try to use the ElastAlert framework for alerting on Elasticsearch. This one is built with python and I installed the required packages.
But when I try python setup.py install, I get the following ...
0
votes
1answer
29 views
Python 2.7 substitute subprocess with subprocess32 [closed]
In the Python subprocess docs it has been encouraged to substitute the default python2.7 subprocess module with subprocess32. How should I do that?
Please give a detailed answer.
0
votes
0answers
17 views
apt-cacher-ng like service for pypi for Ubuntu Cluster
I have the following situation:
I need to install mpi4py in my 32-node Ubuntu 12.04 Cluster, the problem is only master node has the internet connection (public IP), others are in local network ...
1
vote
1answer
106 views
Installing newest version of go in debian, not found by other programs
I want to install universe (python module) on my debian os. Universe needs golang1.5+. The one in the apt repositories is to old, so I installed it from the official website in /usr/bin. I can access ...
0
votes
1answer
43 views
I'm making a GUI program in python that needs to run as root right from the get go, how should I go about it? [closed]
I was thinking of calling GKSu but I understand it's deprecated. How else can I do this?
0
votes
1answer
21 views
Cron Job Ubuntu With Special Command
I need help with a cron job.
I have this command python myscript.py -rss and it's working well in the terminal but not inside crontab.
I have this in my crontab´:
*/15 * * * * cd /var/www/html &...
0
votes
0answers
42 views
Nfqueue forwarding of packets
I have computers A and B. A will ping google.com, B will act as a mitm. I run aprspoof 1 way so that B is in between A's traffic to the router but the router has a clean path to A. On B, I wrote a ...
0
votes
0answers
17 views
PyQt window closes on OK
I have a simple PyQt application launching command line scripts based on a form. I converted the *.ui file to *.py from PyQt designer and imported it into my python application. I have not modified ...
3
votes
0answers
25 views
How to run Amazon CLI “glacier” under Python 2.7 on Centos6?
On Centos 6 after installing Amazon's CLI tools using pip:
# glacier vaults
Result:
ssl.SSLError: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify ...
1
vote
3answers
69 views
Parallel Python scripts on a remote machine
Similar to this thread, I have a remote machine with 8 cores that I want to use for running scripts in parallel (1 script per core at a time).
However, I don't have multiple bash scripts but a single ...
0
votes
2answers
50 views
Monitor process and restart when not running using crontab
I have a Python / JS server combo that I need to keep running at all times. The Python server has a tendency to crash, as it's running on a server with 1GB of RAM.
I've written a script called "...
0
votes
0answers
41 views
can't use apt due to encoding issue
i'm very new to python and ubuntu. Recently i was trying to run apt-get upgrade and i got this error.
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding ...