shell expansion

Mark McEahern marklists at mceahern.com
Mon Sep 9 14:35:31 EDT 2002


[I wrote]
> Is this supposed to work:
> 
>   filename = "$HOME/foo"
>   f = file(filename)
>   ...
> 
> It doesn't seem to.

Doh, that's what os.path.expandvars() is for.

Sorry,

// m
-





More information about the Python-list mailing list