[Tutor] PyMOTW: difflib

2008-04-05 Thread Dick Moores
See < http://blog.doughellmann.com/2007/10/pymotw-difflib.html> And my try with the Differ example, < http://py77.python.pastebin.com/f41ec1ae8>, which also shows the error, "E:\Python25\pythonw.exe" -u "E:\PythonWork\demo_pymotw-difflib.py" Traceback (most recent call last):  File "E:\PythonWor

Re: [Tutor] Diff for Python

2008-04-05 Thread Marc Tompkins
Sorry - forgot to reply to the list the first time... On Sat, Apr 5, 2008 at 3:04 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > On Windows you can use FC - File Compare. > Its not as powerful as diff but it will highlight differences. > On Windows, I've tried a bunch of diff tools - it's probably t

Re: [Tutor] Diff for Python

2008-04-05 Thread Alan Gauld
On Windows you can use FC - File Compare. Its not as powerful as diff but it will highlight differences. Help FC will get you the switch options. Or just use cygwin - any Unix user on Windows should get cygwin as a matter of course IMHO! :-) Alan G. "Eric Walstad" <[EMAIL PROTECTED]> wrote in

Re: [Tutor] Diff for Python

2008-04-05 Thread Eric Walstad
And my whoops, I should have sent my first one to the list, too. I don't run Windows very often. I think 'WinDiff' is what I used there. Have you tried that? There's always cygwin, too. Eric. On Sat, Apr 5, 2008 at 12:28 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: > > Whoop, I should have spe

Re: [Tutor] Code optmisation

2008-04-05 Thread W W
On Sat, Apr 5, 2008 at 2:44 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "yogi" <[EMAIL PROTECTED]> wrote > > Question 2: If I have convert this code into a function. > > Should I ? > > Only if you have a need to reuse it in a bigger context > or of you want to parameterize it. You could maybe

Re: [Tutor] Diff for Python

2008-04-05 Thread W W
Vim also has a similar command On Sat, Apr 5, 2008 at 12:59 AM, Terry Carroll <[EMAIL PROTECTED]> wrote: > On Fri, 4 Apr 2008, Wayne Watson wrote: > > > Is there a Linux diff-like command for Python code? I'd like to see the > > difference between two py files. > > You could just use diff. > >

Re: [Tutor] Code optmisation

2008-04-05 Thread Alan Gauld
"yogi" <[EMAIL PROTECTED]> wrote > #/bin/python > import sys, os, csv, re > x = 0 #Define Zero for now > var = 100 #Taking the variation > # This programme finds the SNPs from the range passed > # csv splits columns and this file is t

Re: [Tutor] Question about global variables on modules

2008-04-05 Thread Alan Gauld
"Tiago Katcipis" <[EMAIL PROTECTED]> wrote > results of a matrix using jacob. I want to inside the module (inside > a > function on the module )assign a value to a global variable, but the > only way i found to do this inside the own module function is > importing > the module inside himself. Is