Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'subject:Python': 0.06; 'subject:code': 0.07; 'python': 0.08; 'anand': 0.09; 'instance.': 0.09; 'underlying': 0.09; 'wrote:': 0.15; 'executables': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'stdin': 0.16; 'stdout': 0.16; 'pm,': 0.16; 'perl': 0.19; 'received:209.85.210.174': 0.19; 'received:mail-iy0-f174.google.com': 0.19; 'rewrite': 0.19; 'otherwise,': 0.19; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'code': 0.24; '(the': 0.28; 'effect': 0.28; 'version,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'import': 0.29; '24,': 0.29; 'second': 0.29; 'module': 0.30; 'sun,': 0.30; 'separate': 0.31; 'break': 0.33; 'to:addr:python-list': 0.34; 'project': 0.35; 'module.': 0.35; 'subject:/': 0.36; 'idea': 0.36; 'bird': 0.37; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'aside': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'easy.': 0.67; 'mouse': 0.67; 'brand': 0.81; 'other?': 0.84; 'mistakes': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SnVz2Ie0hQVd5od9vmr6+urkwz3g3pAVZ0OM/KZ1yxg=; b=DfZD3Kql8OKZZzM1jfOSln5M9E1JzoSBkz8IV/71KPI9lfSlCUFLeDHiOcjEgRx/Gx E5B0w91QnuHF2cw/7TEF/5iwttMAG2INdUwwHpXNvWBciYEO3xzDtP6jF/ih2TGqjqob IkAnAbbYl4Yofj6/n9M4O33sW2CR0BDTAqS9M= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 24 Jul 2011 19:45:11 +1000 Subject: Re: Refactor/Rewrite Perl code in Python From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311500714 news.xs4all.nl 23964 [2001:888:2000:d::a6]:46158 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10203 On Sun, Jul 24, 2011 at 7:29 PM, Shashwat Anand wrote: > How do I start ? > The idea is to rewrite module by module. > But how to make sure code doesn't break ? > How can I import perl and python codes in each other ? Can you separate the project into separate executables that call on each other? You can pipe text from stdout of perl to stdin of python, for instance. Otherwise, it's not going to be easy. But if you're going to change the underlying database AND the code at the same time, it may be best to simply set aside the old code completely and code a brand new system in Python, capitalizing on the Second Mouse Effect (the early bird gets the worm, but the second mouse gets the cheese). You can learn from all the mistakes made in the first version, allowing you to make an entirely new set of mistakes. :) ChrisA