Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
23 views

Permission denied in scripted chroot jail

I am attempting to script the creation of a chroot jail (I know that there are tools for this, but I am in it for the experience, so please don't recommend a tool). I have a script which looks up ...
2
votes
1answer
18 views

Output of a python script running as unit is out of order while shells seems unnafected

How would I get all outputs of systemd managed python2 script instantly into journal, just like it appears in terminal I'm on centos 7, but seems to be same on arch according to systemd manual, ...
1
vote
2answers
32 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 ...
2
votes
2answers
35 views

'NoneType' object has no attribute 'decompressobj' while installing Bootstrap setuptools

I have just started (as in 30 minutes ago) to use Ubuntu 12.04 (all my previous experience is with windows) and I just started to learn how to program a couple of weeks ago so this is probably a ...
4
votes
4answers
105 views

Using jq to extract values and format in CSV

I have the below json file: { "data": [ { "displayName": "First Name", "rank": 1, "value": "VALUE" }, { "displayName": "Last Name", "rank": 2, ...
-3
votes
0answers
35 views

Windows vs Linux for Python programming? [closed]

just wondering which would be better for intermediate to advanced Python programming?
0
votes
1answer
9 views

Plot generated with matplotlib doesn't shows up in Yakuake [closed]

I'm trying to display the plot of this really simple script: import matplotlib.pyplot as mp mp.plot([0,1,2]) mp.show() In Konsole no problem, an external window pop up with the plot. But nothing ...
-2
votes
1answer
33 views

Ruby alternative to fabric [closed]

Is there a Ruby alternative to Python based Fabric?
1
vote
1answer
36 views

Failing to import python modules only on specific user

I've been trying to figure out this for ages. When I run certain python programs they would crash saying that certain module can't be imported, while it's actually installed and should be importable. ...
1
vote
1answer
48 views

How to install PySide package for CentOS 7

I'm trying to install PySide on CentOS 7. Seems pretty straightforward, enable EPEL repo, and install. Except that EPEL doesn't seem to contain a PySide package (yum install python-pyside fails with ...
0
votes
1answer
28 views

Error importing lxml package python in Ubuntu

When I try importing lxml package in python I am receiving the following error. Traceback (most recent call last): File "<stdin>", line 1, in <module> File ...
1
vote
1answer
126 views

“except (IOError, OSError), e: SyntaxError: invalid syntax” when configuring python-lockfile

I am having trouble installing any new packages in Ubuntu because of python. I tried sudo apt-get install python3 python3-dev but I am getting the following output :: dpkg: error processing ...
0
votes
0answers
16 views

Using tee to get realtime print statements from python [migrated]

I have a python script that looks something like this: for item in collection: print "what up" #do complicated stuff that takes a long time. In bash, I run this script by doing the ...
0
votes
1answer
26 views

CRON path problems

I have a Python script that runs from the command line beautifully, but when I try and run it from CRON does strange things. The script generates, then runs an apk script file. The apk script file ...
2
votes
1answer
82 views

To write this Pseudocode with Regex

I am doing a Makefile which I run regularly by Crontab every day at 0230 crontab -e; 30 2 * * * /bin/thePseudocode Python-like Pseudocode directories = ["Cardiology", "Rheumatology", "Surgery"] ...
1
vote
1answer
40 views

Make debian package to install python

I have two Python scripts, and I need to package them into a Debian package. I have tried quite a few things with some success. For example, I made a setup.py and then used python-stdeb to create a ...
1
vote
1answer
23 views

Custom python REPL with fifos

Is it possible to make a custom REPL (for e.g. python) with two fifos? Explanation of the problem Suppose I have two fifos in and out. I have three terminals. In the first I want to run commands ...
1
vote
1answer
35 views

CheckInstall fails to install on Debian

I tried CheckInstall to track installation of package on Debian, but it fails to install it. Installation follows the typical configure/make process $ autoconf $ ./configure $ make $ make install ...
1
vote
2answers
30 views

Window manager with python support/extensions

My prefered desktop environment lately has been Lxde. I like handling most things from the command line, so gnome and kde always seem to get it my way more than I like. But I do envy some of the new ...
2
votes
1answer
52 views

Cron job not behaving as expected

So I have a python script that pulls down git/svn/p4 repositories and does some writing to a database. I'm simply trying to automate the running of this script and based from what I see in syslog it ...
0
votes
2answers
35 views

checkinstall package conflicts with python

I'm trying to do a distribution upgrade from Debian 6 to 7 and am having some issues with some packages I created and installed with checkinstall. When doing the upgrade I get the following message: ...
1
vote
2answers
41 views

Howto include output of a script into the zsh prompt

I would like to add the output of a Python script into my zsh prompt but I am not sure how to do it? Is this done by what is called "PROMPT EXPANSION" in the man pages? Please someone set me on the ...
0
votes
1answer
89 views

How to install Binwalk on Debian without installing the graphs libraries?

What is the proper way to install the Binwalk tool on Debian 7.0 without the added graphing capabilities (and it dependencies)? I've read that I can skip the make deps command, but this deps.sh script ...
0
votes
1answer
30 views

Conversion of the bsonfile with two different outputs

I want convert some bson file to some json file. I do it by the using of bsondump function. bsondump exemple.bson > example.json By the old version 2.4.9 of the bsondump (depended on the version ...
2
votes
0answers
39 views

How do I execute a program in Xfce and make it use another xfwm4 theme other than the default one?

I want to run a python script (the one in the answer to Python - how to make transparent window with gtk.Window but not with Gtk.) that displays a transparent window. I'm running it from a bash script ...
0
votes
0answers
96 views

Capstone for Python not working

I'm unable to get Capstone (http://www.capstone-engine.org/lang_python.html) for Python to work. I have attempted to install capstone both using pip and compiling and installing from source. Both are ...
0
votes
1answer
19 views

Linux packages - Separate Python's external libraries from the system

I read this articles (check What About Python CLI Tools?). Well, this is obivous, separate external Python packages from your System Python's site-packages. When doing a sudo apt-get install package ...
0
votes
1answer
93 views

add-apt-repository Raises A Python Error

I wanted to install Numix icon theme, therefore I needed to add ppa, but it strangely raised this error: Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 163, in ...
1
vote
0answers
119 views

configure python3-tk for manually installed python 3.4 debian wheezy

On wheezy apt packaging python3-tk requires python3.2 & python3 packages. I want python 3.4 and have built it manually. The trouble is I don't know how to get my manual 3.4 build to 'see' the ...
1
vote
1answer
78 views

calling script from perl/python/ruby and retrieving output [closed]

I inherited a tcsh "master" script that works and extracts lines from files with data with using 'zcat' piped to 'grep' and some other commands/scripts. The extracted lines contain numbers . It is ...
1
vote
1answer
100 views

Can't install Python3 package in Debian 7

I get error while installing python3 in Debian 7 (I have all updates installed): root@nuclight:~# aptitude install python3 The following NEW packages will be installed: python3 python3.2{a} 0 ...
1
vote
0answers
40 views

Archlinux proper PKGBUILD: Python executable error

In a previous question, I asked about how to write a PKGBUILD to install a binary .deb package. The solution was to extract the contents of the .deb and copy the data to the archlinux package ...
1
vote
1answer
60 views

How Do I Package a Django Website for Debian (Not a Python Package or Egg)?

I have been searching for the last two weeks and chased myself into multiple dead ends trying to figure out the path that takes me where I want to go. However I finally have to admit that my answer ...
1
vote
2answers
50 views

How to check if disk has linux inside

I am trying to boot a external USB drive which runs Linux to check whether the main computer hard drive is running (so it contains) Linux or not, and mount it into /mnt directory to modify some files. ...
0
votes
1answer
64 views

How to copy rows of different files and paste column-wise?

I want to create a new file by copying rows of each file and pasting columnwise according to their file name orders. Here is the sample input and required output files below. file1.txt 1234 5678 ...
3
votes
1answer
52 views

certificate errors trying to create a virtualenv on old Ubuntu

On an old Ubuntu 8.04 (cannot upgrade yet) I need to create a Python virtualenv, install some packages and then my software. I do get certificate errors: Could not fetch URL ...
0
votes
0answers
67 views

Unable to install bsddb185, Python library for opening Berkeley DB version 1.85 files on Ubuntu

I am writing a python program that makes use of some legacy Berkeley DB 1.85 files. Unfortunately I am unable to install the bsddb185 Python package, either for Python version 2.x and for Python 3. ...
0
votes
1answer
49 views

File not found: Beautiful Soup

I am trying to run a program that I downloaded in Ubuntu latest version, but I continue getting an error everytime I try to run the program. It says: File Not Found: BeautifulSoup So in order to ...
-1
votes
1answer
151 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
1answer
146 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
499 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
87 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
38 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
44 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
315 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
165 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
44 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
169 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
126 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
118 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 ...