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

Unix diff command under Window.

Hello,

Does any one have using Python to write a Unix "diff" command for
Window?

Tony Ha.

Aug 24 '05 #1
8 2737
TonyHa said the following on 24.08.2005 15:50:
Hello,

Does any one have using Python to write a Unix "diff" command for
Window?

http://gnuwin32.sourceforge.net/
http://gnuwin32.sourceforge.net/packages.html
Under Diffutils

--
Dejan Rodiger - PGP ID 0xAC8722DC
Delete wirus from e-mail address
Aug 24 '05 #2
TonyHa wrote:
Does any one have using Python to write a Unix "diff" command for
Window?


No, but you can get the *actual* diff command for Windows:
http://unxutils.sourceforge.net/
--
Benji York
Aug 24 '05 #3
"TonyHa" <to*********@yahoo.co.uk> writes:
Hello,

Does any one have using Python to write a Unix "diff" command for
Window?

Tony Ha.


Yes. There's a script in your Python distribution:
Tools/scripts/diff.py

See also the docs for the 'difflib' standard library module.

I do not know whether the Tools directory is installed by default or
not.

Thomas
Aug 24 '05 #4
Either it didn't exist at the time, or I didn't know about the diff.py that
Thomas Heller mentioned in another response, so I wrote 'pyunidiff'
http://unpy.net/~jepler/pyunidiff.py

ah, I guess unix 'diff'-style output was added to difflib.py in 2003, whilemy
pyunidiff dates to 2002.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDDJKvJd01MZaTXX0RAjcgAJ9R8HpvQIx68iZuvZ/KX7mQbe7umQCfW/di
WrFitVHsLGAmmifxcGiMUeQ=
=v/US
-----END PGP SIGNATURE-----

Aug 24 '05 #5
Thomas Heller:
Yes. There's a script in your Python distribution:
Tools/scripts/diff.py

See also the docs for the 'difflib' standard library module.


Is the opposite code, a Python equivalent to 'patch' available? I
have endless trouble receiving patch files that assume one of Windows or
Unix (in terms of path names and line end characters) which then fail to
apply on the other platform. I would like to have a version I could hack on.

Neil
Aug 25 '05 #6
[Neil Hodgson wrote]
Thomas Heller:
Yes. There's a script in your Python distribution:
Tools/scripts/diff.py

See also the docs for the 'difflib' standard library module.


Is the opposite code, a Python equivalent to 'patch' available? I
have endless trouble receiving patch files that assume one of Windows or
Unix (in terms of path names and line end characters) which then fail to
apply on the other platform. I would like to have a version I could hack on.


So would I! I also have problems with the available patch.exe binaries
hanging or crashing occassionally on Windows.

Trent

--
Trent Mick
Tr****@ActiveState.com
Aug 25 '05 #7
TonyHa wrote:
Hello,

Does any one have using Python to write a Unix "diff" command for
Window?

I generally just us the diff built into tortoiseSVN. That way it's only
a rightclick away.
--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
Aug 25 '05 #8
Trent Mick <tr****@ActiveState.com> writes:
[Neil Hodgson wrote]
Thomas Heller:
> Yes. There's a script in your Python distribution:
> Tools/scripts/diff.py
>
> See also the docs for the 'difflib' standard library module.


Is the opposite code, a Python equivalent to 'patch' available? I
have endless trouble receiving patch files that assume one of Windows or
Unix (in terms of path names and line end characters) which then fail to
apply on the other platform. I would like to have a version I could hack on.


So would I! I also have problems with the available patch.exe binaries
hanging or crashing occassionally on Windows.


The only slightly related thing that I know of is the 'Perl Power Tools'
Unix reconstruction project. Seems they have a 'patch' command
implemented in perl:

http://ppt.perl.org/commands/patch/

Thomas
Aug 25 '05 #9

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

Similar topics

4
by: Liang | last post by:
Hi all, I want to diff two files or two versions of one file, and parse the output to find a summary of how many lines of replacement/addition/deletion in the two files. Known from...
2
by: Steve Manes | last post by:
My company offers an ASP service for advertising companies using PG. For contractual reasons, each client gets its own replicated database. This presents a problem whenever a new feature/fix...
46
by: dawn | last post by:
Hi all, I am now working on a C program under Unix. The requirement for the program is that: A file name is passed to program as a parameter. The program will Find files under a specified...
6
by: Igor Shevchenko | last post by:
Hi! Suppose I have "pg_dump -s" of two pg installs, one is "dev", another is "production". Their schemas don't differ too much, and I want to get a "diff -u"-like schema diff so I can quickly...
1
by: mike11d11 | last post by:
I created a database to work out of at my office, right now we work out of a unix system. we connect using a telnet session software that came with our system we use, but was wanting to place this...
2
by: Michael_R_Banks | last post by:
Is there any way to mount a Unix volume with VB.net and use the file system as if it were native to Windows? I need to write a program that will take a file, manipulate it some, then re-post it &...
4
snowfall
by: snowfall | last post by:
I need to find the difference of two files and save it in third file and process it.. But the outpur of diff command is coming with the 'line number - difference' code. Eg of my output ...
0
by: =?Utf-8?B?QW5vbnltb3Vz?= | last post by:
I just posted this in microsoft.public.inetserver.iis but thought this might be a better place for it. I have the following ASP page that simply executes a DIR command on a UNC path and displays...
0
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.