Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.
1
vote
0answers
8 views
installing dsc30 - python 2.6 fights back
Im trying to upgrade some systems to Cassandra 3.x. The installer want Python(abi) >= 2.7 so I installed it. Still seeing this error:
Resolving Dependencies
--> Running transaction check
---> ...
1
vote
0answers
26 views
How to get all files of a certain type from a virtual web path?
I try to use wget to download certain files from a website. But probably the virtual locations of the files do not represent their actual location.
For example, if the link to the file is ...
0
votes
0answers
9 views
problem with Ubuntu server 12.04 updates, internet access problem but i can ping Local Area network
when I type the following commands on the terminal the following is displayed
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.deb
Here is out put
connecting to ...
0
votes
1answer
20 views
Installing Dependency for epel from yum update on Centos 6.5
I think that I'm not quite understanding where epel repo reads dependency for a python update. For example when I run sudo yum update I get the below and then successfully run pip install requests and ...
1
vote
1answer
21 views
why does setgid permission on an SO cause failures?
When I load a particular version of Python on a server, I get the following error:
python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file ...
0
votes
1answer
31 views
How to install Python module dependencies from my RPM?
I have an application that I am packaging as an RPM and installing on CentOS 7. When I install the RPM I want it to install some compiled binaries as well as some Python modules with their ...
0
votes
1answer
53 views
How do I replace my “base system shell” with IPython?
I'd like to replace bash with IPython on my system, so that even files like .profile are in Python rather than shell script.
I have some confusion on the topic, even though asking a few questions on ...
2
votes
1answer
66 views
.profile is written in shell script — can I instead make my system understand that I want it to execute a Python script instead?
I get Python. I don't get shell script. I could learn shell script, but I would rather not if I can use Python in its place.
A good place for me to start would be the .profile script. Currently, for ...
1
vote
1answer
30 views
Python 26 pkg missing in CentOS 5
Getting following error while accessing :---
--> Missing Dependency: python26 is needed by package ambari-server-1.2.3.7-1.noarch (Updates-ambari-1.2.3.7) Error: Missing
Dependency: python26 is ...
2
votes
0answers
26 views
How do I emulate a virtual keyboard with an arbitrary character set?
I am writing a couple applications that change how your keyboard works. (One that allows key-chording, and another that allows you to say syllables out loud to type individual characters.) The ...
0
votes
0answers
10 views
Apache2 custom errorLogger buffer
I'm currently using this:
ErrorLog "|/var/www/HClogger.py >> /var/log/apache2/web-error.log"
This allows me to have a file log, but also send the log to a HipChat room.
The script is:
...
0
votes
0answers
28 views
Reading Serial Data with Python
I am trying to read a line of serial data from a MaxBotix sonar sensor with Python.
The sensor spits out R0300 The integers after the "R" are the distance read in millimeters. I am trying to write a ...
0
votes
1answer
31 views
Unable to use source command within python script [closed]
I basically want to set path for some of the variables in Unix. But the source command does not work here. Any suggestions of the same?
1
vote
1answer
18 views
What is “site specific” data?
I have heard references in the FHS to "site-specific" data. Python also has the notion of "site packages".
In FHS, is "site" just a general term for an instance of someone using an FHS filesystem? ...
1
vote
1answer
27 views
Unable to run Sugar on Arch Linux due to PyGIWarning
Installing Sugar environment on Arch.
I just installed a fresh Arch Linux just to run Sugar on it.
After downloading sugar from AUR using yaourt -S sugar I wanted to run Sugar using sugar-runner ...
0
votes
1answer
25 views
Does file directory/folder your code is in matter when using python3 modules ? I had an Issue
I am asking as lately while doing python GUI programing I installed tkinter by doing
apt-get install python3-tk
everything went well and when I opened python3 console while I was in the following ...
-1
votes
1answer
22 views
Cron does not execute my Python script [closed]
I'm trying without success to execute a Python script using cron on a
Debian Jessie Raspberry Pi.
I can execute the script manually, but it fails to execute with cron.
Here's what crontab -l shows:
...
1
vote
1answer
16 views
save output of a python script to a text file
how can i save output of this python script to a text file? this is a KMS server which clients connect to it and activates their windows or office. i wanted to save the log in a text file. I should ...
0
votes
0answers
20 views
ImportError python script
import requests File
"/usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg/requests/__init__.py",
line 58, in <module>
from . import utils File ...
1
vote
2answers
57 views
Random files selector in filesystem
Context :
In order to test some backup process which are supposed to work all nights, i want to select a random files on a large amount of datas. (Around 7 millions of files. This is a NFS server with ...
0
votes
1answer
19 views
Where is the actual executable of LiveUSB-Creator located on Fedora?
I don't really know how to phrase this question any better, so let's go with an example:
I installed liveusb-creator on my Fedora a while ago and I wonder where the files it executes are located.
I ...
1
vote
1answer
54 views
Saving process output to a file in systemd unit file
I created a systemd file unit (Centos 7) and I wanted to save the Python output to a file but the service won't start with the below code.
[root@static ~]# cat /etc/systemd/system/pykms.service
...
0
votes
0answers
14 views
OpenCV for python
I am having some issues with importing cv2.cv inside of python2.7.
I installed opencv2 and 3 from source (using make and make install) however when running "import cv2.cv" I am still told no module is ...
0
votes
0answers
39 views
Broken pip3.1 install
I just installed pip3 on my Debian and it return a python error every time I try to use it.
I installed it like this :
apt-get install python3-setuptools
easy_install3 pip
my version of pip :
# ...
2
votes
1answer
42 views
VIM with Python - Multiple # do not get colored as a comment
Something changed on my system and now VIM screws up syntax highlighting of commented lines.
This makes having 'debug' lines very difficult as it looks like the line is still active based on the ...
0
votes
0answers
13 views
Connect to sqlite database - sqlite3.OperationalError: no such table [migrated]
I tried to connect to my sqlite database test.db, but I get when I
try to access the content the following error message:
sqlite3.OperationalError: no such table: testtbl2, but I created
this table ...
-2
votes
2answers
67 views
How to rename bulk of jpg files to png using convert
Let's say I have a bunch of .jpg files which I want to convert to .png. The file structure is as follow:
00-01.jpg
00-02.jpg
00-03.jpg
00-04.jpg
00-05a.jpg
00-05b.jpg
01-01.jpg
01-02.jpg
...
2
votes
1answer
70 views
Is it possible somehow to tell if a laptop is moved in a bash or python script?
I'm trying to figure out if there's a way to use a bash or python script to tell if my laptop gets moved. I had the idea of using wifi signal strength to do it, but the problem with that is that you ...
1
vote
0answers
25 views
How to validate server credentials in python
I'm new to python scripting.
This is my sample script
import pexpect
import getpass
import sys
host = sys.argv[1]
user = sys.argv[2]
password = sys.argv[3]
child = pexpect.spawn("ssh -l %s %s ...
1
vote
2answers
33 views
Rsync two “filepath” found by find commands [closed]
Original file
/001day/backup/001m/name_test_v1.txt
Destination file
/001date/003m/name_test_v12.txt
Method 1
rsync -av --progress /001day/backup/001m/ /001date/003m/
Method 2
...
1
vote
2answers
56 views
How do I run a Python script on my web server
Hi I'm new to python programming.
I have written python script and calling it in shell script.
I want to run my script on my server that is hosted through somedomian.com
I have tried by following ...
3
votes
0answers
95 views
is there a way to get the url from current tab in google-chrome?
I used to do that on firefox using a python command, but recently something changed and I can't get the URL anymore!
What used to work with firefox:
#!/bin/bash
current_tab_num () {
python2 ...
1
vote
1answer
73 views
How to programmatically add new crontab file without replacing previous one
I am working on a small home automation project using raspberry pi (OS -Raspbian).
I want to know how to add more than one crontab file using python-crontab module without replacing the previous ...
0
votes
1answer
51 views
import: unable to open X server `' @ error/import.c/ImportImageCommand/361
I am trying to run a python script to generate heatmap and clustering dendrogram. But I got an error message saying :
import: unable to open X server @ error/import.c/ImportImageCommand/361
I am a ...
1
vote
1answer
24 views
CGI error while trying to retrieve from sqlite3
I am trying to build a very simple login page, which asks the user for his register_no, username and password. And when he presses the submit button. I am trying to check whether it is an existing ...
2
votes
0answers
28 views
Why did this program install into ~/.local/bin … thats the first time I have seen that happen?
Why did this program install into ~/.local/bin ... thats the first time I have seen that happen?
When I install this "Taurus Blazemeter 'bzt'" program, it ends up being installed into ~/.local/bin ...
1
vote
1answer
28 views
Can't run python libraries due to python 2/3 issues
I am running on a fresh install of OpenSUSE 13.2 tumbleweed which comes with python2.7 and python3.4. I am continually having problems running any python based libs in getting the following error ...
0
votes
1answer
32 views
How to compile Python with (Active)Tcl 8.6?
I'm trying to compile Python 3.5.0 on CentOS 6 with Tcl 8.6. I did
./configure --with-tcltk-includes=I/opt/ActiveTcl-8.6/include --with-tcltk-libs=L/opt/ActiveTcl-8.6/libs ...
2
votes
0answers
40 views
Why can't this Python script access XDisplay from Root terminal?
I need to run this Python script as below because it needs access to user's xdisplay:
DISPLAY=:0 XAUTHORITY=/home/<USER>/.Xauthority su <USER> -c "python-script"
The command above has no ...
0
votes
2answers
123 views
How to install Python on CentOS without root privileges?
For some reasons, I need to install Python on CentOS without root privileges. Since without root, one cannot use yum to install packages, so I tried
./configure --prefix=$HOME/tools/python
make
make ...
0
votes
0answers
10 views
unknown type name 'ffi_closure' while installing Python Ctypes
On my Media box I am trying to install python ctypes (needed to run some applications). When trying to install the package (via pip, easy_install or manually) I get the following error:
unknown type ...
0
votes
2answers
69 views
Set Path for all Users (Login and Non-login Shells)
Ok. So, I'm used to Ubuntu and CentOS more than redhat, so I'm hoping there's some obvious solution to this that I'm missing.
I've installed Anaconda (Python). I've placed it in:
/opt/anaconda3
I ...
1
vote
2answers
52 views
Best practice to update own application
We're developing app for raspberry PI in python. We don't have much experience deploying apps in linux and we need to figure out how to update this app after releasing. We came up with 2 ways:
make ...
1
vote
3answers
76 views
what could be the reasons for shell scripts kill itself?
I have shell scripts like
#!/bin/bash
while true;do
#Code HERE!
#Pushing Data to DB
echo "Data to DB"> /root/schip.log 2>&1
done
This is script is continuously running and ...
1
vote
1answer
40 views
What does Requires: Python(package) do for RHEL spec files?
I'm packaging some Python packages currently without RPMs, and some of those depend on others that I'm packaging.
While packaging I noticed a format where people do: Require: python(pkg-name), but ...
2
votes
5answers
2k views
Execute shell commands in Python
I'm currently studying penetration testing and Python programming. I just want to know how I would go about executing a Linux command in Python. The commands I want to execute are:
echo 1 > ...
0
votes
0answers
59 views
why md5 encrypted password insert into php ldap admin extra {md5}
I am using python script to inter encrypted password into php ldap admin but the problem I am facing is LDAP add extra {md5} before the encrypted password, I simulated the code by creating two files ...
-2
votes
1answer
32 views
What is posix, and how can I elevate my permissions using python? [closed]
I was wondering if I could elevate my permissions on a chromebook with the os posix using a python script. I was not given the administrative permissions when I was given the laptop for college.
2
votes
2answers
43 views
Is it possible to pass arguments into a Python script?
I know how to pass arguments into a shell script. These arguments are declared in AWS datapipeline and passed through. This is what a shell script would look like:
firstarg=$1
secondarg=$2
How do I ...
0
votes
2answers
38 views
How to install python on debian? [closed]
I'm new to Linux, so I don't know a lot of things, and I want to know how can I download and install python on my linux VPS (with SSH access).