Google Earth is a powerful and beautiful application. Being able to control the globe, with few lines of Python code, makes you feel like you've got some god-like powers ;)
I've drafted here a short guide to show you how to start controlling Google Earth with Python (through its API COM):
http://docs.google.com/View?docid=dgqhgsgm_933rjw93
dimanche 23 décembre 2007
Controlling Google Earth with Python (API COM)
Publié par
Francois Schnell
à
04:15
0
commentaires
Libellés : google-earth, python, windows
dimanche 20 mai 2007
[Win] Quick access to favorite folders
"Folder Guide" is a handy windows freeware to keep the most common folders you use at your fingertip.
Folder Guide is a free handy utility that provides fast access to your frequently used and favorite folders. It can operate as the part of your context menu in your Windows Explorer.
Publié par
Francois Schnell
à
10:03
0
commentaires
samedi 17 février 2007
Clipboard and all-in-one system information for windows
Two useful free software to complete my list of windows utilities :
Ditto is a very useful Open Source clipboard:
- history of text copies, images, screenshots
- enable hot keys, network sync, etc
SIW is a freeware which stands for "System Information for Windows"
- no installation required (can run on a USB key)
- hardware informations, temperature sensors, license keys, process, etc, etc.
Publié par
Francois Schnell
à
06:28
0
commentaires
jeudi 11 janvier 2007
[Python] Generating an html doc for your script(s)
Pydoc
Python comes with a "pydoc" utility. On windows it is lacated in C:\Python2X\Lib (you may want to add this directory to your system path)
To produce an html documentation of a script or module type in a DOS shell (at the level of your script) :
pydoc.py -w nameOfYourScript
Warning:
- don't type the .py extension in the command above
- respect the uppercase and small caps even on windows.
- your script must have some docstrings
The above command produce a nameOfYourScript.html doc with the classes, methods, functions, etc.
Epydoc
For a more powerful and complete alternative I use the excellent Epydoc that you can download here:
http://epydoc.sourceforge.net/
On windows after the installation you can find the epydoc script in C:\Python2X\Scripts (you may want to add this directory to your system path)
To use epydoc just type in a shell in the folder containing your script(s):
epydoc.py scriptNameWithoutPyExtension
This will produce an "html" folder : read the index.html in your browser and enjoy :)
Publié par
Francois Schnell
à
08:18
0
commentaires
vendredi 29 décembre 2006
Switching from a Linux to a Windows Desktop
When I'm using a WinXP desktop I'm searching for an equivalent "Linux experience". Here's what I find useful so far (a mix of freeware and Free Software).
1) Look and feel
I don't like WinXP theme. CristalXP.net have great themes, wallpaper, icons, etc. I use the Microsoft "Royale Noir" a nice dark and sober theme.
Also very handy is iColorFolder to manage folders icons and the ability to quickly set their color for a better visual organisation.
You may also be interested by a Virtual Desktops Manager or want to access the "contextual" command line window from a right click on a folder or maybe to customize completely you're right click menu.
2)Shell and processes
This was the weakest point of winXP for me. Microsoft now released Power Shell and I must admit I find it good (it is just a little long to start). There are also aliases for usual Linux command (ls, pwd, cd /, etc) but I think Power Shell commands are very neat and clear.
Also, if you want to see the running processes in a graphical way Process Explorer is a great tool to replace the Task manager.
3)Copy/Paste and Screenshots
WinXP doesn't keep an history of your cut and paste actions and this can result in a loss of data. Cliptray is a freeware which solve this problem.
Linux distros always come with handy screenshots utilities. Cliptray can also do it but I prefer to use irfanview (tuto).
4)Security
Microsoft OS is unfortunately a big target. Apart from an antivirus and a firewall I feel safer to use Firefox and this KeyScrambler extension against eventual data loggers for login/passwords.
5)Applications
Software are not a problem since I'm using either web services (gmail, google reader,etc) and/or multi platform software (Vim,Python,OOo,Firefox,etc).
Also to work with a Linux PC or server Putty and WinSCP are a must.
dimanche 24 décembre 2006
[win] Visualize your Hard Drive and more
WinDirStat for windows is an excellent Free utility (GPL):
- visualize disk usage per folder of per file types
- click on a box (file or folder) for properties, edition commands, contextual explorer or command prompt
A really nice and useful tool to organize and know more about what's really on your Hard Drive.
http://windirstat.info/
Publié par
Francois Schnell
à
13:35
0
commentaires
samedi 16 décembre 2006
[Ubuntu] How-to boot windows by default
After a fresh Ubuntu install, on a Windows PC, the Grub boot loader put Linux as the default system.
To change the default OS (Windows to boot first in our case):
- edit the menu.lst file (in /boot/grub) with root rights.
For example with the Vim editor in a shell:sudo vim /boot/grub/menu.lst
- find and change "default 0" to "default X" where X is the "position" of the Windows OS in the list presented by Grub at boot time (count the "title"s/lines beginning with X=0 for the first line)
Publié par
Francois Schnell
à
12:47
0
commentaires
[Win] Command line : recording a live video from a webcam or another video device
I use Microsoft Windows Media Encoder 9 Series which is free as in beer (I didn't need to download the free SDK).
In "Program Files\Windows Media Components\Encoder" it installs in particular a script called WMCmd.vbs.
You can run this script with cscript.exe which should already be in "Windows\system32" :
cscript.exe WMCmd.vbs -adevice X -vdevice Y -output C:\test.wmv -duration Z
where,
X= the number of the audio device (I used 1 in my case for my webcam)
Y= the number of the video device (I also used 1 for my webcam here)
Z= the duration in seconds (you can always kill the process on the go if the video is shorter)
For command-line options type "cscript.exe wmcmd.vbs" in the shell.
If I want the video to be shorter than the given duration and want to control this from a Python script I use the DOS taskkill command.
More informations also here.
Publié par
Francois Schnell
à
12:22
1 commentaires
Libellés : command-line, multimedia, windows
jeudi 7 décembre 2006
[Win] Video/Audio conversion with MMconvert
I'm searching for a tool to convert videos on Windows (in particular wmv) in a more open format. I also need a command line control (for later Python scripting).
A quick search on SourceForge brings me a first tool : MMconvert
In its installation folder there are MMconvert.exe (for command line) and MMConvertGUI (with a GUI ...)
The GUI version:
- choose the video container in "Video Operations" (I have avi, wmv,mkv)
- "add" one or more video to convert
- select the video and audio codecs to use, "ok" -> "execute"
Command line version:
Let say I want to convert my wmv into a matroska (mkv).
First I check for the audio and video codecs that I have on my computer (and that I can use with this container):
MMconvert.exe /f:mkv /lv
MMconvert.exe /f:mkv /av
This commands gives a list of codecs I can use for the matroska container (just remember the associated number, X and Y in the following).
To convert the video:
MMconvert.exe if=test.wmv of=test.mkv /f:mkv /v:X /a:Y
Memo:
if= input file
of=output file
f=format (for the container: avi,wmv,mkv...)
v=video
a=audio
To know more about the aguments : mmconvert.exe /?
It looks like a great tool but I haven't found yet if I can hide the little "Status windows" in command-line mod. I don't see either if I can play with the bitrate
Publié par
Francois Schnell
à
22:31
0
commentaires
Libellés : command-line, multimedia, windows
