Wednesday, August 11, 2010

I used string formating to write the data to the file!

I have improved on my gas mileage GUI program, by writing text to a file using string formatting. I was just writing the variable to the file, but would add extra stuff I didn't want to the file.  String formatting is a much better way to write data. It took me awhile to figure out this simple concept! Also, I added a button that will list the text file using a for loop. The for loop is a very nice way to list lines in a file.

Saturday, August 7, 2010

Run python from a bash shell in Linux.

I have not written any code for a long time, so I had to relearn some basic stuff. I refer back to my python blog to get myself back up to speed. I wrote a very simple gas mileage calculator (again) to get me jump started. Having a blog is a great way to get back some of the programming skills I learned. What is neat about python programming in Linux is that I can run my program by typing "python program_name.py" in a bash shell. PS, this only work in version 2.6.

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.