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
vote
0answers
9 views

Python IDEs stopped working

I'm a beginner programming student, and was using PyScriptor as my Python IDE. Today I wanted to start working and surprisingly, I get an error when starting PyScriptor: Python could not be ...
0
votes
0answers
14 views

Learning Python [on hold]

Anybody have a recommendation for the fastest way to learn Python? Been bouncing back and fourth between Zed Shaw's book and codecademy. Both are a bit repetitive/boring and I'd really like ...
1
vote
0answers
19 views

Can we send and receive uTorrent packets through TOR?

I just started using pcapy python module to capture network packets. Is it possible to capture packets going out from uTorrent (on my own machine) with pcapy or scapy and sending them over the TOR ...
0
votes
0answers
14 views

What “requirement” do I need to give to pip?

I am trying to install PyECC on a Windows 7 machine. Pip is pretty inconsistent, so I'm not sure what it wants this time. First I ran pip install PyECC and got Collecting PyECC Could not find any ...
1
vote
2answers
10k 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 ...
0
votes
0answers
6 views

How to import file into python? [on hold]

I have two files, python code in there. In one file there are only functions, in the other my actual working code. I want to tidy up things a bit so the functions went into a separate file. How do I ...
0
votes
1answer
10 views

How can you lock computer while using curl to download files?

I’m using a Python script in the Terminal in Mac OS X 10.10.2 to download many files from a webpage using curl. However sometimes I might want to lock my computer and walk away but this terminates my ...
0
votes
1answer
21 views

Running Python scripts in Chrome on Windows 7

I would like to run Python scripts (.py files) in Windows 7 Enterprise WITHOUT downloading anything, since I am at a school library. After some research, I found some Chrome apps that CAN run Python, ...
0
votes
0answers
5 views

Search for string in Python

I'm using Python to search for a substring inside of another string. Both strings have been read in from a file. So far I have tried the in operator as well as string.find(substring). Using either ...
2
votes
2answers
4k 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 ...
-1
votes
0answers
17 views

Difference between 'this' and 'self' keyword [closed]

Considering the similarity between the this and self keyword, I have a doubt that how similar are they in practice. And why don't we have to type 'this' as an argument in java methods, but we have to ...
31
votes
6answers
17k 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. ...
0
votes
1answer
3k views

How to launch python script as a windows Services

Using python 2.7 and windows 7. I have a python file(.py). I want to launch this script as a windows services, i.e. this code will keep on running from start to end and never terminate. I can convert ...
1
vote
0answers
10 views

Python not finding appropriate modules/ python version problems

I'm trying to install w3af, and getting a myriad of dependency issues; these I'm trying to resolve by attempting to run a python script which imports the required modules - if this runs without ...
2
votes
1answer
40 views

How to schedule a task to execute 9000 seconds from now on?

I have a batch script that executes a few Python scripts and then needs to schedule the last Python script to be executed 9000 seconds later. Here's what I have so far: (I only know how to manually ...
3
votes
2answers
5k 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 ...
1
vote
1answer
25 views

Intercept outgoing URL's using python

So, I have a Windows computer and it has three web browsers. IE, Chrome and Firefox. Is it possible to have a Python script capture the URL's going out of the browser and store them in a variable? Is ...
2
votes
1answer
40 views

How Are Integers Stored In Excel

I wrote a python script that uses the CSV and xlrd packages to convert a .xlsx binary excel file to a tab delimited .txt file. Unfortunately, every cell is converted to a string (which is ...
0
votes
1answer
26 views

Unable to open Python GUI application

I've installed WinPython 32-bit v3.3.5 in my PC and added C:\WinPython-32bit-3.3.5.0\python-3.3.5 to PATH. My python GUI app does not automatically associate with python and 'Open With' is not ...
1
vote
1answer
18 views

Python-fu plugin not visible in Gimp

I have built and installed the Resynthesizer plugin for GIMP on Linux. The files appear correctly in the plug-in directory /usr/local/lib/gimp/2.0/plug-ins/, but none of the Python plugins is ...
0
votes
0answers
22 views

The module “scmt.dll” failed to load

I'm trying to install a software written from Python 2. The instruction guides me to build the DLL file2 by using this command: python setup.py py2exe And then register them by using: regsvr32 ...
0
votes
0answers
25 views

Blending colors in an RGB LED using GPIO on Raspberry Pi [closed]

I’m tooling around with my Raspberry Pi’s GPIO pins—sweet deal, I didn’t even realize the Raspberry Pi had those—and have an RGB LED plugged in. I have the negative terminal connected to GND and the ...
2
votes
2answers
5k views

python /usr/bin command not found

System: Mountain Lion 10.8. I tried to uninstall python 2.7 and therefore i also deleted /usr/bin/python. However, after that i needed python again and i installed in again. Now I want to use ...
0
votes
2answers
65 views

How do I configure easy_install to use the right Python interpreter?

I am using mac OSX and have installed python 2.7.9 via this article, from /usr/bin if I run the command ls -l /usr/bin/python* in a bash terminal, I get lrwxr-xr-x 1 root wheel 67 Jan 24 02:12 ...
-1
votes
2answers
27 views

Copy sequential files into sequential directories

I need to copy multiple, sequential files into sequential directories. The files have the julian date (day of year) with other info in the file name. The directories are listed by julian date (day of ...
2
votes
3answers
27 views

How can I install pygame on python with cygwin? [duplicate]

I cannot install pygame on cygwin properly. I tried to follow that old doc , http://msdl.cs.mcgill.ca/people/tfeng/svmsccdoc/node49.html, but it doesn't work. Worse issue is SDL not be able to ...
0
votes
1answer
21 views

install matplotlib with pip when pygtk is in non standard location

I have installed PyGTK 2.24.0 in /software/pygtk-2.24.0/gcc directory. Is there any way without rewrite the setup program how to install matplotlib with pip? Simple pip install matplotlib builds ...
0
votes
0answers
15 views

Pop up notification on system tray when a new file added to a directory

How will I add a pop up notification on my system? Let's say I have a directory wherein everyday I have a batch process running and keeps on adding files to that directory? How will I add a prompt so ...
0
votes
1answer
15 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
271 views

wine msi installation issue - err:msidb, fixme:storage

I am trying to do stuff with vpython. vpython.org suggests I do a wine installation and then try to install the vpython stuff as per the instruction mentioned here But the issue is with wine when ...
3
votes
1answer
4k views

python.h not found

I got an installation script that calls gcc and gcc tries to compile a .c file that includes a header that does not exist on my system (ubuntu) . #include "Python.h" I have both python 2.x and ...
0
votes
0answers
12 views

How can I change the sub-directory dynamically while I create one .zip file with zipfile?

I have 5 source file within the same directory (datadir) like: ./datadir 1.file 2.bin 3.md5 4.dat 5.xls Then I want to zip these 5 files into one zip and place them into some directory ...
0
votes
2answers
50 views

How can I install pygame on python with cygwin?

I cannot install pygame on cygwin properly. I tried to follow this old doc http://msdl.cs.mcgill.ca/people/tfeng/svmsccdoc/node49.html but it doesn't work.
0
votes
1answer
62 views

How do I make this add-in toolbar button work in ArcMap 10.2 using the ESRI provided Python Add-In Wizard (i'm following a tutorial)

I'm following a tutorial here: http://resources.arcgis.com/en/help/main/10.1/index.html#/button/014p0000001z000000/ I have added the code to the .py file and installed the add-in using the ...
-1
votes
1answer
38 views

Cannot import module `PyQt4.QtGui`

I am using Mac OS X 10.7.5, have followed and installed the PyQt modules using the "Install homebrew" method as stated in this link but when I did a test run by typing in from PyQt4.QtGui import * I ...
0
votes
0answers
16 views

saving/:w a python file in gvim is creating two of the same files with different extensions [duplicate]

When I first :w test.py My file saves on my desktop with a picture of a python script and the file type is shown as Python File. Now when I go to save my file without including the name as in :w a ...
0
votes
1answer
34 views

How to install python-pip in CentOS7 Docker Container

I am trying to build a docker container that includes pip. I am on CentOS 7. Here is the fragment from running the docker build command: Step 3 : RUN yum -y install python-pip ---> Running in ...
0
votes
0answers
28 views

Error when installing Python modules using wheel files (Python 2.7 and windows 8)

I am trying to install multiple Python modules (Shapely, Fiona, GDAL, etc) with a wheel file (.whl) on Windows 8 with Python IDE 2.7 x32, but for some reason it receive this error: ...
0
votes
1answer
46 views

How to workaround bootstrap.pypa.io while installing openstack? It's not available

I am trying to install openstack first time, as described on official website http://docs.openstack.org/developer/devstack/ bootstrap.pypa.io is not available (i am not able to ping it). It is ...
0
votes
0answers
26 views

Python shows wrong version in command prompt

I have downgraded my version of Python from 2.7.9 to 2.7.4 for compatibility with a legacy piece of software. On Windows 7 x64 computer. I removed Python 2.7.9 and then installed 2.7.4 into the ...
1
vote
2answers
632 views

extract characters between first and second underscores of filenames and count such files in linux folder

I would like to extract characters between first and second underscores of filenames in a folder and count such type of files present in it. The folder contains files in a particular format such as : ...
1
vote
1answer
35 views

Split large text file according to record values

There are some questions alike in this site, but mine is a bit different. I have a 30 GB text file, and I need to split it into smaller files according to the different record values. For example; ...
0
votes
0answers
5 views

Easier way to debug python using IPython.embed?

I tend to debug python apps by spawning an embedded IPython instance. And, I've learned to throw an assertion right after, to avoid getting stuck, when I have the embed in a loop. So, given code ...
3
votes
1answer
142 views

Is it safe to install newer Python and Git versions from source?

I wanted to install newer versions of Python and Git to my system. I eventually used the commands below to compile and install new versions. However, I was informed that it would have been better to ...
0
votes
0answers
10 views

logging package in python - do_POST between two simple http servers

I have two http servers that talk with each other. the scenario is that serverA get a POST request from "outside" (not serverB, by: curl -X POST localhost:8888 ), then serverA sends POST request ...
-1
votes
0answers
21 views

notepad++ code folding in python only on functions and classes

I use Notepad++ for editing python scripts. I have a problem, when I collapse all code blocks, it also collapses ifs and loops as well, basically all blocks with deeper indendation. Is there a setting ...
0
votes
1answer
42 views

bash command in python not working

I would like to run a bash command from python. My code: process = subprocess.Popen(('ifconfig -s'), stdout=subprocess.PIPE, shell=True) output = process.communicate()[0] lcd.message(output) sleep(2) ...
10
votes
6answers
46k views

How to install pip and easy_install on CentOS

I tried to install pip and easy_install on my CentOS but could not find them. How can I install them? Also, I have two versions of Python, 2.4 and 2.7. How will pip make sure to link newly installed ...
0
votes
2answers
2k views

Fedora 17: How do I install Python 2.7 into /usr instead of /usr/local?

I want to install Python 2.7 onto my Fedora machine, but it installs it into the /usr/local/bin. How do I make it so that won't happen? I want to do this because the setuptool I installed keeps on ...
0
votes
0answers
5 views

Install Python's Pandas package on Synology with Marvell CPU box [migrated]

I have a Synology (DS211j, DSM 5.1-5022 Update 1, Python27) box and I'm trying to install pandas package on it via pip. Everytime I run pip install pandas, I'm getting the following error message in ...