subprocess.call(argsv) elif option == 'ul': print('Downloading the latest repo ... ', end='') pack.download('latest') pack.unpack('/app/cache/gets/latest.pa') print('done') elif option == 'crt': if sys.argv[2:] == []: colors.show('paye', 'fail', 'no inputs.') sys.exit(0) crtype = sys.argv[2] if sys.argv[3:] == []: crname = 'untitled' else: crname = sys.argv[3] if not files.isdir(crname): files.mkdir(crname) if crtype == 'gui': cmd.unzip([res.get('@temp/simple-gui-project.zip'), crname]) elif crtype == 'web': cmd.unzip([res.get('@temp/simple-web-project.zip'), crname]) else: cmd.unzip([res.get('@temp/simple-project.zip'), crname]) else: colors.show("paye", "fail", option + ": option not found.")
elif argv[1].__contains__("/"): if files.isfile(argv[1] + ".pyc") and outside == 'Yes': if permissions.check(files.output(argv[1]) + ".pyc", "x", user): ## Set args ## sys.argv = argv[1:] appname = argv[1] parent = files.parentdir(files.output(appname))[1:] sys.path.append(parent) __import__(files.filename(appname)) sys.path.remove(parent) # remove pycache if files.isdir(files.output('./__pycache__')): files.removedirs(files.output('./__pycache__')) else: colors.show(argv[1], "perm", "") elif files.isfile(argv[1] + ".py") and outside == 'Yes': if permissions.check(files.output(argv[1]) + ".py", "x", user): ## Set args ## sys.argv = argv[1:] appname = argv[1] parent = files.parentdir(files.output(appname))[1:] sys.path.append(parent) __import__(files.filename(appname)) sys.path.remove(parent)
elif argv[1].__contains__("/"): if files.isfile(argv[1]+".pyc") and outside=='Yes': if permissions.check(files.output(argv[1])+".pyc", "x", user): ## Set args ## sys.argv = argv[1:] appname = argv[1] parent = files.parentdir(files.output(appname))[1:] sys.path.append(parent) __import__(files.filename(appname)) sys.path.remove (parent) # remove pycache if files.isdir (files.output('./__pycache__')): files.removedirs (files.output('./__pycache__')) else: colors.show(argv[1], "perm", "") elif files.isfile(argv[1]+".py") and outside=='Yes': if permissions.check(files.output(argv[1])+".py", "x", user): ## Set args ## sys.argv = argv[1:] appname = argv[1] parent = files.parentdir(files.output(appname))[1:] sys.path.append(parent) __import__(files.filename(appname)) sys.path.remove (parent)