search between 2 files
José
jmcalvar at telecable.es
Wed Feb 4 10:10:48 EST 2004
mmmh, it's not the same, but I try with this indications.
I have a file called "data" from djbdns with different domain, for example:
----------------------
.domain.com:ns.domain.com
+domain.com
+.*domain.com
.domain1.com:ns.domain1.com
+domain.com
+.*domain.com
------------------------
and have a new file for example "list" with new domains
-------------------------
newdomain.com
newdomain1.com
newdomain1.com
-------------------------
I'm programming a little interface in python, and before I modify the
"data" file I'd like to know if I have in the list one domain I have in
data.
Thans
José escribió:
> I'm newby in Python, and I'm working on a script to manage files.
> I have two files, one with a list of domains, and the other with a new
> list of domains. I'd like to know if I have a repeated domain in the
> new's one. I tried opening with readline(), with readlines(), but truly
> I have no idea to countinue.
>
> Have anybody any question?
>
> thanks
>
More information about the Python-list
mailing list