Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.
0
votes
2answers
2k views
How to setup and use yowsup-cli to to get Whatsapp authentication code?
I've tried following the same way mentioned everywhere, but something is wrong.
sudo apt-get install python python-dateutil python-argparse
sudo wget ...
0
votes
1answer
13 views
Adding commands in a shell script to add a python module path
I want to modify a linux shell script used to install a python module (setup.sh) to add the folder the an environment variable. This is needed so I can run the python module from a terminal. e.g. ...
1
vote
1answer
18 views
Enable cursor keys in python shell over ssh
I run OpenElec on a Pi.
I can ssh to the Pi and open a python shell.
How do I enable the cursor keys to work like up getting to last command in the python shell, like it does on my Ubuntu box.
Now ...
0
votes
1answer
19 views
Installing python library matplotlib on RedHat for second python installation
I can't seem to find documentation on this. Matplotlib says to run:
sudo yum install python-matplotlib
which installs all the dependancies and this version of matplotlib successfully:
...
1
vote
3answers
38 views
Simple install script says it is unable to locate package
This install script is giving me the error Unable to locate package for most of the programs.
#! /bin/bash
apps=(
'python-dev',
'python-pip',
'python-numpy',
'python-scipy',
'python-matplotlib',
...
-2
votes
1answer
32 views
How to parse json output through shell / Python [on hold]
I am running a curl command which gives me json response.
Now I want to parse the response output to get the keys and corresponding values from the output or getting value for a particular key.
I ...
0
votes
0answers
13 views
Do I have support for python in gdb or not?
I've been following this tutorial which requires running gdb with python support but I get following message:
┌─[wakatana@~] [63 files, 178Mb]
└──> gdb --python
gdb: unrecognized option '--python'
...
0
votes
1answer
503 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
votes
0answers
29 views
Proper python development habits under Debian
I've learnt python with IDEs under Windows and after switching to the traditional text editor/terminal couple under Linux I'm lacking two main things which made life easier.
First, I used to press one ...
1
vote
4answers
100 views
Script to delete files that don't match certain filenames
I have a folder with 500,000 images, sorted in subfolders by year and month. I'd like to create a script that does this:
If the filename does not match any of the filenames in names.log then delete ...
1
vote
1answer
27 views
Install newer & older versions of python on debian?
How can I install extra versions of python on Debian (jessie). On Ubuntu I can use the "deadsnakes" PPA which will give me any python version I want, with the version name in the command (e.g. ...
3
votes
2answers
3k views
Installing python modules for python2.6
On my CentOS 5.8 system (el5 , 64bit), I had python2.4 after OS install and I installed python2.6 now. Now I want to install python modules using yum.
But whenever I install a new python module it ...
0
votes
0answers
41 views
running a python script in termin os x
I do not know why but I cannot run a python script though the terminal.
my script:
define_regions.py
print "Hello World!"
print "Hello Again"
print "I like typing this."
print "This is fun."
print ...
2
votes
3answers
745 views
installing eric5 in CentOS 6.4
I am trying to install Eric Python IDE 5 in my CentOS 6.4. The problem here is even I have installed PyQT4 its again saying that module is missing. what I am supposed to do ? here is the terminal log
...
-2
votes
2answers
61 views
How can I find the name of my Network Interface [closed]
I have a project that requires me to scan the local network.
I found a program on the internet that allows the local network scanner condition, but I brought the gold @ IP argument in my network ...
0
votes
0answers
22 views
Using pyenv with sqlite3
I'm trying to install Python via pyenv and I would like to compile it with SQLite. I understand that this requires libsqlite3-dev or similar, but I don't have root access on this machine.
I ...
1
vote
3answers
55 views
Do I have multiple python on my computer? and how to uninstall one of them?
I encountered the problem that pip install - U numpy did not update the numpy version in python, which is similar to ...
0
votes
0answers
19 views
Sign a soap message from a JKS dynamically using Python Unix
I am currently calling a webservice using Curl command from unix .
I have a requirement that I have to dynamically message sign the soap request every time I make a call to the webservice using my ...
0
votes
1answer
53 views
Python function should print out something, does nothing
I wrote small script for my Raspberry Pi Project with an Adafruit 16x2 RGB LCD:
def KismetScanner():
print 'Kismet Scan'
#clearlogs = subprocess.Popen('rm -r /var/log/kismet; mkdir /var/log/kismet', ...
0
votes
1answer
529 views
Debian Stable (“wheezy”): was trying to build Python 3.4, and I ran sudo make install — am I in trouble now?
So, I wanted to run Python 3.4.x inside a virtualenv virtual environment. I learned that the first step should be to build Python 3.4.x.
I was doing so in /usr/bin/Python3.4.x (a folder I created), ...
0
votes
2answers
16 views
How do I correct the path for pip?
I'm trying to get pip to point to a different install rather than the default. It is currently pointing to /usr/bin/pip, but I want it to point to /usr/local/bin/pip. I believe I have the path set ...
1
vote
1answer
773 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 ...
0
votes
0answers
22 views
Exit from imported script in python [migrated]
abc.py:
import xyz
#also import other required modules
#other required code
xyz.func()
#other required code
xyz.py:
import threading
import sys
#few threads
def func():
#start all threads
...
1
vote
0answers
33 views
writing systemd unit file and specfile for a python twistd application [closed]
I have given a task to write the systemd unit file for a python twistd application and create rpm of it. The application is open source and you can find it here: ...
0
votes
1answer
24 views
how to change several piece of html code
I have several chunks of html code ,see below, in a html page that I need to change
Assurez-vous de bien recevoir tous nos messages en ajoutant [email protected] à votre carnet ...
1
vote
1answer
662 views
Can't install python because of zypper conflict
I have a virtual machine I just set up. I'm running a completely fresh install of OpenSUSE (with online updates from yast). At the terminal I tried to run python:
$ python
bash: python: command not ...
1
vote
0answers
46 views
Setup SSH tunnel on existing connection from script
I want to establish an SSH tunnel on an existing connection. The tricky part is doing it from a script (a custom shell I need to allow users only some specific things, like setting up this tunnel).
...
2
votes
5answers
2k views
CUPS - check if print successful (either python or in system)
EDIT: I forgot to make it clear I'm using python and pycups. The code is python but I shouldn't have thought that was enough.
I've dug through the cups documentation a few times and couldn't find ...
1
vote
1answer
608 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
18 views
Start GTK apk based on python
How to start application based on python + glade? startx python apk.py doesn't working. I can run application like firefox from text mode -> startx firefox
2
votes
0answers
41 views
Display cron job times in a human-friendly format
Is there a way to display or is there a tool that can parse a crontab expression and display it in a human-friendly way?
10 6 * * * sh /usr/local/crons/file_check.sh
For example, for the above cron ...
0
votes
0answers
30 views
Xterm not printing python errors
I'm running a suite of bash and python scripts that (taken together) make up a large open source software project running on Ubuntu 14.10 under VirtualBox 4.3.22. I'm using python 2.7.8 and xterm ...
0
votes
1answer
255 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?
1
vote
1answer
307 views
PiGlow not working
After following the steps specified in Boeeerb's PiGlow github repo, when I try to run the test.py file it gives me the following message:
Traceback (most recent call last) :
File "test.py" , line ...
1
vote
1answer
100 views
Linux Mint 13 Problem - No module named site
My Linux Mint 13 64-bit system has developed a problem. Whilst I can run basic commands like ls and vi if I try anything more complex (I have tried python2.7, mysql-workbench and addusr) I get:-
...
0
votes
1answer
38 views
Python script: wait until job in tmux session has completed
I am trying to continuously run a python script with random parameters from another python script, where each run is in its own tmux session. A very simplified overview of what I'm trying to do goes ...
5
votes
1answer
14k views
Running Python on ChromeOS
Is it possible to run the Python interpreter on a ChromeOS machine? I've found various editors you can use, but I would like the ability to run python applications as well.
I would like to purchase ...
3
votes
1answer
638 views
Python script run while screen is locked
I have a python script which seems to be failing to continue running its while True: ... sleep() loop
my code is at http://github.com/xdaimon/xdaimonConky
What happens is I autostart python on ...
2
votes
1answer
50 views
how can I add an extra character after a word search [closed]
I have the following field names
demelog voyapro naisjdf naismc decoide decoccm travide travccm equiccm mariccm
Below is a sample of my file. There are more columns before the first fck=83...
...
0
votes
0answers
37 views
broken yum/python
Yum seems to be broken and below is the error.
'import site' failed; use -v for traceback
There was a problem importing one of the Python modules
required to run yum. The error leading to this ...
1
vote
3answers
76 views
How to include python script inside a bash script
I need to include below python script inside a bash script.
If the bash script end success, I need to execute the below script.
#!/usr/bin/python
from smtplib import SMTP
import datetime
...
8
votes
2answers
115 views
Why is this Python package trying to use a non-existent gcc?
I'm trying to install PyCrypto for Python 3 on Solaris. Whether I do it via "python3 setup.py install" or "pip3 install pycrypto", I run into the same problem: a call is made to a gcc which does not ...
0
votes
1answer
57 views
Installing gdal python package inside Python27 Software Collection
I have a Centos 6.6 VM with the Python 2.7 SCL. I have gdal and gdal-devel installed.
If I start the scl with sudo scl enable python27 bash and do a pip install gdal it fails on:
gcc -pthread ...
1
vote
2answers
23 views
Where is pithos installed?
I'm trying to find the installation directory in Pithos so I can hack it, and am really bad a unix commands and am embarrassed to ask this. If I do:
`which pithos`
This returns a link to the ...
0
votes
3answers
84 views
How do I print a certain line of python code using the Linux terminal?
If I am writing some python and I only want the terminal to show a certain line, what command do I use?
For example my program is:
print("line one")
print("line two")
print("line three")
And I only ...
1
vote
1answer
34 views
How to run specific architecture (32/64) of Python in Centos6 when both are installed?
I have a Centos 6.6 Docker image being used for an automated build. It has the default x64 Python 2.6.6 installed. I need to run some things in a 32-bit Python environment. I snagged the ...
0
votes
0answers
45 views
Testing outgoing FTP with fake data
I would like to implement a fake FTP transfer in a program I'm working on. Basically I just want there to be FTP traffic happening in the background for a variable length of time. Similar to how iperf ...
0
votes
1answer
55 views
Exit /dev/tty after error message
I run this bash function when a button is pressed, it calls my mobile, however when the call ends or I reject the call, it hangs in /dev/tty and does not return to the main program
call.sh
...
2
votes
2answers
72 views
Can't import wx even after installing python-wxgtk2.8
I am running Linux Ubuntu 14.04 LTS and am trying to install wxPython so I can develop GUIs on python.
I have python 2.7 and 3 installed but 2.7 in default.
I have installed wxPython as recommended ...
0
votes
0answers
20 views
Problem in running uberwriter (a python app)
I installed uberwriter on my archlinux using AUR. But when I want to run it this error will be shown:
Traceback (most recent call last):
File "/usr/bin/uberwriter", line 44, in <module>
...