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
2answers
14k 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 ...
1
vote
1answer
247 views

Can't import matplotlib on Anaconda (Python), on my Mac, even though it's installed on the terminal and set as a default

So basically on my Ipython I can't get it working even though it's installed, and the terminal shows that it should be working. Syntax and Error In [1]: import matplotlib.pyplot as plt ...
3
votes
1answer
149 views

Wireless driver for mouse movement on LInux/windows (with the help of interactive board)

I have moved to mainly working on Linux machine primarily Ubuntu 15.04. Please the question here: http://askubuntu.com/questions/731546/wireless-driver-for-mouse-movement-on-ubuntu-15-04 I have a ...
0
votes
0answers
8 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
8 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
26 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
7 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
6 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
11 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 ...
1
vote
0answers
14 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 ...
0
votes
1answer
35 views

How do I make emacs-key-bindings work everywhere in linux

I am just tired of reaching for the home and arrow keys. There is a windows hack: http://www.davesquared.net/2008/02/emacs-key-bindings-everywhere.html How can we achieve that in linux? The ...
-1
votes
1answer
22 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
31 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
vote
0answers
17 views

How does the LZMA Algorithm works?

Making some research on the net, I found that one of the most recent, optimized and high-performance algorithms for data compression, especially in term of compression ratio and decompression time is ...
2
votes
3answers
6k views

How to install PyQT4 and what are the practical differences between PyQT4 and PyQT5?

I am about to start developing using PyQT, but there seem to exist two versions. Which one should I go for? Also, I cannot seem to be able to install either, using pip install PyQt4 I get the ...
0
votes
2answers
2k views

Python error In linux

I removed the default python install from my linux using rpm command without removing the dependencies, I was trying to install 2.7 manually, which wasn't working out that is whay I thouht may be it ...
0
votes
3answers
65 views

Python script to compare the keys of 2 dictionaries and if equal print value of the key of 2nd dictionary

I have 2 dictionaries for example: dict = {1 : a, 2 : b, 3 : c, 4 : d} dict1= {5 : z, 1 : y, 6 : x, 3 : u} I need to compare the keys of 2 dictionaries and if they are equal, I have to print the ...
0
votes
0answers
21 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 ...
5
votes
3answers
8k 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 ...
0
votes
1answer
30 views

How to run a python script on a server 24/7?

I have a python script which I have to run on AWS 24/7. How can I do that? Should I just run it as I'd do locally: python3 main.py Or should I be: python3 main.py & ? Is there any ...
-1
votes
1answer
36 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
18 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
3answers
28 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
31 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 ...
0
votes
1answer
15 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 ...
1
vote
0answers
11 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
0answers
98 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 ...
4
votes
2answers
7k 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 ...
0
votes
1answer
10 views

Python Script Error

When I try to run the following script SyntaxError pops up indicating the else statement. I ran it in python 2.7.11 and 3.4.3 but it won't work. I am new to programming and cannot figure it out myself ...
1
vote
1answer
756 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
19 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(), ...
1
vote
1answer
113 views

How do I create a local update server for Anaconda Python?

I have a set of networked computers that do not have access to the internet. On each of these computers, I need to install the Anaconda Python distribution. This is currently done by manually ...
0
votes
0answers
9 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__": ...
4
votes
4answers
5k views

Matplotlib font_manager.py font finding error

On a Ubuntu 12.04 machine, whenever I plot something I get an error like: /usr/lib/pymodules/python2.7/matplotlib/font_manager.py:1228: UserWarning: findfont: Could not match :family=Bitstream ...
2
votes
1answer
3k views

Python installation errors

This is incredibly, annoying, I can't do anything in python until this is fixed. Thanks if you can help, I know it can be annoying to have to look at so much code but i'd really appreciate. I'm trying ...
0
votes
0answers
11 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 ...
10
votes
0answers
676 views

Jenkins realtime console output for parallel threaded fabric command

We have a Python fabric command that runs in parallel across several hosts, something like this: $ fab --hosts=prod1.server,prod2.server,prod3.server --parallel copy_cache This will copy cache to ...
0
votes
0answers
12 views

Web scraping in the background of Firefox

I am looking for a way to do web scraping in the background of every day Firefox use. What I mean by this is, is there a way for me to set Firefox to run a python web scraper on specific web pages ...
-2
votes
0answers
17 views

Is there a label/goto in python? [migrated]

We can use goto and :label in batch. Is there anything like it in Python? I am a beginner in python. Thanks SuperUser
0
votes
0answers
18 views

how to adjust paragraph width in word doc from plain txt

I have a .txt file that, when opened in Word 2013 (Win-8.1) displays word-wrapping which i could not see when opened in notepad, even when I checked "Word Wrap" (under "Format"). In Word, with default ...
1
vote
1answer
285 views

Recreating su or sudo in Cygwin that doesn't open in separate window

As many of you already know, Cygwin doesn't have the sudo command, and it's recommended to use the runas command when you need root/administrator privileges. However, using runas creates a new cmd ...
0
votes
1answer
4k views

Change install path to /usr/bin instead of /usr/local/bin

A simple question, but I have no concrete documentation to confirm my answer. When installing software with the make install command under a unix machine, the default path is going over to ...
1
vote
1answer
33 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
35 views

upgrade python form 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 installed in our server and also I have access to ssh. How can I upgrade it in Centos ...
1
vote
3answers
462 views

virtualenv command not found in El Capitan

OS: Mac OS X 10.11.1 (El Capitan) Python: Homebrew Python 2.7.10 pip: 7.1.2 (latest) I installed virtualenv by pip install virtualenv, the installation was successful. But when I typed virtualenv, ...
0
votes
1answer
172 views

How to search and install package in Anaconda (Conda)

I am trying to install pandoc so I did conda install pandoc but nothing popped up and it told me to search. I searched with anaconda search -t conda pandoc and the results are below...How can I ...
4
votes
2answers
7k 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 ...
0
votes
1answer
30 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 ...
0
votes
1answer
83 views

Can't connect to download packages

I'm having problems getting packages (spicy, stats,etc) I use python and need to install new packages but even when running on terminal I can't. When trying to install homebrew I got the following ...
0
votes
0answers
9 views

Upgrading from Python to 2.7.10 to 2.7.11 on OSX [duplicate]

How can I upgrade Python from 2.7.10 to 2.7.11 on OSX (Yosemite)?