import codecs regFile = codecs.open ("c:/temp/Deve.reg", encoding="utf_16")
reg = regFile.read ()
regFile.close ()
print reg
My 2cent tips & tricks on computer technology & Application Virtualization ...
Monday, November 26, 2007
Read Registry Files in Python
Reading Python files using open function will not work as Reg files are encoded using UTF-16, thus use the following code to read it
Thursday, November 22, 2007
Softgrid Helper Ver: 0.02 Released.
Hello All,
Today I am releasing a newer & better version of the Softgrid Helper.
New Features:
1. New Installer: The msi package has been created using War Setup which internally uses Microsoft WIX.
2. Logging Enabled: Now most of the task has been logged so that any issue can be debugged.
3. New Name & Icons: New icons make this application look better.
Bug Fix(es) :
1. Refresh All and clean up issues have been resolved.
The installer can be downloaded from Here
Thanks and Regards,
Mayank Johri
Note:
1. This software is should not be used in production and has not been tested at all.
2. This software has been released under GNU 3.0 License.
Today I am releasing a newer & better version of the Softgrid Helper.
New Features:
1. New Installer: The msi package has been created using War Setup which internally uses Microsoft WIX.
2. Logging Enabled: Now most of the task has been logged so that any issue can be debugged.
3. New Name & Icons: New icons make this application look better.
Bug Fix(es) :
1. Refresh All and clean up issues have been resolved.
The installer can be downloaded from Here
Thanks and Regards,
Mayank Johri
Note:
1. This software is should not be used in production and has not been tested at all.
2. This software has been released under GNU 3.0 License.
Adding the Shortcuts to StartMenu
1. Create a new Directory in "Setup Files" and set the ID as "ProgramMenuFolder" and set Name as "Programs".
2. Create a new Directory under this directory and set ID as "ProgramMenuDir".
3. In the shortcut set the Directory as "ProgramMenuDir"
2. Create a new Directory under this directory and set ID as "ProgramMenuDir".
3. In the shortcut set the Directory as "ProgramMenuDir"
Sunday, November 18, 2007
Adding Scrollbars to TCL/TK listbox in python
The listbox itself doesn’t include a scrollbar. Attaching a scrollbar is pretty straightforward. Simply set the xscrollcommand and yscrollcommand options of the listbox to the set method of the corresponding scrollbar, and the command options of the scrollbars to the corresponding xview and yview methods in the listbox. Also remember to pack the scrollbars before the listbox. In the following example, only a vertical scrollbar is used. For more examples, see pattern section in the Scrollbar description.
Set the "yscrollcommand" of listbox to scrollbar.set in properties section and command of scrollbar to listbox.yview
frame = Frame(master)
scrollbar = Scrollbar(frame, orient=VERTICAL)
listbox = Listbox(frame, yscrollcommand=scrollbar.set)
scrollbar.config(command=listbox.yview)
scrollbar.pack(side=RIGHT, fill=Y)listbox.pack(side=LEFT, fill=BOTH, expand=1)
Copied from http://effbot.org/tkinterbook/listbox.htm for personal use only.
Ok, now how to do this using GUI Builder:
Set the "yscrollcommand" of listbox to scrollbar.set in properties section and command of scrollbar to listbox.yview
Monday, October 29, 2007
This is my second tool which i use to clean up the OSD files, and prepare them to promote them to production server by updating the server name in the OSD files by right clicking them and selecting "update to Prod Server" in Windows Explorer.
The tool can be downloaded from OSD Helper
The source code of the package is also available with the package and is released under GNU 3 License.
NOTE: This program has not been tested fully and will contain many bugs, kindly report them and this program has not been intended to be used in production. Use it at your own risk.
Also comments and suggestions are always welcome.
The tool can be downloaded from OSD Helper
The source code of the package is also available with the package and is released under GNU 3 License.
NOTE: This program has not been tested fully and will contain many bugs, kindly report them and this program has not been intended to be used in production. Use it at your own risk.
Also comments and suggestions are always welcome.
Tuesday, October 16, 2007
Softgrid Helper.
I have developed a new tool which can be used to cleanup the cache of softgrid client, refresh specific softgrid server or refresh all server.
Download it from here http://sourceforge.net/projects/softgridhelper/
Download it from here http://sourceforge.net/projects/softgridhelper/
Sunday, September 16, 2007
Another Downloader... batch downloader ....
The script can be used to batch download the files from the internet. say for example the website contain files from 1.zip to 100.zip at
http://www.something.com/zipfiles/ folder. then the download command will be
AnotherDownloader.py http://www.something.com/zipfiles/*.zip 1 100 /home/test/download
the above command will download the files to /home/test/download folder.
http://www.something.com/zipfiles/ folder. then the download command will be
AnotherDownloader.py http://www.something.com/zipfiles/*.zip 1 100 /home/test/download
the above command will download the files to /home/test/download folder.
AnotherDownloader.pdf
Wednesday, August 29, 2007
rm2ogg convertor
Use the following command to convert rm files to ogg files.
$ mplayer "aks1.rm" -ao pcm:file=temp.wav | oggenc -q 10 -o "aks1.ogg" temp.wav
$ rm temp.wav
$ mplayer "aks1.rm" -ao pcm:file=temp.wav | oggenc -q 10 -o "aks1.ogg" temp.wav
$ rm temp.wav
Display Video in VLC when using compiz is enabled.
For some reason, when compiz is running VLC does not show any video. I found the work around to the issue by following the below instructions
- Start VLC and click on Settings -> Preferences.
- Expand Video -> Output modules.
- Select Output modules, and check the checkbox at the bottom right that says Advanced options.
- Select the option to select a different output device. Pick X11 video output, click on Save.
Sunday, August 26, 2007
mp32ogg convertor
I am adding a script which will convert the mp3 from a folder to ogg. mpg123 and oggenc are prerequisite for this scirpt. It can be download from http://mayankjohri.files.wordpress.com/2007/08/mp32ogg.pdf
The PreReq's are mpg123, vorbis-tools, python-id3
The PreReq's are mpg123, vorbis-tools, python-id3
Saturday, August 25, 2007
Setting Evolution for Gmail Account
Steps to follow
- Enable the POP & SMTP service on gmail accont.
- Start Evolution
- Add New Account by clicking "Edit" -> "Preference"
- In "Accout Details", press "Add" Button
- Select "Forward"
- Enter your Account Name and Email ID and select "Forward"
- Select "POP" server for "Receiving Email"
- Under "Configuration" section enter "POP.gmail.com" and your email username
- Under "Security" select "SSL encryption"
- Under "Authentication Type" select Password
- Select "Forward"
- Select "Forward" for "Receiving Options
- In "Sending Email" select
- Server Type : SMTP
- Under "Server Configureation" add "SMTP.GMAIL.COM" for Server
- Under "Security" select "SSL Encryption" as "Use Secure Connection"
- Enter Username under Authentication section.
- Select "Forward"
Tuesday, August 21, 2007
Slackware: Enabling package update through online mirrors
Unfortunately Slackware 12.0 does not unable update of OS by default, slackpkg needs to be installed from the install CD/DVD which is located in "extra\slackpkg" folder.
installpkg slackpkg*.tgz
uncomment only one mirror on /etc/slackpkg/mirrors file which represent your version.
slackpkg update; slackpkg upgrade-all
the above command will upgrade your machine.
installpkg slackpkg*.tgz
uncomment only one mirror on /etc/slackpkg/mirrors file which represent your version.
slackpkg update; slackpkg upgrade-all
the above command will upgrade your machine.
Subscribe to:
Posts (Atom)