Author Topic: How to get parameters values in scripts  (Read 1252 times)

0 Members and 1 Guest are viewing this topic.

Offline fehrenc

  • Newbie
  • *
  • Posts: 1
How to get parameters values in scripts
« on: April 05, 2017, 06:38:59 am »
dear all,

I try to running KeyShot on the command-line like " keyshot6.exe  -script <python script file> (optional script arguments..)"

how can I get the arguments values in my script ?

regards

Offline jt_pedersen

  • Developer
  • Newbie
  • *****
  • Posts: 34
Re: How to get parameters values in scripts
« Reply #1 on: April 07, 2017, 05:45:48 am »
Quote
import sys

for arg  in sys.argv:
    print(arg)

sys.exit(0)