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

0
votes
0answers
29 views

decorator retry doesnt work

Iam trying out the example from : http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/ I get error : @retry(Exception, tries=4) TypeError: 'NoneType' object is not callable ...
0
votes
0answers
13 views

problems starting django for the first time

New to Django I downloaded a django app (DefectDojo) and I'm following instructions (on windows) to start Django. So far, I've used pip to install Django and a host of other libraries. I understand I ...
1
vote
0answers
77 views

How to parse a Wireshark pcap for a string

What efficient ways exist to parse a Wireshark capture to check for a given string? I'm trying to find a STOP command for an embedded device that its plaintext in the Wireshark 'info' field. Are ...
1
vote
3answers
39 views

How can I give maximum CPU Utilization to this Python Process

I'm using Spyder IDE for Data Analysis using Python. My dataset is pretty large and hence I wish to give it maximum priority. I've set the priority to realtime however it is only using 13-15% of CPU. ...
1
vote
0answers
52 views

Disable Ghostery add-on intro page in Selenium Firefox profile - Python

I am using Ghosetry add-on in my Selenium Firefox profile. Firefox is opening with Ghostry add-on but I have two issues with that. 1.Every time I invoke Selenium-Firefox, it is going to intro page ...
1
vote
1answer
66 views

Fixing homebrew path

I'm learning Python and most tutorials recommend to install Python using homebrew so I installed homebrew then I typed: brew install python which should overwrite OS X Python 2.7.10 with 2.7.11 but ...
0
votes
0answers
20 views

Module is found by python2.7 but not python3.4 in debian 8

I m trying to use a python module in python3.4 but I did the whole PythonPath variable thing in my .bashrc file and the module only works with python 2.7. If I run python3.4 interactively and try to ...
1
vote
1answer
152 views

Notepad++ change color of import statement in Python

Is there a way in Notepad++ to adjust the syntax highlighting for specific keywords? What I want is to be able to change the color of the import keyword in Python. I know you can create a user defined ...
0
votes
1answer
79 views

Run python program on startup in background on Intel Galileo

I have a python program that is an infinity loop and send some data to my database. I want this python script to run when I power my Intel Galileo. I tried to make a sh script python myprogram.py and ...
0
votes
1answer
16 views

How can I get the entry of some commands in .bash_history through a script in centos?

writing a python script to generate commands is working and the commands are getting executed in bash, but they are not getting entered in .bash_history.What should I do so that those commands are ...
-1
votes
1answer
64 views

How to see Python source files on Windows if it's in hidden folder

I formatted my computer couple of days ago and re-installed Python again. The version is 3.5 now. The problem is, Python installed itself into AppData which is a hidden folder. I tried to un-hidden ...
0
votes
0answers
28 views

While interactively reading Thunderbird emails, how to automatically copy full content of a single email to stdin of a Mac OS X command?

What tools or methods might I employ to solve the problem below? If I have to write code I'll do so; Python-based environment preferred. Problem summary How can I issue a command to copy the full ...
0
votes
1answer
222 views

Upgrade python 3.4 to 3.5

I have two versions of python, namely, 2.7.10 and 3.4.3 in my Ubuntu 14.04 (trusty) machine. How can I upgrade the 3.4.3 version to 3.5 latest version without affecting the 2.7.10 version? Thanks ...
1
vote
1answer
21 views

How to transfer scripts seamlessly between server and a desktop computer?

I have two python scripts: First one runs in a server and creates a script in lua language. Second one runs in my desktop computer and is supposed to receive that file, run that lua script and ...
0
votes
0answers
35 views

Google Chrome cannot connect to native message process host after docking

I am testing a chrome extension that opens a code editor from a web page. It connects to a native python script using chrome.runtime.connectNative(). The python script is able to create a file and ...
0
votes
2answers
24 views

why do strings print differently in python shell then interpreter window?

new to programming and i am reading through a a couple intro to programming concepts using python books, and i am seeing a contradiction between the texts and what i am seeing in my python document. ...
0
votes
0answers
59 views

How to save one file to multiple locations simultaneously

I am currently doing my GCSE Computer Science coursework and save it to my One Drive. However I have already had one occasion where something happened to my account and all data was lost. To prevent ...
0
votes
0answers
35 views

Need python or power shell code that configure the network of a Windows VM without accessing the VM inside

I want to configure the network of a Windows VM, and I want to run script from jump station. Since we have to configured network, initially we don't have IP, so I only configure the network via v ...
0
votes
0answers
54 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
31 views

drone-kit Python is not connecting with Iris+

I'm trying to build my first dronekit python program, and I'm doing some tests with some examples but I couldn't connect to my UAV(Iris+). I plugged the usb radio(3DR 915 MHz) and I put vehicle = ...
0
votes
0answers
30 views

Run nethogs in python program

I want to run a python program for displaying bandwidth utilization using nethogs. In terminal nethogs wlan0 executed and shows the result. But when i run the code in eclipse it shows sh: 1: nethogs: ...
0
votes
1answer
37 views

estabilishing a connection using scapy

When I do ip=IP(src=<src ip>,dst=<dst ip>) SYN=TCP(sport=4444,dport=4444,flags="S",seq=12345) send(ip/SYN) I see on Wireshark that src computer sends a SYN packet to dst, to which it ...
1
vote
1answer
131 views

Tinfoleak 1.5: __init__() got an unexpected keyword argument 'secure'

I found a Tinfoleak fork on a developer blog (http://www.vicenteaguileradiaz.com/tools/) and tried to use this tool on my own Twitter account, but even after installing any of the required ...
0
votes
0answers
48 views

nfqueue is full and I don't know how to flush it

I wrote a python script to handle some packets in a nfqueue but something went wrong, the queue got flooded with packets and now the script won't run because it can't open the queue. It says: ...
2
votes
1answer
367 views

How to create a python3 virtual environment (as of 2016)

I installed python3-virtualenv on lubuntu 15.1 using the official ubuntu package apt-get install python3-virtualenv. The official documentation indicates that a simple virtualenv . in my project ...
0
votes
0answers
45 views

nfqueues and arp spoofing iptables

I am ARP poisoning and DNS spoofing my home network for learning purposes. When I get the victim to send their packets to my attacking computer, which rule do I have to create so I can intercept the ...
0
votes
0answers
127 views

Requirements to install cx_oracle

I'm trying to install cx_oracle on Mint 17.1. At first, I got an error "cannot locate an Oracle software installation". I then attempted to install Oracle 11g, but the installer failed. There was a ...
0
votes
0answers
87 views

Request authentication on gatt server with BlueZ 5.37

I am running on a rpi a gatt server(example-gatt-server modified) using BlueZ BLE stack and all runs just fine but i was wandering if anyone managed to set up a PIN authentication for the server. ...
0
votes
2answers
31 views

Unable to add spaces

How can i add spaces between my outputs using sed/echo or any other command in linux? Preferred Output: Virtual Machine Test01 status Running. Virtual Disk Test01 size 61GB Physical Disk ...
0
votes
0answers
50 views

mitmproxy ignore all websocket connections

At the moment, mitmproxy doesn't seem to be able to handle websocket connections. How can I just pass these on so that clients can still connect with a websocket server? Here's my current command: ...
0
votes
0answers
17 views

When calling a python program from a context menu, the program only opens if the right clicked file is in the same directory as the script

I have created a python script which is a simple IDE. When selecting "Edit with RavenIDE" in the context menu of a .py file, the program will open that file. Unfortunately, it only opens the file if ...
1
vote
0answers
63 views

python34 installing rtree on Windows 64

I am using windows10 64 bits, my os.name is 'nt', I used pip to install but its complaining about the spatialindex_c.dll File "C:\Users\Bachir\AppData\Local\Temp\pip-build-td64lrth\rtree\rtree\core....
0
votes
1answer
56 views

Cannot upgrade Python

I just recently tried using Let's Encrypt to generate free SSL certs for a small website I'm running on a personal server. When I ran the letsencrypt-auto tool everything seemed to work, although a ...
1
vote
0answers
94 views

Running `pip` gives 'command not found' after successful Python homebrew install

To preface, I am very bad with the terminal, please be patient with me. when I run pip I get: zsh: command not found: pip I have installed Python 2.7.11 with brew, which should allow pip to work ...
-1
votes
1answer
45 views

Notepad to .py file [duplicate]

When I first made a .py file I told it to open in notepad, and now it wont run in cmd, it only opens the notepad, does anybody have a fix for that?. I thought that i was supossed to run it by dobble ...
-1
votes
1answer
65 views

How do I convert a setup.py file to an egg file for Deulge 3rd party plugins in Windows?

I do not understand how to change a 3rd party plugin into an egg file using python. An egg file is the only file the deluge will accept as a proper plugin. The problem is that all the third party ...
-1
votes
1answer
132 views

How can I constantly check that a python script is running 24/7 and is not down?

I have a python script which has to run 24/7 on a Linux server. What's a wise way to ensure it's up? They suggested me to use cron and the 2nd another script which checks the 1st one somehow.
0
votes
0answers
134 views

How to download Anaconda packages for offline installation

I've one machine which used to have internet access where I installed Anaconda 3.5. Now I want to create a Python 2.7 environment: conda create -n py27 python=2.7 How can I download the required ...
0
votes
1answer
132 views

Wrap ffmpeg for extracting audio from video in a python function

I'd like to wrap ffmpeg in a python function for extracting audio from video. I can successfully extract audio from mp4 videos on the command line. ffmpeg -i sourcevideo.mp4 -vn -acodec copy ...
2
votes
0answers
68 views

Can't import python module in .vimrc

So, I decided to try out powerline in vim, and for that reason I installed pypy using brew. I installed macvim as well and it is compiled with python support. Following powerline installation ...
0
votes
1answer
820 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 ...
0
votes
0answers
60 views

Python console keeps popping up in Sublime Text 3

I have configured installation of Sublime Text 3 in one of my Windows machines. Now, I used PackageSyncing to sync packages to another installation of ST3 on another Windows machine. (Both are Windows ...
0
votes
0answers
64 views

Python cannot assign requested address

I was trying to get the IP address on my Raspberry Pi with python: def get_ip(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), ...
0
votes
0answers
86 views

Transfer speed over network faster than from the server itself Ubuntu 14.04

I have a home server low powered 800mhz 2 cpu running Ubuntu 14.04 LTS. I have attached a 5TB external hard drive USB 3.0 and I get average 30MB+/s read speed using hdparm -t --direct. My issue is ...
1
vote
0answers
16 views

How do you add Python syntax highlighting to a markdown file in vim?

For Vim how do I add Python syntax highlighting to markdown files? Context I'm creating a markdown document to show how to use a project. Fairly simple thing if __name__ == "__main__": ...
0
votes
3answers
49 views

Attempting to make a multi-column graph

I am trying to make a column graph where the y-axis is the mean grain size, the x-axis is the distance along the transect, and each series is a date and/or number value (doesn't really matter). Here ...
0
votes
0answers
65 views

How to make sure our script is using a proxy

I have a python script I made which requests pages on the web. I am using a mac os and am using a socks proxy on 127.0.0.1:9150 on my wifi (pass all apps thru proxy --tor--). Using wireshark, how do I ...
0
votes
3answers
1k views

Upgrade Python from 2.6 to 2.7 on Centos 6.5

I want to update my Python version on server, my current Python version is 2.6 and I want upgrade it to 2.7. Plesk is installed in our server and I also have access to ssh. How can I upgrade it in ...
1
vote
1answer
56 views

How to copy a .zip from within a .tar to a given location without extracting entire .tar using AWS S3 CLI

OSX 10.11 - python3.5 or AWS CLI (or other tool?) I have ~ 5,000 subdirectories within an Amazon S3 bucket, each subdirectory contains a single .tar. In each .tar it contains only one .zip, ~<1mb ...
0
votes
1answer
111 views

Why is 256 color display not working with linux console, while it does with screen?

I am working on a python program with a text-mode GUI based on urwid. urwid is a library to create ncurses-style programs with python. Operating System is CentOS 7. Everything works fine under '...