By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,270 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,270 IT Pros & Developers. It's quick & easy.

Exit from python-Strange problem

P: 1
Hi All,
I have a python program which was developed to for USB commincation. This program writes its results to .csv file.All is working fine on the PC with which we developed this program. Now I moved the same program to another PC here also its working almost ok expect that the program could not comeout of python(I dont receive any error message or exception) and I have force it quit( I mean End Now).
I am unable to open the .csv file until I close the cmd prompt

I tried to using
sys.exit(1)
os._exit(99)
os.abort()
noting is seems working...

Can someone tell me the reason for this strange behaviour?
Cheers
Sudhir
Jun 4 '07 #1
Share this Question
Share on Google+
2 Replies


bartonc
Expert 5K+
P: 6,596
Hi All,
I have a python program which was developed to for USB commincation. This program writes its results to .csv file.All is working fine on the PC with which we developed this program. Now I moved the same program to another PC here also its working almost ok expect that the program could not comeout of python(I dont receive any error message or exception) and I have force it quit( I mean End Now).
I am unable to open the .csv file until I close the cmd prompt

I tried to using
sys.exit(1)
os._exit(99)
os.abort()
noting is seems working...

Can someone tell me the reason for this strange behaviour?
Cheers
Sudhir
This sounds like an issue with the "USB commincation" part of the system. My guess is the read() thread that waits for USB packet is sitting there waiting. I'll dig up a thread where I have posted a working, multi-threaded usb reader that doesn't hang (after much development) when the application quits.
Jun 4 '07 #2

bartonc
Expert 5K+
P: 6,596
This sounds like an issue with the "USB commincation" part of the system. My guess is the read() thread that waits for USB packet is sitting there waiting. I'll dig up a thread where I have posted a working, multi-threaded usb reader that doesn't hang (after much development) when the application quits.
Here is that link.
Jun 4 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.