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

Triplicate entries of a column

I have a data column with over 2000 entries... MV1 BNV CMG IKN ... ... I want to triplicate each entry in the column format. Result should be; MV1 MV1 MV1 ...
0
votes
1answer
348 views

Can't use python in interactive mode on new msys-git terminal?

I recently upgraded my laptop, which ran a 32-bit Win7, and my new laptop runs a 64-bit Win7 installation. I am installing git 2.5.1 from git-scm.com, and the latest python versions (both 3.4.3 and ...
0
votes
0answers
19 views

Twitter API for Python

I am looking for a convenient Twitter API for Python. There are some Python APIs available however it seems they have some limitations on the number of tweets that can be retrieved. I wish to analyze ...
7
votes
5answers
2k views

How can I prevent the python.el that ships with Emacs 23 from EVER loading?

I use python-mode.el instead of python.el for python work, and all of my customizations depend on it. However, periodically for some reason the python.el that ships with Emacs23 will magically get ...
5
votes
2answers
12k views

“Cannot allocate memory” while no process seems to be using up memory

I am not competent on server issues, any help is much appreciated. When try to start a python/django shell on a linux box, I am getting OSError: [Errno 12] Cannot allocate memory. free -m seems to ...
7
votes
2answers
530 views

OS-X terminal behaves oddly after running Python interactively

After running a python repl (2.7.10) in the os-x terminal and exiting, the terminal no longer echos typed input and some other strange things happen. If I run python again and exit(), then the ...
0
votes
0answers
73 views

Glade for Gtk 2 not work in ubuntu 15.10

I am a new person in Glade GTK . I tried a working program (demo) in my Ubuntu using Python. But I got error message as File "revolution.py", line 21, in init ...
1
vote
2answers
2k views

How do I create a python daemon in Windows?

I want to create a python daemon in windows named daemon.py. There is a file a.py which is used to take backup. I want to run this file every hour as background process. After one hour this daemon.py ...
0
votes
0answers
39 views

Convert vmware .ovf to hyper-v

Can you please tell me if there is any script that I can do(preferably in python or powersehll), for taking vmware .ovf(+his vmdk) and import it in hyper-v machine? I don't want to convert with third ...
0
votes
0answers
23 views

Find doc/docx/txt/rtf/ file containing 12 strings/words only - MAC OS

This is a strange request and I'm unsure if it's even possible but Google led me here through a not so similar question and so I thought I'd ask. I basically need to find a text file on my computer ...
2
votes
2answers
728 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 ...
0
votes
0answers
16 views

Precompiled M2Crypto to run Python script on Windows (pysFEMMA)

I am trying to run a Python script on a Windows Server 2012 R2 (64bit) server. I need to install quite a few dependencies and tools that I am having issues with. Please see the installation document ...
0
votes
0answers
27 views

Update python 2.7.6 to latest 2.7.x

My OS is Mint Linux and my python version is 2.7.6. If there is no reason for NOT update, I would like to update it to the latest 2.7.x version. I can't figure out a linux command which does this. ...
1
vote
2answers
158 views

Mapped Drive inaccessible from Windows Scheduled task

I am working with python 2.7.9 (64 bit) and windows server 2012 R2 I am trying to set up a windows scheduled task to run a lengthy python script every day. I've managed to by calling the python from ...
0
votes
1answer
42 views

Pad a regex capture group?

Is there some way to pad single digit numbers with a 0 with regex? I'm using Python. 6 => 06 1 => 01 etc. Here's what I'm working on: https://regex101.com/r/iG9qC7/1 I'd like all the file names ...
0
votes
0answers
23 views

Ubuntu 14.04 LTS: what to do so that Python and NGINX use a secure ssl (ie 1.0.1p) library?

I'm going nuts over this issue. I'm totally unable to get a working system where Python 2.7 (Python 2.7.6 (default, Jun 22 2015, 17:58:13) and NGINX (nginx/1.4.6 (Ubuntu)) use a openssl which has been ...
1
vote
1answer
23 views

Is Ubuntu Server 14.04 LTS getting neglected by Canonical?

I'm doing some clean installs and am faced with the issue that OpenSSL is at version 1.0.1f 6 Jan 2014 (yay, heartbleed!), and Python at 2.7.6. I'm having a really hard time upping OpenSSL to the ...
0
votes
0answers
55 views

Running WeasyPrint after updating Mac to El Capitan

I recently updated my OS on my mac to El Capitan and since then have been running into issues trying to run WeasyPrint. I have updated macports, uninstalled and reinstalled all of the macport ...
0
votes
1answer
33 views

How to create a file with invalid or special characters in its name?

I'm trying to install some Python 2.7 module named libwapiti on Windows 7. While trying to install it, it asked me for several header (*.h) files which were not included in MSVC2008ForPython27 and I'm ...
1
vote
1answer
21 views

Unexpected BPython console output behaviour

I am using BPython to run Python scripts, and I found the console output has a different behavior than the regular Python console.. For example this small snippet: import time for i in range(100): ...
2
votes
2answers
85 views

What does CPU column means on Process Tab on Task Manager

I have an application in Python that I have deployed in a Client. It shows 25% on CPU column on Process Tab. I wonder what it means or how it affects the CPU? Because most of the processes have only ...
0
votes
0answers
58 views

Installing freetype/matplotlib for Python

I'm trying to install Matplotlib for Python 3.4 but it says Freetype is not installed. Here's what I've tried: pip install freetype (can't find) pip install freetype-devel (can't find) sudo yum ...
0
votes
1answer
32 views

Where does pip install to on Linux when i use --user

I just installed a Python app using pip2 install pyriscope --user and now I need to find the installed files, since it seems like the app is built to use the python assuming it's python2, when on my ...
0
votes
0answers
40 views

Can I install java 8 on Travis CI for a python project?

I have a python project that also requires Java 8 to run the tests and thus fails because Travis CI uses Java 7 by default. I know this can be updated if the project is a Java project but mine is ...
8
votes
13answers
22k views

Scripting: what is the easiest to extact a value in a tag of a XML file?

I want to read a pom.xml ('Project Object Model' of Maven) and extract the version information. Here is an example: <?xml version="1.0" encoding="UTF-8"?><project ...
0
votes
0answers
24 views

Why is user _postgres on os x unable to write in a 0777 mode directory?

I'm trying to create a function in Postgresql, written in plpython, to move files from one directory to another in the file system, and optionally create the destination folder if it doesn't exist. ...
2
votes
1answer
1k views

What Linux distributions come with Python 3 as the default? [closed]

I know that ArchLinux has Python 3 as the default Python install. What other Linux distributions ship with Python 3 as the default Python version? I've checked this SO question, but it seems more ...
0
votes
1answer
598 views

Python-pillow install fails, despite required library being available

Good day, I am using my Synology DS215J as a Python development environment. I have configured ipkg as a system package manager on it. My goal is to use the Django and Pillow python packages in a ...
11
votes
3answers
11k views

How can I make a table of contents for a markdown document with Python/AWK/SED?

I have the following markdown document: Heading-a ========== ---text--- Heading-b ------------ --- text --- Heading-c ---------- --- text--- Heading-d ======= --- text---- Heading-e --- ... ...
0
votes
1answer
85 views

Yum Install software-properties-common on EC2

I'm trying to install software-properties-common on an EC2 micro instance and getting the following error: $ sudo yum install software-properties-common Loaded plugins: priorities, update-motd, ...
2
votes
3answers
1k views

Serialport doens't work correctly after ubuntu update?

I have a strange problem with my serial port. It seems that sth has changed after ubuntu actualizations and reboot. przem@przem:~/Pulpit/bat/scripts$ python Python 2.7.6 (default, Jun 22 2015, ...
0
votes
2answers
45 views

How can processes detach when I try to kill them?

I have an application on Linux where I have to kill a whole process tree from within an application. The process tree looks like: app └── parent ├── child1 ├── child2 ├── child3 ├── ...
0
votes
0answers
29 views

Python Fabric for executing local python scripts on remote server

Can fabric be used to execute a local python script on remote server which has no python installed in it?
0
votes
0answers
16 views

Intellij not going to line number of error when I click on the error message

I'm running a flask app inside of intellij, and when there's an error the stacktrace has the line number, but clicking on the error doesn't take me to the line, it just takes me to the top of the ...
0
votes
0answers
9 views

Broken PythonPath environment variable when using cmd prompt as admin only.

I have a folder that I use to keep my command line python programs such that they can be invoked from any directory. Specifically, this folder is in the pythonpath environment variable so that I can ...
0
votes
0answers
144 views

gendef and cl - installation

I am trying to wrestle myself through a rather complicated installation of theano on Windows 7, 64-bit, Python 2.7. I have little experience in conducting these installations - and am currently stuck ...
0
votes
1answer
38 views

GCC - windows - no input files

I am trying to install GCC on a windows 7, 64bit machine in order to run a specific package (theano) on python 2.7. at the moment - when i type gcc --version at the command prompt - i get the ...
0
votes
0answers
28 views

How to isolate python code (without sandbox) on a linux server?

I was wondering how python hosting providers run the code you can place on their servers in a secure way. I am interested in this because I'd like to find a way to run untrusted python code on my ...
0
votes
0answers
67 views

Cannot write to text file from python

I have a program in python, which takes data's from system and puts them to the text file line by line. Everything works properly when I run it from terminal using: python myprogram.py Every-time I ...
2
votes
4answers
1k views

Run pip for python3 on Fedora

I can't run pip for python3 (3.4) on Fedora 22. Pip for python2.7 is installed on system by default and works fine. I install package python3-pip but can't run it. pip3, pip-3.4, python3-pip, python3 ...
0
votes
1answer
253 views

Python: TCP/IP Socket Client, how to send login packet?

I wanted to create a bot to send login/join packets to a game server. So it will join then send more packets for it to write something in the chat, but I'm not sure how to do this. If someone could ...
0
votes
1answer
125 views

DD-WRT calling web service from Arduino ESP8266

I am looking for a way of finding out what devices are currently attached wirelessly to the router thats running DD-WRT firmware. Problem is that I am unable to find any references to a REST API or ...
2
votes
4answers
155 views

python2.7 from macports stdin issue

My python2.7 from macports seems to mess up with osx terminal in a weird way. Here is what I mean. The exact input from the keyboard was: /opt/local/bin/python2.7<ENTER> a = 3<ENTER> ...
0
votes
1answer
18 views

(X-Post) Tried switching between python verions on Linux. Ended up messing the whole thing. How to fix it?

I actually have three questions: So I was trying to switch between python2.7 and python3.4. I added both the alternatives using update-alternatives, giving priorities 1 and 2, respectively. It was ...
5
votes
2answers
309 views

“file” command yields “ASCII text, with no line terminators”, unless I first edit the file in vim

I am experimenting a strange behaviour which I don't know how to solve. I will explain the scenario: From a Python script I'm getting a json from a simple application hosted on parse. Once I get ...
0
votes
2answers
64 views

Compare two different texts - found the same and different

I want to compare the different two texts. Please check the below details and what I need The 1st text content: 111 xx1 222 333 555 The 2nd text content: 333 111 xxx 222 888 My questions I am ...
7
votes
1answer
614 views

gedit indent guides

I would like some indent guides for gedit. This is very useful in python code. I couldn't find such an option in the settings, nor a plugin to add it. Does anyone know how to make such a thing ...
0
votes
0answers
54 views

how do I get the PID list and USERNAME of each of those PIDs in LINUX using python?

I am trying to get the PID's and their respective usernames for displaying something similar to the top command in linux. I managed to get the list of PIDs but I am unable to fetch any username for ...
0
votes
0answers
90 views

Encountered “error: command 'c++' failed with exit status 1” while trying to install pymedia in ubuntu

I'm trying to install pymedia in ubuntu to run scripts using python 2.7. So, I tracked down the dependencies and got them installed : sudo apt-get install python-dev libogg-dev libvorbis-dev ...
0
votes
1answer
61 views

Appending to path in linux

So I've just installed the python anaconda package on a scientific linux system (I have no sudo privileges), using the given bash script. I've checked .bashrc and anaconda has correctly added export ...