aspineux wrote:
> import os.path
>
> file=open(os.path.join(os.path.dirname(__file__), 'hauteur.yaml'))
Thanks that worked ;)
--
http://mail.python.org/mailman/listinfo/python-list
The filename and its path is in global variable __file__ (that is
different in any source file)
try
import os.path
file=open(os.path.join(os.path.dirname(__file__), 'hauteur.yaml'))
On 30 mai, 22:22, EuGeNe Van den Bulke <[EMAIL PROTECTED]>
wrote:
> Hi there,
>
> I have a "problem" which co
Hi there,
I have a "problem" which could be a bad design on my behalf but I am not
sure so ...
I have a package WMI which contains a module hauteur.py which, when
imported, load data from a file located in WMI/data/. In hauteur.py I
call open('data/hauteur.yaml').
test.py
WMI/
hauteur.py