Changeset 391 for python/trunk/Lib/binhex.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/binhex.py
r2 r391 171 171 172 172 class BinHex: 173 def __init__(self, (name, finfo, dlen, rlen), ofp): 173 def __init__(self, name_finfo_dlen_rlen, ofp): 174 name, finfo, dlen, rlen = name_finfo_dlen_rlen 174 175 if type(ofp) == type(''): 175 176 ofname = ofp 176 177 ofp = open(ofname, 'w') 177 if os.name == 'mac':178 fss = FSSpec(ofname)179 fss.SetCreatorType('BnHq', 'TEXT')180 178 ofp.write('(This file must be converted with BinHex 4.0)\n\n:') 181 179 hqxer = _Hqxcoderengine(ofp) … … 478 476 if not out: 479 477 out = ifp.FName 480 if os.name == 'mac':481 ofss = FSSpec(out)482 out = ofss.as_pathname()483 478 484 479 ofp = open(out, 'wb') … … 501 496 ofp.close() 502 497 503 if os.name == 'mac':504 nfinfo = ofss.GetFInfo()505 nfinfo.Creator = finfo.Creator506 nfinfo.Type = finfo.Type507 nfinfo.Flags = finfo.Flags508 ofss.SetFInfo(nfinfo)509 510 498 ifp.close() 511 499
Note:
See TracChangeset
for help on using the changeset viewer.