INNER CODE UNIT · Python

create_symlink

TeamDefronix/Cyberonix · setup.py:42

    def create_symlink():
        proc = subprocess.Popen([f"pwd"], stdout=subprocess.PIPE, shell=True)
        #there keyfor success output and noththere for error output
        (there, notthere) = proc.communicate()
        there=there.decode()
        there=there.split()
        f = open("run.sh", "w")
        f.write("#!/bin/bash")
        f.write("\n")
        f.write(f'cd {there[0]} && python3 cyberonix.py "$@"')
        f.close()
        os.system("chmod +x *")
        os.system("sudo mv run.sh /usr/bin/cyberonix")
        os.system("sudo mv cyberonix.1 /usr/local/man/man1/")
        finish()
    def finish():
        os.system("clear")
        banner.main()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…