[Tutor] Silly directory problems...
Joel Ricker
joejava@dragoncat.net
Thu, 11 Jan 2001 19:34:12 -0500
I've got two problems but I think they are both connected to one another.
The first is reading in a file. I want my data to be in a directory called
dat located from the current directory (the one the script is running in).
The directory is there and so is the file but:
fhandle = open("/dat/game.dat","r")
doesn't work (file not found or similiar stated error).
This works fine: fhandle = open("game.dat","r"). So I'm thinking I need to
append the current directory before adding the /dat/ directory but I
couldn't find where thats located.
Also I created a module and when I first stared building it, I located just
off one of the builtin module directories (I'm using activestate python so
that directory is c:/python20/libs/) but when I moved it and tried to append
the directory, it still couldn't find it. I think I did manage to get it to
find the modules but dir(module_name) didn't produce any of the subroutines
or variables inside it. I moved the modules back to where it was working
but I'm going to need my modules to be run-time specific.
Any ideas? These are probably silly and I'm just missing something minor.
Thanks for the help
--
Joel Ricker joejava@dragoncat.net Just Another Python Hacker
=======================================================================
I have been Perl-Free for 6 Days, 21 Hours, 34 Minutes, and 28 Seconds.