[Tutor] finding path to resource files in a GUI
Christian Meesters
meesters at uni-mainz.de
Thu Jun 9 12:43:42 CEST 2005
On 9 Jun 2005, at 12:00, Michael Lange wrote:
> Hi Christian,
>
> try
>
> self.cwd = os.path.abspath(sys.path[0])
>
> sys.path[0] is the directory of your main program file, with
> os.path.abspath() you can
> get rid of the "../../" stuff at the beginning of the path if the
> program is called from a link.
>
> I hope this helps
It does! Actually I tried abspath, but didn't think of this very
combination with sys.path ...
Thanks a lot!
Danke,
Christian
More information about the Tutor
mailing list