Both python and perl look to be reasonably solid on the NT platform.
So, I am curious which supports COM and win32 better?
For example, one thing I have of interest is MAPI. I'd like to resolve
a mail alias into their corresponding usernames. It looks like I'd have
to use extended MAPI on the NT side w/C++. If I can use perl or python
instead, that would be preferred.
Also, are both reasonably adept at producing gui envrions for windows?
Thanks for any input . . .
john
But I will say what Python can do with COM.
COM support in Python is very complete, and very natural. The dynamic
nature of Python has made it possible to get very tight integration, with
very few surprises.
We support IDispatch, which means that Python can talk using "Active
Messaging" to MAPI, to do exactly what you suggest. Interestingly, we also
support true MAPI, which is a native COM interface based API. Native MAPI
is best for applications such as high-performance servers, and typically
these applications run as NT/Exchange Services (which Python also _fully_
supports, by the way). But from your description of the problem, Active
Messaging is probably the way to go.
Should you download Python, the COM test suite actually tests Active
Messaging, so you have some decent sample code to get started.
Visit www.python.org/windows/ - if you can wait 24 hours or so, that URL
will be better organised, and allow you to download seperate components,
rather than the monolitic 3.5MB download you will be forced with now. If
you cant wait that 24 hours, visit starship.skyport.net/crew/mhammond to
get the files now (with less pretty web pages :-)
Regarding the Win32api - we support hundreds of methods - including
categories such as Network, Files, Pipes, RAS, Event Log, Performance
Monitor, Services, Events (eg, native mutexes, semaphores), Active
Scripting, Active Debugging, ODBC, Memory mapped files, asynch sockets,
dde, LZ compression, and security objects - ie, pretty complete support...
Hope this helps...
Mark
John Nielsen <jnie...@chemistry.mps.ohio-state.edu> wrote in article
<612t1o$k...@chemistry.ohio-state.edu>...
> -----Original Message-----
> From: jnie...@chemistry.mps.ohio-state.edu
> [SMTP:jnie...@chemistry.mps.ohio-state.edu]
> Sent: Friday, October 03, 1997 6:48 AM
> To: pytho...@cwi.nl
> Subject: better at win32/COM/gui: python or perl??
>
> I have recently entered into the NT world from Unix and am looking
> at the scripting languages available for NT.
>
> Both python and perl look to be reasonably solid on the NT platform.
>
> So, I am curious which supports COM and win32 better?
>
Well, Activestate Perl (http://www.activestate.com/) allows you to call
automation interfaces.
Frankly, there are features of Perl that make me not want to use COM and
Perl together.
The most annoying being no exception handling. The next in line is that
you can't tell Perl the VB equivalant of
"On Error Goto 0", instead of Perl's normal outlook on life: "On Error
Resume Next"
The end result of which is that you have to deal with HRESULTS (oh yay,
just what I want to do)
Python on the other hand, has support for Automation interfaces, and for
helping you generate glue layers from Python to vtable interfaces, and
vtable interfaces to Python.
On the Win32 side of things:
You can have a Python class running as an NT service.
PythonWin comes with Python extension modules that wrap MFC.
99.5% of the Win32 API's that Activestate Perl exposes are also
exposed in Python through extension modules.
PythonWin comes with a DB-SIG ODBC module, while Perl's just
exposes the API.
You can use Tk for Win32 with Python to do GUI's as well.
Python has an ActiveX Scripting Engine that responds to the
debugging API's so you can use the script debugger.
Python on Win32 is multithreaded.
Just general Python vs. Perl wins I see:
IMHO Python is much easier to extend/embed then Perl just
because of the simplicity and explictness of the API, i.e.
(PyTuple_New(1)) as opposed to things like: sv_setiv() Which means given
a Scalar Value, set the scalar to be this particular integer.
Bill Tutt
Not speaking for Microsoft, just myself.
Be aware that the state of perl on NT is undergoing some changes at this
time (for the better, but it still requires patience to "have it all").
There is a perl port that does MAPI, ISAPI, Active Server Pages, COM,
DCOM, a Win32::* API, etc. There is a separate, distinct port that does
Perl/Tk GUIs (that is not based on the Tcl/Tk 8 code that allegedly is a
better fit to NT controls). However: there is active work right now on
the Perl/Tk based on Tk 8 and there will be a merging of these two
distinct ports this fall.
For the COM, DCOM capable perl see:
for the Perl/Tk perl see:
http://www.perl.com/CPAN/authors/Gurusamy_Sarathy/
Good luck.
Peter Prymmer