Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python and should be asked at [Stack Overflow](http://www.stackoverflow.com).

learn more… | top users | synonyms

7
votes
2answers
1k views

OS-X terminal behaves oddly after running Python interactively

After running a python repl (2.7.10) in the os-x terminal and exiting, the terminal no longer echos typed input and some other strange things happen. If I run python again and exit(), then the ...
0
votes
0answers
89 views

Python CGI 500 Error on RHEL

I am trying to setup a python cgi script on my httpd RHEL box. I am getting the following errors: [Wed Oct 07 15:53:02.256118 2015] [cgi:error] [pid 2207] [client 10.169.0.202:51691] AH01215: ...
0
votes
1answer
71 views

Appending to path in linux

So I've just installed the python anaconda package on a scientific linux system (I have no sudo privileges), using the given bash script. I've checked .bashrc and anaconda has correctly added export ...
0
votes
0answers
25 views

Pip links don't make sense

I followed these instructions to update from Python 2.7.6 to 2.7.10. Immediately after I started getting errors that I don't understand. Several of my site-packages seem to be lost, leading to import ...
-1
votes
1answer
87 views

How to run multiple linux commands with variables from python

I am trying to implement the below from python using subprocess but getting stuck: Within a python script I want to do the below varname = "namegoeshere" varvalue = "12345" echo "varname varvalue ...
0
votes
1answer
831 views

wine1.6 How to fix installation

sudo apt-get install wine1.6 Reading package lists... Done Building dependency tree Reading state information... Done Package wine1.6 is not available, but is referred to by another package. ...
2
votes
0answers
20 views

Do iTunes backups store file modification times?

I have an iPhone. With a USB connection, I can use tools such as Macroplant iExplorer or Apple's Image Capture to transfer files from the iPhone to my computer. When I transfer files over USB, the ...
0
votes
0answers
88 views

Since Python 3.5 upgrade my .py files won't work right

Before when i had Python 3.4 if i right clicked on a .py file it would give me the option to open it with IDLE or just open it which would do it through the terminal/cmd or w.e. I set it up so that ...
0
votes
0answers
25 views

how to adjust paragraph width in word doc from plain txt

I have a .txt file that, when opened in Word 2013 (Win-8.1) displays word-wrapping which i could not see when opened in notepad, even when I checked "Word Wrap" (under "Format"). In Word, with default ...
1
vote
1answer
327 views

How do I create a local update server for Anaconda Python?

I have a set of networked computers that do not have access to the internet. On each of these computers, I need to install the Anaconda Python distribution. This is currently done by manually ...
0
votes
1answer
283 views

Cannot import module in python shell or py files

I use xubuntu 14.04.3,and its default python version is python 2.7.6 and python 3.4.3.Then I download python 2.7.10 source code and compile install with command ./configure make sudo make -i install ...
2
votes
3answers
2k views

Serialport doens't work correctly after ubuntu update?

I have a strange problem with my serial port. It seems that sth has changed after ubuntu actualizations and reboot. przem@przem:~/Pulpit/bat/scripts$ python Python 2.7.6 (default, Jun 22 2015, ...
3
votes
1answer
41 views

Python Prompt Output Out of Order

My Python installation comes with Macports on OS X 10.10.4. After updating Python to 2.7.10 with Macports, the Python shell now outputs the prompt string ">>>" before the output of a single statement: ...
1
vote
1answer
806 views

Can't uninstall Python 2.7.9 on Windows 10

Hello I am trying to uninstall Python 2.7.9 on Windows 10, but this pop-up keeps showing up: There is a problem with this Windows Install package. A program required for this install to complete ...
0
votes
1answer
142 views

Can't access Python from cmd unless on c: drive

This likely sounds like a stupid question, but I can't seem to access python from cmd unless the working directory is on the c: drive. Ultimately, I want to run a script on a network folder (z:), but ...
0
votes
1answer
62 views

Mac as a python development environment, parallel or no parrallel

I’m planning on switching to Mac platform as my primary dev machine - I do python full stack development. I have had a MacBook Air for 5 years as a personal PC so I'm generally familiar with the OS. ...
0
votes
0answers
167 views

Getting PyCharm to import sklearn

Beginner here. I’m trying to use sklearn in pycharm. When importing sklearn I get an error that reads “Import error: No module named sklearn” The project interpreter in pycharm is set to 2.7.10 ...
1
vote
1answer
188 views

LXDE (Lubuntu) can't add an autostart app

There are several answers for this on the internet including this one: How do I add startup applications in Lubuntu/Lxde? However, it simply does not work. 14.04 version of LUbuntu allows to both set ...
1
vote
2answers
66 views

Is there an one-liner to log the wlan signal quality and the ip-address?

I would like to log the wireless signal quality and the last number of the IP-address to a text file or an IoT website. Is it possible to extract both in python and/or bash with a simple one-liner? ...
1
vote
0answers
43 views

Python 2.7 don't have HTTPSHandler and _ssl modules on Centos4.4

I build Python 2.7 from source code on Centos4.4, but there aren't HTTPSHandler and _ssl modules in Python2.7.10. I have already installed and upgrade openssl and openssl-devel before building ...
1
vote
0answers
44 views

noVNC console on Openstack Dashboard is rendering garbled UI on RHEL7

I am running nova-compute on RHEL7. Openstack dashboard's noVNC console is rendering garbled UI for any instance having a UI console. Can somebody please help out? This is working just fine on RHEL65 ...
1
vote
0answers
8 views

How can I insert at the start of a line a string dependent on two other string values that define beginning and end locations using python note++

How to use Python plugin for note++ for the example below...please advice So for example, I have First x y z Second a b c Third d e f The result I would like to achieve is; First Q1 x Q1 y Q1 z ...
2
votes
1answer
48 views

I want to execute a file every time a file changes

I have a python script that automatically ends after X amount of runs, at the start of the program it sets the value of restart.txt to 0 using this code. restart = open("restart.txt", "w") ...
0
votes
2answers
38 views

Need to try Python on OSX, but I don't have a Mac [closed]

I need to try some Python code on OSX operating system, but I only have a Windows PC. What is the easiest option that exist out there? An online virtual service would be great, but I am not sure if ...
-1
votes
1answer
180 views

python script equivalent to sed command

I have sed command : sed -r 's/^((.){20})/\n/' log1.txt which ignores first 20 charcters of file log1.txt. what is the pythonic equivalent to this sed command??
1
vote
0answers
220 views

The system cannot find the file specified error when using subprocess.check_output()

I have a sed command like : sed -r 's/^((.){20})/\n/' log1.txt I want the above command to be executed in python script. I tried something like this : path = 'log1.txt' sedcmd = 's/^((.){20}/\n/' ...
0
votes
0answers
228 views

How to install missing OpenGL binding for PyQtGraph (pyqtgraph.opengl)?

The pyqtgraph.opengl module is required by binwalk to generate graphs and visualizations. I've already installed pyqtgraph via: pip install pyqtgraph. I also installed PyOpenGL as below: pip ...
0
votes
1answer
101 views

python script to compare 2 files by ignoring timestamp

I have two log files: log A and log B. Their contents are something like : log A 2014-07-12 09:50:33,904 dk,jnbxkmgl,mb.;/lkngjn..... 2014-07-12 09:56:45,060 ;lkjdgzkblnx.m.mc;xgjjjjjj.... ...
2
votes
3answers
357 views

How to run Python script in a terminal window by double clicking it?

I am running OSX, and I am making an app that has a Python program in the Resources folder, the Bash script calls the Python script to run when the app is launched. The script is in the MacOS folder ...
0
votes
0answers
60 views

Unable to load correct Python module

I am working on a cluster where I do not have sudo privileges and am trying to link to a custom installation of numpy for optimization reasons. I set up my PYTHONPATH in the following way: export ...
0
votes
0answers
56 views

Errors while installing Python modules on OS X

I keep trying to install python addons but I keep getting error codes. Uqueias-iMac:~ uqueia$ python setup.py install ...
0
votes
0answers
29 views

CloudWatch Maximum IOPS Usage

I have volumes with Provisioned IOPS but I want to check what is maximum number of IOPS being used, so if not required I can scale down them. I searched but couldn't figure out which parameter metric ...
1
vote
1answer
668 views

Can't use python in interactive mode on new msys-git terminal?

I recently upgraded my laptop, which ran a 32-bit Win7, and my new laptop runs a 64-bit Win7 installation. I am installing git 2.5.1 from git-scm.com, and the latest python versions (both 3.4.3 and ...
2
votes
4answers
186 views

python2.7 from macports stdin issue

My python2.7 from macports seems to mess up with osx terminal in a weird way. Here is what I mean. The exact input from the keyboard was: /opt/local/bin/python2.7<ENTER> a = 3<ENTER> ...
2
votes
1answer
2k views

zlib is missing which break Haxe and pip on Mac OS X 10.11 (El Capitan)

I upgraded to El Capitan (version 10.11 Beta 7, build 15A263e) a few days ago. Aside from issues related to permissions, everything seemed to work fine. However, when I try to run some Haxe libraries, ...
2
votes
0answers
94 views

youtube-dl gracefully stop download

I'm using youtube-dl to download a live stream and I'd like to be able to limit the time of the download, closing the connection once that time has elapsed. Is there a built in way to close the ...
0
votes
0answers
51 views

Is there a way to download wikipedia pages programmatically?

I'd like to download some Wikipedia pages as part of a program. Currently I would go to the pages on a browser, click "Download as PDF" manually, wait for it to render, then download it, then rename ...
1
vote
3answers
102 views

Mass find / replace in file using python

I have a file from editing in wich I need to change some stuff. My knowledge of python is very basic. It would save me hours of copy/pasting if I would find a solution. My file contains this: 002 ...
0
votes
0answers
24 views

Eset Endpoint blocking CherryPy web service?

I'm not positive I'm asking this in the right place, so if you think it should be elsewhere, please be gentle and tell me where you think I should ask. I have a web service written in Python, using ...
1
vote
2answers
232 views

Mapped Drive inaccessible from Windows Scheduled task

I am working with python 2.7.9 (64 bit) and windows server 2012 R2 I am trying to set up a windows scheduled task to run a lengthy python script every day. I've managed to by calling the python from ...
0
votes
0answers
67 views

Issue with python path after installing Vagrant

I just recently installed Vagrant using this guide: https://www.reddit.com/r/deepdream/comments/3c2s0v/newbie_guide_for_windows/ I noticed that after that when using git bash, I was unable to use ...
0
votes
2answers
89 views

Info on '#!' (shebang, hashbang, crunchbang, etc.)

I have a question about the phrase '#!' that appears at the top of every python file, most bash files, and several others. I've already performed a search for this term on both Google and this ...
0
votes
0answers
49 views

Running PyCharm remotely using a local PyCharm?

Does PyCharm provide an option of remotely modifying a python program and running it on a different server, which for itself runs a full version of PyCharm? If I want to simulate this process without ...
0
votes
0answers
110 views

How do I install pySerial for python3, when the installer can't detect python3?

I have python 2.7 and python3.4 installed on my computer. I am trying to install pySerial on my computer through its py 3K installer. Problem is that when I run the installer, it can ONLY find python ...
1
vote
0answers
61 views

How do you download a zipped build from a jenkins job using “jenkinsapi” module in Python?

Has anyone tried download a build using jenkinsapi module in Python?
0
votes
2answers
101 views

virtualenv cannot create environment

System used= ubuntu 14.04 , python = 2.7.6 . I'm trying to setup virtualenvironment using virtualenv to setup django1.8 . I installed pip and virtualenv using below commands apt-get install ...
1
vote
1answer
34 views

Python interpreter slowly pastes code

When I first started using Python, the process of pasting code was fast; code I copied was pasted almost instantaneously into the interpreter. However, at some point roughly 6 months or so ago the ...
0
votes
0answers
183 views

install python package with pip on codeanywhere.com

When i try to install python-constraint on codeanywhere.com using pip the console log's this error: copying logilab/constraint/setup.py -> /usr/local/lib/python2.7/dist-packages/logilab/constraint ...
2
votes
0answers
140 views

McAfee firewall blocks localhost in subprocess only

This is a programming-related question but seemed more appropriate for SuperUser than StackOverflow. I have installed McAfee (a trial version of LiveSafe -- Internet Security) on my PC. I am running ...
0
votes
0answers
93 views

Can't connect to django runserver from my phone using pycharm but it works with visual studio

I'm trying to connect to my development server (local django runserver) while running from pycharm. I have a custom build of an android app that points to my ip address and the phone is on the same ...