Home > other > With the resource file Python package
With the resource file Python package
Time:10-21
Wrote a Python small programs, relying on a local music files, could you tell me how to guarantee after packaged into exe program still can find the music file, and play, to run on other computers
CodePudding user response:
The import sys The from OS import join abspath, dirname
The root=dirname (abspath (sys. Argv [0])) The file=join (root, 'XXX. Mp3)