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
35 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 ...
2
votes
2answers
57 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() { ...
3
votes
5answers
294 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 ...
1
vote
1answer
67 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 ...
2
votes
2answers
88 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 ...
0
votes
1answer
21 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
2answers
23 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: ...
0
votes
1answer
29 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, ...
0
votes
0answers
59 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
17 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
0answers
196 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
23 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 ...
1
vote
1answer
33 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
44 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
4answers
3k views

Mercurial 1.5.4 Can't Find osutil Module Using Ubuntu 10.04

I'm using Ubuntu 10.04 and I just installed Mercurial 1.5.4 from source (see this question for some installation trouble that I had). Now, however, when I invoke: hg I get the following: File ...
1
vote
1answer
73 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 ...
0
votes
0answers
162 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
48 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
1answer
91 views

Why do python's os.stat and du and ls not agree on block size?

While writing a simple function that computes the quantity of blocks consumed in a directory, I checked with du to see that I was getting the same answers. Why do ls and du say this file occupies ...
2
votes
1answer
147 views

Installing pymedia on OSX

Trying to install the most recent version of pymedia available at sourceforge. python setup.py install I get the error: In file included from sound/sound.cpp:33: sound/audio_unix.h:29:10: fatal ...
1
vote
1answer
49 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 ...
3
votes
1answer
525 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
1answer
19 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% ...
0
votes
0answers
29 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 ...
1
vote
1answer
414 views

Dropbox.py on RHEL 6

I'm trying to run a headless install of Dropbox on RHEL 6. The daemon seems to be running, but when I try to use Dropbox's associated dropbox.py tool to control the daemon, it fails to run with the ...
0
votes
0answers
30 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 ...
0
votes
1answer
202 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
0answers
65 views

How to convert 'c' program into python module

I want a program that can encrypt/decrypt a file on windows 7 using xxtea which is a fixed up version of tea. I found that google has such a system at ...
0
votes
2answers
349 views

How to run a WebPy server on port 8080 using DDNS of dlink router and to access this site from internet?

I have two major issue with setting up a web server using my dlink DIR-600L router. Issue 1: I run a WebPy server on port 8080. But the DDNS service providers (like dlinkddns.com or dyndns.org) only ...
0
votes
0answers
8 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
31 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?
2
votes
1answer
1k views

How to automate Checkpoint firewalls rules implementation?

I HATE CP with a passion beyond belief... I mean, why, WHY you couldn't include a command line interface that allows me to grep a CSV file in which I'm requested rules, format them properly and then ...
0
votes
0answers
32 views

How can I add a contextual menu that will work ONLY on files of a specific folder?

I have been looking around and it's hard to find what I want. I know how to add context menus for files of particular extension through registry edit. I need to have context menu for all the files in ...
0
votes
0answers
53 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 ...
0
votes
0answers
34 views

Associating .pyw file with Python to run Python programs using other libraries like matplotlib, scipy,

The answer to a previous question "How do I associate .pyw files with Python in OSX" almost solves this problem - but not quite. I have a Python script that runs successfully under Andaconda's Spyder ...
0
votes
1answer
64 views

Configuring PyDev

After speeding too much time trying to find out what went wrong with the installation of a new module in python, I realised that the root of the problem is due to fault configuration of PyDev plug-in. ...
6
votes
4answers
7k views

How can I open Python files in IDLE from Windows?

I'm new to Python. I use Python 2.7 and I am running Windows Vista (64-bit). How do I make it when I click on .py scripts... that it opens up in IDLE so I can edit it a snap? Ya know... without having ...
2
votes
1answer
70 views

Possible causes for random software changes?

I'm on Windows Vista. I've been using IDLE, the default Python IDE ever since installing Python. I long enjoyed the functionality of right-clicking a .py file and selecting "Open with IDLE" until ...
1
vote
1answer
216 views

Sublime Text can't find interpreters for SublimeREPL

Interestingly, I'm able to execute .py files through any of the Tools -> SublimeREPL -> Python ->* options, except virtualenv, which does nothing, or execnet, which is not applicable, but ...
1
vote
1answer
107 views

Python IDLE won't launch - (Using MAC 10.8.5 /Python and UNIX noobie)

Months ago, I installed Python 2.7 on my MacBook Pro (OS 10.8.5) and was using IDLE to run programs for classes I was taking on Udacity. One morning IDLE would no longer start, it would just bounce ...
1
vote
1answer
112 views

Python IDLE not starting when clicking .py files in OSX Finder

I can open IDLE. After opening IDLE, I can do File > Open > some_file.py just fine. When IDLE is open, I can also just double-click on any .py files in Finder and they will open in IDLE. ...
0
votes
0answers
37 views

Blender pythonpath with existing python installation

i have installed python 2.7 for some applications and set the pythonpath in my environment variables. now i wanted to start blender, but it crushes because i use an old python version. i googled it ...
3
votes
2answers
419 views

Python2.7 yum module

I have a virtual machine running centos 5.8 and I just installed python2.7 because I was having some issues with import simplejson as json. After installing python2.7 and running ansible roles I have ...
2
votes
0answers
104 views

Sublime Text 3 - Detect syntax based on file header

How would I get Sublime Text 3 to recognize file type (i.e. set syntax and build system) based on a files header? For example: If the first line of a file was <!DOCTYPE html>, it would be ...
0
votes
2answers
166 views

raspberry pi fast linux based os

I have made a server with python that does some stuff with databases. My original plan was to install raspbian, but now that I have it is kind of sluggish. is there a more lightweight and thus ...
0
votes
0answers
40 views

Run Python program to use all available memory in a LAN cluster

I have access to 20 LAN connected computers each running Ubuntu 12.04 lts(SSH installed and password less authentication enabled). Each of the computer has 2 GB RAM. I am running a python program that ...
0
votes
0answers
54 views

gcc fails with “No available targets” on Mac OS 10.9.2

When I try to install pycrypto or psychopg2 on my macbook, I get this error: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic -std=c99 ...
5
votes
2answers
3k views

Python IDLE disappeared from the right click context menu

My IDLE shortcut in the right click menu has disappeared. I think it's because I used to use Python 2.7, but I installed Python 2.5 without uninstalling Python2.7, and then uninstalled Python 2.5. I ...
0
votes
0answers
20 views

Sublime Text 2: refactor Python line into method / create a method

ST 2, Python. Code in body of class method: print 'here' bar = foo(*args) I'd like to select foo and refactor it into a class method, or create it if it does not exist yet: def foo(self, *args): ...
0
votes
0answers
38 views

How to get the file extended attribute offline on windows python

I'm looking for the way to get the attribute file property as shown on windows file parameters. This property show D for folder, A for archives , O for Offline,... I've already tried to have a look on ...