Index: doc/example-scripts/rosetta-serialization.tcl =================================================================== diff -u -r1617c4f080e984ae2725d8337f994d5e5fa3d4cc -r30e0cbddb908f2167be0a8b231378affdc35601b --- doc/example-scripts/rosetta-serialization.tcl (.../rosetta-serialization.tcl) (revision 1617c4f080e984ae2725d8337f994d5e5fa3d4cc) +++ doc/example-scripts/rosetta-serialization.tcl (.../rosetta-serialization.tcl) (revision 30e0cbddb908f2167be0a8b231378affdc35601b) @@ -33,7 +33,8 @@ # +i am Fido alive true+ # # Serialize the animals to a file -! {set f [open /tmp/dump w]} +! {set fpath [::nsf::tmpdir]/dump} +! {set f [open $fpath w]} ? {foreach i [Animal info instances] { puts $f [$i serialize] }} "" ? {close $f} "" @@ -46,7 +47,7 @@ ? {puts ===========} "" # Load the animals again ... -? {source /tmp/dump} "" +? {source $fpath} "" # and print it. The print output is the same as above ? {foreach i [Animal info instances] { $i print }} ""