[Live-demo] Re: [OSGeo] #771: AtlasStyler does not open from ISO, but seems to work from VM

OSGeo trac_osgeo at osgeo.org
Sat Aug 27 00:44:47 PDT 2011


#771: AtlasStyler does not open from ISO, but seems to work from VM
----------------------+-----------------------------------------------------
 Reporter:  camerons  |       Owner:  live-demo@…              
     Type:  defect    |      Status:  new                      
 Priority:  major     |   Milestone:                           
Component:  LiveDVD   |    Keywords:  5.0, atlasstyler, iso    
----------------------+-----------------------------------------------------

Comment(by darkblueb):

 this small program in python will filter a list of files to ones that
 start with #!

 Made to be combined with a file list generator and an action, like examine
 perms for lack of -x

 {{{
 import os,sys

 gUsage = '''
   app filename  RETURNS True for #! False otherwise
 '''
 if len(sys.argv) < 2:
   print gUsage
   sys.exit(0)

 tFName = sys.argv[1]
 tF = open( tFName, 'r')
 tChars = tF.read(2)

 if tChars == '#!':
   print tFName
   sys.exit(1)
 else:
   sys.exit(0)

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/osgeo/ticket/771#comment:13>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.


More information about the Osgeolive mailing list