I try not to top-post in this group, but the strange formatting of the message makes this advisable, as I am sure many people won't even persist in reading down as far as the "content".
Can I make a wild-assed guess that you are a Lotus Notes user reading python-list? Please try and find a way of not barfing these awful headers out with your post (perhaps you could use a newsgroup reader and access the gmane servers?). It really does make it difficult to focus on what you say when there are twenty-odd lines of badly-formatted heading information at the start of each message. regards Steve [EMAIL PROTECTED] wrote: > > > Internet > > [EMAIL PROTECTED] > > > To > > python-list > Sent by: > cc > python-list-bounces+matthew.warren=uk.bnpparibas.com@ > > python.org > Subject > Re: > Why chdir command doesn't work with > 05/02/2008 19:39 > client.get_transport() ? > > > > > > > > > > > > > > > > > > > > > > > >> Thank you, Matt, for your valuable advice! I did try using ';' to issue > three >> commands at once and it works! >> >> However, I have more problems with issuing ClearCase commands, which is > what >> I am really doing. >> >> 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?) > > I'm not familiar with cleartool - could it be that the first command you > are using is invoking an application that is not returning to the command > line?, for example, if you were telnetted in and doing the same would you > literally type > > $>ct setview viewName > $>cd /some/where > > or does the session look more like > > $>ct setview viewName > _new_ct_prompt> exit > $>cd /some/where > > If that is the case, it mightbe possible to direct ct to get it's input > from a file > > ct setview viewName < exitfile; cd /some/where > > and exitfile has the word 'exit' in it. > > just an idea though. may not work. > > >> 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 >> not be executed. And it is useless to do it in the next exec_command() >> function. (Without the first command, one can not cd into a directory in >> ClearCase.) > > I'm a bit confused here. - Do you have an application called 'ct' (from > previous paragraph, it appears you do. But if you are issuing 'ct' via > python and getting 'bad phone number'??) Can you explain the bigger > picture a bit more, and what ClearCase is? > > Why do you say 'Even if ct was recognized, the second command would not be > executed' - if ct was recognised and returns to the command line prompt I > would fully expect the second command to execute. > > >> Do you think that paramiko can replace telnet in my application? Thanks. > > I think it would be taking it a bit far if you are just trying to automate > something unless you really have to run on a remote machine. Then either > telnet or paramiko should work. You could also maybe look at using python > to invoke rsh/rexec processes if telnet was suitable in the first place. > > Matt > > > > > > > > This message and any attachments (the "message") is > intended solely for the addressees and is confidential. > If you receive this message in error, please delete it and > immediately notify the sender. Any use not in accord with > its purpose, any dissemination or disclosure, either whole > or partial, is prohibited except formal approval. The internet > can not guarantee the integrity of this message. > BNP PARIBAS (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. > Do not print this message unless it is necessary, > consider the environment. > > --------------------------------------------- > > Ce message et toutes les pieces jointes (ci-apres le > "message") sont etablis a l'intention exclusive de ses > destinataires et sont confidentiels. Si vous recevez ce > message par erreur, merci de le detruire et d'en avertir > immediatement l'expediteur. Toute utilisation de ce > message non conforme a sa destination, toute diffusion > ou toute publication, totale ou partielle, est interdite, sauf > autorisation expresse. L'internet ne permettant pas > d'assurer l'integrite de ce message, BNP PARIBAS (et ses > filiales) decline(nt) toute responsabilite au titre de ce > message, dans l'hypothese ou il aurait ete modifie. > N'imprimez ce message que si necessaire, > pensez a l'environnement. -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list