Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python and should be asked at [Stack Overflow](http://www.stackoverflow.com).

learn more… | top users | synonyms

1
vote
0answers
4 views

Snippets for PyCharm (specifically django templates)

I am in the process of moving from SublimeText to PyCharm for python development. One feature I loved in Sublime were the Djaneiro Django template snippets. In a template, I could just type include ...
0
votes
0answers
6 views

copy a pc file to VM env/linux

I have a file on Desktop 'Test1.py'. I want that file to run on saltmaster VM and am trying to copy that file through scp commands. I hit this command scp Test1.py ...
-1
votes
0answers
9 views

How do I submit data to a web form in python? [migrated]

I'm trying to automate the process of creating an account for something, lets call it X, but I cant figure out what to do. I saw this code somewhere, import urllib import urllib2 import webbrowser ...
0
votes
0answers
5 views

Setup SSH tunnel on windows machine using sshtunnel

I would like a local program to be able to ssh into a machine which is on a private network. The schematic should be like this: (external machine) ---ssh---> (external/internal facing server) ...
14
votes
5answers
48k views

How do I write code of more than 1 line in the Python interpreter?

I have a problem coding Python in terminal. I'm just learning basics so I have no need to create .py files. In terminal I can run one line of code in the Python interpreter, but how do I write more ...
3
votes
6answers
48k views

How to manually stop a Python script that runs continuously on linux

I have a Python script that is running and continuously dumping errors into a log file. I want to edit the script and run it again, but don't know how to stop the script. I'm currently logged on ...
15
votes
2answers
15k 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 ...
1
vote
1answer
17 views

Installing parallel-ssh on python2.7

I am trying to install parallel-ssh on python2.7. My use-case for using this is to make an ssh connection run in parallel and not let it block further execution of a python file. I used the following ...
0
votes
0answers
6 views

Anaconda show error under cursor on current line

I would like to know if it is possible in Anaconda to show more information about the error on the current line. I have only found context menu > Anaconda > Show error list, but this shows all ...
23
votes
3answers
5k views

Find outdated/updatable pip packages

pip freeze shows me the packages installed, but how do I check against pypi which ones are outdated?
0
votes
0answers
27 views

After declaring Panda3D's python as my interpreter, it unlinks all other libraries that I need

(I use Eclipse on mac but I can switch to any other tools that can solve this problem.) Since I need to use the library Panda3D, the way to setup Panda3D showed on its official website is to make the ...
0
votes
0answers
5 views

What kind of JIT uses PyPy

What kind of JIT compiler uses PyPy. The real one (whole code is translated at app start-up) or the economic one (only used parts are compiled)?
0
votes
0answers
12 views

Detect when 'New E-mail' or 'Send' button is clicked in outlook

I'm trying to write up a python script that could detect when a button ('New E-mail' or 'Send') is clicked in Microsoft Outlook - > and then do something if that is true. Is there any way that ...
1
vote
2answers
985 views

Outline view in Sublime Text 3

I've been advised to use SublimeText and I'm giving it a try. When I take notes in a text file, I would like to structure it with a few levels of headers (in LaTeX, that would be sections and ...
0
votes
0answers
8 views

how to use python with nginx

I have nginx running under Windows. What I can't figure out is how to bind python interpreter to nginx. I guess it has something to do with nginx.conf. I'm going to use Django or other framework, I ...
4
votes
2answers
8k 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 ...
6
votes
5answers
45k views

Uninstalling Python 3 on a Mac

I installed Python 3 to learn Python and quickly realized that django isn't compatible with Python 3. How do I uninstall Python 3 on my Mac so that I can install a different version?
0
votes
0answers
16 views

Creating a bash script or something to run through several directories

I had a quick question. I have the code below, which as you can see, I am loading in a file. Note that I am in the folder "Angle1" and that I am in the subfolder "1eV" The code works fine and does ...
3
votes
3answers
1k 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 ...
2
votes
1answer
36 views

Python Script with .py Extension Data Recovery

I have deleted some of my python scripts about 3 months ago and now I want to recover them, I tried Data Rescue 4 which is told as the best data recovery software but it was unable to find .py ...
-1
votes
0answers
12 views

How to start with this [migrated]

Hi I want to excute the following command in python using for loop. I have written the following code but it is not working. x = 5 for i in x: if (x % 2) == 0: print (i, "is an even number") else: ...
0
votes
0answers
33 views

Python module path not found

On our Openstack installation somethin awfully went wrong. Now python does not work properly any more. The module path is not found: root@controller:/root# keystone token-get Traceback (most recent ...
0
votes
0answers
12 views

Recon-ng on Windows disables all modules

I was running Python 3.5 but got to know that recon-ng tool runs on Python 2.8 or below. Therefore I installed Python 2.7.11 also on my Windows 10 system. I installed the dependencies also mentioned ...
1
vote
0answers
15 views

Installing Python Chromagnon for OSX Terminal to extract/restore Google Chrome tabs

I saw this suggestion posted here http://softwarerecs.stackexchange.com/questions/19500/tool-to-read-data-from-google-chrome-snss-files/19501?noredirect=1#comment46394_19501 but am not sure how to ...
3
votes
3answers
633 views

How to run pip in non-interactive mode?

Most of tools I'm using have some mode (often ON by default) where they ask me zero questions while running the command. apt-get is an example close to pip. There's -y option which makes it ...
1
vote
0answers
15 views

Running an ssh connection as a daemon

I am trying to monitor gerrit events through an ssh command. The command is as follows. ssh -p 29418 review.example.com gerrit stream-events I need to monitor various such gerrit instances running ...
0
votes
0answers
25 views

How do I use uncompyle6

I am new to Python. I have version 2.7.11 installed on my MacBook Pro, running Yosemite 10.10.5. I am trying to figure this out because I would like to decompile the scripts to the Native Instruments ...
0
votes
1answer
24 views

Python - TypeError: 'list' object is not callable [closed]

I'm trying to write a text file that has a list of rearranged alphabets so that each begins with a different character. The first letter is moved to the end, repeat. alphabet = ...
0
votes
0answers
14 views

What is the best way to create a friendly interface for postgresql database? [closed]

I've created a Posgresql database, and I'd like to create a web form to be easier and faster for inserting data in the database. I found out there are a lot of different alternatives, php, python, ...
1
vote
2answers
15k 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
1answer
13 views

Python logging output limited to ~65 lines

I am working on a simple python script on CentOS 7. There is an error, but I am trying to figure it out using the log. I have a logging class that has the following logging levels: Error Warn Degub ...
0
votes
0answers
50 views

pylucene install on mac failed

using what recommended in official document: https://github.com/fnp/pylucene/blob/master/doc/documentation/readme.pdf changed lots of environment variable but got this error in the end: clang: error: ...
0
votes
0answers
9 views

Fixing a Python installation in Ubuntu 15.04

In order to run a program that requires Python 3.5, I recently installed it from source using checkinstall: # download and extract the source # install dependencies cd Python-3.5.0 ./configure make ...
0
votes
1answer
29 views

Python application called under apache server is not the same as one run from command line

So I'm running dokuwiki under Apache on RHEL6 and working on a plugin that calls proc_open in a php script. My problem is that I'm trying to call an application that has been installed locally for ...
1
vote
1answer
11 views

Move Code PyCharm

I am currently re-structuring my Python Code using PyCharm. I am often in the situation that I have to "move" many lines of code due to the indentation mechanism of Python. Moving lines of code ...
0
votes
0answers
22 views

Compiling OpenCV from Source Excluding Features

I'm trying to install OpenCV 3.1.0 from source on OSX following this article. Long story short, I'm at the point of creating the make file using the following declarations: cmake -D ...
0
votes
1answer
32 views

Sublime Text Editor 3 doesn't show traceback when running Python code

Yesterday I installed ST3 and installed some plugins, but I noticed that if Python has a syntax error then it shows an error. But when a statement has a non-syntax error, then it shows nothing. Like ...
2
votes
1answer
3k views

Selenium with PhantomJS, click() not working

I have a working script to manipulate a site. When running with webdriver.Chrome(chromedriver.exe) it works like a charm. But when I try with webdriver.PhantomJS(phantomjs.exe) it doesn't work. More ...
1
vote
1answer
137 views

How to pass nmap outout to a Python script

I have a list of server, and I want to nmap then pass to a Python parser (this) So normally I do this: nmap -sV -p- hostname -oN - | python nmaptocsv.py > hostname.txt Now I want to create a ...
0
votes
0answers
10 views

Anaconda install core dumps when trying to unzip

I download this file: wget http://repo.continuum.io/archive/Anaconda2-4.0.0-Linux-x86_64.sh And run it per the instructions: bash Anaconda2-4.0.0-Linux-x86_64.sh And it core dumps trying to ...
4
votes
2answers
3k 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 ...
0
votes
0answers
11 views

OSX-Launchd leaving processes open

I've written a script in Python that I call using launchd every night. The script uses a time delta to stop after a few hours. I'm finding that my plist file and script are working properly (launching ...
-1
votes
1answer
25 views

Why do I have multiple python executables?

I am trying to add python to my PATH variable, but I'm not sure which one to add, or what the difference is. I have one in \appdata\local\programs\python\python35-32\python.exe and also one in ...
0
votes
2answers
37 views

Running a Python script that accesses a protected file when Windows starts

I have a Python script that adds some text to the hosts file which allows administrator access only. So, what I do is I first open cmd from the Start menu on Windows 7, and then right click and go to ...
1
vote
0answers
20 views

Troubleshooting tips for SSH issue on proprietary software

I am having an issue establishing a channel with a piece of hardware that we purchased. I can SSH into the VXworks OS using both Putty (on Windows) and the Ubuntu's CLI, however, when I send commands ...
0
votes
1answer
654 views

Installed Python 2.7, but Module in /usr/lib/python2.6/site-packages

I'm running CentOS, it already has Python2.6. I installed Python2.7 and I can see version 2.7 with python -V. I installed demjson module(pip install demjson) and then I try to execute the program. It ...
3
votes
3answers
166 views

How to jump to top or bottom of script with keyboard shortcuts?

I'm looking for the VI/VIM equivalent of 'gg' and 'Shift+g' but within PyCharm. Searched through their docs and didn't find anything.
0
votes
0answers
10 views

Why doesn't home-brew correctly configure my python installation?

I installed python 2.7.11 using home-brew on my OS X EI Captain. Note that EI Captain shipped with python 2.7.10 already. However, it seems like the install done by home-brew did't correctly configure ...
0
votes
1answer
28 views

Strange socket behaviour (one computer - my laptop - will accept a connection to my server, another - my PC - won't)

I wrote 2 programs in Python 2.7. One creates a host socket while the other one creates a client socket. Then they try to connect. I had my host program on my PC and put my client program on my phone ...
0
votes
0answers
34 views

How to direct (Python) error messages printed in a PowerShell console to a text file

Firstly, the errors I'm interested in redirecting are NOT PowerShell errors, but those generated by a Python script that is called within my PowerShell script. I have read multiple post on here (and ...