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

Problems when installing NumPy on MacOS 10.9.4

I am using MacOS 10.9.4 with Xcode 5.1 (command line tools installed) Today I upgraded macports and installed py27-numpy. Everything looked ok in my terminal window. Then I tried to install PyCogent ...
0
votes
0answers
8 views

Batch removal of watermark from a pdf using pdftk

Is there any script available or possible to remove a specific and a very large watermark using python. How to remove watermark from pdf using pdftk? I followed everything in the above link but i've ...
0
votes
0answers
16 views

Mac OSX finder requiring permissions when deleting file, even after chmod

I created a Python script that requires sudo permissions to run (doing ICMP requests). This script creates a small directory and a couple .csv files, as well as a log.txt file. At first, after running ...
0
votes
0answers
8 views

Auto search and download torrent from file names in CSV file?

I lost my hard drive some time ago and the only thing I have left is a CSV file with all the sector refenences and most of the filenames. Some of them are either broken or missing characters. Here is ...
1
vote
0answers
23 views

Starting with python [on hold]

I have been an open-source user for many years. I am trying to get up to speed with python. Most open-source tools are like the Borg - massive, complex, and impenetrable to the outsider, but seem to ...
0
votes
2answers
16 views

Creating a Python local server in Windows

I'm trying to use this commmand: python -m SimpleHTTPServer but it's not working. I'm guessing that it isn't working because I'm running that through Windows Command Prompt. How does one make ...
0
votes
0answers
4 views

Android (Java) method equivalent to Python HMAC-SHA256 in Hex [migrated]

I am attempting to replicate the Python HMAC-SHA256 equivalent in Android (Java). The Python representation is shown bellow with the correct output: Python print (hmac.new(key = ...
0
votes
0answers
6 views

Creating virtual host with Apache2

I'm trying to get Apache2 to host my Django project located in /var/www/tbg/. I get an Internal Server Error (500). I have already installed libapache2-mod-wsgi and My files are as follows: ...
0
votes
0answers
5 views

import .cer file into ubuntu for curl

I am trying to use fiddler to act as a ssl proxy for debugging. I am trying to install fiddlers root certificate. I am mainly doing it so I can debug my python program. Using python I get a cert ...
0
votes
0answers
5 views

Using new Python on old CentOS, but only for certain services?

I am using Trac issue tracking system version 0.12 on CentOS 5.8. I am also using Agilo for Trac plugin. This plugin needs Python 2.5 and CentOS 5 comes with Python 2.4. Is it possible to install ...
2
votes
1answer
55 views

What's the quickest way to parse and display a `.csv` file?

I am currently using python with matplotlib to display a 440+ k lines .csv but it takes 11 sec to display only one column. My .csv has always the same format. Is there a way to parse it quicker ? I ...
0
votes
1answer
11 views

How to automatically close the Debug Output Window in PTVS?

I am using the PTVS package on MSVS 2013 Express to develop and run my Python scripts. I am using the Start button (F5) to run the script. The script uses the TCP/IP stack to communicate with an ...
-1
votes
1answer
28 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
0answers
6 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
40 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
14 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
20 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
25 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
23 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
20 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
28 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 ...
0
votes
1answer
20 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
12 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
25 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.... ...
0
votes
0answers
14 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.
1
vote
0answers
23 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
10 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
36 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
240 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
32 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
43 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() { ...
1
vote
2answers
113 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
2answers
46 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
44 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
15 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
50 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
60 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
20 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
23 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
10 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
57 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
18 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
25 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
26 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
17 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
40 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 ...
3
votes
5answers
134 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
32 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
32 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
17 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 ...