do export statement in Python script

James Mills prologic at
Wed Oct 22 13:24:44 CEST 2008

On Wed, Oct 22, 2008 at 9:19 PM, Simon Strobl <Simon.Strobl at> wrote:
> #!/usr/bin/
> python
> import os
> os.system("export NLTK_DATA=/opt/nltk/data/")


os.environ["NLTK_DATA"] = "/opt/nltk/data/"

if that doesn't work, consider wrapping up NLTK
in a bash script that contains the shell statement:
export var=...


-- "Problems are solved by method"

More information about the Python-list mailing list