How can you store a file handle in python similar to perl? -
how can perform code in python
open( output, $outputfile ) , $struct{'existing'} = *output{io} $struct{'output'} = *stdout{io};
a "file handle" in python reference file
object, handled other name in python. opening file returns file object:
output = open(outputfile)
this reference can stored in data structure:
struct["existing"] = output
Comments
Post a Comment