By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,650 Members | 1,865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,650 IT Pros & Developers. It's quick & easy.

Does Python have a Template::Extract equivalent from Perl's CPAN

P: n/a
Hi All,

I already searched this newsgroup and google groups to see if I could
find a Python equivalent to Perl's Template::Extract, but didn't find
anything leading to a Python module that had similar functionality. I
am a big fan of Python as an OO language and use it for many system
admin utilities, webdev and even MS Excel AddIn development, but I have
found that Perl's Template::Extract is so invaluable to my web scraping
utilities that I can not migrate this very old code base over to Python
yet since there is nothing that I can easily port it over to without
making my web scrapers very brittle to website redesigns. I while I
think Perl is a wonderful language in its own right I would rather just
code more of my codebase in Python than Perl to make my coding more
efficient.

If anyone knows of a Python module that has the same features of
Template::Extract please let me (and maybe the group) know. If nobody
is not aware of any module, I would be interested in developing one for
the Python public. Please let me know if anyone else is interested and
I can setup a sf.net project to get this rolling (unless anyone knows
of an sf.net like website that offers Subversion instead of CVS?).

Thanks!

Jul 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
should have read, "if nobody is aware of any module..." not "if nobody
is not aware...".

Jul 19 '05 #2

P: n/a
Can you please elaborate on how to use Python for MS Excel AddIn
development? Is this easy to do? I would love to be able to create
custom extensions to Excel using python! IMHO Python is much better
than Perl due to its OOP features.

Cheers,
CL

Jul 19 '05 #3

P: n/a
Please start a new thread when appropriate.

combinational.logic $ soc-ip.com wrote:
Can you please elaborate on how to use Python for MS Excel AddIn
development? Is this easy to do? I would love to be able to create
custom extensions to Excel using python! IMHO Python is much better
than Perl due to its OOP features.


Do you mean automating Excel sheets using Python? If so, you need to get
a COM interface from Python (see Mark Hammond's win32all Python
extensions for this), and you need to figure out the proper com calls,
which is easiest by going into Excel and recording a macro, and then
taking a look at the vbscript the macro recorded.

--
Paul McNett
http://paulmcnett.com

Jul 19 '05 #4

P: n/a
Thanks Paul! When I get a chance I'll mess around with Py + Excel as
you have suggested . I was hoping not to have to deal with VBScript :)

Jul 19 '05 #5

P: n/a
CL, after you install py_win32 on windows you should look for a module
called "excel*.py" under your ${PYTHONHOME} directory. They have a
very basic COM Server Excel AddIn as an example.

Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.