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

-1
votes
1answer
39 views

I don't see 'path' under environment vaariables

I am trying to set path for Python but I have no 'path' under environment variables. Below is a link for the original issue as well a screen shot. How can I fix this?
0
votes
1answer
61 views

Homebrew App Not Using Python Package

I installed duply using Homebrew and tried to create a backup to Google Drive. Doing so results in the following error: BackendException: Google Docs backend requires Google Data APIs Python ...
0
votes
0answers
41 views

How to change '.py' file from 'PY File' to 'Python File' in Windows? [duplicate]

I want to implement drag and drop of files onto a Python3 script. I noticed that my Windows7 64bit does not recognize '.py' as 'Python File' but as 'PY File' (Windows is just capitalizing the file ...
0
votes
1answer
217 views

SIOCGIFADDR: Cannot assign requested address Error in python

I want to set IP address by using python's subprocess module. I was trying to use it like this: from subprocess import call call(["ifconfig", "eth0", "50.7.192.226", "netmask", "255.255.255.248", ...
-1
votes
1answer
35 views

editing column of a text file

abc.txt consists of two column data as 1 A1021 2 A1021 3 A1022 4 A1022 I want another test file, say pqr.txt (replacing A1021 by 1 and A1022 by 2 and so on). I used the following usual perl ...
0
votes
1answer
56 views

Extracting data from an excel column

Not entirely sure if this is the right area for this question but i'll give it a shot! I have a very large excel spreadsheet that contains a number of columns. The sheet identifies tax assessed ...
0
votes
2answers
262 views

How to save the stdout and stderr to a file while still seeing the output?

I'm trying to debug a program that generates a lot of data. But the event which I want to debug happens after a random amount of time (I cannot force it). So I would need to see the stdout and stderr ...
0
votes
0answers
46 views

How can I remove anything related to python aside from the default installation on os x mavericks?

I have a really messed up python installation. I have the preinstalled version of python that comes with os x mavericks. then I installed the homebrew version with brew install python. Then I ...
0
votes
1answer
48 views

Test connection to a port without actually connecting to it

I have a python socket server (single-threaded, accepts only one connection) running somewhere. I connect to that port and do my things. How can I detect whether port is open or closed without ...
1
vote
1answer
317 views

How to add a color scheme to PyCharm?

I downloaded the IDLE-like color scheme from here. However, I can't find where to install this for use with PyCharm on Windows 7?
0
votes
0answers
94 views

Problems installing PTVS (Python Tools for Visual Studio)

After a couple of weeks working with IDLE, I am trying to add the PTVS extension to VS Express 2013 for Desktop. Following this page, I downloaded the .msi installer and run the file. The dialog opens ...
0
votes
1answer
71 views

Python path is not recognized after adding a new variable under environment variables, picture provided

'python' is not recognized as an internal or external command, operable program or batch file. My Python folder is directly in C:\python34. Please look at the picture: What am I doing wrong?
0
votes
0answers
54 views

How do I put a python bot onto an IRC server?

I'm using the bot found here. There aren't really many instructions, and I want to know how I can upload it to a server and make it interact with me/people, etc.
2
votes
0answers
70 views

Tor on Google App Engine Launcher

I have installed Google App Engine SDK for Python on Windows 8.1. I use Vidalia Bridge Bundle and the Chrome extension Proxy SwitchySharp to access the net through Tor. But the problem seem to be it ...
0
votes
0answers
18 views

Smart transfer files to an isolated network environment

I'm working with a project that requires to provision a batch of files to machines frequently. But these deploy machines are located in an isolated network, which is ONLY accessible via a broker ...
0
votes
1answer
167 views

Difference in opening a file in Python in Linux versus Windows

What are the differences, if any, in how Python deals with opening/closing a file in Windows versus doing the same in Linux? I understand that in Linux the kernel acts as an interface between the ...
4
votes
1answer
295 views

Which Python format should I download?

I need to download Python to upload my project to Google App Engine. But I don't know which format to download: Windows x86 MSI Installer (2.7.7) Windows X86-64 MSI Installer (2.7.7) Here's my ...
0
votes
1answer
130 views

How to make apt-offline on windows

Apt-offline claims to be a utility that allows you to install packages on Debian without internet connection. It can be downloaded from the git repository. As with many free software, the problem is ...
3
votes
2answers
91 views

How do I handle multiple quotes in an alias (for bash or zsh)

I am using zsh, and I am trying to use python as a simple calculator. I'm very familiar with python, but can't seem to get the alias (or function) to work properly. So far I've got: pycalc() { ...
2
votes
4answers
1k views

Unable to install Python on Windows 8

Recently I decided to upgrade from Python 2.7 to Python 3.4 on my Windows 8 laptop. So I uninstalled Py2.7, downloaded the .msi file from python's site and ran it. I found that every installer I tried ...
0
votes
3answers
159 views

How to update Mac's system Python

I'm on Mavericks at the moment, and i want to update the Python system's version (2.7.5) to the latest (2.7.7) from http://www.python.org, because i want to install pygame. What i have to do? I would ...
2
votes
2answers
435 views

How do I use caffeinate to prevent my computer from sleeping while a script runs?

This morning I started a very long running script with: caffeinate python spam.py and when I checked in on the computer several hours later, the computer was asleep! I moved the mouse and the ...
1
vote
2answers
42 views

Can't run the Python interpreter in Mac's Terminal

At the moment i'm on Mavericks, and i just uninstalled homebrew. With homebrew i had installed python, but after uninstalling it my terminal can't start the python interpreter. I receive this message: ...
1
vote
2answers
2k views

python3-pip installed but pip3 command not found?

I am testing a Python3 program in several computers. To do that, I need to install a library of Python with pip3. So first, I was installing python3-pip in each computer (everyone is running a ...
1
vote
1answer
78 views

What does the file extension do if I can execute a python file without it?

I'm using Ubuntu 14.04. And I have an astonish finding today: I can execute a python file without a file extension! e.g. $ echo " print 'hello' " > z $ python z hello So, why do we need a file ...
0
votes
1answer
41 views

Batch APPEND (RENAME) a specific keyword to set of files

I have few files namely - "a", "b", "c",etc.. I want to add the keyword: ".mov" to all files in that folder. Please suggest me an approach which script will be best suited for this - AppleScript, ...
1
vote
1answer
136 views

pip install python winerror 10054

Been trying to pip install selenium keep getting these same errors, but its not just selenium its any package. I believe it maybe a firewall issue because I am trying to install this on a workstation ...
2
votes
1answer
66 views

How to preserve files downloaded by pip after failed installation?

If pip install a_package fails (e.g. pip install matplotlib in setuptools isn't new enough), the next invokation of pip install my_package causes the file to be downloaded again instead of just ...
0
votes
1answer
587 views

PyQt5 - python-3.2 : no module available + pyuic5 cannot find PyQt5.uic module

Trying to install PyQt5, the ''make install'' command ended by issuing a warning related to pyuic5 file format (see bellow) the python path is set as ...
0
votes
2answers
39 views

Batch TRIM (RENAME) a specific keyword from set of files

I have few files namely - "a.mov-, attachment", "b.mov-, attachment", "c.mov-, attachment",etc.. I want to trim the keyword: "-, attachment" from all files in that folder. Please suggest me an ...
0
votes
1answer
124 views

ConEmu: Run command in open Tab?

I'm using ConEmu (which is already open for the task in this question) with running ipython. Now I want to run a command from a second programm (namely notepad++) to make my edited python script run ...
1
vote
1answer
61 views

Why fabric can connect to remote host immediately while normal connecting needs to wait 20 seconds?

I'm using a remote hosting service. Everytime I connect to it. It costs me 20 seconds or more to wait for the password input line prompt out. But today I used python fabric module. I set the host ...
0
votes
1answer
70 views

Clear remove of additional Python from usr/local/ on Ubuntu

I need to use a machine at work (12.04 Ubuntu box) that has two versions of Python installed: the default 2.7.3 one from the /usr/bin and a 2.7.5 one that was installed into usr/local/bin. The ...
1
vote
1answer
259 views

Is it possible to run a program as a specific user but with root permissions?

I'm doing development with PyCharm, doing development on a script that uses the scapy module for Python to do port scans, sniff traffic, and build raw packets. This, of course, requires root ...
4
votes
6answers
1k views

Force output buffer flush in running program

I have a long-running python script that periodically outputs data to standard output that I've invoked with something like: python script.py > output.txt This script has been running for a ...
0
votes
0answers
655 views

Notepad+: Adding a Python Function parser / Function List

Are there any improvements that could be made to this? From ArtFunkel on SourceForge: http://sourceforge.net/p/notepad-plus/discussion/482781/thread/515001cd/#31ae <parser id="py_function" ...
0
votes
1answer
83 views

How to let Linux Python application handle termination on user logout correctly?

I have written a Linux GUI application in Python that needs to do some cleanup tasks before being terminated when the user logs out. Unfortunately it seems, that on logout, all applications are ...
0
votes
0answers
54 views

How do I reset my PYTHONPATH?

Somehow my PYTHONPATH environment variable got emptied, and now I can't import some downloaded modules. I've tried running the following command to reinstall all Python packages, but it didn't set ...
0
votes
1answer
48 views

inputrc windows for ipdb kybinding

I am trying to get vi bindings for python debugger ipdb. I am not running cygwin's python but the windows version from the dos command prompt. I have tried creating .inputrc in my %HOMEPATH% ...
3
votes
1answer
1k views

Attempting to bootstrap and getting weird errors

I'm on a new computer(mac 10.9.2) and I am attempting to bootstrap my companies project, but setuptools is failing. I can run python bootstrap.py, which creates the ./bin/buildout, but when I run ...
0
votes
0answers
76 views

Create a matrix of tf-idf values from documents

I have a set of documents like: D1 = "The sky is blue." D2 = "The sun is bright." D3 = "The sun in the sky is bright." and a set of words like: "sky","land","sea","water","sun","moon" I want to ...
1
vote
1answer
76 views

GPU access to a newly created user in Linux (Ubuntu)

I have a desktop computer with an Nvidia GPU, and the Python machine learning library Theano installed on it. Theano uses the GPU for carrying out certain computations. When I start IPython and ...
-1
votes
2answers
1k views

Ping exit code and python

I am using os.system ("ping 192.168.178.5") command to ping a machine. Funny thing is, I get exit code 0 even if ping fails. How can I get something that tells me the ping failed/host is offline?
0
votes
1answer
502 views

Check if downloaded torrent file has finished download so Python script can move file

I made a script in Python that is able to move some files from one folder to another. This is on when the file's are static. My problem comes when the files are "incomplete" because a torrent program ...
0
votes
1answer
1k views

Python2.7 / Pip2.7 install in Centos6: root does not see /usr/local/bin

I am trying to install Python2.7 in Centos 6. It's a pain as centos6 ships with python26 and yum is dependent on it. Furthermore yum does not seem to have python2.7 I ended up building it from ...
0
votes
2answers
163 views

How to upgrade python version 2.5.5 to 2.6.8 in Solaris 11

I am using SunOS 5.11 Solaris. Currently I have python version 2.5.5. I would like to upgrade it to 2.6.8. Can someone please help me on the steps to follow for this upgrade? Please note, I need the ...
0
votes
0answers
10 views

The location of the compiled binaries of matplotlib

What is the location of the compiled binaries of matplotlib after I use pip install matplotlib to install it?
0
votes
1answer
53 views

modules installed in python 2.6 not works in python 2.7

I have installed python2.6, and I now installed python 2.7. My problem is that the modules (numpy for example) installed in python 2.6 not works in Python 2.7, why?
1
vote
1answer
144 views

How to delete python interpreters

So, I made a few bummers while installing latest version of Python. Somehow I have managed to install Python more than once, and now I have several Python interpreters lying around (at least I have a ...
0
votes
0answers
87 views

Upstart is throwing reload: Unknown instance: error with Django and virtualenv

I am trying to run django on my website with nginx, upstart and gunicorn. I have written the following in upstart configuration file /etc/init/myserver.conf: description "Gunicorn server for ...