Skip to content

Tag: python

Tkinter look (theme) in Linux

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: …

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

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…

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.

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 o…