![]() |
File path in Mac OS X
Hey all,
I'm pretty new Python, but I'm been reading over it and writing some cool scripts. I've developed a script and I need a little help with something that seems to be really easy but, for the life of me, I cannot figure out how to do it. Say I have a finder window open and have a directory selected. If I were to make my pyton script an app and were to select the directory and then run the script/app, how do I get the entire path of the directory? If anyone could help me out it would be greatly appreciated. Thanks! :banana: |
Are you asking how to determine the path of the directory currently selected in the Finder, or just how to get the path of a particular directory to use in your script?
|
Thanks for replying back. I'm asking how to determine the path of the directory currenttly selected in the finder.
|
The only way to do this (that I aware of) is with AppleScript. Open Script Editor, copy and paste the following into a blank document, and save it as an application named GetSelectedFolders.app:
:
on run:
import os |
| All times are GMT -5. The time now is 1:53 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC