I have my own VPS server with Centos and cpanel/WHM Currently i am building one website in Django with djnago builin server. When site finishes then i will move to WSGI and apache I want to know that Can I host multiple sites with same django installation Also what bout apps which i have installed with pip like SOUTH, SENTRY,
Tag: python
How to get formatted date time in python
I want my Linux Filename like this How can i get the date variable formatted like above in Python IN bash i write Answer You can use the same formatting string in strftime on a datetime object: Incidentally, I’d just like to put a word in for the joy of ISO-8601 date formatting
Pyaudio installation error – ‘command ‘gcc’ failed with exit status 1′
I’m running Ubuntu 11.04, Python 2.7.1 and wanted to install Pyaudio. So I ran, $ sudo easy_install pyaudio in the terminal and the process exited with following error messages, Searching for pyaudio Reading http://pypi.python.org/simple/pyaudio/ Reading http://people.csail.mit.edu/hubert/pyaudio/ Best match: pyaudio 0.2.4 Downloading http://people.csail.mit.edu/hubert/pyaudio/packages/pyaudio-0.2.4.tar.gz Processing pyaudio-0.2.4.tar.gz Running PyAudio-0.2.4/setup.py -q bdist_egg –dist-dir /tmp/easy_install-0Tetss/PyAudio-0.2.4/egg-dist-tmp-PYy9T8 In file included from /usr/include/python2.7/Python.h:8:0, from src/_portaudiomodule.c:30: /usr/include/python2.7/pyconfig.h:1155:0: warning: “_POSIX_C_SOURCE”
NoSQL Solution to Store Arrays?
I need a scalable NoSql solution to store data as arrays for many fields & time stamps, where the key is a combination of a field and a timestamp. Data would be stored in the following scheme: KEY –> “FIELD_NAME.YYYYMMDD.HHMMSS” VALUE –> [v1, v2, v3, v4, v5, v6] (v1..v6 are just floats) For instance, suppose that: FIELD_NAME = “TOMATO” TIME_STAMP
Read/Write LabView TDMS files in python under linux
Does anyone know of a way to read and write the National Instruments binary file type (TDMS) in python under linux? I know that NI has a C DLL available, but I don’t know how to access that through python, or if I even can do so under linux. Answer It looks like TDMS isn’t directly supported under Linux (see
Format of /dev/input/event*
What is the “format” of the character devices located in /dev/input/event*? In other words, how can I decode the character stream? A Python example would be greatly appreciated. Answer Right here in the Input.py module. You’ll also need the event.py module.
How do you set your pythonpath in an already-created virtualenv?
What file do I edit, and how? I created a virtual environment. Answer The most elegant solution to this problem is here. Original answer remains, but this is a messy solution: If you want to change the PYTHONPATH used in a virtualenv, you can add the following line to your virtualenv’s bin/activate file: This way, the new PYTHONPATH will be
How to detect if USB keyboard is plugged and unplugged
Is there any daemon/tool which will trigger some signal/event when USB keyboard is plugged and unplugged from pc? I need to know in my program when USB keyboard is plugged and unplugged. Any ideas on how to do this? Answer udev (Linux device manager) is the one that polls hardware. When it detects some changes about devices, it executes the
Python 2.7 cannot import PyQt4
I’ve upgraded to Python 2.7 from Python 2.6 on Ubuntu Maverick Meerkat (10.10) and I’m unable to import PyQt4. I installed both Python 2.7 (python2.7) and PyQt4 (python-qt4) from the Ubuntu repositories. I installed PyQt a while back, but I installed Python 2.7 recently. If I try Python 2.6 (since it’s shipped with Ubuntu, the command is simply python), it
iwlist scan output format
I have to write a tool to get the encryption type out of a iwlist scan. I just can’t seem to find whether or not there’s a standard output. Googling it looks like people are posting slightly different formats, but I can’t tell if they just copy/pasted wrong or what. Specifically, in Encryption key: On, is On/Off frist letter always