ERROR: how to use a text file in a module?

Moni GV tamuzija at
Thu Jun 18 20:57:46 CEST 2009


Help with a "No such file ..." error. I have the next folder structure:
---Network contains:
    --Temp contains:

Well, within I do this:
from Temp.test import *

Within I do this:
f = open ("topo.txt", "r")

The error is:
No such file "topo.txt"

However, when I execute, without using neither nor the folder structure, there is no error, because topo.txt exists.

I'm sure I'm doing something wrong with the "import" staff or "path" maybe, but have no idea...please help!!!

Thanks in advance!

Mónica Guerrero
M.Sc. Student
Rey Juan Carlos University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list