[DIFF] 2 diffs to use posix paths correctly in .ini files
Eliezer Flores <[email protected]> Thu, 29 Dec 2005 20:18:58 -0500
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
these are 2 patches so that paths in a config.ini file are utilized properly
Diff 1: utils.py
Index: lyntin40/lyntin/utils.py
===================================================================
RCS file: /cvsroot/lyntin/lyntin40/lyntin/utils.py,v
retrieving revision 1.13
diff -r1.13 utils.py
148c148,149
< adding an os.sep to the end) as well as verifies that it exists.
---
> adding an os.sep to the end and expanding if using the ~/ user
> dir for posix OSes) as well as verifies that it exists.
158a160,161
> if os.name=='posix' and d.startswith("~"):
> d = os.path.expanduser(d)
Diff 2: modules/__init__.py
Index: lyntin40/lyntin/modules/__init__.py
===================================================================
RCS file: /cvsroot/lyntin/lyntin40/lyntin/modules/__init__.py,v
retrieving revision 1.2
diff -r1.2 __init__.py
103a104,106
> truemoduledir=moduledir
> if os.name=='posix' and moduledir.startswith("~"):
> truemoduledir = os.path.expanduser(truemoduledir)
105c108
< _module_list = glob.glob( os.path.join( moduledir, "*.py"))
---
> _module_list = glob.glob( os.path.join( truemoduledir, "*.py"))
108c111
< sys.path.append(moduledir)
---
> sys.path.append(truemoduledir)
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click