473,651 Members | 2,790 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2776
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*********@ya hoo.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)

iD8DBQFDDJKvJd0 1MZaTXX0RAjcgAJ 9R8HpvQIx68iZuv Z/KX7mQbe7umQCfW/di
WrFitVHsLGAmmif xcGiMUeQ=
=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****@ActiveSt ate.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****@ActiveS tate.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
4942
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 diff/cleardiff, the output has a style like: 15a16, 15,17d3, 18c19,21 etc. Anyone know how to parse these output to generate a summary?
2
2732
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 requires a DDL change which must be rolled out across N databases. Currently, we keep track of these changes via a central text file in CVS with manually entered DDL updates. The problem is making sure that overworked developers actually log all these...
46
2516
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 directory. The matched file must have the same content with the given file. It does not matter whether the filenames are the same. It is easy to find file that has the same name with given file, but may be hard to find the files that with the same...
6
6443
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 add missing/remove old tables/sequences/etc to one or another (manually). Is there some quick tool for doing this ? There was a thread about it sometime in aug, 2002, but it ended without producing anything useful.
1
2422
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 telnet session in a control or something inside my database form, so everything will be in one place. So when they go into the database it will have the telnet connection there for them and they wont have to go start the connection through...
2
2816
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 & hopefully not use FTP. Any insight is appreciated since I'm not very familiar with Unix.
4
3827
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 i22,26d21 < Use the bc program to convert from decimal to hexadecimal. < To do so, use the obase command to set the base for output: 39c34,35 < See Section 5.6 for more examples of using bc.
0
2457
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 the results. When the UNC path is a Windows machine the output is as expected however when the UNC path is a Unix machine running Samba, nothing is returned. I've configured the Authentication Method for the IIS web site to use an account that has...
0
13326
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 programatically either from UNIX or Oracle PLSQL. In this Section, I will be explaining about calling a Concurrent program from UNIX using the CONCSUB Command. Pre-requisite: 1. Concurrent Program should be registered in oracle Applications...
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8700
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8581
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.