I know that Tkinter is not so modern, not so cool and maybe better to use PyQt or etc. But it is interesting for me can Tkinter look not so ugly in Ubuntu (Linux). Looks that brew version (in OS X) of python’s Tkinter compiled with built-in theme and looks good: But Ubuntu’s Tkinter makes me cry: I’ve read that
Tag: python
How to run python 3 on Synology NAS
I’m a little new to linux and I’m having trouble running Python scripts on Synology NAS running on DSM 5.1 I installed a Python 3 module, but when I call I get How can I run python 3 ? Thanks Answer As suggested by Geotob the solution is simply calling python3
Communicate with a subprocess using pipes on other than stdout/stderr
This is how I fork/exec a subprocess and communicated with it (pseudocode): My question is: I don’t really want to read the stdout of my subprocess, I would like the subprocess to write on a file descriptor other than stdout. And, I’d like the above code to read from that file descriptor. The subprocess is written in python, the main
Cannot get Pandas to install ! Help! (pip install pandas)
I’m trying to install Pandar but I can’t get pandas to install on my linux Centos 6.4. Running pip install pandas leads to this error: What should I do to fix this? Answer Im pretty sure thats a compiler error, so try installing g++ on the system if you are working on linux, run this.
Python + pexpect – How to establish a ssh connection?
I’ve been trying to establish an ssh connection via Python + pexpect, but I can’t send the lines that I want. I think it’s certainly a syntax problem, but I don’t know where it is occurring. The problem is that the password ‘xxyyzz’ never appears on the terminal, so I think the child.sendline doesn’t work and is a syntax problem.
print a pdf file in python
I want to print a pdf file in python. My code is as below: I am on Fedora 20. path.txt is a file that contain path to the pdf file like ‘/home/user/a.pdf’ When I run the code it says no such file or directory. Thanks Answer Try this code may help: Make sure the file in every line exists.
wifiphisher traceback. error after entering the number of AP
Recently, I used the wifi phisher tool in Kali Linux. when I enter the number of AP in the list, I get the following trace in the terminal: Any suggestions on this? Answer You can check your issues in sophron github, so you can try this changes in your wifiphisher.py: Change to python2 in the header code. Change this: to
Ubuntu – trying to install Python Couchbase lib – “libcouchbase/couchbase.h: No such file or directory”
All, I’m trying to install the Python Couchbase lib in my Linux server, but it’s failing with “libcouchbase/couchbase.h: No such file or directory”. I also cannot find which package contains the couchbase.h file. How can I fix this? ubuntu@ip-172-31-17-167:~$ sudo easy_install couchbase Searching for couchbase Reading https://pypi.python.org/simple/couchbase/ Best match: couchbase 1.2.4 Downloading https://pypi.python.org/packages/source/c/couchbase/couchbase-1.2.4.tar.gz#md5=4a51bf3ac1fa26bcb9433d53ac4ba34b Processing couchbase-1.2.4.tar.gz Writing /tmp/easy_install-ZF8OtY/couchbase-1.2.4/setup.cfg Running couchbase-1.2.4/setup.py -q
Plot .tif GDAL raster using matplotlib Basemap
I have a bit of code from here that I am using for plotting a geotiff image (Landsat): But, it fails at ct.TransformPoints(xy_source.reshape(2, size).T)) and I’m not sure why. The error it gives me: TypeError: in method ‘CoordinateTransformation_TransformPoints’, argument 1 of type ‘OSRCoordinateTransformationShadow *’ Which I do not understand. Any OSR guru’s out there? Thanks for reading. EDIT 1 The
Infinite while not working with os.execvp
I am programming in python which involves me implementing a shell in Python in Linux. I am trying to run standard unix commands by using os.execvp(). I need to keep asking the user for commands so I have used an infinite while loop. However, the infinite while loop doesn’t work. I have tried searching online but they’re isn’t much available