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

learn more… | top users | synonyms

1
vote
1answer
41 views

How to Load data to one table from Multiple excel files?

I have to load data from multiple excel file into one table , Please help me to achieve the solution. We are getting excel file from different retail shop which contain multiple column , each file is ...
1
vote
2answers
149 views

How to specify the python path for pip?

With pip installed, I am trying to install matplotlib in Ubuntu 12.04.4 LTS. I got the following error when executing "sudo pip install matplotlib" I guess this is because the python version is too ...
0
votes
0answers
36 views

Building python with openssl support

I have the following directory structure: nchambers@nchambers-305E4A-305E5A-305E7A:~/mini-bin$ la 2to3 cpp-5.3.0 gcov-5.3.0 grmid-5.3.0 objcopy-2.25.1 ...
0
votes
1answer
100 views

Running a command on all servers using Fabric

I am not sure , whether i should i ask this question here or some other stack-exchange community , but i am trying some simple commands to run on a list of servers , using python fabric. The code ...
0
votes
1answer
374 views

Upgrading from Python to 2.7.10 to 2.7.11 on OSX

How can I upgrade Python from 2.7.10 to 2.7.11 on OSX (Yosemite)?
1
vote
2answers
91 views

How can I run this python script on all html files under a directory? [duplicate]

I have a python script $ cat ~/script.py import sys from lxml import etree from lxml.html import parse doc = parse(sys.argv[1]) title = doc.find('//title') title.text = span2.text.strip() print ...
2
votes
1answer
266 views

Building python with openssl support

I have the following directory structure: nchambers@nchambers-305E4A-305E5A-305E7A:~/mini-bin$ la 2to3 cpp-5.3.0 gcov-5.3.0 grmid-5.3.0 objcopy-2.25.1 ...
1
vote
2answers
182 views

FreeBSD: using python3 in uwsgi instead of python2

I have a server with FreeBSD 10.1 installed. I want to deploy a Django site on it using uwsgi+nginx+python3 and got some problems. The site was written for python3, I installed python3.4 then python3 ...
1
vote
1answer
121 views

Install Python package in linux OpenSUSe

I am using this weird SuSE machine. I need to install a python package in my python 2.7. I downloaded it from the site and then untar it and cd to the directory.. Tried: cd /python-package_Pyxnat/ ...
1
vote
1answer
72 views

How to provoke a broken pipe

I try to debug a python script that interfaces MPD using python-mpd2. When the script tries to perform an action after being idle for a couple of hours, it terminates with an exception ...
0
votes
2answers
608 views

Make python 2.7 the default python in centos, making an alias didn't work

I am trying to install llvm on my centos 6.7. While running the configure file it says it throws the error checking for python >= 2.7... not found configure: error: found python 2.6.6 ...
0
votes
2answers
35 views

Shell script - blanks are not always recognized as such?

I'm confused on how bash interprets blanks while executing a script. In the end, I want a script that is fed by a csv file containing software used by an organisation and it should return the CVEs for ...
0
votes
0answers
40 views

Track command line with timestamps

I want to create a program that audits the command line I/O of a terminal session using its PID. I found out about script command which is pretty much the same to what I want, but the problem is that ...
0
votes
1answer
22 views

Problems with terminal opening URL

I am using soundcloud API with python and I'm trying to open url of the song with my browser. I use this code client = soundcloud.Client(client_id=clientIdEntry.get()) track_url = urlEntry.get() if ...
0
votes
0answers
19 views

problem locating module in ubuntu, visible through Anaconda but not accesible

I have Ubuntu 12.04. I have installed Anaconda3 latest version. It has python3.5 which is default for the system now. Some of the programs require using python2.7 which I invoke as follows ...
0
votes
3answers
464 views

apt-get install bluez only installing documentation

I've been struggling for the past two days to get my Bluetooth keyboard to work with my Raspberry Pi 2, with Kali 2.0 installed (I have gotten Adafruit's PiTFT software from ...
0
votes
1answer
28 views

mysql error.log centralize logs

I'm developing a script where it will look into logs every 10 minutes and if there's any critical error it will send an e-mail to a certain adress. I have this problem i would like to solve more ...
-1
votes
1answer
124 views

Why are my emails generated with Python stuck in mail queue

I'm trying to send emails programmatically with Python. The emails stay in the mail queue (mailq). Details are below. My diagnosing abilities have reached their limit. Perhaps the issue is my ISP ...
0
votes
2answers
72 views

how to write python code to change display color

I want to change display color. I have a simple script: #!/bin/bash sleep 50 xrandr --output VGA1 --gamma 1.28:1:1.28 # for purple How can I write it in python?
0
votes
2answers
194 views

How to set up Python path?

I have uninstall anaconda2. but now when I run Python command in terminal it says "bash: /home/user/anaconda2/python: No such file or directory" now how can I set to Python when I have python 2.7 in ...
0
votes
0answers
16 views

OpenStack EC2 API url in API access tab

I want to configure open-stack ec2 API , such that the ec2 API url apears in API access tab in project settings as other urls appear , such as urls for other services. Do i need to install some ...
0
votes
1answer
15 views

FreeBSD install python31 over python27

Hi I had installed python27 and after python31, I tried to deinstall python27 but it seems that this version is standing on host. How can I set python31 to become main python ?
1
vote
0answers
48 views

Installing armhf libboost-python-dev in amd64 cross environ

I'm trying to install libboost-python-dev for armhf in amd64 cross compilation build environment. apt install libboost-python-dev:armhf libboost-python-dev depends on python2.7-minimal, which ...
1
vote
0answers
20 views

How to view WIFI devices names and signal strength [duplicate]

I want a cli utility or script that shows all the Wifi devices or hotspots or access points and their signal strength. I want to log this data using Python. I will write the logging script myself. ...
2
votes
2answers
246 views

installing dsc30 - python 2.6 fights back

I'm trying to upgrade some systems to Cassandra 3.x. The installer wants Python(abi) >= 2.7, so I installed it. Still seeing this error: Resolving Dependencies --> Running transaction check ...
1
vote
0answers
45 views

How to get all files of a certain type from a virtual web path?

I try to use wget to download certain files from a website. But probably the virtual locations of the files do not represent their actual location. For example, if the link to the file is ...
0
votes
0answers
15 views

problem with Ubuntu server 12.04 updates, internet access problem but i can ping Local Area network

when I type the following commands on the terminal the following is displayed wget http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.deb Here is out put connecting to ...
0
votes
1answer
434 views

Installing Dependency for epel from yum update on Centos 6.5

I think that I'm not quite understanding where epel repo reads dependency for a python update. For example when I run sudo yum update I get the below and then successfully run pip install requests and ...
1
vote
1answer
38 views

why does setgid permission on an SO cause failures?

When I load a particular version of Python on a server, I get the following error: python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file ...
0
votes
1answer
169 views

How to install Python module dependencies from my RPM?

I have an application that I am packaging as an RPM and installing on CentOS 7. When I install the RPM I want it to install some compiled binaries as well as some Python modules with their ...
0
votes
1answer
76 views

How do I replace my “base system shell” with IPython?

I'd like to replace bash with IPython on my system, so that even files like .profile are in Python rather than shell script. I have some confusion on the topic, even though asking a few questions on ...
1
vote
1answer
141 views

.profile is written in shell script — can I instead make my system understand that I want it to execute a Python script instead?

I get Python. I don't get shell script. I could learn shell script, but I would rather not if I can use Python in its place. A good place for me to start would be the .profile script. Currently, for ...
1
vote
1answer
93 views

Python 26 pkg missing in CentOS 5

Getting following error while accessing :--- --> Missing Dependency: python26 is needed by package ambari-server-1.2.3.7-1.noarch (Updates-ambari-1.2.3.7) Error: Missing Dependency: python26 is ...
1
vote
0answers
53 views

How do I emulate a virtual keyboard with an arbitrary character set?

I am writing a couple applications that change how your keyboard works. (One that allows key-chording, and another that allows you to say syllables out loud to type individual characters.) The ...
0
votes
0answers
12 views

Apache2 custom errorLogger buffer

I'm currently using this: ErrorLog "|/var/www/HClogger.py >> /var/log/apache2/web-error.log" This allows me to have a file log, but also send the log to a HipChat room. The script is: ...
0
votes
0answers
47 views

Reading Serial Data with Python

I am trying to read a line of serial data from a MaxBotix sonar sensor with Python. The sensor spits out R0300 The integers after the "R" are the distance read in millimeters. I am trying to write a ...
0
votes
1answer
226 views

Unable to use source command within python script [closed]

I basically want to set path for some of the variables in Unix. But the source command does not work here. Any suggestions of the same?
1
vote
1answer
39 views

What is “site specific” data?

I have heard references in the FHS to "site-specific" data. Python also has the notion of "site packages". In FHS, is "site" just a general term for an instance of someone using an FHS filesystem? ...
1
vote
1answer
115 views

Unable to run Sugar on Arch Linux due to PyGIWarning

Installing Sugar environment on Arch. I just installed a fresh Arch Linux just to run Sugar on it. After downloading sugar from AUR using yaourt -S sugar I wanted to run Sugar using sugar-runner ...
0
votes
1answer
34 views

Does file directory/folder your code is in matter when using python3 modules ? I had an Issue

I am asking as lately while doing python GUI programing I installed tkinter by doing apt-get install python3-tk everything went well and when I opened python3 console while I was in the following ...
-1
votes
1answer
55 views

Cron does not execute my Python script [closed]

I'm trying without success to execute a Python script using cron on a Debian Jessie Raspberry Pi. I can execute the script manually, but it fails to execute with cron. Here's what crontab -l shows: ...
1
vote
1answer
126 views

save output of a python script to a text file

how can i save output of this python script to a text file? this is a KMS server which clients connect to it and activates their windows or office. i wanted to save the log in a text file. I should ...
1
vote
2answers
95 views

Random files selector in filesystem

Context : In order to test some backup process which are supposed to work all nights, i want to select a random files on a large amount of datas. (Around 7 millions of files. This is a NFS server with ...
0
votes
1answer
30 views

Where is the actual executable of LiveUSB-Creator located on Fedora?

I don't really know how to phrase this question any better, so let's go with an example: I installed liveusb-creator on my Fedora a while ago and I wonder where the files it executes are located. I ...
1
vote
1answer
110 views

Saving process output to a file in systemd unit file

I created a systemd file unit (Centos 7) and I wanted to save the Python output to a file but the service won't start with the below code. [root@static ~]# cat /etc/systemd/system/pykms.service ...
0
votes
0answers
78 views

OpenCV for python

I am having some issues with importing cv2.cv inside of python2.7. I installed opencv2 and 3 from source (using make and make install) however when running "import cv2.cv" I am still told no module is ...
0
votes
0answers
79 views

Broken pip3.1 install

I just installed pip3 on my Debian and it return a python error every time I try to use it. I installed it like this : apt-get install python3-setuptools easy_install3 pip my version of pip : # ...
2
votes
1answer
66 views

VIM with Python - Multiple # do not get colored as a comment

Something changed on my system and now VIM screws up syntax highlighting of commented lines. This makes having 'debug' lines very difficult as it looks like the line is still active based on the ...
-2
votes
2answers
81 views

How to rename bulk of jpg files to png using convert

Let's say I have a bunch of .jpg files which I want to convert to .png. The file structure is as follow: 00-01.jpg 00-02.jpg 00-03.jpg 00-04.jpg 00-05a.jpg 00-05b.jpg 01-01.jpg 01-02.jpg ...
2
votes
1answer
81 views

Is it possible somehow to tell if a laptop is moved in a bash or python script?

I'm trying to figure out if there's a way to use a bash or python script to tell if my laptop gets moved. I had the idea of using wifi signal strength to do it, but the problem with that is that you ...