Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

write to windows registry?

Status
Not open for further replies.

cmose

Technical User
Aug 4, 2003
14
US
Hello all,
I am very very new to python. I've pretty much just picked it up to do a very specific task using wxPython ( window that allows a user to browse to a directory and then writes that directory to a registry setting ). What I am trying to figure out is how to use python to write to the windows registry. I haven't turned anything up yet so any suggestions are very appreciated.
Thanks much!
 
ok, I'm replying as I don't see any means to edit this post:

I'm actually having a bit of a problem with another python related issue, specifically using python and wxPython. I'm trying to use the wxFileDialog to allow the user to select a file. I then want to display the path to that file in a wxText_Ctrl object however, the information that is displayed for the path is always just garbage, also if a file is selected that has a space in the file name, nothing is displayed at all. Any suggestions?

thanks very much!
 
As to your first issue, with the windows registry, I don't know yet - I'm still trying to figure that one out for myself. I have been working with python for about 12 months.

Your second problem could be to do with strings and file objects.

The output of wxFileDialog is probably a file object, you may need to convert this to a string object using str(). As to the filenames with spaces, you will need to put them into quotes to be able to use them - which you will do, converting to strings.

I hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top