Skip to content

Instantly share code, notes, and snippets.

@ariesduanmu
Created March 23, 2020 05:25
Show Gist options
  • Select an option

  • Save ariesduanmu/6b941b2cfb86d63c0a4ae30db89917e0 to your computer and use it in GitHub Desktop.

Select an option

Save ariesduanmu/6b941b2cfb86d63c0a4ae30db89917e0 to your computer and use it in GitHub Desktop.
get exe file address
import os
if getattr(sys, 'frozen', False):
basedir = os.path.dirname(sys.executable)
else:
basedir = os.getcwd()
print(basedir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment