View Single Post
Old Jul 7th, 2006, 7:39 PM   #1
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 931
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Show File in Window

I have the path to a file, say C:\path\to\file.txt. I need a way to open the folder where that file (file.txt) resides, and select it.

Since I am on a Windows machine, I can use the webbrowser module to load a path:

import webbrowser

webbrowser.open(r"C:\path\to\file.txt")
However, this does not select the file. (I do not want to open it, just to select it.)

Thanks in advance. I'm not even sure this is possible in Python.
titaniumdecoy is offline   Reply With Quote