Newbie questions: write permission, interpreter minimizing

pcarey at lexmark.com pcarey at lexmark.com
Fri Sep 20 12:17:54 EDT 2002


Win2K, Python2.2
Hello list.

I'm relatively new to Python.

When I want to test for write permissions (on Win2K),
I use try: except: clauses, something like this:

try:

      os.mkdir("X:\\anydir")

except OSError (e,s):

      print s

os.rmdir("X:\\anydir")



Is there an easier way?

I tried os.access("X:\\anydir", W_OK), but it always returns 1,
so I guess I am misunderstanding that.



Also, (and forgive me if I betray woeful ignorance)...

I use PythonCardPrototype to make UI's.
When launching these apps (double-clicking),
the interpreter launches (as it should) and remains in the background
(as it should)... but is there any way to automatically minimize the
interpreter?



Thank you,

Pete







More information about the Python-list mailing list