2012/9/14 Przemek Klosowski <przemek.klosow...@gmail.com>: > On Fri, Sep 14, 2012 at 2:45 PM, Viesturs Lācis > <viesturs.la...@gmail.com> 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")
Thank You! What is the syntax to put current date in the file name. In Your example the file name is xyz. And how can I specify the folder, in which the file is saved? 2012/9/15 cogoman <cogo...@optimum.net>: > On 09/14/2012 03:53 PM, Stephen Dubovsky wrote: >> Python can make database calls. Just write the lengths to a database. >> Use database tools to do all the analysis like histogramming, etc. >> Thats what they are very good at. > Or, if the end user is handy with a spreadsheet, you could write it out > to a .CSV file, and include the date and time so they could tell if data > came before or after the power failure. Of course for safety sake, you > could close the file after each board is stored. Yesterday I saw a video, where they demonstrated, how such a machine is working. Each new piece of wood plank is created every 2 or 3 seconds. We agreed that saving to a file will be done, when operator explicitly presses "save" button. So they are taking a risk that powerfailure will cause a loss of unsaved data. I just cannot figure out, how to create a reminder for operator to save data in case he/she is trying to close application with some unsaved numbers. Yes, saving to csv would be nice, but I think that I have a solution - put in the rows some special characters, like semicolon, and then use "text to columns" function in spreadsheet. What I am concerned about is the coding of the file - most likely they will import the file in excel on windows. -- Viesturs If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users