From: Sebastien M. <seb...@ig...> - 2006-03-09 14:34:15
|
Hello, I would like to know if there is a way to manipulate standard error=20 redirection into pymol scripting language ? Thanks --=20 S=E9bastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS UPR 2589 163 Avenue de Luminy, case 934 13288 Marseille cedex 9 (France) |
From: gilleain t. <gil...@gm...> - 2006-03-10 00:16:28
|
Hello, yes. maybe. if you are talking about printing to standard error, then : import sys sys.stderr.write("hello, stderr!") will do it. if, on the other hand, you mean something more complicated to do with manipulating the shell ("redirection"...?) than I don't know, sorry. gilleain torrance On 3/9/06, Sebastien Moretti <seb...@ig...> wrote: > > Hello, > I would like to know if there is a way to manipulate standard error > redirection into pymol scripting language ? > > Thanks > > -- > S=E9bastien Moretti > http://www.igs.cnrs-mrs.fr/ > CNRS - IGS UPR 2589 > 163 Avenue de Luminy, case 934 > 13288 Marseille cedex 9 (France) > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users > |
From: Sebastien M. <seb...@ig...> - 2006-03-10 16:29:27
|
> Hello, >=20 > yes. maybe. if you are talking about printing to standard error, then : >=20 > import sys > sys.stderr.write("hello, stderr!") >=20 > will do it. >=20 > if, on the other hand, you mean something more complicated to do with=20 > manipulating the shell ("redirection"...?) than I don't know, sorry. >=20 > gilleain torrance I would like to change the current path for stderr to /dev/null by exampl= e. I have a plugin which creates a legend box from a fake (empty) apdb map.=20 Instruction, which loads the map, sends an error message and I would=20 like to hide it. How can I do ? Thanks >=20 > Hello, > I would like to know if there is a way to manipulate standard error > redirection into pymol scripting language ? >=20 > Thanks --=20 S=E9bastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS UPR 2589 163 Avenue de Luminy, case 934 13288 Marseille cedex 9 (France) |
From: Jules J. <jo...@he...> - 2006-03-10 16:58:07
|
Hi, If you are getting unwanted PyMOL standard errors you can turn them off using the cmd.feedback() commands: cmd.feedback('disable', 'selector', 'everything') cmd.feedback('disable', 'executive', 'everything') to turn them on again: cmd.feedback('enable', 'selector', 'everything') cmd.feedback('enable', 'executive', 'everything') cmd.feedback('disable', 'all', 'everything') will do exactly as it says on the tin. otherwise maybe use a Python try:/except: clause? eg: try: Instructions to load the map (cmd.load(map)?) except: raise IOError('') Jules Sebastien Moretti wrote: >> Hello, >> >> yes. maybe. if you are talking about printing to standard error, then : >> >> import sys >> sys.stderr.write("hello, stderr!") >> >> will do it. >> >> if, on the other hand, you mean something more complicated to do with >> manipulating the shell ("redirection"...?) than I don't know, sorry. >> >> gilleain torrance > > I would like to change the current path for stderr to /dev/null by example. > > I have a plugin which creates a legend box from a fake (empty) apdb map. > Instruction, which loads the map, sends an error message and I would > like to hide it. > > How can I do ? > > Thanks > >> >> Hello, >> I would like to know if there is a way to manipulate standard error >> redirection into pymol scripting language ? >> >> Thanks > |
From: Sebastien M. <seb...@ig...> - 2006-03-13 08:25:16
|
> Hi, >=20 > If you are getting unwanted PyMOL standard errors you can turn them off= =20 > using the cmd.feedback() commands: >=20 > cmd.feedback('disable', 'selector', 'everything') > cmd.feedback('disable', 'executive', 'everything') >=20 >=20 > to turn them on again: >=20 > cmd.feedback('enable', 'selector', 'everything') > cmd.feedback('enable', 'executive', 'everything') >=20 > cmd.feedback('disable', 'all', 'everything') will do exactly as it says= =20 > on the tin. >=20 > otherwise maybe use a Python try:/except: clause? >=20 > eg: >=20 > try: > Instructions to load the map (cmd.load(map)?) > except: > raise IOError('') >=20 >=20 > Jules It's this kind of manipulation I want. Thanks >>> Hello, >>> >>> yes. maybe. if you are talking about printing to standard error, then= : >>> >>> import sys >>> sys.stderr.write("hello, stderr!") >>> >>> will do it. >>> >>> if, on the other hand, you mean something more complicated to do with= =20 >>> manipulating the shell ("redirection"...?) than I don't know, sorry. >>> >>> gilleain torrance >> >> >> I would like to change the current path for stderr to /dev/null by=20 >> example. >> >> I have a plugin which creates a legend box from a fake (empty) apdb=20 >> map. Instruction, which loads the map, sends an error message and I=20 >> would like to hide it. >> >> How can I do ? >> >> Thanks >> >>> >>> Hello, >>> I would like to know if there is a way to manipulate standard err= or >>> redirection into pymol scripting language ? >>> >>> Thanks --=20 S=E9bastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS UPR 2589 163 Avenue de Luminy, case 934 13288 Marseille cedex 9 (France) |
From: Peter A. M. <pa...@co...> - 2006-03-10 21:11:10
|
> > I would like to change the current path for stderr to /dev/null by > example. > > I have a plugin which creates a legend box from a fake (empty) apdb map. > Instruction, which loads the map, sends an error message and I would > like to hide it. > > How can I do ? Create a new script (pymol.bash) containing these lines: #!/usr/bin/env bash pymol.com 2>/dev/null This could probably be done within pymol.com itself as well, but someone else will have to point out how to do that (aka I don't know how). As a side question, why have a csh script with a .com extension? Pete Pete Meyer Fu Lab BMCB grad student Cornell University |