Installer 5b3 problem
Zoltan Felleg
zfelleg at telnet.hu
Sun Mar 24 17:49:41 EST 2002
Hello,
If this list is not the right place for this stuff, please redirect me
to the proper one (and forgive me for bothering you here).
I have a problem with the new mcmillan installer, namely the following
code freezes at the commands.getstatusoutput() line when its function
runs as a thread. The script itself works correctly, the "frozen"
executable does not. (It did work with installer 5b2). The system is Red
Hat Linux 7.2, with Python 2.2 compiled from source, and the database
(for the shelve) is gdbm. (I can use installer 5b2, but if the problem
is not in my script, it would be nice to have the next installer version
without this glitch). The script is as follows:
import time
import shelve
import thread
import commands
def main():
db = shelve.open('/tmp/test.db')
db.sync()
callprogram('main')
time.sleep(1)
thread.start_new_thread(callprogram, ('thread',))
time.sleep(1)
def callprogram(parameter):
print 'Starting', parameter
rc, output = commands.getstatusoutput('/sbin/ifconfig')
print output, rc
print 'Ending', parameter
if __name__ == '__main__':
main()
It runs perfectly without opening the shelve, but if it is opened, the
thread hangs...
Regards, zoltan
More information about the Python-list
mailing list