Go to advanced search

by rossirm
Tue Aug 07, 2018 3:31 pm
Forum: Python
Topic: How to use relative path to my script...
Replies: 1
Views: 286

How to use relative path to my script...

Hi, guys! I don't know exactly if I use a relative paths instead of absolute ones in my Python scripts if they will be usable when I transfer them on another SD card with the same OS installed on abother Raspberry or the same one. I mean - how my written software on the first SD card would be reusab...
by rossirm
Tue Jul 17, 2018 3:23 pm
Forum: Python
Topic: Charts from logged data
Replies: 6
Views: 760

Re: Charts from logged data

Thanks!
So it deserves to begin learning its world, right?
Ok.
by rossirm
Tue Jul 17, 2018 3:16 pm
Forum: Python
Topic: Charts from logged data
Replies: 6
Views: 760

Charts from logged data

Hi, would someone recommend me the best modules of Python for extracting diagrams, graphics and charts of already logged data and saved to txt files and csv file? I know about Pygal but it isn't so proper for my data... I have heard about Matplotlib , but is it better than Pygal or is it one of the...
by rossirm
Mon Jul 16, 2018 6:12 pm
Forum: Beginners
Topic: How to restore rewritten version of CSV file?
Replies: 11
Views: 960

Re: How to restore rewritten version of CSV file?

Ready! I simply defined a function which gets date with custom parameters and keep it in a variable. Then in another variable I keep the path and so on every part of the filename is in separate variables which I concatenate and use the result as a filename in the open method of Python. It works pre...
by rossirm
Mon Jul 16, 2018 10:47 am
Forum: Beginners
Topic: How to restore rewritten version of CSV file?
Replies: 11
Views: 960

Re: How to restore rewritten version of CSV file?

Yes, your idea is brilliant but somehow I don't know exactly how to do it. Can you help me with some info about it. My Python script runs as root and is in a python file which starts with pushing a button.
by rossirm
Sun Jul 15, 2018 6:14 pm
Forum: Beginners
Topic: How to restore rewritten version of CSV file?
Replies: 11
Views: 960

Re: How to restore rewritten version of CSV file?

Thank you all, good people!
For the testing - I intentionally use 'w' mode of writing files. Don't need appending etc. No matter how careful you are, it may happen to everyone.
Regards!
by rossirm
Sat Jul 14, 2018 6:18 pm
Forum: Beginners
Topic: How to restore rewritten version of CSV file?
Replies: 11
Views: 960

How to restore rewritten version of CSV file?

I'm new to Raspberry Pi world and Python 3. I have written some program for logging data from sensors of my RPi. The data is being written to a CSV file but with 'w' which means that the previous version of the file deletes and the file is being rewritten every next time. Today I wrote my data to th...

Go to advanced search