[DIFF] patch to help with getting the #write command to play nicely with OS X and Unix
Eliezer Flores <[email protected]> Thu, 29 Dec 2005 14:50:24 -0500
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
This adds posix user paths (~username or ~/file for current user)
support for the #write command. This should ease the complaint that OS X
can't use #write command.
Index: lyntin40/lyntin/modules/tintincmds.py
===================================================================
RCS file: /cvsroot/lyntin/lyntin40/lyntin/modules/tintincmds.py,v
retrieving revision 1.25
diff -r1.25 tintincmds.py
624a625,628
>
> Note: OS X and Unix users the user paths (~user or~/file) are now
supported.
> It also defaults to the current user's folder if no path
information is
> passed.
641a646,649
> # add support for ~ format for posix paths
> if os.name=="posix" and filename.startswith("~"):
> filename = os.path.expanduser(filename)
>
-------------------------------------------------------
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