Feb-21-2019, 03:42 PM
So I'm having issues with my program command line arguments. In pycharm on windows it works great but when I go to linux it only takes arguments up to the first semicolon ";" and then pretends nothing exists beyond it.
My code:
sample input is something like this:
load-policy sample.txt; add-attributes-to-permission PW role Student; check-permission Josie GradesFile ENV PW
In linux I run my file:
ABAC_engine.py load-policy sample.txt; add-attributes-to-permission PW role Student; check-permission Josie GradesFile ENV PW
and I have it print out everything saved in inputs....it only saves the first bit up until sample.txt (I'm supposing because of the semicolon)
Please help! Thank you!
My code:
inputs = [] for arg in sys.argv: inputs.append(arg)then I call inputs.pop(0) to get what I need.
sample input is something like this:
load-policy sample.txt; add-attributes-to-permission PW role Student; check-permission Josie GradesFile ENV PW
In linux I run my file:
ABAC_engine.py load-policy sample.txt; add-attributes-to-permission PW role Student; check-permission Josie GradesFile ENV PW
and I have it print out everything saved in inputs....it only saves the first bit up until sample.txt (I'm supposing because of the semicolon)
Please help! Thank you!