Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-16 Thread obiwan-92
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 obiwan-92 posted a new comment: That's correct. I'm sorry, I don't have Unix for now, so I'm testing it on Windows. Thanks a lot Raiman. Regards. -- You received this question notification because you

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-15 Thread obiwan-92
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 Status: Open = Answered obiwan-92 proposed the following answer: Hello, Like RaiMan said, t1 = time.strftime(%Y-%m-%d %H:%M:%S) # return the time system and save it in the local variable t1 Regards.

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-15 Thread RaiMan
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 RaiMan proposed the following answer: os.system() executes the given command, but does not return the content of stdout, but only the return code of the executed command. So in your case the date string is

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-15 Thread obiwan-92
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 obiwan-92 proposed the following answer: Hello, If you really want the result of your command try this : import subprocess as sub p = sub.Popen(echo $(date +'%Y-%m-%d

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-15 Thread RaiMan
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 RaiMan proposed the following answer: @obiwan-92 With subprocess.Popen() you have to either use a list of strings building the command line with the first being the program to run or one string, that is

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-15 Thread Peter Samulat
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 Status: Answered = Solved Peter Samulat confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because you are a member of Sikuli

[Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-14 Thread Peter Samulat
New question #242206 on Sikuli: https://answers.launchpad.net/sikuli/+question/242206 I like to add a row to an existing csv-file. The row should contain a timestamp (t1), text information and a numeric value (t2). t1 is right now always zero, so my first question is how to get the message

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-14 Thread RaiMan
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 Status: Open = Answered RaiMan proposed the following answer: at 1: t1 = time.strftime(%Y-%m-%d %H:%M:%S) at 2: with open('eggs.csv', 'a') as csvfile: a -- to open in append mode no b (means binary)

Re: [Sikuli-driver] [Question #242206]: write os.system generated message to csv-file

2014-01-14 Thread Peter Samulat
Question #242206 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/242206 Status: Answered = Open Peter Samulat is still having a problem: Great, thank you! It works fine. But is there (in addition) any way to get the message generated by os.system(echo $(date +'%Y-%m-%d