July 29, 2010, 7:39 pm
While running a command line program or some GUI initiated from command line on Windows, there is always a black console window on the screen. This sometime becomes annoying. For example, when you start the Eric Python IDE on Windows, normally you start it by calling a batch file “eric4.bat” which calls the actual eric4.py script sequentially. Since Eric4 is designed to be a GUI program, the black console window has no use but it is there. To prevent that or hide it, there are several ways. Continue reading ‘Hide the command console window while running a GUI/Command line program on Windows’ »
March 1, 2010, 4:32 pm
Both Linux Bash and Windows DOS support random number generation. The random number is ‘stored’ in a system environment variable named “RANDOM” (I believe this variable links to a script to generate the actual random numbers on both systems), use it in the same way as you use other ENV variables. E.g.
Continue reading ‘Get random numbers under BASH and DOS’ »
February 12, 2010, 11:40 am
VERY handy!
1 2 3 4 5 6 7 8 9 10
| @echo off
rem --------------------------------------------------------
rem File: which.cmd
rem Description: Windows equivalent of Unix which command
rem Author: Pankaj Kumar
rem Copyright 2004 Pankaj Kumar. All Rights Reserved.
rem License: This software is available under GPL (http://www.gnu.org/licenses/gpl.html)
rem ---------------------------------------------------------
setlocal
if " %1" == "" goto noArg |
Continue reading ‘Handy ‘which’ command on Windows’ »
February 10, 2010, 1:24 pm
September 15, 2009, 4:06 pm