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
11 views

High memory rate - how to focus on the cause?

I have an high memory rate on my app and I see that gunicorn takes about 2.74GB memory. How can I identify exactly what is the reason for that? Can I see what are the running processes within ...
0
votes
1answer
9 views

What's the exit code for “curl -I” when not HTTP 200?

I want to check what HTTP status code is returned for an HTTP(S) URL. I don't care about content, so I just request head with curl -I $url or curl --head $url But what's the exit code I should ...
0
votes
0answers
7 views

Configuring Ansible for Docker Dynamic Inventory

I'm trying to setup Ansible's Dynamic inventory for Docker. I read the instructions in the docker.py and docker.yml file. My docker.yml contains: --- defaults: host: unix:///var/run/docker.sock ...
0
votes
0answers
17 views

What is the CentOS 7 equivilent package for python's “rhpl” from CentOS 5 (textdomain_codeset)

I have legacy Python (2.4) code from a CentOS 5 machine, which I am porting to CentOS 7 with Python 2.7. The file "timeconfig.py" (used for setting system time and date "graphically" on a text ...
0
votes
0answers
7 views

WSGI, Ngnix, Python3, Debian Wheezy: what pkgs to install, how does it all fit in?

I'm working on a web-site. I would like to add some database functionality eventually: for this, i need to understand SQL, python-sqlite3, python-wsgi spec, python-uWSGI server and how all this is ...
0
votes
1answer
17 views

Unable to communicate with peripheral over Serial USB from Linux

I am struggling with establishing comunications with a peripheral over USB serial on my Linux here (fedora 20/64bit), and I am probably missing some step: I connect the device, a /dev/ttyUSBx port ...
-6
votes
0answers
26 views

Need to figure out where to start with programming and making my own macros [on hold]

When I was a Windows user, I liked the program Macro Express because it was able to speed up tasks where I needed to collect data by doing repetitive key strokes, changing windows, etc. Now switching ...
0
votes
0answers
5 views

set tabs to 4 spaces in pudb

is there a way to set 1 tab = 4 spaces in pudb python debugger? i have tried setting my terminal tabs like so: tabs 1,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4,+4 in ~/.bashrc and this fixes ...
0
votes
0answers
7 views

improving my batch “ts to mkv muxing” python script

i have a ts2mkv python script and i wonder how i can add Search folder for files to remux Support mov,mp4,ts containers Run from commandline Run from context menu Python 2.6 on Windows Haali ...
0
votes
0answers
28 views

Mac OS X Yosemite and Client SSL Certificates

Ever since I upgraded from Mavericks to Yosemite, my SSL Client Certificates have stopped working in certain places. They still work in web browsers and in wget, but they have stopped working in curl ...
0
votes
0answers
7 views

create a virtual environment with anaconda in windows

I am having a difficult time running python 3.4.2 with Anaconda/spyder/ipython. Question: if I delete Anaconda and start over, why isn't python 3.4.2 an option? Is it related to the fact that when I ...
0
votes
0answers
21 views

MySQLdb-python installed but throws import error when run: Library not loaded: libssl.1.0.0.dylib

I'm having issues setting up my python environment on a new computer, specifically with the MySQL-python module. Im using... macbook pro version 10.10.1 the anaconda distribution for python 2.7: ...
0
votes
0answers
6 views

SASS e images not loaded

I have used webasset and cssmin on a python static site generator to merge 4 css files into a one compressed file. The individual CSS files when referenced individually does contribute to a fully ...
0
votes
1answer
15 views

Parley says “Failed to determine interpreter for scriptfile” for all stock scripts on Mint 17 (with Python 2.7.6)

When I first tried using Parley 1.0.0 (which I had installed using the Software Manager in Mint 17, 32-bit), I downloaded many vocab files via the built-in mechanism, and when I tried the first one, ...
0
votes
0answers
5 views

How to copy all table with python-docx? [migrated]

I use the python-docx library and I have a document named file.docx. I need to copy all the content of the .docx table to file.xlsx I'm using from docx import * f = open('file.docx') d = Document(f) ...
0
votes
1answer
25 views

Python SimpleHTTPServer

A few questions about python's quick and easy http server module. Is it secure? It is only available to people on my lan, right? If somebody typed in my public ip xxx.xx.xx.xxx:8000 it wouldn't work? ...
0
votes
0answers
12 views

Running Plone on Apache with WSGI instead of ProxyPass

I am looking for a beginner friendly documentation for using Plone 4.3.3 with WSGI. At the moment I am using simply ProxyPass, ProxyPassReverse, Balancer, and so on. Is there a step by step guide ...
0
votes
0answers
6 views

PyDev contextual documentation in Eclipse [migrated]

I dislike the PyDev contextual documentation in Eclipse (mouse hoovers over a method, little window appear). It does not work for many methods. For example, f = open('file') will show the docs for the ...
0
votes
0answers
16 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 ...
0
votes
1answer
61 views

Anaconda distribution Python error [DatabaseError: database disk image is malformed]

There seems to be something wrong with my Anaconda Python installation. When I run Python through cmd it works and I can also run Python programs directly through cmd, and even import scipy, numpy, ...
1
vote
1answer
19 views

Any suggestions on a netbook/desktop setup to run Python for scientific computing?

This may seem like an inappropriate question that should be relegated to some hardware forum, but I love StackExchange for other things and thought perhaps you could help! I had my laptop stolen a ...
1
vote
1answer
40 views

Windows 8.1 command like Unix/Linux WHICH command

Below is an example of the results of the WHERE command used in Win 8.1 CMD (DJANGO) C:\Python34>where python C:\Python34\python.exe C:\Python34\DJANGO\Scripts\python.EXE What I am looking for is ...
0
votes
1answer
30 views

How to syntax highlight python scripts in PHP storm

I tried installing this script but then got this error message: I'm hoping for an answer that's similar to this one but for python instead of ruby.
-2
votes
1answer
62 views

Unable to uninstall python2.7.8 installed in ~/Downloads directory

I have read many answers regarding this kind of problem but unfortunately, I am unable to achieve the uninstallation. So please don't downvote or flag this question. I have python2.7.8 installed in ...
0
votes
3answers
44 views

How Can I Batch Change the Metadata of MP3 Files? [duplicate]

I have a fews of songs in a folder which I would like to add the metadata items of artist, title, genre and album to. I would like to take the metadata info for the title and artist from the file name ...
0
votes
0answers
46 views

Can't run newly created Python file

I have followed a lecture on installing Python and so far I have been unable to resolve this recurring issue. When I mirror the instructional video I get one of two errors. The first error This ...
0
votes
1answer
26 views

How do applications like gksu lock focus when launched?

I am curious how applications like gksu lock screen focus when prompting for a password. I see gksu even has an option "-g", that can disable this behavior. I am interested in doing something ...
0
votes
0answers
28 views

Updates don't install complaining about missing dependencies when dependencies are clearly installed (RHEL 6)

I have installed RHEL 6.2 and I am upgrading all the packages on it right now. I was expecting auto update to work, but I get these error messages when I authorize an auto update - ...
-1
votes
1answer
36 views

How to solve python bug without root permission

Python has a bug that can be fixed by modifying a file in /usr/lib/. But I don't have permission to edit that file, is there any way to solve this problem? Is it possible to overwrite that solution in ...
0
votes
0answers
19 views

Emacs: failed to install ELPY

I tried to install ELPY package for python development in Emacs. I followed instructions from here: https://github.com/jorgenschaefer/elpy Yet I kept getting this error every time I start Emacs: ...
1
vote
0answers
18 views

Sort lines to form a unique words dictionary listing

Many a times we build dictionaries in online forums for typical words used in a forum, the user responds in following format in a phpbb forum term: defination hence the job is to collect all these ...
0
votes
1answer
20 views

Type on python script on the Unix command line (without a .py file)

Working with python 2.7, I want to do this: $> python "import Tkinter; Tkinter.tk(); etc... " but python doesn't seem to accept script this way. I don't want to create a .py file. Is there a ...
0
votes
0answers
58 views

Powershell Start-Process fails to start when -Credential argument is added

If I run this in powershell, Start-Process "c:\Python27\python.exe" -WorkingDirectory "c:\wd" -ArgumentList "-m SimpleHTTPServer" It can start the python process as expected However when I add ...
0
votes
2answers
65 views

Parse out specific parameter from python script

I have a chage output that I formatted myself called accounts. It basically has the name of the user listed as a section and then the information below it (which are the parameters). I would like to ...
0
votes
1answer
111 views

No space left on device, but the partition only half full and inodes are available

I was running a Python process which creates a huge number of files under a single directory (I should have been smarter and bucketed them into multiple directories, but that's another story). After ...
0
votes
0answers
8 views

Find average CPU, vMem, sMem usage on 1, 5, and 15min

I am trying to find at time T the average CPU usage on 1, 5, and 15min, just like what you get from /proc/loadavg Same thing for virtual memory, and swap memory. I would be fine with a python ...
0
votes
0answers
17 views

Resize window using Appkit in python

I'm writing a python script which gets some string representing a name of window, than it finds that window, gets its size and logs it to some txt file. On Windows I used pywin32 module, and it worked ...
0
votes
2answers
14 views

X86: Frequency or architecture or other factor matter to compute fast and massive python/numpy loops?

We need to compute numpy/python script that run for days because they use a massive number of loops to compute small Numpy/Python float arrays (array of some Mo). Operations are over rows taken one by ...
1
vote
2answers
29 views

Mapped keyboard shortcuts that generate text responses (macros maybe)

I've got a seemingly simple idea where I would press a combination of keys (like Ctrl + Alt + Z) and paste a previously written(and saved) response on wherever I'm typing. This is meant to work in a ...
1
vote
1answer
84 views

how to shut down a server from the webinterface

I want to be able to shutdown my server remotely by clicking on a button on a web page. The server runs Ubuntu 14.04.1 64 Bit and a python web application. I have not decided which yet, but it will be ...
0
votes
0answers
78 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 ...
15
votes
2answers
2k views

Run Python scripts without explicitly invoking `python`

I'm using Debian Linux. I was wondering if there was a way to configure to run all Python scripts in the terminal by typing script.py (instead of python script.py).
0
votes
0answers
74 views

How can CentOS 6 use python 2.6 with anaconda (python 2.7) installed?

I am using CentOS 6 and it uses python 2.6 by default. Recently, I install anaconda package with python 2.7 to work with scikit-learn, but now some packages that my OS uses are not available to it. I ...
0
votes
0answers
63 views

Trouble configuring/building couchnode on ubuntu

I have installed both nodejs, and the module couchbase via npm. couchbase is installed too, and I can access to the backend via the browser. I have installed python 2.7. I'm getting the Error: ...
1
vote
1answer
45 views

Lighttpd appending /main.py/ to url

I have a web server using web.py running on lighttpd. My lighttpd.conf file is as follows: server.modules = ("mod_fastcgi", "mod_rewrite", "mod_compress", "mod_expire", "mod_redirect") ...
0
votes
0answers
64 views

brew prune permission denied - what should group and permissions be?

Reinstalling python using brew so that hopefully psycopg2 will stop giving errors: Library not loaded: /usr/local/opt/postgresql/lib/libpq.5.dylib So following this answer: mikekilmer$ brew prune ...
0
votes
1answer
70 views

Disabling the dialogs shown when opening an application for the first time on OSX

I am making an app on osx 10.9 using python 2.7. But when it is launched first time, warning comes. You are opening the application MYAPP for the first time. Are you sure you want to open this ...
2
votes
1answer
33 views

Is my understanding of the WSGI path correct

My past web application experience is limited to a few Apache+PHP experiments. Starting from this background I've been reading up on using Python for REST services, and this is my current ...
0
votes
0answers
18 views

303 Redirect in Django WSGI setup

I am running a django application using the WSGI setup. I want to write a redirect to some non existing pages in the app. I tried using .htaccess . But it is not working. Not even a file in ...
0
votes
1answer
30 views

How to remove the visual line from Python mode in Emacs

I started to use Emacs for Python and I am using this package: https://github.com/gabrielelanaro/emacs-for-python After I install it, I see this: There is a white line (like underscore) ...