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
2answers
7 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 ...
0
votes
0answers
7 views

Is there a way to scrape network activity using beautiful soup?

I can use JavaScript to scrape the incoming and outgoing requests/responses of a website using something like netlog. I am now trying to do the same using Beautiful Soup, but I’m not sure if it’s ...
1
vote
1answer
12 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 ...
0
votes
0answers
5 views

Python external windows not displayed with Yakuake/Guake

I use Yakuake a lot and would like to display graphs with python from there. import matplotlib.pyplot as mp mp.plot([1,2,1]) mp.show() With Konsole or any other real terminal, it works: a window ...
1
vote
1answer
40 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
12 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
13 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
24 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: ...
0
votes
0answers
13 views

Check with python if search result is empty

When searching thourgh an engine I want to check whether there are more than 0 results. For instance if I were to Google (or another site, not only just sites like Google, Bing, etc. but also amazon, ...
1
vote
1answer
28 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
14 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
0answers
24 views

What are the advantages of using Named Pipes/Domain Sockets? [migrated]

So I am working on a project which involves a Python back end and a JavaScript Front end, but there is also some PHP acting as the middle man between the two and serving up the web pages. As it ...
0
votes
1answer
32 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 ...
1
vote
0answers
14 views
+50

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 ...
-1
votes
0answers
28 views

How I can get magnet(simple:BBCDEFGHIJKLMNOPQRSTUVWXYZ12345678) info? [closed]

I have a lot of 'Magnet URI', is there any way to parse 'Magnet URI' information (such as size, name etc) with Python, without the use of external applications? Please provide sample Python code that ...
0
votes
0answers
6 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
22 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) ...
0
votes
0answers
13 views

applescript permissions for copied files

Using applescript, I'm copying PY files to a location in OSX. However, they don't compile when I load Python, it seems because the permissions havent been set on the files. When I look at "get info" ...
0
votes
0answers
12 views

Open a jar file without it taking focus

I've written a python script that runs a java program every 3-5 seconds. This is run by using subprocess.call() method: subprocess.call(['java', '-jar', ...
0
votes
1answer
28 views

Running at close to 100 cpu

So I have a python script that is really pushing the limits on concurrency. When the script is running, the cpu load of my computer is close to 100% at all times. Can this harm my computer? To be ...
-1
votes
0answers
5 views

generating random numbers in python with percentage function on what selected value in python [migrated]

Lets say I wanted to generate a random number in python using something like random.randint(1,100) but how would I go about making Python want to tend toward selecting higher random numbers? So like I ...
0
votes
1answer
36 views

Why my iptables configuration for port-knocking does not work?

I implemented the following iptables rules on my test server for a course. The firewall shuts down and I cannot access port 22. However, after knocking on the ports 1111, 2222 and 3333 in that order - ...
1
vote
0answers
17 views

How does the Python Web Application stack work [closed]

I've been frantically reading up about python and REST services as I want to start learning and building a service. The terms confused me a lot - my past web application experience is some limited ...
1
vote
1answer
118 views

How do computers generate random numbers? [closed]

How does a computer generate 'random' numbers? How close to truly 'random' can a number generated by a computer actually be? Is there software / programming language out that that might generate a ...
0
votes
0answers
16 views

Where did pep8 went when I upgraded to OSX 10.9.5?

I just updated OSX to 10.9.5, but I now miss pep8, brew did not help, how do you install pep8 on MAC OSX 10.9.5? I already accepted the new license with sudo xcodebuild -license.
0
votes
0answers
24 views

OpenStack Rally manual install issue(with sqlalchemy import in python)

When I try to install Rally based on this tutorial https://wiki.openstack.org/wiki/Rally/installation/manual (because I already deployed an OpenStack cloud) I get an error message: rally-manage db ...
0
votes
0answers
8 views

Gmvault / got-your-back (gyb) features compare, for decision making

Are there any differences in the way the backups can be done for Gmail, and restored, through Gmvault or got-your-back? Haven't been able to locate a side by side comparison. http://gmvault.org ...
0
votes
2answers
49 views

Win8.1 Error -1073741819 -> 0xc0000005

I've never had this problem on PC since Win95 I guess, but somehow it's happened recently while I was trying to 'make force' python framework( setup.py build_ext --inplace -f -> ...
0
votes
1answer
25 views

Open with only lists choose default program for .py files

The context menu for a .py file in file explorer is only giving the Choose default program... option in the context menu. Currently it runs it with python.exe by default. If I change the default ...
2
votes
2answers
87 views

IDE for Chromebooks without Developer Mode Acess

I am starting a computer club at my school, and I am running into a problem with Chromebooks. The new freshmen are given Toshiba Chromebooks, where developer mode access to blocked. We are going to ...
2
votes
1answer
57 views

Notepad++ how to copy the text (only) which matches the regex expression (not the whole line)

I am looking for a simple way to copy into the clipboard all the "marks" in notepad++. I found that I could copy the whole line that match the regex using the bookmark option. But I'm looking for a ...
0
votes
1answer
18 views

Task scheduler Windows 7(schtasks) set Principals RunLevel highest returns Access denied (Run with highest privilege)?

SCHTASKS /Create /TN "New Task" /SC HOURLY /TR blah.exe /RU myusername /RP pypassword /RL HIGHEST Returns {ERROR: Access Denied} Error also used below code in Xml but still getting the same Error ...
0
votes
0answers
18 views

64-bit outlook link no longer being found with python script - SUBPROCESS.Popen()

I used to execute a script that at the end would distribute an e-mail using Microsoft Outlook and a custom form. I found a website that told you how to create a custom form, insert some VBA script ...
0
votes
3answers
17 views

gVim closes automatically when opening python file

I'm using gVim 7.4 , it was running smoothly before installing Plugins after installing pathogen gVim window closes automatically when opening python files. It's working fine for other files except ...
0
votes
0answers
36 views

Gdb - cannot access memory at 0x12345 and a program is being debugged already - why/ what to do?

Just got to meet gdb, and it's acting up a little. I managed to install gdb and the python addon on CentOS 6, but when trying to debug a process in Ubuntu with the command sudo gdb python 4074 i get ...
1
vote
1answer
67 views

Python 2.x and Python 3.x with Beautiful Soup Package on Mac OSX 10.9.5

I am fairly new to Python and have run into some problems installing Beautiful Soup. I am running Mac OSX 10.9.5. I installed and used Python 3.4 during a summer and installed Beautiful Soup 4 for a ...
0
votes
1answer
41 views

How to add indent in Python 3.4 interactive mode Terminator Linux?

I'm starting Python from basics. The Python 3.4 Tutorial has an example for interactive mode: >>> the_world_is_flat = True >>> if the_world_is_flat: ... print("Be careful not to ...
-1
votes
1answer
41 views

A process CPU usage doesn't change for different priority

I wrote an infinite loop in python to print No! in the output. while True: print("No!") When I execute it, I see its process (pythonw.exe) in Windows-Task-Manager that uses 60% of the CPU. I ...
-2
votes
0answers
16 views

Where can I find the python shell in raspberry pi?

Were is python in raspberry pi? I cannot find it in \usr\bin as suggested here I am using the latest version of raspbian. The search provided only the above link, which wasn't helpful.
0
votes
0answers
26 views

How to make standalone app using python on mac osx

I am making an app in python 2.7 on osx 10.9 Used py2app to create .app. python setup.py py2app is making semi-standalone app. As my.app/Contents/MacOS there is shortcut to /usr/bin/python. Now I ...
0
votes
1answer
63 views

gcc error Python.h: No such file or directory

I have python-dev (or, as I'm on Centos, python-devel) already installed. sudo yum install mysql mysql-devel mysql-libs sudo yum install python-devel sudo yum install MySQL-python How come this ...
0
votes
0answers
23 views

Import packages to Python IDLE 2.7 from Anaconda

I installed numpy, scipy, matplotlib, etc through Anaconda. I set my PYTHONPATH environment variable to include C://Anaconda; C://Anaconda//Scripts; C://Anaconda//pkgs; (I didn't put spaces in the ...
-1
votes
1answer
30 views

Run a python script from its icon in linux

May be this question is very basic i googled it but couldn't get a proper answer. I have a python script which when run as "python2.7 mygui.py" in the terminal opens up a gui but now i want to open ...
0
votes
1answer
32 views

CPU clock and L3 cache for programming

I'm interested in how much different hardware choices affect the following use cases: Programming in Python: lots of heavy mathematical computations using numpy arrays Data Applications in Python ...
0
votes
0answers
38 views

Minted cannot find pygmentize in TexStudio on Windows 7

I want to use minted package, but when I'm xelatexing in TexStudio, there's an error: minted: You must have `pygmentize' installed to use this package. pip seems unable to find pygmentize: In my ...
0
votes
0answers
14 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 ...
0
votes
1answer
18 views

python-gnupg search_keys() returns different result when run as root

I have a python script that needs to be run as root (to access framebuffer on a raspberry pi with a small touchscreen). This script also needs to search for keys on a keyserver. To achieve this, I am ...
0
votes
0answers
73 views

Openerp, how to show columns using fields.function

This is a piece of my custom openerp module. I can't understand how to show this fields only if column private is equal to 't' ( True ). I know that i should use fields.function, but all my retries ...
0
votes
0answers
28 views

Can't install PIP, Easy Install or Setup Tools on a mac

I am unable to install any thing on my mac via the terminal - Pip, Easy Install or the Setup tools for python packages. A screenshot of my terminal while installing the pip looks like this: Could ...