I would like to pass shell input to a variable in python. Usually I would use the raw_input() method for this, but I would like to use something that allows me to “browse” through my folders.
In a bash script, I would use something like this: (-e allows me to use the shell's “auto-complete” function via Tab.)
#!/bin/bash echo Please input the path to the file: read -e var echo $var
Does anyone know how to solve this in Python? I looked at os.popen() and os.system() , but cannot figure out how to use them.
source share