def str2file(sourcestring, outfile, colors=None, title='', markup='html', header=None, footer=None, linenumbers=0, show=0, dosheet=1, form=None):
 (css, html) = str2markup(sourcestring, colors=colors, title='', markup=markup, header=header, footer=footer, linenumbers=linenumbers, form=form)
 f = open(outfile, 'wt')
 f.writelines(html)
 f.close()
 if ((css != None) and dosheet):
  dir = os.path.dirname(outfile)
  outcss = os.path.join(dir, 'pystyle.css')
  f = open(outcss, 'wt')
  f.writelines(css)
  f.close()
 if show:
  showpage(outfile)

def str2file ( sourcestring , outfile , colors = None , title = '' , markup = 'html' , header = None , footer = None , linenumbers = 0 , show = 0 , dosheet = 1 , form = None ) : ( css , html ) = str2markup ( sourcestring , colors = colors , title = '' , markup = markup , header = header , footer = footer , linenumbers = linenumbers , form = form ) f = open ( outfile , 'wt' ) f . writelines ( html ) f . close ( ) if ( ( css != None ) and dosheet ) : dir = os . path . dirname ( outfile ) outcss = os . path . join ( dir , 'pystyle.css' ) f = open ( outcss , 'wt' ) f . writelines ( css ) f . close ( ) if show : showpage ( outfile )
converts a code string to a file .