--> Thursday, February 5, 2004, 1:55:19 PM, [EMAIL PROTECTED] wrote: > * [EMAIL PROTECTED] writes:
> [ Python and a plug-in ] >> You can do a lot. This template results in the attached message. >> I just started this yesterday, all for the sake of my spam solution. >> Let me know if you have any suggestions, or if I missed something. >> # Exec executes a dos command and returns the output > Do we need it? I'd keep the plug-in as simple and tiny as > possible. But okay. Why does it have to be as tiny as possible? Yeah I think I need it. There's also TRIM. These are functions I have deemed useful for executing Python code flexibly in The Bat. >> # Py executes python code, print statements go to msg >> # Pyx evaluates a python expression, result to msg > I'd suggest to rename the macros to %Python and %PythonEval. Isn't > that a lot more beautiful? :-) I used to have those, and renamed to Py and Pyx because I thought those were a lot more beautiful actually... Py is obvious, Pyx is Python eXpression, akin to the Win32 convention of appending Ex to new or revised API functions. I wrote this because I've never used TB macros and templates. I will start using templates now, via Pyxie, and I won't have much (or any) real TB code in them. I wanted the names terse. >> # Python env is global and includes auto-imported tb module > Fine. Again, I wouldn't call this module »tb« but »thebat«. IMHO tb > is a little short and likely (?) to conflict with any other module. That might be a consideration, but I like to be terse in code. It does look like I cornered the module-named-tb market though. Perhaps if another comes along which we find ourselves using in our tb macros we can use this same argument on them instead. :p >> # Python Exceptions and others go to msg with a stacktrace > Very good. > [ Example ] > This is so cool :-) First release, v0.4 is available : http://kaishaku.org/software/tbpyxie/ -- [EMAIL PROTECTED] \\IO has been up for: 21 day(s), 1 hour(s), 14 minute(s), 41 second(s) ________________________________________________ Current version is 2.02.3 CE | "Using TBUDL" information: http://www.silverstones.com/thebat/TBUDLInfo.html