Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

learn more… | top users | synonyms

-1
votes
1answer
19 views

Django can not connect to MySQL database over ubuntu 10.04

I am newbie in Django. I got a simple Django 1.3.* project, i would like to run it over my localhost. I installed all necessary modules like: python-mysqldb, rptz etc... I have ubuntu 10.04 ...
0
votes
0answers
44 views

Linux distribution that helps you learn [on hold]

I listen to many Linux podcasts and one of them recently mentioned a distribution (well its more like an application really) that you can double click on Windows and it will give you a small Apache ...
0
votes
1answer
53 views

Running Python script over multiple directories and multiple files

Here is my command line for python: python script.py -a .faa -n .fna I have a directory containing multiple directories. Out of these multiple directories, there could be 1 or more folders. In ...
2
votes
3answers
51 views

'ImportError: No module named _struct' error when managing packages

I'm running elementary OS 0.2 (based on Ubuntu 12.04) and starting today I'm seeing a weird error when attempting to install/upgrade packages. Just now for example I did a: sudo apt-get update ...
1
vote
0answers
21 views

lxml with custom install location for libxml2/libxslt doesn't find correct location

I am using CentOS 6.5 and want to use newer versions of Python, lxml, libxml2 and libxslt2 than what's available from the repos. So I build libxml2, libxslt2 and python 2.7.8 from scratch, and add ...
2
votes
0answers
15 views

Install `mpl_toolkit.basemap` on RedHat without compiling from source

I need to install matplotlib and mpl_toolkit.basemap on a RedHat machine. matplotlib is already installed but for mpl_toolkit.basemap the only way I could find was to download the source and compile ...
0
votes
0answers
35 views

Updating data sets from Online databases/Webservice

I want to have an idea as to how to update the data regularly from the source, if its stored locally in your server or local machine.Lets say MySQL database. Source:It will be a webservice data ...
1
vote
1answer
53 views

How to install meld 3.11 in Ubuntu 14.04?

I am trying to get meld 3.11 to work on ubuntu 14.04 I tried following the method below" cd ~ git clone https://git.gnome.org/browse/meld cd meld sudo ln -s ~/meld/bin/meld /usr/bin/meld But ...
0
votes
1answer
73 views

Google App Engine alternative for CentOS, Fedora, Ubuntu?

I have written WebRTC Apps which is Python and Google App Engine. Google App Engine is not freely available to use for production release, so I am looking alternative of it for CentOS, Fedora. Can ...
0
votes
2answers
34 views

untar specific file to present date in linux [closed]

I am using Centos and I am installing one Debian application with multiple-instance. I have created 3 multiple-instance successfully and it is running good. Because of Debian application, the ...
0
votes
1answer
27 views

qmake error when installing PyQt5

I'm trying to install PyQt5 for python3 from source files. I install SIP correctly. Then when I want to prepare the make file for installing PyQt, I get this error: #python3 configure.py Error: ...
1
vote
0answers
29 views

Failed installation 32-bit python on 64-bit Linux Mint

I basically have two questions: How do you install 32-bit Python alongside 64-bit Python on linux? How do I fix my broken system from the failed attempt below? I just tried to install a 32-bit ...
2
votes
1answer
28 views

Python failing to import winregistry

I'm trying to use secretsdump.py, which relies on winregistry.py. The error I'm getting is: Traceback (most recent call last): File "secretsdump.py", line 41, in <module> from impacket ...
3
votes
2answers
102 views

Unable to pass a bash variable as a python argument in bash

For some reason I cannot pass the bash variable $FOLDER as a python argument on the following code. The python script downloads some files from amazon s3. Bash script: #!/bin/bash FOLDER=$(./aws get ...
1
vote
2answers
79 views

subversion not working with pycharm

In pycharm, there is an option to upload changes to a remote svn repository. However, it does not ask for password. How do I provide it?
0
votes
1answer
83 views

How can I recover deleted data from a partition [closed]

I want to recover deleted data from a partition with the help of a Python program. I know that on deletion, only the inode information of that file is deleted, but the bits are not overwritten by ...
1
vote
1answer
43 views

“make test” failed while compiling Python

I compiled Python 3.4.1 on an emulated Debian 7 ARM system. make test failed on test_multiprocessing_fork: FAIL: test_semaphore_tracker (test.test_multiprocessing_fork.TestSemaphoreTracker) ...
0
votes
0answers
9 views

Is there any prompt decoration package available for iPython?

One can argue, that IPython can be a productive replacement for bash. I wonder, if anyone here have seen some sort of prompt decoration for IPython, that can be compared to the standard bash prompt, ...
4
votes
2answers
43 views

Tilling window manager written in Python

Is there any tiling manager like XMonad but written with Python? I think Haskell was too hard for me. But I know python a little.
2
votes
2answers
62 views

How to change my script to replace and add new variable in a configuration?

Well this is my script. It is to configure my systems sysctl.conf. infile = open('sysctl.conf') outfile = open('sysctl.conf.new', 'w') replacements = {'Net.ipv4.icmp_echo_ignore_all' :'1', ...
-1
votes
1answer
26 views

add groups from external file

I want to write a script which add groups to the system, specified in groups.txt file. content of groups.txt : group01 : computer group02 : electronics group03 : IT . ...
3
votes
1answer
50 views

Grepping a variable

I've written a simple init script to start and stop a Python script as a service. I have to be explicit about the version of Python I'm running, because this is on a CentOS 5 box with Python 2.4 & ...
1
vote
1answer
30 views

'altinstall' python-devel; can't install psycopg2 on centos

I installed python2.7 on my centos 2.6.32-431.17.1.el6.x86_64 following these directions: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/ #after the yum stuff... # Python ...
0
votes
2answers
61 views

Why can't my python script change umask?

This is my script #!/usr/bin/python import os print "hello world from python" os.system("echo 'hello world from bash'") os.system("umask 055") os.system("ls -alh > test") If I run this code ...
0
votes
3answers
36 views

Python compile error on openSUSE: no module named wx

I'm new to Linux. After installing openSUSE I'm trying to make my VPN software running. I've followed the site's direction: Unpack the general package [Other / Source code], install OpenVPN and ...
5
votes
2answers
241 views

how to read and modify fstab in python?

I want to automatically configure my fstab in python by running a script. I thought of using ConfigParser in python, but I am unable to use it properly.
2
votes
1answer
174 views

Convert xml subtitle file to srt format

I have a xml subtitle that looks like this: <?xml version="1.0" encoding="utf-8" ?><transcript> <Item from="1.16" duration="4.68"><![CDATA[(Dong-hyuk is coming to see you now.) ...
1
vote
2answers
92 views

Do all Linux processes write EOF to stdout when they are terminating/have finished terminating?

I'm having trouble with sending shutdown -h 0 to a lxc Debian container (i.e. executing this command in the lxc) with with the python pexpect module (in a python script). In this module the user can ...
2
votes
3answers
163 views

Unable to access CentOS setup Network Configuration after attempting Python update

I attempted to update Python on my CentOS 5.6 VM and have encountered some issues afterward. Initially, yum wouldn't work, but I have resolved that. However, now I am unable to access the Network ...
2
votes
1answer
117 views

How to install Node.js in CentOS 5.10 with Python 2.4?

I want to use Grunt on websites we have hosted on our WHM dedicated server. It is running CENTOS 5.10 x86_64 standard with WHM 11.42.1 (build 21). It is critical that things do not break, as we have ...
1
vote
1answer
116 views

Trouble installing lxml with custom install location for libxml2/libxslt

I am attempting to install a python module called lxml to my account on a supercomputer running RHEL. I do NOT have root access or super user status. lxml requires the dev/devel versions of libxml2 ...
1
vote
1answer
31 views

Identify python script is waiting for a manual input

I'm writing a shell script which executes a Python script. The Python script halts for a manual enter to be provided. However, I don't wan't to have to press enter each time to the script. Instead, I ...
1
vote
2answers
110 views

How to change the default version of Python in Debian 7.5?

I'm using Debian 7.5, and I've installed Python 3.3 and 3.2. How do I make 3.3 the default for when someone types python in the command line?
2
votes
2answers
118 views

How does a parallelized Python program look with top command?

I work on a shared cluster. I've seen people run parallelized c code on this cluster which, when I use top to see what processes are running, are shown to be using (for example) 400% of the CPU, ...
2
votes
2answers
44 views

How do I remove the new environment commands that were created by the virtualenvwrapper script?

I've installed and run virtuarenvwrapper.sh to try to configure an alternate version of python on my system. This script has placed somewhere a series of commands that are now executed whenever I ...
2
votes
3answers
75 views

Linux - preventing an application from failing due to lack of disk space

Due to an unpredicted scenario I am currently in need of finding a solution to the fact that an application (which I do not wish to kill) is slowly hogging the entire disk space. To give more context ...
0
votes
1answer
85 views

Python3 error “no module named bluetooth” on Linux Mint

I am trying to connect my Lenovo S10E to a Nintendo Wiimote via bluetooth. I am using a simple Python script, reproduced below. I am calling it from the Linux Mint (version 16, "Petra") command line ...
0
votes
2answers
73 views

shell or python script to transpose rows to columns [duplicate]

I have a big file with numbers like: 1 2 3 4 5 6 7 8 9 9 9 9 I want to tranpose it into 1 5 9 2 6 9 3 7 9 4 8 9 I have search on google for solutions, but those solutions simply don't ...
1
vote
1answer
36 views

Uninstall a python software properly

I installed a little python software (pycarddav) before to notice there is a packaged version for Debian sid... Now, I would like to uninstall properly this software and then, install the packaged ...
3
votes
5answers
190 views

Listing directories based on size from largest to smallest on single line

I can use the following command to get a list of directories and their sizes and sort them from largest to smallest (in the example I renamed the directories to numbers to make this easier to ...
0
votes
1answer
69 views

Python file issue from root path

I have a script that is well-tested and known to be working. I am running into an issue with it where when I try to run it from /root/backup/script.py or ~/backup/script.py I get a file not found ...
0
votes
0answers
66 views

Installing iPython3 Fedora 20

It was very easy to install ipython and upgrade it to the newest version (2.0) using pip. However, I want to set up ipython3, which uses Python 3, and found it more difficult. I finally installed it ...
0
votes
1answer
41 views

install python module for particular python instance

I have 2 python instance on a CentOS machine, i.e. /usr/bin/python2.4 and /usr/bin/python2.7. Modules for 2.4 are in /usr/lib/python2.4, and modules for 2.7 are in /usr/local/python27. When I do ...
1
vote
1answer
95 views

Modoboa 1.1.1 Deployment Errors

I try to install modoboa follow this steps: http://modoboa.readthedocs.org/en/latest/getting_started/install.html I installed modoboa with pip install modoboa Traceback (most recent call last): ...
0
votes
1answer
100 views

python xml parsing

I have to delete particular tags from an xml file. Sample xml below. <data> <tag:action/> </data> I want to delete all contents between data and /data. ...
0
votes
1answer
81 views

How to install QGIS from source into user space?

I want to install QGIS from source on Ubuntu 13.10. (saucy). into ~/bin. There is Python 2.7.5+ installed. Therefore, I cloned the repository to my machine and checked out the master branch. First I ...
0
votes
1answer
26 views

Python: Move lines backward in a textfile

Imagine a text file which contains random text and two unique markers 01 text text text 02 text text text 03 __DELETE_THIS_FIRST__ 04 text text text 05 text text text 06 text text text 07 text text ...
5
votes
3answers
98 views

How to grab the oldest unread message from `mail` in a script?

In a script I am trying to finish writing now, I need to get the oldest unread message from the current user's mailbox (specifically, I need the subject line for this project). After extracting the ...
4
votes
4answers
351 views

How do I get 'realpath' to find my symbolic link?

I am on MacOSX using bash as my shell. I have symbolic link, created like this: ln -s /usr/bin/python python2 I have a package that uses python2 and I want to create a symbol link in my current ...
1
vote
1answer
100 views

Why does PyCrypto require a C compiler?

Is there a python crypto library that does not rely on anything besides python? Or pre-complied bundles of PyCrypto for Linux?