gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] --foo syntax meaning, conventions etc.


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] --foo syntax meaning, conventions etc.
Date: Sun, 27 Mar 2005 05:18:51 +0200 (MEST)

> the convention
>       --talkback
> was used in the related thread however
>       --...
> 
> was also used in some of the discussion about gnumed configuration
> 
> I can't tell if the usage for such --items is related, whether it is 
> part of a general Python convention or Python required method etc. 
> What can I put over on the wiki* that people should understand 
> "--foo" to be referring to, especially if it pertains to coding or 
> module-writing guidelines?
> 
Ok. Don't worry. It has nothing to do with coding or module-writing.
Do you know the conncept of commandline switches ?

On Unix systems they are fairly common.
Let's say you have a programm called 'ping' which lets you check if a host
in a network is alive. If you type ping at the commandline it will output:

Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
            [-M mtu discovery hint] [-S sndbuf]
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination

Ok. ping did not know what to do because you did not supply any tasks to it.
So ping actually called 'ping --help' to give you some help.

Same goes for gnumed.
if you type 'python gnumed.py --help' you will see this:

help requested
--------------
GNUmed
======
This is the launcher for the main GNUmed GUI client. It is
intended to be used as a standalone program.

Command line arguments:

--quiet
 Be extra quiet and show only _real_ errors in the log.
--debug
 Be extra verbose and report nearly everything that's going
 on. Useful for, well, debugging :-)
--profile=<file>
 Activate profiling and write profile data to <file>.
--talkback
 Run the client and upon exiting run a talkback client where
 you can enter a comment and send the log off to the bug hunters.
 Very useful when used in conjunction with --debug.
--text-domain=<a text domain>
 Set this to change the name of the language file to be loaded.
 Note, this does not change the directory the file is searched in,
 only the name of the file where messages are loaded from. The
 standard textdomain is, of course, "gnumed.mo".
--log-file=<a log file>
 Use this to change the name of the log file.
 See gmLog.py to find out where the standard log file would
 end up.
--conf-file=<file>
 Use configuration file <file> instead of searching for it in
 standard locations.
--help, -h, or -?
 Well, show this help.

License: GPL (details at http://www.gnu.org)

So what's the message ? Users with a Unix background usually know about
this. Users with OSs like MaxOSX or Windows which are ususally well
protected from the commandline (:-) don't really have to woory about it
since it is not essential. It can still be used on those OSs as well without
problems.
 
One thing you could put in the wiki is the output of --help.
Users won't usually fiddle with that. Developers should grasp the concept
quickly. I am afraid talking to much about this in userspace with confuse
potential users. 

Sebastian

-- 
*************************************************************************
*
* help solving the protein folding problem
foldingathome.stanford.edu   
*          
* sign the linux driver petion :
http://www.libranet.com/petition.html
*
*************************************************************************

Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]