Hi,
I use RedHat linux.
How can I find where exactly the current python script is running?
I use this code:
#test.py
import os,sys
print sys.argv
os.chdir(os.path.dirname(sys.argv[0]))
It doesn't work when I run this command from the directory that
test.py is located:
python test.py
That me
Simon Forman wrote:
> gmax2006 wrote:
> > Hi,
> >
> > Is it possible that a python script finds out whether another instance
> > of it is currently running or not?
> >
> > Thank you,
> > Max
>
> Yes, there are several ways. What OS are you
Hi,
Is it possible that a python script finds out whether another instance
of it is currently running or not?
Thank you,
Max
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am using RedHat Linux 4. and I developed an oracle 10g based
application by using cx_Oracle (cx_Oracle-4.1-10g-py23-1.i386.rpm) and
Python 2.3.4.
When I run the application through direct console connection, It works
perfect.
But, when I schedule a crontab job to run the application, It lo
Hi,
I went through couple of wrong paths to install MySQLdb on my RedHat
box. I was trying to download MySQL client from MySQL.com and also
mySQLdb from SourceForge. After some challenges with compile errors and
also searching for pre-required RPMs, I found RedHat distribution
already contains all
Hi,
I am having hard time with installing MySQLdb on Linux.
My Python version is 2.3. I have downloaded
"MySQL-python-1.2.1_p2.tar.gz" from sourceforge. The README file
asks for MySQL installation. My MySql server is on another box. That is
why I think I should to install just the MySql client (a
Fredrik Lundh wrote:
> DO NOT do a full install; you'll most likely break RedHat stuff if you
> do that.
I was expecting an rpm to do the update. This is a sensitive production
box. I think I should just continue with Python 2.3.
Regards,
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
My RedHat Linux installation already has Python 2.3 on it.
What is the easiest way to upgrade it to 2.4?
I use ActiveState python in Windows. Is it the best distribution for
Linux as well?
Thank you,
Max
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am developing scripts that must run on both Linux and windows.
My scripts contain lots of relative paths (such as log\\log.txt or
ctl\\table.ctl) If I use os.sep, it makes the code ugly. Is there any
tips or techniques to have Python automatically converts \\ to / when
the script runs on Li