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

learn more… | top users | synonyms

-3
votes
0answers
14 views

Removing intermediate line breaks in muliple columns except the last new line character [on hold]

Suppose If I have the data like this Col1|Col2|Col3 <br\> 123|abc\n<br\> xyz\n<br\> |abc\n<br\> def\n<br\> other rows<br\> <br\> In the above newline ...
0
votes
0answers
15 views

Equivalent to OS X's py2app and Windows's py2exe?

I'm writing an application in Python. I don't expect my end users to be particularly tech-savvy, so I'd like to package it up like a familiar native executable. For OS X, that means running it ...
1
vote
0answers
14 views

Build xpra on local directory without root priviledges

I am trying to build xpra on local directory without root priviledges. The xpra official site says: https://www.xpra.org/trac/wiki/Building Building with distutils For installing into a local ...
0
votes
0answers
16 views

Testing by Change variables [closed]

I am trying to write a shell script for testing. Goal: I need to be able to change the variables (automatically) after the test (by changing the variables to anything) to compare both results. The ...
1
vote
0answers
13 views

Can I copy output from sage to my clipboard?

I run sage from the terminal. One nice feature of sage is that it can automatically latex-ify results. I would like to be able to pipe these results to my clipboard (I run Ubuntu 14.04). I have ...
1
vote
0answers
17 views

Can I change owner of a tunnel after creating it?

I've been trying to finagle pytun to do my bidding in creating persistent ssh tunnels, but I very much do not want these to be owned by root and unless I modify the python package myself (which as a ...
0
votes
0answers
47 views

FreeBSD Selenium PhantomJS - Can not connect to the Service

i am stuck to run PhantomJS with selenium. So i have prepared a FreeBSD Jail and installed phantomjs via ports. whereis phantomjs > phantomjs: /usr/local/bin/phantomjs /usr/ports/lang/phantomjs ...
0
votes
2answers
64 views

Script for ssh automatic login to a specific port

So currently, the "traditional" way to connect through SSH is the following one: ssh USERNAME@HOST -p PORT I would like to create a script in which I will include all the appropriate information ...
3
votes
1answer
66 views

Bulk downloading PDFs

This may/may not be possible using bash happy for a suggestion in Python if there is one. But I would like to download all the PDFs/ePubs from the following link https://mises.org/library/books ...
0
votes
0answers
26 views

wget changes downloaded file size

I'm using wget to download Excel file with xlsx extension. The thing is that when I want to deal with the file using openpyxl, I get the following error: "BadZipfile: File is not a zip file" But when ...
0
votes
0answers
38 views

Email generated with Python stuck in mailq, times out (Debian)

I want to send emails out, originating from my Debian computer. I do NOT want the emails to originate from my gmail account, like in most Python smtplib examples. I called my ISP regarding port 25, ...
0
votes
1answer
54 views

How do I print the data received on a serial port?

Below is the python code I have written : import serial,time #initialization and open the port ser = serial.Serial() ser.port = "/dev/ttyUSB0" ser.baudrate = 1152000 ser.bytesize = serial.EIGHTBITS ...
0
votes
0answers
39 views

Cronjob python script

I have a python script that parses some html and then writes it to output file. I want that cronjob would execute that python script. When I run this script from command line it works fine (python ...
0
votes
1answer
18 views

OPENSSL_1.0.0 not found when running PyPy 4.0.1 on Amazon Linux (AWS EC2)

I want to run PyPy 4.0.1 on Amazon Linux (AWS EC2), and then downloaded and unzipped the tar.bz file. Also, I created the symbolic links to fix problems, such as pypy: error while loading shared ...
3
votes
0answers
29 views

What is wrong with my systemd unit file?

Here is my unit file: [Unit] Description=Backend Service After=mariadb.service Requires=mariadb.service [Service] Type=simple ExecStart=/var/www/html/pythonscripts/Backend.py [Install] Alias=BEd ...
1
vote
1answer
23 views

How to Load data to one table from Multiple excel files?

I have to load data from multiple excel file into one table , Please help me to achieve the solution. We are getting excel file from different retail shop which contain multiple column , each file is ...
1
vote
2answers
39 views

How to specify the python path for pip?

With pip installed, I am trying to install matplotlib in Ubuntu 12.04.4 LTS. I got the following error when executing "sudo pip install matplotlib" I guess this is because the python version is too ...
-1
votes
0answers
34 views

How to retrieve SSH remote data from a tty device via linux?

I have data coming from a device tty which is on a remote machine (via a SSH connection with IP:Port and a user:password to access it). Via PuTTy, I can log on to that IP and Port and put manually ...
0
votes
0answers
22 views

Building python with openssl support

I have the following directory structure: nchambers@nchambers-305E4A-305E5A-305E7A:~/mini-bin$ la 2to3 cpp-5.3.0 gcov-5.3.0 grmid-5.3.0 objcopy-2.25.1 ...
0
votes
1answer
31 views

Running a command on all servers using Fabric

I am not sure , whether i should i ask this question here or some other stack-exchange community , but i am trying some simple commands to run on a list of servers , using python fabric. The code ...
0
votes
1answer
43 views

Upgrading from Python to 2.7.10 to 2.7.11 on OSX

How can I upgrade Python from 2.7.10 to 2.7.11 on OSX (Yosemite)?
1
vote
2answers
37 views

How can I run this python script on all html files under a directory? [duplicate]

I have a python script $ cat ~/script.py import sys from lxml import etree from lxml.html import parse doc = parse(sys.argv[1]) title = doc.find('//title') title.text = span2.text.strip() print ...
1
vote
1answer
34 views

Building python with openssl support

I have the following directory structure: nchambers@nchambers-305E4A-305E5A-305E7A:~/mini-bin$ la 2to3 cpp-5.3.0 gcov-5.3.0 grmid-5.3.0 objcopy-2.25.1 ...
0
votes
2answers
47 views

FreeBSD: using python3 in uwsgi instead of python2

I have a server with FreeBSD 10.1 installed. I want to deploy a Django site on it using uwsgi+nginx+python3 and got some problems. The site was written for python3, I installed python3.4 then python3 ...
1
vote
1answer
24 views

Install Python package in linux OpenSUSe

I am using this weird SuSE machine. I need to install a python package in my python 2.7. I downloaded it from the site and then untar it and cd to the directory.. Tried: cd /python-package_Pyxnat/ ...
1
vote
1answer
41 views

How to provoke a broken pipe

I try to debug a python script that interfaces MPD using python-mpd2. When the script tries to perform an action after being idle for a couple of hours, it terminates with an exception ...
0
votes
2answers
63 views

Make python 2.7 the default python in centos, making an alias didn't work

I am trying to install llvm on my centos 6.7. While running the configure file it says it throws the error checking for python >= 2.7... not found configure: error: found python 2.6.6 ...
0
votes
1answer
37 views

Using hex colors in Ranger file manager

I would like to change the colors in a ranger colorscheme to some custom hex colors I defined. However, in the python file the colors are set by their names, like "blue" or "red". I tried to swap them ...
0
votes
2answers
29 views

Shell script - blanks are not always recognized as such?

I'm confused on how bash interprets blanks while executing a script. In the end, I want a script that is fed by a csv file containing software used by an organisation and it should return the CVEs for ...
0
votes
0answers
26 views

Track command line with timestamps

I want to create a program that audits the command line I/O of a terminal session using its PID. I found out about script command which is pretty much the same to what I want, but the problem is that ...
0
votes
1answer
12 views

Problems with terminal opening URL

I am using soundcloud API with python and I'm trying to open url of the song with my browser. I use this code client = soundcloud.Client(client_id=clientIdEntry.get()) track_url = urlEntry.get() if ...
0
votes
0answers
13 views

problem locating module in ubuntu, visible through Anaconda but not accesible

I have Ubuntu 12.04. I have installed Anaconda3 latest version. It has python3.5 which is default for the system now. Some of the programs require using python2.7 which I invoke as follows ...
0
votes
3answers
62 views

apt-get install bluez only installing documentation

I've been struggling for the past two days to get my Bluetooth keyboard to work with my Raspberry Pi 2, with Kali 2.0 installed (I have gotten Adafruit's PiTFT software from ...
0
votes
1answer
20 views

mysql error.log centralize logs

I'm developing a script where it will look into logs every 10 minutes and if there's any critical error it will send an e-mail to a certain adress. I have this problem i would like to solve more ...
-1
votes
1answer
42 views

Why are my emails generated with Python stuck in mail queue

I'm trying to send emails programmatically with Python. The emails stay in the mail queue (mailq). Details are below. My diagnosing abilities have reached their limit. Perhaps the issue is my ISP ...
0
votes
2answers
41 views

how to write python code to change display color

I want to change display color. I have a simple script: #!/bin/bash sleep 50 xrandr --output VGA1 --gamma 1.28:1:1.28 # for purple How can I write it in python?
0
votes
2answers
54 views

How to set up Python path?

I have uninstall anaconda2. but now when I run Python command in terminal it says "bash: /home/user/anaconda2/python: No such file or directory" now how can I set to Python when I have python 2.7 in ...
0
votes
0answers
12 views

OpenStack EC2 API url in API access tab

I want to configure open-stack ec2 API , such that the ec2 API url apears in API access tab in project settings as other urls appear , such as urls for other services. Do i need to install some ...
0
votes
1answer
9 views

FreeBSD install python31 over python27

Hi I had installed python27 and after python31, I tried to deinstall python27 but it seems that this version is standing on host. How can I set python31 to become main python ?
1
vote
0answers
23 views

Installing armhf libboost-python-dev in amd64 cross environ

I'm trying to install libboost-python-dev for armhf in amd64 cross compilation build environment. apt install libboost-python-dev:armhf libboost-python-dev depends on python2.7-minimal, which ...
1
vote
0answers
19 views

How to view WIFI devices names and signal strength [duplicate]

I want a cli utility or script that shows all the Wifi devices or hotspots or access points and their signal strength. I want to log this data using Python. I will write the logging script myself. ...
2
votes
0answers
60 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
32 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
15 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
102 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
31 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
56 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
56 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
87 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
54 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 ...