Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pyinstaller onefile current working directory

import os, sys
# determine if the application is a frozen `.exe` (e.g. pyinstaller --onefile) 
if getattr(sys, 'frozen', False):
    application_path = os.path.dirname(sys.executable)
# or a script file (e.g. `.py` / `.pyw`)
elif __file__:
    application_path = os.path.dirname(__file__)
config_name = 'myConfig.cfg'
config_path = os.path.join(application_path, config_name)
Comment

PREVIOUS NEXT
Code Example
Python :: pd.datafram 
Python :: overriding update in serializer django 
Python :: RGB To Hex Conversion python 
Python :: inherit init method 
Python :: edit error page flask 
Python :: python opencv measure distance two shapes 
Python :: Python - How To Check if a String Contains Word 
Python :: Invalid password format or unknown hashing algorithm. 
Python :: mutiple condition in dataframe 
Python :: captions overlap in seaborn plot jupyter 
Python :: openpyxl read cell value 
Python :: python list directories only 
Python :: gdscript tween 
Python :: parse int python 
Python :: prime number checking algorithm 
Python :: python how to make a movement controler 
Python :: serialize keras model 
Python :: temp python web server 
Python :: flask url_for 
Python :: User serializer in django rest framework 
Python :: python remove duplicates 
Python :: dataframe subtract value from previous row 
Python :: how to change todays date formate in python 
Python :: Using a list with index and column names to Convert List to Dataframe 
Python :: reading a file line by line using a generator 
Python :: pandas invert a boolean Series 
Python :: python remove duplicates from list of dict 
Python :: python flask windows 
Python :: reorder list python 
Python :: Python program to count Even and Odd numbers using lambda 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =