View Single Post
Old Jul 8th, 2006, 6:22 PM   #9
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,069
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Oh wow! That's amazing, it works. :p So easy... so the code would then be...


import os

path = 'c:\\path\\file.txt'

os.system('explorer.exe /select, %s'%path)

Edit: I'll post the code for if the path has spaces in it, when I get back from dinner.

Post Edit: Oh! Nvm. It works with spaces already. :o

Last edited by Sane; Jul 8th, 2006 at 6:49 PM.
Sane is offline   Reply With Quote