newbie, dir tree parsing

Sean 'Shaleh' Perry shalehperry at attbi.com
Thu Oct 17 10:52:16 EDT 2002


On Thursday 17 October 2002 03:59, Jaqui wrote:
> new to python, need to make an app to completely scan the computer for a
>   specific directory, take that path and insert it into a python script
> for another application to use.
> I know the python mods to look at and work with to get the path data,
> but how to insert into another script ( opened by the app to do so )?
>
> literally need to pull *\poser\runtime\python where the * is the
> absolute path to the specified directory.
> then put the absolute path into a script opened by the app so that the
> app poser can make use of the script. poser's python interpreter
> requires an absolute path.
>

you open the file, write the line, close the file.

fp = open(path, 'w')
fp.write(data)
fp.close()




More information about the Python-list mailing list