[Top][All Lists]

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

[ESPResSo] Re: using external arguments in a tcl script

From: Ulf Schiller
Subject: [ESPResSo] Re: using external arguments in a tcl script
Date: Tue, 04 Sep 2007 12:44:36 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.1.3)

-------- Original Message --------
Subject: Re: [ESPResSo] RE: using  external arguments in a tcl script
Date: Mon, 3 Sep 2007 09:28:29 -0700 (PDT)
From: Christopher Jesudason <address@hidden>
To: Olaf Lenz <address@hidden>
CC: ESPResSo users' mailing list <address@hidden>

The output for the input is as follows:
address@hidden tests]$ ./espa argment2.tcl A B C

This passes all arguments from the commandline to ./espa.
Make sure that they are passed on to ESPResSo from your script.


0: Script directory:

*                    - Espresso -
*                    ============
*      A MPI Parallel Molecular Dynamics Program
* (c) 2002-2006
* Max-Planck-Institute for Polymer Research
* Mainz, Germany

the command was: argment2.tcl
The first argument was:  1
The  arguments were :   1
number of words was:   1
 and the tcl script was
#### tricking... the line after a these comments are
interpreted as standard shell script \
 exec $ESPRESSO_SOURCE/Espresso $0 $*

puts "the command was: $argv0"
puts "The first argument was:  [lindex $argv 0]"
puts "The  arguments were :   $argv"
puts "number of words was:   $argc"
and espa just contained the path to the bin  and
Espresso. I use this path for all my runs that has
given proper values.Clearly I am not getting a proper
reading  for $argv.
Any suggestions for the sake of Espresso?

Learn shell first.

--- Olaf Lenz <address@hidden> wrote:

Hash: SHA1

Hi Christopher,

Christopher Jesudason wrote:
when I am in the tcl shell with prompt say tclsh>
I can refer to the external variables A B C inside
the tcl script X.tcl in the statement > tclsh>  X.tcl A B C  > by
referring to them from the  &argvo, &argv and
variables. But I find this is not possible in
for some reason. Is there a workaround for this,
or is
there a special command for this feature?

I'm sorry, I do not understand the problem.
Are you referring to executing Espresso
interactively, like


without an argument, or are you referring to
starting non-interactive, like

        Espresso X.tcl A B C

In the first case, $argv is empty, in the second
case, $argv contains
the strings "A" "B" and "C".
Both cases work the same in Espresso and in tclsh,
at least here.
Could you specify the problem?


Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


____________________________________________________________________________________Ready for the edge of your
Check out tonight's top picks on Yahoo! TV.

ESPResSo mailing list

This email was Anti Virus checked by Astaro Security Gateway.

Christoph Junghans
Max Planck Institute for Polymer Research
Theory Group
POBox 3148
D 55021 Mainz, Germany

Phone: +49 6131 379 335

reply via email to

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