Dennis Lee Bieber
2/6/2008 6:33:00 AM
On Tue, 5 Feb 2008 11:39:23 -0800 (PST), Charles_hans
<charles_hans@yahoo.com> declaimed the following in comp.lang.python:
> Under telnet, I could issue commands one by one, just as typing at the
> command prompt. Now I tried to use ';' manually typing two commands at once
> on my Solaris command line, such as
>
> ct setview viewName; cd dir_in_clearcase
>
> (ct = cleartool) The second command will not be executed, since the command
> prompt changes after the first command. --- I think that it was because
> there was a long delay after the first command. (any way out?)
>
Part of the problem is that the "cleartool setview" command /itself/
spawns a new shell interpreter. It would be the same as (assuming one
is running, say, bash) entering "csh" at the prompt. An "exit" command
returns one to the prior shell.
Since the entire command line was being parsed by the outer shell,
the inner shell won't see the CD command.
> When I used exec_command() to do this in Python, even the first command was
> not recognized (error: bad phone number. I used 'man ct' and found that ct
> dials a phone number). Even if 'ct' was recognized, the second command would
>
Which basically demonstrated that the shell started from Python
didn't run the same initialization as your login <G>... Somewhere you
have a symbol definition for "ct" to "cleartool".
--
Wulfraed Dennis Lee Bieber KD6MOG
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/