Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

learn more… | top users | synonyms

0
votes
1answer
13 views

Saving shell command output in python script to text file

I manage to call and use a terminal command in my python script, in which it is working. But currently I am trying to save the 'output' result from this command into a text file but I am getting ...
2
votes
1answer
20 views

YUM python package What is the diffrence

i have a question about the yum Python packages. In the YUM reposetory there are two different packages. python34.x86_64 : Version 3 of the Python programming language aka Python 3000 python34u....
1
vote
1answer
19 views

'netcat -e' not relaying stdout

I'm using netcat to create a backdoor running a python script with the following command: netcat -l -p 1234 -e 'python /script.py' then I'm connecting to the backdoor with another shell using: ...
0
votes
1answer
21 views

Building Python 2.7 and Pandas in a different directory

What's the best way to install Python 2.7 and Pandas (with its dependencies), to a separate directory so that it doesn't interact with the OS version? I'm building everything on a separate machine, ...
2
votes
1answer
27 views

error while connecting remote server using ssh

I am trying to access remote server: Here is my ssh command given below- bitech@hdpedge01:~/.ssh$ ssh [email protected] -i ~/.ssh/id_rsa -v I am getting permission denied error: OpenSSH_6....
0
votes
0answers
13 views

Installing setuptools gives error: struct.error: ushort format requires 0 <= number <= USHRT_MAX

I am trying to install python (2.7.1) packages on an embedded Linux (2.6.37) device (ARM Cortex-A8 AM3517) that doesn't have an internet connection. My plan is to download the source packages onto my ...
1
vote
1answer
20 views

Makefile installing python module out of of pythonpath?

I'm currently building a project that imply sources from different languages such as C, C++ and some homemade python module. I'm using Automake/Autotools to install the sources. Problem here is when i'...
1
vote
0answers
13 views

Arch Linux / Virtualenv: Python 3.5 failed after system upgrade

I updated my arch linux system just now. It upgraded my Python 3.5 to 3.6. When using python in the main environment, it works fine: [yuanyin@YuanYin ~]$ python Python 3.6.0 (default, Jan 16 2017, 12:...
0
votes
0answers
11 views

Setting the right ipv6 prefix for a docker subnet [on hold]

Lets say we have a LAN with /64 hosts what's the best way we can assign prefixes for docker subnet? is it ok for us to go with /120 for docker subnet if we want 256 hosts What is the standard that ...
0
votes
0answers
14 views

Linux Mint - Can't open cinnamon-settings

If I try to open System Settings, nothing happens. If I use the terminal, I get an error: $cinnamon-settings Traceback (most recent call last): File "/usr/share/cinnamon/cinnamon-settings/cinnamon-...
0
votes
0answers
24 views

ssh connection using fabric / python

I’m trying to control a redpitaya device over ssh using a python script.  My script looks like this: from fabric.api import run, env env.host_string = '[email protected]' env.password = 'root' run(...
-1
votes
0answers
30 views

Python for Linux Systems Administation [closed]

Using bash I edit .bashrc for Linux systems administration, what do I edit If I transition to Python for systems administration? Ans I completely just use Python for systems administration?
1
vote
1answer
21 views

How do I build an exit into python script running at boot?

I use an rPi Zero running Raspbian for time-lapse photography. Upon boot a shell script is called that then launches a python script. The shell script and python script are the first programs I've ...
12
votes
5answers
383 views

How can I sort a list with major.minor.patch level and sometimes rc correctly?

I have to sort the following list with a shell script and make the latest version appear on the bottom or top. How would I do that with shell tools only? release-5.0.0.rc1 release-5.0.0.rc2 release-5....
1
vote
1answer
19 views

Debugging a running python process

I want to debug a running python service which has threads in my Ubuntu system. I need to attach running root process and be able to place break points in python script. What would be the best way to ...
-1
votes
1answer
40 views

How to schedule a cron job to run a video fill every 5 minute?

As Im new to cronjob just can anyone help me to play a video file on vlc every 5 minutes daily. tell me the step by step procedure how to schedule it. thank you.
0
votes
1answer
65 views

Device or resource busy

I referred the following link, the solution works. How to get over "device or resource busy"? The above solution works when you are manually deleting the file. But I have a python script ...
0
votes
1answer
31 views

Python and Bash compare numbers

If I run the following in bash, i will get correct answer # if [ 2.0000000000000000000000000001 > 2 ] ; then echo " True "; else echo " False " ; fi True # But if run in python IDLE >>>...
-1
votes
3answers
48 views

Extracting multiple lines from each file in directory, editing text and appending file name for each matching line

I have a folder containing multiple files, and from each file I need to 1) extract all lines containing items from a prespecified list of words; 2) pre-pend the file name to that line 3) separate the ...
0
votes
1answer
16 views

error installing packages in linux mint

any time i try to install a package, it writes the following: E: /var/cache/apt/archives/mintupdate_5.1.0.4_all.deb: subprocess new pre-removal script returned error exit status 127 E: /var/cache/...
1
vote
1answer
42 views

Source .bashrc file in bash globally

So I am trying to write a script which compiles VMAF from the GIT and I need to change the PYTHONPATH location to the installation directory. The script is working good, and it is installing VMAF, but ...
0
votes
1answer
18 views

dbus-laauch failed caused by the child process exited

I want a python script to send notification. The script can be run successfully and show what I want. but crontab did not boot it in right way. the following is the the code refer to the libnotify ...
0
votes
1answer
37 views

Generate dummy traffic over OpenVPN link

I'm trying to generate some dummy traffic that is sent over an existing OpenVPN link. I can ping some public IP over the OpenVPN link, but that's not enough traffic for my tests. How could I ...
0
votes
1answer
21 views

Cannot use python IPWhois: IPWhois instance has no attribute 'lookup_rws'

I am following an IPWhois example posted on stackoverflow. I am howfrom ipwhois import IPWhois obj = IPWhois('74.125.227.206') results = obj.lookup_rws() print(results['nets'][0]['name']) I have ...
0
votes
2answers
28 views

Python 3 doesn't see packages installed by root under different user

I installed psycopg2 for Python 3 on CentOS 7.3 as root. When I su to root > python3 -m pip show psycopg2 Name: psycopg2 Version: 2.6.2 Summary: psycopg2 - Python-PostgreSQL Database Adapter Home-...
3
votes
3answers
179 views

/bin/python3: No module named pip

I installed Python 3.4 on CentOS 7.3: sudo yum install epel-release sudo yum install python34.x86_64 There was python 2 installed before under type python python is hashed (/bin/python) So version ...
1
vote
0answers
88 views

How to build a network tap device? [closed]

I'd like to build a network tap device, to intercept traffic between my PC and router. Imagine the raspberry pi or similar device, running linux, having two ethernet ports. I plug it in between my ...
0
votes
0answers
14 views

Questions about getting IP from EDNS queries

Currently I want to setup up a similar service like http://ip-api.com/docs/dns which can determain the visiter's DNS setting and real IP through EDNS queries. I have one questions: How can we get the ...
0
votes
1answer
50 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 ...
0
votes
0answers
12 views

Why upstart logging to default location, even if not logging command in service scripts

I have upstart service myservice written in bottle.py, there is no loggin block in upstart service root@localhost:~# cat /etc/init.d/myservice-api description "Bottal Service API" author "test@test....
1
vote
1answer
72 views

Is there an efficient way to parse blocks of text in python?

I have an enormous file (~70GB) with lines that look like this: $ cat mybigfile.txt 5 7 1 1 0 -2 0 0 2 0 4 0 -4 0 0 4 0 0 1 -1 0 0 0 ...
0
votes
1answer
31 views

Problem with the permissions of newly created /tmp

On an Ubuntu 14.04 system I had to enlarge the /tmp folder, and instead of resizing partitions I unmounted the partition mounted to /tmp and created a new file mounted to /tmp, following the ...
0
votes
0answers
51 views

AttributeError: 'module' object has no attribute 'INotifyWrapper'

I have installed python(2.7.9) and Django package(1.10.5). But when i execute the Django commands, i am getting below error. Help me to solve this issue. Command: python -m django --version Error: ...
0
votes
1answer
71 views

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.DBus.Properties' on object [closed]

I am trying to run a script to connect to a specific wifi network, and I am getting this error. I am running archlinux lts 4.4.47-1. Any general suggestions for further reading/understanding of the ...
1
vote
1answer
84 views

Fedora 25 Change from Python 2.7.13 to Python3 (broken by `alternatives`)

So I'm starting out with python. I'm working on a laptop with a fresh install of fedora25. I got everything running in eclipse with pydev, but per directions of the instructor I need to use python 3....
0
votes
0answers
21 views

CentOS 7 / Apache / mod_wsgi - UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2727: ordinal not in range(128)

I've deployed a Python web application (uses Pyramid) in Apache (httpd) using mod_wsgi. After starting the Apache service the error below (from Apache log) occurs when we make a http request to the ...
0
votes
0answers
16 views

Centos updated with Oracle linux repositories causing problems?

I have used Oracle repositories to update few packages on my Centos 6.5, now my computer shows Oracle linux while booting up. I am not able to run some python codes. It's saying no module, skimage. ...
0
votes
1answer
28 views

Prevent freezing when running python scripts

I am running some python scripts in my linux terminal that happen to be pretty resource intensive, but when I do my system will become pretty non-responsive until the process has completed. I know ...
1
vote
1answer
98 views

Cross-compiling Python

I am using an evaluation board with an ARM926EJ-S running Openembedded and I want to install python on it. I successfully cross-compiled python 2.7.13 on my Fedora 25 with the linaro toolchain (...
1
vote
0answers
37 views

Python process can't create a file in a directory, keeps getting `permission denied` IOError

I've a directory mnt with 777 permissions: drwxrwxrwx 2 root root 14336 Feb 5 15:52 mnt I've created a bunch of users in the group root from uid to 5204 to 5250. I've a python script that ...
0
votes
1answer
83 views

Crontab run-parts

I am looking at run-parts script on Centos 7. Very similar to this: https://github.com/ikysil/run-parts/blob/master/run-parts It appears to run everything in the cron.hourly etc directories in ...
2
votes
1answer
49 views

Script highlight_focus for highlighting current screen does not work

I would like to install this script from the following discussion, that allows me to highlight the current screen. http://askubuntu.com/questions/665155/how-to-highlight-current-screen-or-window?...
0
votes
0answers
25 views

how do you download python on acer chromebook R11 [duplicate]

i want to complete a homework sheet on python however i dont know how to download python
1
vote
0answers
42 views

Problems compiling Python 3.6.0+ in Qubes OS Debian

I've tried to compile Python 3.6.0 and the lastest CPython from sources in a Debian Template inside Qubes OS (gcc 4.9.2). I've managed to do it, but looking the configure output in details, I've ...
0
votes
0answers
27 views

Uploaded new Flask code, socket file disappeared, how do I bring it back?

I start this off with the fact that I am a python developer and I know very little about server management so this is all a learning curve for me. I created a new Ubuntu 16.04 Digital Ocean droplet ...
0
votes
0answers
43 views

dnf broken on Fedora 23

I have a crazy situation where I can not run dnf after executing dnf update on Fedora 23. These are the errors reported when I run any dnf command: [root@asus Downloads]# dnf --version ERROR:root:...
0
votes
2answers
36 views

learn python and find the libraries [closed]

I have learnt that python has a vast repository of libraries and functions that can be used to straightaway implement some really cool projects. Where can I find these libraries and the corresponding ...
1
vote
1answer
64 views

Reliably detect Python 3 development files

I have a shell script which installs all required packages for a project. Some of those packages are Python 3 based and require to compile things and for this the Python sources need to be installed1 (...
2
votes
2answers
64 views

install python 3.6 from source, now dpkg is messed up

I installed 3.6 from source to /opt in Ubuntu 16.04 thinking that I was avoiding startnig any python conflicts this way. Next time I tried to run apt-get update I ran into an error that says... You ...
2
votes
1answer
25 views

Raspberry Pi Python Talkey (TTS) + Cron

I have written this little Python script to listen to the BBC RSS Top Stories feed on my Raspberry Pi So first of all because I have problems with the 3.5 mm Jack (no sound), I went into sudo raspi-...