Advertisement
AceScottie

init

Jan 18th, 2020
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. def __init__(self, appname):
  2.     import os, traceback, time
  3.     self.traceback = traceback
  4.     self.os = os
  5.     self.time = time
  6.     if getattr(sys, 'frozen', False): #windows path fix
  7.         self.exe = self.os.path.dirname(sys.executable)
  8.     elif __file__:
  9.         self.exe = self.os.path.dirname(__file__)
  10.     if not os.path.exists(os.path.dirname("~/%s/" %appname)):
  11.         os.makedirs(str("~/%s/" %appname)
  12.     self.fname = "~/%s/debug.log" %appname
  13.     self.logfile = None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement