On Fri, Sep 14, 2012 at 2:45 PM, Viesturs Lācis
<[email protected]> wrote:
>> Maybe check if the file exists, and if it does, open in append mode;
>> otherwise open it normally for writing.
>
> Yes, that would be nice.
> Can You share some source, where I can see, how does it look, when coded?
As it turns out, opening the file in append mode creates it if it
doesn't exist, so you can just do
x=open("xyz","a")
x.write("abc")
if you needed to do some more housekeeping if the file didn't exist,
you could do the explicit test:
import os
if os.path.isfile("xyz"):
print "file exists"
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users