Questions tagged [python]

Python is a dynamically and strongly typed programming language that encourages readability.

1743 questions
0
votes
1 answer

Errors related to python version added to error log when I start apache2

When I start apache I am getting those errors: [Tue Jun 14 02:28:58 2011] [error] python_init: Python version mismatch, expected '2.6.5', found '2.6.6'. [Tue Jun 14 02:28:58 2011] [error] python_init: Python executable found '/usr/bin/python'. [Tue…
jnbdz
  • 927
  • 5
  • 24
  • 46
0
votes
2 answers

Want to upgrade python for django

I would like to upgrade python for django. Currently I have python 2.4.3 on my Red Hat server. I have installed python 2.7.1, but the default python is still 2.4.3 (It didn't upgrade python, but installed python 2.7 separately). Django python…
Shehzad009
  • 147
  • 1
  • 2
  • 6
0
votes
1 answer

/bin/sh - non interactive usage from Python

I am invoking cmd from Python like this: subpocess.Popen(['coffee'], shell=True) which I belive is translated to: /bin/sh -c "coffee" From docs I have read that in non-interactive mode files like /etc/profile, /etc/bash.bashrc are not read and…
Vladimir
  • 145
  • 10
0
votes
2 answers

Apache + mod_wsgi: seem to be getting a 403 server error

Hello I had to recently reinstall mod_wsgi today (As our Red Hat server was curupted again). Something funny happed while deployiing with Django. I kept on getting page 403 errors You do not have permission to access /mmc on this server error. My…
Shehzad009
  • 147
  • 1
  • 2
  • 6
0
votes
2 answers

Where should python and rails-based web apps be placed in the Linux filesystem?

/etc? /srv? /home? Apps in these languages shouldn't be under document root (which, in my opinion, goes under /srv/www). But, otherwise, I can't think of a location/scheme that's best practice to store them. Ideas?
eastydude5
  • 103
  • 1
0
votes
1 answer

How can I install Zope on Ubuntu 10.04 with Python 2.6.5?

I tried to install Zope on Ubuntu server 10.04: mnk@srv:~/zope-plone/Zope-3.4.0$ ./configure --prefix=/opt/zope-3.4.0 Configuring Zope installation Testing for an acceptable Python interpreter... Python version 2.6.5 found at…
MNK_real
  • 31
  • 6
0
votes
1 answer

Can i run Python PHP and Java sites on one VPS server

I have one VPS server with cpanel/whm installed. i want to host one python/django and one J2EE based website on that server. is it possible. I know that i have run thoseweb server at different ports but can users still see the site by typing…
Mirage
  • 561
  • 4
  • 10
  • 25
0
votes
1 answer

Is there any way to get databases belong to particular user

I am making script to backup users home directories and databases. i can make backup by going through dirs but i am not able to find a way to gets databases belong to particular user
Mirage
  • 561
  • 4
  • 10
  • 25
0
votes
2 answers

Setup Apache to run the same site, some parts with Django and some parts with RoR

I want to setup a website, say http://example.com so that requests to http://example.com/a/<...> would run on a RoR app and http://example.com/b/<...> would run in a Django app. Is it possible to configure Apache this way? How? Would it be better to…
donatello
  • 746
  • 1
  • 9
  • 16
0
votes
1 answer

How to install setup tools on Python 2.7?

When I try /bin/sh setuptools-0.6c11-py2.7.egg it says python 2.7 not found, my python is in /opt/python27/bin/python
Mirage
  • 561
  • 4
  • 10
  • 25
0
votes
2 answers

How to completely remove python2.4 and update to 2.7

I have installed python 2.7 but if I use python on shell then python 2.4 opens. Also, I installed the MySQL module and it gets installed for python 2.4. I don't want this to happen, can I make it that everything links to python 2.7, not 2.4?
Mirage
  • 561
  • 4
  • 10
  • 25
0
votes
1 answer

Python script take long time to backup folder

I copied this script from some book to make tar.bz2 of some folders for backup. #!/usr/bin/env python import tarfile, os def make_tar(folder_to_backup, dest_folder, compression='bz2'): if compression: dest_ext ='.' +…
Mirage
  • 561
  • 4
  • 10
  • 25
0
votes
1 answer

Got error while encoding text in linux

I am using python code to encode text before inserting into a database in a remote server (linux). Since I have special characters so I need to encode them to unicode. But I got following error while encoding text. UnicodeDecodeError: 'ascii' codec…
khati
  • 31
  • 2
  • 6
0
votes
1 answer

IOError: [Errno 32] Broken pipe

I got "IOError: [Errno 32] Broken pipe" while writing files in linux. I am using python to read each line a of csv file and then write into a database table. My code is f = open(path,'r') command = command to connect to database p =…
khati
  • 31
  • 2
  • 6
0
votes
1 answer

Whhich is best way to do linux tasks via shell commands or via python scripts

I want to build the web interface for executing or doing linux tasks . Although there may be some existing tools but i have build a complete system on the top of that so i need to program that system myself. 1)Is Python/Django good for making …
Mirage
  • 561
  • 4
  • 10
  • 25