shell expansion

Mark McEahern marklists at mceahern.com
Mon Sep 9 20:35:31 CEST 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