473,386 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
5 2046
should have read, "if nobody is aware of any module..." not "if nobody
is not aware...".

Jul 19 '05 #2
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert Oschler | last post by:
What is the Python equivalent of the C# StringCollection container? I'm trying to port some C# code over to Python. Thanks. Robert
15
by: Dan | last post by:
Is there a python equivalent of this trick in C? Logic_Test ? True_Result : False_Result Example: printf( "you have %i %s", num_eggs, num_eggs > 1 ? "eggs" : "egg" );
4
by: Dekaritae | last post by:
I have a script that I've written in Perl that retrieves files generated from a template. It works decently enough, but I'd like to rewrite it in Python (Perl was just a detour; it was originally...
17
by: Just | last post by:
While googling for a non-linear equation solver, I found Math::Polynomial::Solve in CPAN. It seems a great little module, except it's not Python... I'm especially looking for its poly_root()...
0
by: malachi | last post by:
Is there an python equivalent to perl IDENT module, specifically the client functionality ? TIA
6
by: AndyL | last post by:
Hi, What would by a python equivalent of following shell program: #!/bin/sh prog1 > file1 & prog2 > file2 &
22
by: Kurien Mathew | last post by:
Hello, Any suggestions on a good python equivalent for the following C code: while (loopCondition) { if (condition1) goto next; if (condition2) goto next;
0
by: Jean-Paul Calderone | last post by:
On Sat, 16 Aug 2008 23:20:52 +0200, Kurien Mathew <kmathew@envivio.frwrote: Goto isn't providing much value over `if´ in this example. Python has a pretty serviceable `if´ too: while...
0
by: ivandatasync | last post by:
I have read about both Plone and Alfresco being considered as alternatives to Sharepoint and unfortunately they may not be enough if you require everything Sharepoint has too offer. Plone and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.