debian

How to install Tkinter on debian sid?

How to install Tkinter on debian sid? Question: I need to install tkinter on debian. After some research[1][2], I noticed that Tkinter should be automatically installed with Python. However, when I try to import the module, I get the following: >>> import tkinter Traceback (most recent call last): File “<stdin>”, line 1, in <module> ImportError: …

Total answers: 2

Setting Django up to use MySQL

Setting Django up to use MySQL Question: I want to move away from PHP a little and learn Python. In order to do web development with Python I’ll need a framework to help with templating and other things. I have a non-production server that I use to test all of web development stuff on. It …

Total answers: 13

A configuration file that can be read by python and shell

A configuration file that can be read by python and shell Question: I have python scripts and shell scripts in the same folder which both need configuration. I currently have a config.py for my python scripts but I was wondering if it is possible to have a single configuration file which can be easily read …

Total answers: 4

Call Python script from bash with argument

Call Python script from bash with argument Question: I know that I can run a python script from my bash script using the following: python python_script.py But what about if I wanted to pass a variable / argument to my python script from my bash script. How can I do that? Basically bash will work …

Total answers: 8

python-dev installation error: ImportError: No module named apt_pkg

python-dev installation error: ImportError: No module named apt_pkg Question: I am Debian user, and I want to install python-dev, but when I run the code in the shell as a root: # aptitude install python-dev I get the following error: Traceback (most recent call last): File “/usr/bin/apt-listchanges”, line 28, in <module> import apt_pkg ImportError: No …

Total answers: 25

Where can I find and install the dependencies for pygame?

Where can I find and install the dependencies for pygame? Question: I am relatively new to linux and am trying to install the pygame dev environment for python. When I run the setup.py it says that I need to install the following dependencies, one of which I found and installed (SDL). However, the others have …

Total answers: 9

How to compare Debian package versions?

How to compare Debian package versions? Question: I looked at python-apt and python-debian, and they don’t seem to have functionality to compare package versions. Do I have to write my own, or is there something I can use? Ideally, it would look something like: >>> v1 = apt.version(“1:1.3.10-0.3”) >>> v2 = apt.version(“1.3.4-1”) >>> v1 > …

Total answers: 4

How do I do Debian packaging of a Python package?

How do I do Debian packaging of a Python package? Question: I need to write, or find, a script to create a Debian package, using package python-support, from a Python package. The Python package will be pure Python without C extensions. The Python package for testing purposes will just be a directory with an empty …

Total answers: 5