Finaly found a simple enough task for python, took the plunge, but.....

Sam Sambo at connection.com
Wed Jan 7 01:30:10 CET 2004


Only 2 weeks messing around with it ( thanks to programs like SYNCHRONEX and 
BITORRENT ), and already trying to create windows ( the paths are just too long 
for me to want to type them ).
After much trial and error I finaly got the following code to open the 'get dir'
dialog , but I am getting another blank window titled 'tk' and "NOT RESPONDING"
When I kill it (end task), I get reiniit/restart (CTRL+F6) in my shell window
What am I doing wrong? Do I need to do anythink to clean up after using the 
dialogs?

**********************************************************************************
import os
import sys
import tkCommonDialog

def me():
   dir_name = ""

   getfileDLG = tkCommonDialog.Dialog()
   getfileDLG.command = "tk_chooseDirectory"
   getfileDLG.__init__()
   dir_name = getfileDLG.show( )

   print dir_name

**********************************************************************************

The other think is that the dialog does not get focus.	

Must admit I was little more confortable with the HTML help in Python 2.3 
however less informative ( which I only installed a week before 2.3.3)
The help server in 2.3.3 just produces blank pages (most of the time) and 
eventualy locks up. I think it has to do with the loopback, I read about 
somewhere, but I can't be dialed to my ISP all the time.


Thanks, Sam.




More information about the Python-list mailing list