Loading ...
Sorry, an error occurred while loading the content.

344Re: [NTS] Using Python instead of Perl

Expand Messages
  • acummingsus
    Oct 19, 2005
      Hi Rick,

      Have you tried

      ^$GetDosOutput("whatever command")$

      sometimes GetDosOutput works

      other times GetOutput works

      Of the two, Perl generally seems to like the GetDosOutput better.

      I suppose your Python binary and pertinent libraries are in your OS
      environment search path or otherwise you'd also have a problem in a
      console too. (and you don't have prob in console)

      None of those search paths in $PATH (for Python) have a space in the
      path? I'm thinking: if space then ntb may need use of the GetShort()

      Perl has no space in path. Likely Python doesn't either.

      I'd try Python now. But I'm too far along down (or up) into the
      *depth* of the Perl pool or lake or whatever it is. And, vision sees
      Perl falling together before too long now.

      I'll try Python after that happens.

      Alan.

      --- In ntb-scripts@yahoogroups.com, "rpdooling" <rpdooling@y...> wrote:
      >
      > Jason,
      >
      > For purposes of comparison, this DOES work:
      >
      > ^!Info ^$GetOutput(python -c "import sys;print sys.version")$
      >
      > So I'm thinking it's some quirk in Python or NoteTab that sends the
      > output of a regular commandline Python command to StdErr.err instead
      > of allowing NoteTab to grab it with the ^$GetOutput()$ function.
      >
      > Oh well.
      >
      > rd
      >
      > --- In ntb-scripts@yahoogroups.com, "rpdooling" <rpdooling@y...> wrote:
      > >
      > > Jason,
      > >
      > > Any idea why I can't get something like this to work? It works fine
      > > from the command line no matter what directory I'm in.
      > >
      > > ^!Info ^$GetOutput("python -V")$
      > >
      > > --- In ntb-scripts@yahoogroups.com, "Jason Morgan" <jason@d...> wrote:
      > > >
      > > > Rick,
      > > >
      > > > From my point of view, Python is much easier to understand than
      Perl.
      > > > If you have any experience with other Object Oriented languages,
      > such as
      > > > C/C++, Python should be a snap for you.
      [ . . ]
    • Show all 19 messages in this topic