Forum: Poser Python Scripting


Subject: More Q's on controlling external apps from Poser Python

layingback opened this issue on Dec 03, 2003 ยท 6 posts


layingback posted Fri, 05 December 2003 at 5:05 PM

Ockham, Thanks so much for the detailed - and useful - reply. I'm using Execfile expressly to call a python script which has the spawn command in it. (spawn appears to be in new in 1.6.) Reason for this is that with NT-based Windoze (2K, XP) the python script calling the external program becomes "In use" per Windoze until the external program goes to EOJ. I.e. you can't edit the python script in the meantime. So I don't want to risk tying up poserStartup.py for potentially the whole session. Problem is when you try to access an "In use" py script from within Poser Python it appears fine, until you go to execute it. Then the ugly dialog box appears! Looks as if I may have found a route to a way around it though... Attempting to delete an "in use" script will fail in Poser python. 'Course it's a tad like the old method of testing suspected witches by burning - by the time you find out that the file isn't locked, it's gone! Fortunately virtual things like files are somewhat easier to recreate :-) Thanks for the insight on close down detection - both could work for this situation.