[Tutor] File path requirements (absolute or relative)?
boB Stepp
robertvstepp at gmail.com
Fri May 15 18:16:55 EDT 2020
After reading this and Peter's reply my conclusion: I am so forgetful! I
now realize I struggled with this same topic a couple of years ago and
forgot what I then learned with the help of this forum. Heavy sigh.
On Fri, May 15, 2020 at 02:35:59PM -0600, Mats Wichmann wrote:
>~username is not interpreted by Python directly, it's a shell thing.
I keep forgetting this.
>For Python you can use os.path.expanduser or pathlib's Path.home()
>
>for the rest - if a relative path doesn't work, it usually means it
>isn't being evaluated in the context you think it is. relative paths
>certainly work, so you're likely getting them relative to someplace else.
Yes. This should have awakened my sleeping faculties.
>some debugging prints should help...
If I wasn't so hard-headed in believing what I *thought was true*, I might
have done so and not generated this thread.
Thanks, Mats, for your patience.
--
Wishing you only the best,
boB Stepp
More information about the Tutor
mailing list