T
T
Tr3m2016-05-27 16:46:29
Python
Tr3m, 2016-05-27 16:46:29

How to get the full path to a script using argparse?

Good afternoon.
You need to use argparse to get the full path to the script.
Off. The documentation suggests using .prog , but it only returns the name, unlike sys.argv[0].
Tell me how to get the full path using argparse?
Windows, python 3.5

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-05-27
@Tr3m

Judging by the docs - no way
. I assume that the author of the library did not want to duplicate the existing functionality of the system library
. Use sys

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question