Frequently Asked Question

TPT API: How can I use the arguments in my python script which are given by the command line option "--run apiserver arg1 arg2 arg3"?
Last Updated 3 months ago

TPT can be run via command line and there are several options for it. One example is to call a TPT API script in TPT. Additionally you can add some parameters to this script by using a syntax like this:
--run apiserver arg1 arg2 arg3

In the API script itself you can access the arguments via:

sys.argv[1], sys.argv[2], etc.

Please note that "sys.argv[0]" does not work since "0" is already taken.

Please Wait!

Please wait... it will take a second!