Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Ted Leung on the air: Open Source, Java, Python, and ...
Tue, 09 Dec 2003
Adventures with XChatAqua
Tonight I decided to try to build a Python plugin for XChat that would grab my nick and use the Mac OS X speech engine to say my nick and the channel that I was mentioned in. It sort of boggles me that XChat doesn't have functionality to alert you when you are called on, but so be it. I figured that this was a good chance to do some Python to Mac hacking. The XChat Python plugin should work wonderfully. You can load Python files, execute Python commands, etc. The operative word is should. I tried to do an "import os" and the import failed. Fortunately "import sys" worked, and examining sys.path revealed that XChatAqua is looking for Python 2.2 libraries that were probably built by Fink. Of course, Panther and the latest Fink are both on Python 2.3 and the libaries don't work on 2.2. Next stop, XChatAqua.sf.net to get the sources from CVS. Open the Project Builder file with XCode, and try to build. No joy, as it seems the definition of GSList is missing. So off to Fink to get glib2 (which is hauling down and compiling 11 other packages including OpenSP and Jade).
I even tried Perl -- dropping a perl script into ~/.xchat2, but it doesn't appear to have loaded.
[23:34] |
[computers/operating_systems/macosx] |
# |
TB |
F |
G |
1 Comments |
When you use Python with Apache, you get the same behavior. Whatever your shabang says, Python 2.2 get used. I guess that it would be as simple as adding /usr/local/bin in front of the path variable used by the system at startup. In this case, 2.3 would be used instead of 2.2. I did not bothered to try it.
HTH
Posted by François Granger at Wed Dec 10 10:28:43 2003
HTH
Posted by François Granger at Wed Dec 10 10:28:43 2003
You can subscribe to an RSS feed of the comments for this blog:
Add a comment here:
You can use some HTML tags in the comment text:
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are:
You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are:
<a href>
, <em>
, <i>
, <b>
, <blockquote>
, <br/>
, <p>
, <code>
, <pre>
, <cite>
, <sub>
and <sup>
.You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk