I've been doing my last flag for copy/moving user document function, which is comparing souce and target file and only copy the newer one from souce. It should check all sub-directories also. I was thinking to use os.path.walk, cos when i was talking in irc, someone told me to use it. So i go ahead... and.. here it came the nightmare.
I started coding this ReplaceOld function since 6am this morning.. I couldn't get it done after 4 hours of struggle, cos os.path.walk, dosen't allow me to do what I want. I need to go back to parent directory any time I want and I need the path after the source path. If I keep using this function, I may need to use nested array, which is headache and will use a lot of resources and do a lot of coding too.....
And this morning... finally, i figured out what to do... (on the way to washroom.. lol )...
RECURSIVE FUNCTION!!!
Yes!! so, i dun have to assign a lot of array and just call up the function itself, that's it! As long as my calculate is right, it'd be okay. To me it's just something like an other "for..." loop. And it works!!
But of course, this function is not completed yet. But I'm still so excited! Hope I can finish this function before this week. Then I can move on other functions... ^^
Last night, I started coding from 7pm last night to 7am.. oh yeah.. 12 hours of programing.. hehe... I got 400 lines done so far. And if I'm done with this function, I have 3 totally working functions which included a lot of error flag checking already. And I've got a very smart design of flag sorter/reader function from someone's code on net.
Can't wait to see it? Wait for my WDMT 0.2 release! ^^
Tuesday, November 11, 2008
Sunday, November 9, 2008
Windows Data Migration Tool - copytree issue...
I've got a user folder directory function working. But there is a problem now, python will only copy the directory tree to an non-existing directory. And I would assume that user call up this function when the user is already created. So, what should I do?
Hope I can find a function that support merge directory. Otherwise, I have two choice, copy windows directory to a subdirectory, lets say, /home/_user_name/Music/xp_music/ or.. i can ask user if he wants to delete the music directory.. or... the best way is to write a function and generate a list of folder and files that need to be copied... And it seems this is the best way to do...
Or... how about calling up File Browser to do the job? ^^ Lets see.. it's late today, gotta go home and have my dinner...
Hope I can find a function that support merge directory. Otherwise, I have two choice, copy windows directory to a subdirectory, lets say, /home/_user_name/Music/xp_music/ or.. i can ask user if he wants to delete the music directory.. or... the best way is to write a function and generate a list of folder and files that need to be copied... And it seems this is the best way to do...
Or... how about calling up File Browser to do the job? ^^ Lets see.. it's late today, gotta go home and have my dinner...
Thursday, November 6, 2008
SYA710 Lab06 - Virtual Machine
Oh.. VM.. i love it.. isn't it cool to have a totally different operating system running on your machine? It dosen't matta what OS u're gonna put, OSX, Windows, FreeBSD, it's just cool!!! seeing VM running is like.. seeing a woman has a baby in her stomach. ;-p
So, I put FreeBSD 7.0 in Fedora 8. It's really cool. Althought I was kinda disappointed about not seeing any GUI. I think GUI is not in the default installation. But it's still cool. And the coolest thing is you can have few VM running in your system! Isn't it great to see 3 babies in a woman's stomach?
I think I'm gonna put a OSX in my Fedora when I have chance... So I can run a iPhone simulator, hehe.. it's gonna be fun. ^^
So, I put FreeBSD 7.0 in Fedora 8. It's really cool. Althought I was kinda disappointed about not seeing any GUI. I think GUI is not in the default installation. But it's still cool. And the coolest thing is you can have few VM running in your system! Isn't it great to see 3 babies in a woman's stomach?
I think I'm gonna put a OSX in my Fedora when I have chance... So I can run a iPhone simulator, hehe.. it's gonna be fun. ^^
SPR720 Package Review
This week, I have a chance to review some package. I choose this soundmodem, because it sounds like an interesting thing. It's really good to have experience on review packagin, because we can know what will our project face when our project is completed. From this lab, I can see packaging from another angel. Which open my eyes and let me know what I should do when I do my package and codying.
Links:
Review Request: soundmodem - Soundcard Packet Radio Modem
Links:
Review Request: soundmodem - Soundcard Packet Radio Modem
Windows Data Migration Tool(wdmt) - Progress News
I've been working on coding wdmt in python. I found it's really easy. I myself don't have much experience on programming. The only programming langage I used the most was GWBASIC, yeah.. structure programming. But of course, I did learn some at other college and university. But it's still lack of skill tho.
I was so happy to see my first python function running. Then I made my argument coding completed also. Great!! Althought I found there is a better way to sort out argument input, but it's still good. Because It means I'm improving. And I think I've been learning faster than I expected.
In my early planning, I was going to have all functions working on Release 0.2. But it seems to be impossible now, because of the time of learning curve is more than I expected. But I still plan to have all command mode functions working at the end of this sem. Wish me luck. ^^
Here is something I would like to share to you. The way I learn python is not from reading a concept, it's actually not the best way to learn thing, but it's the fastest way. When I need file handling, I google "python file handling", when I need user create, I search "python user create". It seems to improve the speed on learning. But of course, I may not making the best app, but I'm sure it's a working app. ^^
Right now, I have a simple user search based on listing vista/nt user directory and exclude a list of non-user folders and the help file after 5 hours of coding. The simple user search should handle the most documents migration cases. But at the end I may need to go to registry file and search for user's documents path, since user may move their folder to other location, eg: user may move music folder to 'D:\user_name\mp3'
I will have at least 2 more days to code, wait for my good news.. ^^
I was so happy to see my first python function running. Then I made my argument coding completed also. Great!! Althought I found there is a better way to sort out argument input, but it's still good. Because It means I'm improving. And I think I've been learning faster than I expected.
In my early planning, I was going to have all functions working on Release 0.2. But it seems to be impossible now, because of the time of learning curve is more than I expected. But I still plan to have all command mode functions working at the end of this sem. Wish me luck. ^^
Here is something I would like to share to you. The way I learn python is not from reading a concept, it's actually not the best way to learn thing, but it's the fastest way. When I need file handling, I google "python file handling", when I need user create, I search "python user create". It seems to improve the speed on learning. But of course, I may not making the best app, but I'm sure it's a working app. ^^
Right now, I have a simple user search based on listing vista/nt user directory and exclude a list of non-user folders and the help file after 5 hours of coding. The simple user search should handle the most documents migration cases. But at the end I may need to go to registry file and search for user's documents path, since user may move their folder to other location, eg: user may move music folder to 'D:\user_name\mp3'
I will have at least 2 more days to code, wait for my good news.. ^^
Tuesday, November 4, 2008
Kick Start - Creating User in Automatic Installation
In the lecture, Prof. John Selmy suggested me to have a look of kick start configuration options, I may able to use one or two function from kickstart. So I did.. and yeah.. it dose support user creation!
It seems useful. When I was thinking how to use it, I had a second thought. Because if I use kickstart to do user migration, then, the adminstrator can not use the Windows Data Migration Tools (WDMT) after installation. Then it is not the concept of WDMT, cos we want WDMT to support post-installation migration.
But i found some other usefull options. First one is cmdline, it support some non-interactive command to run during installation. It's cool. Because you can run your own bash, python script to do something that the installation dose not support. Second one is firstboot, it will allow system to enable or disable firstboot to run after the system is installed. I would properly disable it if I am using kick start to install a lot of machines. Because I prefer to do those first boot functions our self. ^^
Anyway, I was of surprised how many options kickstart support.. There must be like 100 options. It's a really good administrators tool. ^^
============================
user (optional)
Creates a new user on the system.
user --name= [--groups=
It seems useful. When I was thinking how to use it, I had a second thought. Because if I use kickstart to do user migration, then, the adminstrator can not use the Windows Data Migration Tools (WDMT) after installation. Then it is not the concept of WDMT, cos we want WDMT to support post-installation migration.
But i found some other usefull options. First one is cmdline, it support some non-interactive command to run during installation. It's cool. Because you can run your own bash, python script to do something that the installation dose not support. Second one is firstboot, it will allow system to enable or disable firstboot to run after the system is installed. I would properly disable it if I am using kick start to install a lot of machines. Because I prefer to do those first boot functions our self. ^^
Anyway, I was of surprised how many options kickstart support.. There must be like 100 options. It's a really good administrators tool. ^^
============================
user (optional)
Creates a new user on the system.
user --name=
- ] [--homedir=
--name=
Provides the name of the user. This option is required.
--groups=
In addition to the default group, a comma separated list of group names the user should belong to.
--homedir=
The home directory for the user. If not provided, this defaults to /home/
--password=
The new user's password. If not provided, the account will be locked by default.
--iscrypted
Is the password provided by --password already encrypted or not?
--shell=
The user's login shell. If not provided, this defaults to the system default.
--uid=
The user's UID. If not provided, this defaults to the next available non-system UID.
cmdline (optional)
Perform the installation in a completely non-interactive command line mode. Any prompts for interaction will halt the install. This mode is useful on S/390 systems with the x3270 console.
firstboot (optional)
Determine whether the Setup Agent starts the first time the system is booted. If enabled, the firstboot package must be installed. If not specified, this option is disabled by default.
--enable or --enabled
The Setup Agent is started the first time the system boots.
--disable or --disabled
The Setup Agent is not started the first time the system boots.
--reconfig
Enable the Setup Agent to start at boot time in reconfiguration mode. This mode enables the language, mouse, keyboard, root password, security level, time zone, and networking configuration options in addition to the default ones.
Monday, November 3, 2008
Windows Data Migration Tool - Plan for 0.2 Rlease
After researching on Windows XP, Vista system, I think it's time to do some actual coding.
I'm planning to write all the codes for user and directory handling. Which included user search and create, directory search and create. The functions sounds complicated but the concept is easy. All it will do is list vista/xp home directory and generate a list, administrators files will be moved to root in linux.
The program will be writen in multiple function format, in one big python code files. User will be able to run the program with running "wdmt" with flags. It may not have full support in 0.2 release, but may able to handle basic user search and folders functions.
Please refer to my wiki for detail informations...
Windows Data Migration Tool in Fedora Project
Windows Data Migration Tool in Seneca Open Source Wiki
I'm planning to write all the codes for user and directory handling. Which included user search and create, directory search and create. The functions sounds complicated but the concept is easy. All it will do is list vista/xp home directory and generate a list, administrators files will be moved to root in linux.
The program will be writen in multiple function format, in one big python code files. User will be able to run the program with running "wdmt" with flags. It may not have full support in 0.2 release, but may able to handle basic user search and folders functions.
Please refer to my wiki for detail informations...
Windows Data Migration Tool in Fedora Project
Windows Data Migration Tool in Seneca Open Source Wiki
Subscribe to:
Posts (Atom)