473,382 Members | 1,445 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,382 software developers and data experts.

Converting a perl module to a python module would it be worth it?

Hi All,

I am the current author of the Astro-Sunrise perl module
http://search.cpan.org/~rkhill/Astro....91/Sunrise.pm
and was wondering if it would be worth while to convert it to python.
First off, I have never programmed in python. I would like to use
this project to learn python. I was wondering if there was a
"How to program python for perl programmers" Kinda
like what is different between the two, pitfalls for perl programmers
and what not.
Another question is, if I do this where can I put the results?
As far as I know python has no "CPAN".

Thanks in advance.

Mothra
Jul 19 '05 #1
5 2145
Mothra wrote:
Hi All,

I am the current author of the Astro-Sunrise perl module
http://search.cpan.org/~rkhill/Astro....91/Sunrise.pm
and was wondering if it would be worth while to convert it to python.
Only you and your module's users may tell...
First off, I have never programmed in python. I would like to use
this project to learn python.
Well, this might be an answer to your first question !-)
I was wondering if there was a
"How to program python for perl programmers"
Kinda
like what is different between the two, pitfalls for perl programmers
and what not.
http://www.hackdiary.com/slides/lpw2004/
http://starship.python.net/crew/aahz/OSCON2002/
http://mail.python.org/pipermail/pyt...er/241757.html
http://pleac.sourceforge.net/

Google is your friend, as usual...

Note that, apart from the Perl/Python diffs, Python has some (few)
gotchas, one of them being the difference between mutable and immutable
objects.
Another question is, if I do this where can I put the results?
As far as I know python has no "CPAN". http://www.python.org/pypi/
Thanks in advance.


HTH, and welcome on board.

PS: please don't consider my sig as representative of a good Python
coding style !-)

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 19 '05 #2
Hi All--

bruno modulix wrote:

Mothra wrote:
Hi All,

I am the current author of the Astro-Sunrise perl module
http://search.cpan.org/~rkhill/Astro....91/Sunrise.pm
and was wondering if it would be worth while to convert it to python.


Only you and your module's users may tell...


I'd use it.
First off, I have never programmed in python. I would like to use
this project to learn python.


Well, this might be an answer to your first question !-)


If you can get your mind off the @#)*&^@#!!&-ing Perl syntax, you'll be
fine;-)
Another question is, if I do this where can I put the results?
As far as I know python has no "CPAN".

http://www.python.org/pypi/


They're working on the Python version of CPAN, but it's taking a long
time. I think they started in 1998 or so? Haven't kept up, so I have
no idea what's taking so long. I'm sure someone more knowledgeable than
me will come along and set us straight.

Metta,
Ivan
----------------------------------------------
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
http://www.foretec.com/python/worksh...oceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours
Jul 19 '05 #3

"Ivan Van Laningham" <iv*****@pauahtun.org> wrote in message
news:ma**************************************@pyth on.org...
Hi All--

bruno modulix wrote:

Mothra wrote:
Hi All,

I am the current author of the Astro-Sunrise perl module
http://search.cpan.org/~rkhill/Astro....91/Sunrise.pm
and was wondering if it would be worth while to convert it to python.
Only you and your module's users may tell...


I'd use it.


I guess I spoke to soon
http://kortis.to/radix/python/code/Sun.py

This was from the same source I used to create ny module.
First off, I have never programmed in python. I would like to use
this project to learn python.


Well, this might be an answer to your first question !-)


If you can get your mind off the @#)*&^@#!!&-ing Perl syntax, you'll be
fine;-)
Another question is, if I do this where can I put the results?
As far as I know python has no "CPAN".

http://www.python.org/pypi/


They're working on the Python version of CPAN, but it's taking a long
time. I think they started in 1998 or so? Haven't kept up, so I have
no idea what's taking so long. I'm sure someone more knowledgeable than
me will come along and set us straight.

I checked out the above link (thanks!!) I need to look deeper
at the docs for creating a "module"

Thanks all for the responses!!

Mothra
Jul 19 '05 #4
Mothra a écrit :
(snip)
I checked out the above link (thanks!!) I need to look deeper
at the docs for creating a "module"
Well, start with wrting the code - you'll take care of
how-to-distribute-it later.
Thanks all for the responses!!


You're welcome.
Jul 19 '05 #5
On Thu, 14 Apr 2005 07:25:26 -0700, "Mothra" <mo****@nowhereatall.com>
declaimed the following in comp.lang.python:

this project to learn python. I was wondering if there was a
"How to program python for perl programmers" Kinda
like what is different between the two, pitfalls for perl programmers
and what not.
Out of print, but maybe available used...

http://www.amazon.com/exec/obidos/tg...glance&s=books

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Terry Hancock | last post by:
Hi all, Suppose you have found a really nice module that does what you want (or will do, it still being in development), and you don't want to waste a lot of duplicated effort, but this module...
17
by: Michael McGarry | last post by:
Hi, I am just starting to use Python. Does Python have all the regular expression features of Perl? Is Python missing any features available in Perl? Thanks, Michael
2
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # suppose you want to fetch a webpage. from urllib import urlopen print urlopen('http://xahlee.org/Periodic_dosage_dir/_p2/russell-lecture.html').read() #...
31
by: surfunbear | last post by:
I've read some posts on Perl versus Python and studied a bit of my Python book. I'm a software engineer, familiar with C++ objected oriented development, but have been using Perl because it is...
25
by: rbt | last post by:
Are there any plans in the near future to support PDF files in Python as thoroughly and completely as Perl does? http://cpan.uwinnipeg.ca/search?query=pdf&mode=dist I love Python's clean...
3
by: Xah Lee | last post by:
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core...
4
by: eight02645999 | last post by:
hi i have some regular exp code in perl that i want to convert to python. if $line =~ m#<(tag1)>(.*)</\1># { $variable = $2; }
4
by: pmcgover | last post by:
I enjoyed Paul Barry's September article in Linux Journal entitled, "Web Reporting with MySQL, CSS and Perl". It provides a simple, elegant way to use HTML to display database content without any...
0
by: alex23 | last post by:
On Jul 24, 11:53 pm, Brett Ritter <swift...@swiftone.orgwrote: I've never used Perl myself, so I can't comment on the quality, but this document was recommended earlier this week:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.