Python is an interpreted, general, high-level programming language. The design emphasizes readability. It is notable for using tabs to indicate block levels. As a dynamic language, it shares many similarities to Ruby, Perl, and Scheme. The language is very popular for scientific computing and ...

learn more… | top users | synonyms

0
votes
1answer
3k views

Remote debugging with pydev > pydevd > “connection refused”. Why?

I'm trying to have remote debugging working in Eclipse (actually Aptana 3). I'm using the same computer both for server and Aptana (localhost, ubuntu 12.04) My code looks like this: ...
2
votes
1answer
445 views

GCC error could not create c++ files during pyqt4 install in osx lion using xcode 4.5.1

Intel mac osx lion 10.7. Installed xcode 4.5.1 version and also installed command line tools from xcode preferences. Could not install python 3.2.x from its source code since i wanted to create so ...
0
votes
2answers
93 views

Run pip for python3 on Fedora

I can't run pip for python3 (3.4) on Fedora 22. Pip for python2.7 is installed on system by default and works fine. I install package python3-pip but can't run it. pip3, pip-3.4, python3-pip, python3 ...
1
vote
1answer
14 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
3answers
426 views

Watch a filesystem and rsync changes in a cross-platform way with minimal dependencies

I'd like to start a long-running Ruby or Python script, and have the script watch a local directory for changes to files and new files. Periodically, the script will trigger a one-way rsync to a ...
0
votes
1answer
34 views

Script to monitor realtime CPU & Bandwidth usage in xen live migration

I need to write a script (bash or python or ??) to perform live migration of a VM in xen, and to simultaneously log and extract the CPU & bandwidth usage of the Domain-0 AND write the output into ...
0
votes
1answer
13 views

How should I record metrics on code that is being used by many people?

I have code (let's say a bunch of Python scripts) being used by many people (on a common AFS network). I would like to be able to collect metrics on the usage of the code (compile times, run times and ...
0
votes
0answers
26 views

OS X El Capitan: zlib is missing, breaking Haxe and pip

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, ...
0
votes
0answers
7 views

Python (seleniumrequests)Class, Constructor, Method Not Working [migrated]

Newbie question. I created a class: class WP(seleniumrequests.PhantomJS): def __init__(self, wpurl='https://blah.org/download/release-archive/', ...
1
vote
0answers
13 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 ...
1
vote
3answers
37 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
2answers
24 views

I apparently have two different versions of Python installed on Debian; how can I remove the older one?

Here is the original question I posted on Stack Overflow. I’m on Debian and have Python 2.7.10 installed from sources (compile && make && make install) and 2.7.3 from an unknown ...
0
votes
0answers
24 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 ...
0
votes
0answers
5 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 ...
0
votes
0answers
5 views

Pybrain is not able add modules into a feedforward network. I am not able to figure out why? [migrated]

from pybrain.structure import FeedForwardNetwork, SigmoidLayer, LinearLayer, FullConnection #creating a feed forward network n=FeedForwardNetwork() #creating varrious layers inlayer=LinearLayer(2, ...
2
votes
4answers
979 views

Create a term-document matrix from files

I have a set of files from example001.txt to example100.txt. Each file contains a list of keywords from a superset (the superset is available if we want it). So example001.txt might contain apple ...
1
vote
1answer
21 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 ...
5
votes
5answers
5k views

vim could not load library python27.dll

I need Windows 7 + vim + python for writing vim plugins. :python print("hello") E370: Could not load library python27.dll E263: Sorry, this command is disabled, the Python library could not be ...
0
votes
0answers
9 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
0answers
26 views

Regarding: Generate html based on directory structure [closed]

"Generate html based on directory structure" So why did you delete my post. I just posted the truth that the script doesnt work and gave a reason. What is wrong with that ?
0
votes
2answers
47 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 ...
2
votes
1answer
3k views

How to permanently append a directory to PYTHON PATH on Mac

I tried the two common methods: import sys sys.path.append('foo/bar') AND export PYTHONPATH=$PYTHONPATH:foo/bar The first one terminates the appendage once interpreter is exited. The second ...
0
votes
0answers
7 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
1answer
16 views

How does conda's source activate foo work

Anaconda's documentation for managing environments states that activating an environment is done using: source activate <env-name> I've noticed that with conda installed, activate is in the ...
0
votes
0answers
8 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 ...
0
votes
0answers
11 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 ...
0
votes
2answers
18 views

virtualenv cannot create enviroment

System used= ubuntu 14.04 , python = 2.7.6 . I'm trying to setup virtualenviroment using virtualenv to setup django1.8 . I installed pip and virtualenv using below commands apt-get install ...
1
vote
0answers
10 views
6
votes
2answers
8k views

How to use Latest Python 2.7.x “The Right Way” on Ubuntu 12.04 LTS?

My project needs to stay current on Python releases, but 12.04LTS is currently stuck on 2.7.3, even though 2.7.5 is out now. Is there a way I can stay more current without manually compiling? We're ...
0
votes
1answer
1k views

If i use Yum to install a specific version of python, does that overwrite my current python or install an additional version?

I'm trying to install a specific version of python. I will be using yum install python26. My question is, does that upgrade the current python installed on the machine or does it install the new ...
2
votes
0answers
35 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 ...
4
votes
1answer
5k views

Windows 7 : Prevent computer from sleeping while there is network traffic

I have a python script that is downloading data on a remote computer. I want to prevent the computer from going to sleep as long as the data download is in progress. However if the program ...
0
votes
0answers
13 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 ...
2
votes
2answers
419 views

How to exit Windows Python in Cygwin

I have installed Python with the Windows binaries, so I need to type python -i to start Python in Cygwin. And when I exit it I need to write exit(). It is just a minor issue, but I still would like to ...
1
vote
1answer
3k views

Python installation errors

This is incredibly, annoying, I can't do anything in python until this is fixed. Thanks if you can help, I know it can be annoying to have to look at so much code but i'd really appreciate. I'm trying ...
1
vote
2answers
13k views

Windows scheduled tasks fail with 0x1, don't log errors

I have three Python scripts running overnight as scheduled tasks on a Windows Server 2008 VM. I can run them manually with no problems. But when I look at the Task Scheduler each morning, the first ...
3
votes
2answers
6k views

How exactly does one install `.egg` files?

When I tried downloading the Sphinx installer here, my computer couldn’t find a default application to run the installer. easy_install doesn’t work either. I’m running Python 2.7 but only have ...
7
votes
4answers
16k views

How do I make a script run upon startup of the Ubuntu machine?

I want to run /home/myuser/go.py How do I make that run in the background, everytime my linux machine boots up?
0
votes
1answer
34 views

Netcat connection closes after connecting through python

So I have installed Netcat on my raspberry pi and my mac and I can get them to connect really easily. Problem is that if I want a python script on my mac to establish the connection when the raspberry ...
1
vote
0answers
24 views

How to automate pressing right command key on a macbook using python

I am doing some automation for my testing work on mac. While a lot of tools and libraries are available to simulate button pressing on keyboard(like pyautogui and osascript), I could not find a way to ...
1
vote
0answers
21 views

why is my master node idle when running gnu parallel remotely?

I'm using gnu-parallel to run a number of python scripts in parallel across a number of computers in my gigabit network. The files being processed are located on a tmpfs (RAM) folder on my master ...
1
vote
3answers
31k views

Scatter chart, with one text (non-numerical) axis

Lets imagine I manage 100 pizza stores. I want to plot a chart each day, of how long deliveries are taking. My data might look like this: London 23 London 22 London 44 London 18 ...
0
votes
1answer
41 views

why `./file.py` was working but `bash file.py` not work?

Why ./file.py was working, but bash file.py not work? When i run bash file.py or . file.py or source file.py get error like this: file.py: line 4: syntax error near unexpected ..... But ./file.py ...
0
votes
1answer
3k views

Change install path to /usr/bin instead of /usr/local/bin

A simple question, but I have no concrete documentation to confirm my answer. When installing software with the make install command under a unix machine, the default path is going over to ...
0
votes
1answer
26 views

regex to match everything but substrings beginning with hashkey

I am building a regex to filter out any substrings beginning with '#' or '@'. I am trying to filter tweets from those. Currently it matches everything no matter if the string contains words beginning ...
1
vote
0answers
17 views

Issue installing PyPar on Ubuntu

I am attempting to install pypar the parallel computing python toolbox on Ubuntu ver 14.04.1 LTS (code name trusty). Essentially I'm having installation errors and was wondering if anybody knows what ...
3
votes
2answers
5k views

How do I install python with proper permissions?

So python installed probably fine. Or perhaps it was already on here (I'm using xubuntu 12.10). But I tried to install networkx today using pip: pip install networkx then says I don't have ...
34
votes
7answers
20k views

emacs: how to indent/unindent region of python code by 4 spaces?

I have a region of python code selected in emacs. What are the most efficient ways to indent and unindent every line in it by 4 spaces? Ideally I'd like something that's not context sensitive (eg. ...
-1
votes
1answer
24 views

Install Python on Centos

I have some scripts on my server that I to run when the url is loaded so I have been looking around and I'm not sure but from what I can tell I want to install apache python? Because right now I have ...
0
votes
1answer
44 views

How can I rename all image files within a directory (and recursively within its subdirectories)?

I have a directory containing a large number of image files, some of which are in subdirectories. I need to rename all image files matching *.png, *.jpg, *.jpeg, *.bmp, *.gif using a simple pattern ...