I just want to have some ideas to know how to do that...
I have a python script that parses log files, the log name I give it as an argument so that when i want to run the script it's like that.. ( python myscript.py LOGNAME ) what I'd like to do is to have two scripts one that contains the functions and another that has only the main function so i don't know how to be able to give the argument when i run it from the second script.
here's my second script's code:
import sys import os path = "/myscript.py" sys.path.append(os.path.abspath(path)) import myscript mainFunction() the error i have is:
script, name = argv valueError: need more than 1 value to unpack
path = "./myscript.py"? Also, this error most likely originates frommyscript.pyand not this script considering you don't even usesys.argvin this scriptmyscript)sys.argv