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

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -