Importing modules

Ben Finney ben+python at benfinney.id.au
Sun Jun 6 23:16:09 EDT 2010


Anthony Papillion <papillion at gmail.com> writes:

> import os
>
> os.path.append('$HOME/gsutils/boto')
>
> thinking I could then successfully do the import boto statement.
> Nope.

You'll need to give the literal path. Substitution of environment
variables isn't performed implicitly in strings.

-- 
 \         “When we pray to God we must be seeking nothing — nothing.” |
  `\                                          —Saint Francis of Assisi |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list