I want to write to a text file the function text as it is passed to a variable:
myvariable = myClass(arg1, arg2, arg3, arg4, arg_n)
f = open("mytextfile.txt", "w")
f.write("here is my paremeters:"+ str(myvariable))
f.close()
in my printout text file, I get:
"here is my parameters:<somefunction.myClass instance at 0x7d54a5101b48>"
the desired output will be:
"here is my parameters: myClass(arg1, arg2, arg3, arg4, arg_n)"
I should use the myvariable
because the arguments change from time to time, so I can't hardcode the function text as it is.