Python3 prompt tk simpledialog.askstring()

 # -*- coding: utf-8 -*-
r""" tkAskString.py uses TK to ask the user for a string & prints it out
Usage:   ./tkAskString.py 
Sample:  ./tkAskString.py 
see: 
  1. ["Example 2" - Python tkinter.simpledialog.askstring() Examples](https://www.programcreek.com/python/example/100669/tkinter.simpledialog.askstring)
  2. [How do I get rid of Python Tkinter root window?](https://stackoverflow.com/questions/1406145/how-do-i-get-rid-of-python-tkinter-root-window)
  3. [Tkinter Dialogs (Python3.10)](https://docs.python.org/3/library/dialog.html)
  4. google: tkinter simpledialog set width   |   tkinter simpledialog keyword arguments  
  5. ["add extra tabs at the end of your prompt"](https://stackoverflow.com/a/69396488/601770)
"""
import tkinter as tk
from tkinter import simpledialog
# root = tk.Tk()

def main():
    root = tk.Tk()
    root.withdraw()
    uname = simpledialog.askstring("My Title", "Enter username:\t\t\t") # Tabs make it wide as i want
    
    print(uname)
    return uname

if __name__ == "__main__":
    main()

#python, #tkinter

Python Main NUM_ARGS = 1

N.B. Replace ‘example’ with ‘myFileNameWITHOUT.py’ creates a RUNNING Python Program.

# -*- coding: utf-8 -*-
r"""example.py DoesSomethingTo INFILEPATH (FILE CONTENTS DESCRIPTION) Producing FILL_IN_HERE
Usage:   ./example.py INFILENAME
Sample:  ./example.py myInFileName   
"""
import sys, os, fnmatch, shutil, json
 
def example(infilename):
    indirpath = 'outPDFparseJSON'
    infilepath = os.path.join(indirpath, infilename)
    infilename_root, infilename_ext = os.path.splitext(infilename)
    print()
    print (infilepath)
    print (indirpath)
    print (infilename)
    print (infilename_root)
    print (infilename_ext)
 
    outdirpath = 'outPyObjList'
    outfilename = infilename_root + '_filled' + infilename_ext
    outfilepath = os.path.join(indirpath, outfilename)
    print(outfilepath) 
 
NUM_ARGS = 1
def main():
    args = sys.argv[1:]
    if len(args) != NUM_ARGS or "-h" in args or "--help" in args:
        print (__doc__)
        sys.exit(2)
    example(args[0])

if __name__ == '__main__':
    main()

#main, #python, #pythonmain