python: how do you concatenate time to a string?
<p>I'm a py newbie and was wondering if there was a simpler way to concatenate time to a string in a write function?  here is my code running windows xp with activepy 2.6: </p>

<pre><code>from time import clock
filename = "c:\Python\\test.txt"
try:    
    tm = clock()
    print "filename: " + filename                            
    fsock = open(filename, "a") 
    try:
        fsock.write(tm + 'test success\n ')                             
    finally:                        
        fsock.close()
except IOError:                     
    print "file not found"
print file(filename).read()
</code></pre>

<hr>

<pre><code>C:\Python&gt;python test.py
filename: c:\Python\test.txt
Traceback (most recent call last):
   File "test.py", line 8, in &lt;module&gt;
    fsock.write(tm + 'test success\n ')
   TypeError: unsupported operand type(s) for +: 'float' and 'str'

C:\Python&gt;
</code></pre>
