I think I have a pretty good idea on what we want to build/code for this project:
our 0.1 is to makes a change to file(s) “color to colour”
our 0.2 is a directory walk that “walk” all directory and file in a folder.
our 0.3 will be to support multiple translations, instead of just “color to colour” and if we have time we will fix the “key changing problem”
It seems like the research and practice on python has pay off decently. Yesterday, Armen and Rueen went to my house to work on our 0.2. Armen arrived at 10:11am and Rueen arrived at 10:42am. We want to have it done eary because we know that we are going to be extremely busy deeper into the semister. Reading week is our chance to get “something” done again.
And yes, at the end of the day, we done it again. We have “something”. our 0.1 make changes to all file in the current directory. now, our 0.2 make changes to not only the current directory but all the child and sub directory files. At first, i wanted to do it recursively just as what I did before in another course. We had a few options:
1. reuse the code from Axel, because the code seems to have a directory walk function called zipwalk. that would take us a few hours to understand and modify/reuse
2. use my recursive testing code in python that has not been tested. that would take a few hours to fix and modify..
3. do a search a find a simple & working directory walk code online.
Since directory walk is such a common task, I just know that they already exist somewhere. So? why waste our time to recode the exact same thing. Moreover, Dave encourages us to reuse existing code? Didn’t he? ^^” It took me less than a minute to find one. And yes, it works perfectly. It did walk every file and folder. But we want it to do more than just that. We want the code to use our translation function and apply change to all DTD and Propertise file. We made a few adjustment. We completely rewrite some of our code, did a lot of copy and paste.
Fixing the indentation is not fun. Python rely on indentation so much that if the indentation is wrong the program wouldn’t work at all. No a problem. I just has to do a lot of copy and paste of the indentation. Moving things around. I know the code will work… just that the identation is a little messy.
Now comes to think of it? There should probably be “an Automatic Indentation Fixing Tool/Function for Python” out there we could use. If they don’t? Here come another open source project which will be greatly welcomed by all python developer
2 Comments »
Leave a Reply
- Our 0.3 Release!
- Distcc?!?! Woo!
- Lab 5 Completed
- Redo Lab 1-2 & Lab 3-4 Posted
- Lab: Creating a Binary C++ XPCOM Component
- Problem with Fixing a bug in Thunderbird Lab
- Helping on SQLite/CVS Editor/Testing
- More for the Translator Tool 0.2
- Our 0.2
- re: my Watching@bugzilla begins
- Modifying the Browser Lab (continued! done)
- Modifying the Browser Lab