How to use argparse to get the full path to the script?

Good afternoon.
Need using argparse to get the full path to the script.
Off. documentation suggest to use .prog , but it returns only the name, unlike sys.argv[0].
Tell me how to get full path using argparse?
Windows, python 3.5
July 9th 19 at 11:08
2 answers
July 9th 19 at 11:12
Solution
sys.path.abspath(__file__)
os..path.abspath(__file__) - Ramon.Stracke commented on July 9th 19 at 11:15
Yeah. Thx. - Jettie88 commented on July 9th 19 at 11:18
July 9th 19 at 11:10
Solution
Judging by docks - no way

I assume that the author of the library did not want to duplicate existing functionality of system libs

Use sys
I assume that the author of the library did not want to duplicate existing functionality of system libs

Not just nafig it is not necessary usually, so the author did not add this to the module. Moreover, the full path to the program and the contents of the sys.argv is not always the same. - Ramon.Stracke commented on July 9th 19 at 11:13

Find more questions by tags Python