<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><pre><code>Hi Joel,<br><br>I found this on stackoverflow*)<br>os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ['PATH']<br>windll.LoadLibrary('mydll.dll')<br><br>It extends the directory list of the environment variable 'path'.<br><br>Now at least I've loaded the dll, but I still need to read up on ctypes an file handles. <br>Any good pointers (no pun intended ;-) are welcome!<br></code></pre><div><span>&nbsp;*) <a target="_blank" href="http://stackoverflow.com/questions/2980479/python-ctypes-loading-dll-from-from-a-relative-path">http://stackoverflow.com/questions/2980479/python-ctypes-loading-dll-from-from-a-relative-path</a></span><br><br></div>Cheers!!<br>Albert-Jan<br><br><div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>All right, but apart from
 the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Joel Goldstick &lt;joel.goldstick@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> tutor@python.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, March 8, 2011 12:14:45 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Tutor] ctypes question<br></font><br>
<br><br><div class="gmail_quote">On Tue, Mar 8, 2011 at 4:09 AM, ALAN GAULD <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:alan.gauld@btinternet.com" target="_blank" href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div class="im">&gt; When I use os.chdir (by the way: why on earth isn't this called os.setcwd()?? <br>&gt; That's consistent with os.getcwd()) <br>
<br></div>History.<br>They are Unix commands (and possibly Multics/PDP before that!).<br>cd has been the command in almost every CLI OS I've ever used from <br>CP/M thru' OS/9, Unix, DOS,&nbsp; etc...<br><br>The only exceptions being VAX/VMS(uses 'set def') and OS/390 on <br>
a mainframe which doesn't use a directory based file system.<br><br>That doesn't mean Python shouldn't adopt a more consistent naming <br>scheme it's just that the folks building it simply transferred the names <br>
of the commands that they were familiar with. Its a self perpetuating<br>habit... :-)<br><br>Alan G.<br></div></div><br>_______________________________________________<br>
Tutor maillist &nbsp;- &nbsp;<a rel="nofollow" ymailto="mailto:Tutor@python.org" target="_blank" href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br><span>
<a target="_blank" href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a></span><br>
<br></blockquote></div><br>I'm glad to see you got the result you wanted.&nbsp; But, by moving your current working directory to the library's directory seems like it could cause other problems with the code.&nbsp; I don't do python on windows, and have unremembered a lot I used to know about windows.&nbsp; So, my question is, isn't there another way to do this?<br clear="all">
<br>-- <br>Joel Goldstick<br><br>
</div></div></div>
</div><br>

      </body></html>