 from shinymud . lib . sport_plugins import SportError <EOL> import os <EOL> def transport ( world , shinydata , filename , path ) : <EOL> """<STR_LIT>""" <EOL> if not os . path . exists ( path ) : <EOL> try : <EOL> os . mkdir ( path ) <EOL> except Exception , e : <EOL> world . log . error ( '<STR_LIT>' + str ( e ) ) 
 raise SportError ( '<STR_LIT>' ) 
 from shinymud . lib . sport_plugins import SportError <EOL> import os <EOL> def transport ( world , shinydata , filename , path ) : <EOL> """<STR_LIT>""" <EOL> if not os . path . exists ( path ) : <EOL> try : <EOL> os . mkdir ( path ) <EOL> except Exception , e : <EOL> world . log . error ( '<STR_LIT>' + str ( e ) ) <EOL> raise SportError ( '<STR_LIT>' ) <EOL> filepath = os . path . join ( path , filename ) <EOL> try : <EOL> f = open ( filepath , '<STR_LIT:w>' ) <EOL> except IOError , e : <EOL> world . log . debug ( str ( e ) ) <EOL> raise SportError ( '<STR_LIT>' ) <EOL> else : <EOL> f . write ( shinydata ) <EOL> finally : <EOL> f . close ( ) <EOL> return '<STR_LIT>' % filepath </s>
