You wouldn't gain much with a Pyton script. You can specify the extension with "assoc".

Try "assoc .zip".

But if you want to try it anyway, look at the "popen2" module (depreciated) or the "subprocess" module to extract the data and assign it to a variable that you can parse any way you like.


----- Original Message ----- From: "Richard D. Moores" <[email protected]>
To: <[email protected]>
Sent: Friday, August 06, 2010 6:11 AM
Subject: [Tutor] Seek suggestions for script for looking up extensions usingC:\>assoc


Python 3.1; Windows Vista.

I just ran C:\>assoc and was amazed to see 658 associations roll by.
Here's the top of the list:

.001=jZip.file
.386=vxdfile
.3g2=QuickTime.3g2
.3gp=QuickTime.3gp
.3gp2=QuickTime.3gp2
.3gpp=QuickTime.3gpp
.7Z=jZip.file
.aa=NeroShowTime.Files9.aa
.aac=QuickTime.aac
.ac3=QuickTime.ac3
.aca=Agent.Character.2
.acf=Agent.Character.2
.acl=ACLFile
.acr=IrfanView.DCM
.acrobatsecuritysettings=AcroExch.acrobatsecuritysettings
.acs=Agent.Character2.2
.acsm=Adobe.ACSMessage
.AddIn=VCExpress.AddIn.9.0
.adts=QuickTime.adts
.aif=IrfanView.aif
.aifc=WMP11.AssocFile.AIFF
.aiff=WMP11.AssocFile.AIFF
.air=AIR.InstallerPackage

I thought it would be convenient to have a Python script I could use
to look up unfamiliar file extensions. I assume one is possible, but
have no idea where to start, and would appreciate hints and
suggestions.

Thanks,

Dick Moores
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to