me.fier.tcpserver/tcpserver.py

27 lines
784 B
Python
Executable File

#!/usr/bin/env python3
def init(): pass
def main():
mfp.setProgramName("me.fier.tcpserver") # Your domain/username and the name of your program
server = mfp.require("server")
server.main()
def bootstrap(name,modName):
if name in globals(): return
import sys, os, importlib
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
s = os.path.realpath(sys.executable)
else:
s = os.path.realpath(__file__)
if not os.path.join(os.path.dirname(s),"module","py") in sys.path:
sys.path = [os.path.join(os.path.dirname(s),"module","py")] + sys.path
mod = importlib.import_module(modName); modl = mod.Bunch()
mod.init(mod,modl,s,name)
globals()[name] = mod; globals()[name + "l"] = modl
bootstrap("mfp","me.fier.python")
init()
if __name__ == '__main__':
main()