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

Python Scripts in Windows?

Expand Messages
  • Draigh
    Hello everyone, First things first: Happy New Year! May you all have a healthy, lucky and most important loving new year. And now my question... I have my own
    Message 1 of 16 , Jan 1, 2003
    • 0 Attachment
      Hello everyone,
       
      First things first: Happy New Year!
      May you all have a healthy, lucky and most important loving new year.
       
      And now my question...
      I have my own server with Windows 2000 on it. I have MailEnable on it and it can use scripts. But ALL emails are send to the script.
      And the script is acting up because I cannot point to atlantis.py (Thera scripts) directly because then it doesnt use the python program to run it. Anyone ideas how to solve it?
       
      * I have tried to send it to python.exe which didnt work (no standard runnable script afaik)
      * Making a script.bat which puts it in a commandline doesnt seem to work either...
        ( python.exe atlantis.py %1 // where %1 is a reference to the incoming email)
       
       
      Thanks!
      Greetings,
      Draigh
    • Anthony Briggs
      ... This shouldn t be too much of an issue to fix. Thera throws up an error (via email) if it can t find the #atlantis or #end lines. You could just change it
      Message 2 of 16 , Jan 1, 2003
      • 0 Attachment
        At 6:16 PM +0100 1/1/03, Draigh wrote:
        >Hello everyone,
        >
        >First things first: Happy New Year!
        >May you all have a healthy, lucky and most important loving new year.
        >
        >And now my question...
        >I have my own server with Windows 2000 on it. I have MailEnable on
        >it and it can use scripts. But ALL emails are send to the script.

        This shouldn't be too much of an issue to fix. Thera throws up an
        error (via email) if it can't find the #atlantis or #end lines. You
        could just change it to log an error, rather than mail the sender
        back. The relevant part is this one (at line 122 of atlantis.py):

        # Fail nicely if we found the start of the turn, but not the end,
        # or vice-versa. If we find neither, that's ok, since they might
        # be submitting meta-orders...
        if (gotstart == 'yes') != (gotend == 'yes'):
        if gotend == 'yes':
        failnicely(mail['them'], 're:'+mail['subject'],
        'Couldn\'t find the #atlantis line in your orders',
        mail['gamename'], 'Unknown')
        else:
        failnicely(mail['them'], 're:'+mail['subject'],
        'Couldn\'t find the #end line in your orders',
        mail['gamename'], mail['factionnumber'])

        You could change this to something like:

        # Fail nicely if we found the start of the turn, but not the end,
        # or vice-versa. If we find neither, that's ok, since they might
        # be submitting meta-orders...
        if (gotstart == 'yes') != (gotend == 'yes'):
        if gotend == 'yes':
        log(logfile, mail['them']+' didn't have an #atlantis line.'
        sys.exit(0)
        else:
        log(logfile, mail['them']+' didn't have an #end line.'
        sys.exit(0)

        Note that I haven't tested this, but there's no reason it shouldn't
        work. It'll stop if it gets a #atlantis with no #end or vice-versa.

        >And the script is acting up because I cannot point to atlantis.py
        >(Thera scripts) directly because then it doesnt use the python
        >program to run it. Anyone ideas how to solve it?

        You don't say how exactly it's acting up, so I can't tell what it's
        meant to be doing. What happens if you try to run a script directly?

        >* I have tried to send it to python.exe which didnt work (no
        >standard runnable script afaik)
        >* Making a script.bat which puts it in a commandline doesnt seem to
        >work either...
        > ( python.exe atlantis.py %1 // where %1 is a reference to the
        >incoming email)

        You could try giving it the full python path, eg.
        C:\PROGRA~1\PYTHON\PYTHON.EXE, or whatever the python path is in
        windows.

        Have you checked the server logs (especially the MailEnable ones) to
        see if it gives you any hints as to what's going wrong? Does thera
        give you any errors in it's logs?

        Hope this helps,

        Anthony
        --
        ----------------------------------------------------
        HyPEraCtiVE? HeY, WhO aRE YoU cALliNg HypERaCtIve?!
        aBRiGgS@...
        ----------------------------------------------------
      • Draigh
        If I run a script directly in windows, then it works because it automatically uses python to open it. But if the email software tries to open it then it just
        Message 3 of 16 , Jan 2, 2003
        • 0 Attachment
          If I run a script directly in windows, then it works because it automatically uses python to open it.
          But if the email software tries to open it then it just fails. I only get the error that it couldnt run. Thera still hasnt reached the point of generating any log at all.
           
          The .bat file seems to be working at least partly. But even then it doesnt work as it should...
          And I used the full python path, which didnt matter at all. It does open the file there but refuses somewhere when reading the email-header.
           
           
          I think I will write something else to handle this.. Unless anyone has any good ideas?
          *sigh* But school first :(
          I hoped to start the new year with a game over here.. But that will take a whole lot longer now...
           
          Thanks anyway!
          Draigh
           
          ----- Original Message -----
          Sent: Thursday, January 02, 2003 3:07 AM
          Subject: Re: [atlantisdev] Python Scripts in Windows?

          At 6:16 PM +0100 1/1/03, Draigh wrote:
          >Hello everyone,
          >
          >First things first: Happy New Year!
          >May you all have a healthy, lucky and most important loving new year.
          >
          >And now my question...
          >I have my own server with Windows 2000 on it. I have MailEnable on
          >it and it can use scripts. But ALL emails are send to the script.

          This shouldn't be too much of an issue to fix. Thera throws up an
          error (via email) if it can't find the #atlantis or #end lines. You
          could just change it to  log an error, rather than mail the sender
          back. The relevant part is this one (at line 122 of atlantis.py):

          # Fail nicely if we found the start of the turn, but not the end,
          # or vice-versa. If we find neither, that's ok, since they might
          # be submitting meta-orders...
          if (gotstart == 'yes') != (gotend == 'yes'):
               if gotend == 'yes':
                   failnicely(mail['them'], 're:'+mail['subject'],
                              'Couldn\'t find the #atlantis line in your orders',
                              mail['gamename'], 'Unknown')
               else:
                   failnicely(mail['them'], 're:'+mail['subject'],
                              'Couldn\'t find the #end line in your orders',
                              mail['gamename'], mail['factionnumber'])

          You could change this to something like:

          # Fail nicely if we found the start of the turn, but not the end,
          # or vice-versa. If we find neither, that's ok, since they might
          # be submitting meta-orders...
          if (gotstart == 'yes') != (gotend == 'yes'):
               if gotend == 'yes':
                   log(logfile, mail['them']+' didn't have an #atlantis line.'
                   sys.exit(0)
               else:
                   log(logfile, mail['them']+' didn't have an #end line.'
                   sys.exit(0)

          Note that I haven't tested this, but there's no reason it shouldn't
          work. It'll stop if it gets a #atlantis with no #end or vice-versa.

          >And the script is acting up because I cannot point to atlantis.py
          >(Thera scripts) directly because then it doesnt use the python
          >program to run it. Anyone ideas how to solve it?

          You don't say how exactly it's acting up, so I can't tell what it's
          meant to be doing. What happens if you try to run a script directly?

          >* I have tried to send it to python.exe which didnt work (no
          >standard runnable script afaik)
          >* Making a script.bat which puts it in a commandline doesnt seem to
          >work either...
          >   ( python.exe atlantis.py %1 // where %1 is a reference to the
          >incoming email)

          You could try giving it the full python path, eg.
          C:\PROGRA~1\PYTHON\PYTHON.EXE, or whatever the python path is in
          windows.

          Have you checked the server logs (especially the MailEnable ones) to
          see if it gives you any hints as to what's going wrong? Does thera
          give you any errors in it's logs?

          Hope this helps,

          Anthony
          --
          ----------------------------------------------------
          HyPEraCtiVE?  HeY, WhO aRE YoU cALliNg HypERaCtIve?!
          aBRiGgS@...
          ----------------------------------------------------


          To Post a message, send it to:   atlantisdev@...
          To Unsubscribe, send a blank message to: atlantisdev-unsubscribe@...


          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        • Andrey Repin
          Greetings, Draigh! D If I run a script directly in windows, then it works because it D automatically uses python to open it. D But if the email software
          Message 4 of 16 , Jan 2, 2003
          • 0 Attachment
            Greetings, Draigh!

            D> If I run a script directly in windows, then it works because it
            D> automatically uses python to open it.
            D> But if the email software tries to open it then it just fails. I only get
            D> the error that it couldnt run. Thera still hasnt reached the point of
            D> generating any log at all.

            Hm..
            If your Python processor can ignore EXTPROC command in first line of
            script... Solution may be very sample:

            -- some.bat --
            EXTPROC X:\DIR\PATH\python.exe

            ....
            py commands
            ....
            -- some.bat --


            --
            WBR,

            Andrey Repin (yahoo@...-net.ru) 02.01.2003, <18:03>
            Sorry for my terrible english...
          • Anthony Briggs
            ... Sounds like your email program isn t opening the script properly, or isn t feeding it the right stuff, or isn t using python when running the script. Might
            Message 5 of 16 , Jan 2, 2003
            • 0 Attachment
              At 10:03 AM +0100 2/1/03, Draigh wrote:
              >If I run a script directly in windows, then it works because it
              >automatically uses python to open it.
              >But if the email software tries to open it then it just fails. I
              >only get the error that it couldnt run. Thera still hasnt reached
              >the point of generating any log at all.

              Sounds like your email program isn't opening the script properly, or
              isn't feeding it the right stuff, or isn't using python when running
              the script.

              Might be time to read your mail server's documentation, or email
              them. I can't see anything about scripting support in the docs on
              their web site, though.

              > The .bat file seems to be working at least partly. But even then it
              >doesnt work as it should...
              >And I used the full python path, which didnt matter at all. It does
              >open the file there but refuses somewhere when reading the
              >email-header.

              Thera refuses? Or the mail program refuses?

              >I think I will write something else to handle this.. Unless anyone
              >has any good ideas?

              Well, it's probably going to be far easier to figure out why it's not
              working, rather than roll your own separate email handler. Try a
              simple script which prints (or logs) it's input - that might help you
              find out which headers are missing.

              Anthony
              --
              ----------------------------------------------------
              HyPEraCtiVE? HeY, WhO aRE YoU cALliNg HypERaCtIve?!
              aBRiGgS@...
              ----------------------------------------------------
            • Draigh
              ... Sounds like your email program isn t opening the script properly, or isn t feeding it the right stuff, or isn t using python when running the script. Might
              Message 6 of 16 , Jan 2, 2003
              • 0 Attachment

                At 10:03 AM +0100 2/1/03, Draigh wrote:
                >If I run a script directly in windows, then it works because it
                >automatically uses python to open it.
                >But if the email software tries to open it then it just fails. I
                >only get the error that it couldnt run. Thera still hasnt reached
                >the point of generating any log at all.

                Sounds like your email program isn't opening the script properly, or
                isn't feeding it the right stuff, or isn't using python when running
                the script.

                Might be time to read your mail server's documentation, or email
                them. I can't see anything about scripting support in the docs on
                their web site, though.
                MailEnable can handle events (like an incoming email). Normally it uses VB scripts. But it can only point to ONE thing only and it passes it on like:
                <program email connectiontype>
                The script is not an executable and thats where it stops. I cannot give it the assignment to start python with a certain script and pass the mail through that. And there is not much more documentation available on these events.

                >  The .bat file seems to be working at least partly. But even then it
                >doesnt work as it should...
                >And I used the full python path, which didnt matter at all. It does
                >open the file there but refuses somewhere when reading the
                >email-header.

                Thera refuses? Or the mail program refuses?
                 
                Thera refuses. I did this testing it by hand.
                 


                >I think I will write something else to handle this.. Unless anyone
                >has any good ideas?

                Well, it's probably going to be far easier to figure out why it's not
                working, rather than roll your own separate email handler. Try a
                simple script which prints (or logs) it's input - that might help you
                find out which headers are missing.
                I tested it, and it already refuses with the very first header. I was thinking about writing something in c++ and letting it check all the emails in the directory. If its an Atlantis email then getting the orders out of it and into a file. But before I have that program it will be a lot of time later... Especially because school goes first and I have exams in two weeks.
                 

                Anthony
                --
                ----------------------------------------------------
                HyPEraCtiVE?  HeY, WhO aRE YoU cALliNg HypERaCtIve?!
                aBRiGgS@...
                ----------------------------------------------------
              • Draigh
                This is written in the .bat file? I will try it. Hopefully it works. What does it mean anyway? :D Grz. Draigh ... From: Andrey Repin To: Draigh Sent: Thursday,
                Message 7 of 16 , Jan 2, 2003
                • 0 Attachment
                  This is written in the .bat file?
                  I will try it. Hopefully it works.
                  What does it mean anyway? :D
                   
                  Grz.
                  Draigh
                  ----- Original Message -----
                  To: Draigh
                  Sent: Thursday, January 02, 2003 4:14 PM
                  Subject: Re[2]: [atlantisdev] Python Scripts in Windows?

                  Greetings, Draigh!

                  D> If I run a script directly in windows, then it works because it
                  D> automatically uses python to open it.
                  D> But if the email software tries to open it then it just fails. I only get
                  D> the error that it couldnt run. Thera still hasnt reached the point of
                  D> generating any log at all.

                  Hm..
                  If your Python processor can ignore EXTPROC command in first line of
                  script... Solution may be very sample:

                  -- some.bat --
                  EXTPROC X:\DIR\PATH\python.exe

                  ....
                  py commands
                  ....
                  -- some.bat --


                  --
                  WBR,

                      Andrey Repin (yahoo@...-net.ru) 02.01.2003, <18:03>
                  Sorry for my terrible english...



                  To Post a message, send it to:   atlantisdev@...
                  To Unsubscribe, send a blank message to: atlantisdev-unsubscribe@...


                  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
                • Anthony Briggs
                  ... How does it feed the email to the program? I suspect this might be where the problem lies - there s no equivalent to stdin on windows. Thera expects it s
                  Message 8 of 16 , Jan 2, 2003
                  • 0 Attachment
                    At 5:28 PM +0100 2/1/03, Draigh wrote:
                    >MailEnable can handle events (like an incoming email). Normally it
                    >uses VB scripts. But it can only point to ONE thing only and it
                    >passes it on like:
                    ><program email connectiontype>
                    >The script is not an executable and thats where it stops. I cannot
                    >give it the assignment to start python with a certain script and
                    >pass the mail through that. And there is not much more documentation
                    >available on these events.

                    How does it feed the email to the program? I suspect this might be
                    where the problem lies - there's no equivalent to stdin on windows.
                    Thera expects it's email to be fed in through stdin.

                    >> >The .bat file seems to be working at least partly. But even then it
                    >> >doesnt work as it should...
                    >> >And I used the full python path, which didnt matter at all. It does
                    >> >open the file there but refuses somewhere when reading the
                    >> >email-header.
                    >>
                    >>Thera refuses? Or the mail program refuses?
                    >
                    >Thera refuses. I did this testing it by hand.

                    What error or exception does it give you? Normally it'll log an error
                    to either the logfile within the game's directory, or to a generic
                    logfile in your base atlantis directory if it can't find the game
                    name from the email.

                    >> >I think I will write something else to handle this.. Unless anyone
                    >> >has any good ideas?
                    >>
                    >>Well, it's probably going to be far easier to figure out why it's not
                    >>working, rather than roll your own separate email handler. Try a
                    >>simple script which prints (or logs) it's input - that might help you
                    >>find out which headers are missing.
                    >>
                    >>I tested it, and it already refuses with the very first header.

                    Does it give you any error messages?

                    >>I was thinking about writing something in c++ and letting it check
                    >>all the emails in the directory. If its an Atlantis email then
                    >>getting the orders out of it and into a file. But before I have
                    >>that program it will be a lot of time later... Especially because
                    >>school goes first and I have exams in two weeks.

                    Doing something like that in c++ isn't going to be trivial, though.
                    Perl or python are better bets. It's probably even going to be easier
                    in VB, which might make integration with your mail server easier too.

                    Anthony
                    --
                    ----------------------------------------------------
                    HyPEraCtiVE? HeY, WhO aRE YoU cALliNg HypERaCtIve?!
                    aBRiGgS@...
                    ----------------------------------------------------
                  • Draigh
                    There are no errors logged anywhere. And it runs a program and gives it some arguments (the email is one of them) And I dont know any other useful languages to
                    Message 9 of 16 , Jan 2, 2003
                    • 0 Attachment
                      There are no errors logged anywhere. And it runs a program and gives it some arguments (the email is one of them)
                       
                      And I dont know any other useful languages to program in. Especially any that should work here. So I am leaving the mail server functionalities and start a background program that checks the mailbox for emails and inserts that in the game directory as the submitted orders.. 
                       
                      Unless, again, any of you know something to get it working properly.
                      (still have to try the .bat thingy didnt have time yet to do anything about it.)
                       
                      Greetings,
                      Draigh
                      ----- Original Message -----
                      Sent: Friday, January 03, 2003 2:25 AM
                      Subject: Re: [atlantisdev] Python Scripts in Windows?

                      At 5:28 PM +0100 2/1/03, Draigh wrote:
                      >MailEnable can handle events (like an incoming email). Normally it
                      >uses VB scripts. But it can only point to ONE thing only and it
                      >passes it on like:
                      ><program email connectiontype>
                      >The script is not an executable and thats where it stops. I cannot
                      >give it the assignment to start python with a certain script and
                      >pass the mail through that. And there is not much more documentation
                      >available on these events.

                      How does it feed the email to the program? I suspect this might be
                      where the problem lies - there's no equivalent to stdin on windows.
                      Thera expects it's email to be fed in through stdin.

                      >>  >The .bat file seems to be working at least partly. But even then it
                      >>  >doesnt work as it should...
                      >>  >And I used the full python path, which didnt matter at all. It does
                      >>  >open the file there but refuses somewhere when reading the
                      >>  >email-header.
                      >>
                      >>Thera refuses? Or the mail program refuses?
                      >
                      >Thera refuses. I did this testing it by hand.

                      What error or exception does it give you? Normally it'll log an error
                      to either the logfile within the game's directory, or to a generic
                      logfile in your base atlantis directory if it can't find the game
                      name from the email.

                      >>  >I think I will write something else to handle this.. Unless anyone
                      >>  >has any good ideas?
                      >>
                      >>Well, it's probably going to be far easier to figure out why it's not
                      >>working, rather than roll your own separate email handler. Try a
                      >>simple script which prints (or logs) it's input - that might help you
                      >>find out which headers are missing.
                      >>
                      >>I tested it, and it already refuses with the very first header.

                      Does it give you any error messages?

                      >>I was thinking about writing something in c++ and letting it check
                      >>all the emails in the directory. If its an Atlantis email then
                      >>getting the orders out of it and into a file. But before I have
                      >>that program it will be a lot of time later... Especially because
                      >>school goes first and I have exams in two weeks.

                      Doing something like that in c++ isn't going to be trivial, though.
                      Perl or python are better bets. It's probably even going to be easier
                      in VB, which might make integration with your mail server easier too.

                      Anthony
                      --
                      ----------------------------------------------------
                      HyPEraCtiVE?  HeY, WhO aRE YoU cALliNg HypERaCtIve?!
                      aBRiGgS@...
                      ----------------------------------------------------
                    • Rick C
                      From: Anthony Briggs ... Heh, who told you that? It s there, just a little harder to get to.
                      Message 10 of 16 , Jan 2, 2003
                      • 0 Attachment
                        From: "Anthony Briggs" <abriggs@...>

                        > How does it feed the email to the program? I suspect this might be
                        > where the problem lies - there's no equivalent to stdin on windows.
                        > Thera expects it's email to be fed in through stdin.

                        Heh, who told you that? It's there, just a little harder to get to.
                      • Anthony Briggs
                        ... Nobody told me that -- I ve just never seen it used. Maybe you could help Draig? I m a little out of my depth with the intricacies of windows... Anthony --
                        Message 11 of 16 , Jan 2, 2003
                        • 0 Attachment
                          At 12:24 AM -0500 3/1/03, Rick C wrote:
                          >From: "Anthony Briggs" <abriggs@...>
                          >
                          >> How does it feed the email to the program? I suspect this might be
                          >> where the problem lies - there's no equivalent to stdin on windows.
                          >> Thera expects it's email to be fed in through stdin.
                          >
                          >Heh, who told you that? It's there, just a little harder to get to.

                          Nobody told me that -- I've just never seen it used. Maybe you could
                          help Draig? I'm a little out of my depth with the intricacies of
                          windows...

                          Anthony
                          --
                          ----------------------------------------------------
                          HyPEraCtiVE? HeY, WhO aRE YoU cALliNg HypERaCtIve?!
                          aBRiGgS@...
                          ----------------------------------------------------
                        • Rick C
                          From: Anthony Briggs ... I m tempted to tell him to just skip it and use cygwin. I ll take a look if i have time tomorrow. I was
                          Message 12 of 16 , Jan 2, 2003
                          • 0 Attachment
                            From: "Anthony Briggs" <abriggs@...>

                            > At 12:24 AM -0500 3/1/03, Rick C wrote:

                            > >From: "Anthony Briggs" <abriggs@...>
                            > >> How does it feed the email to the program? I suspect this might be
                            > >> where the problem lies - there's no equivalent to stdin on windows.
                            > >> Thera expects it's email to be fed in through stdin.
                            > >Heh, who told you that? It's there, just a little harder to get to.

                            > Nobody told me that -- I've just never seen it used. Maybe you could
                            > help Draig? I'm a little out of my depth with the intricacies of
                            > windows...

                            I'm tempted to tell him to just skip it and use cygwin. I'll take a look if
                            i have time tomorrow. I was skipping the early parts of this thread, I'll
                            have to go back thru the archives and catch up.

                            Draig, do you have python.exe registered to handle .py files? (IE, if you
                            double-click a python script in Windows Explorer, will it run, or will you
                            get the "please choose a handler" dialog?)
                          • Draigh
                            Registered. It will run the file automatically. But the email software doesnt do that.... - Draigh ... From: Rick C To: atlantisdev@yahoogroups.com Sent:
                            Message 13 of 16 , Jan 3, 2003
                            • 0 Attachment
                              Registered. It will run the file automatically.
                              But the email software doesnt do that....
                               
                              - Draigh
                              ----- Original Message -----
                              From: Rick C
                              Sent: Friday, January 03, 2003 7:35 AM
                              Subject: Re: [atlantisdev] Python Scripts in Windows?

                              From: "Anthony Briggs" <abriggs@...>

                              > At 12:24 AM -0500 3/1/03, Rick C wrote:

                              > >From: "Anthony Briggs" <abriggs@...>
                              > >>  How does it feed the email to the program? I suspect this might be
                              > >>  where the problem lies - there's no equivalent to stdin on windows.
                              > >>  Thera expects it's email to be fed in through stdin.
                              > >Heh, who told you that?  It's there, just a little harder to get to.

                              > Nobody told me that -- I've just never seen it used. Maybe you could
                              > help Draig? I'm a little out of my depth with the intricacies of
                              > windows...

                              I'm tempted to tell him to just skip it and use cygwin.  I'll take a look if
                              i have time tomorrow.  I was skipping the early parts of this thread, I'll
                              have to go back thru the archives and catch up.

                              Draig, do you have python.exe registered to handle .py files?  (IE, if you
                              double-click a python script in Windows Explorer, will it run, or will you
                              get the "please choose a handler" dialog?)



                              To Post a message, send it to:   atlantisdev@...
                              To Unsubscribe, send a blank message to: atlantisdev-unsubscribe@...


                              Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
                            • Rick C
                              From: Draigh ... Heh. Considered running a different SMTP server? :) I ll look into this a bit later, I don t have time today. Got up
                              Message 14 of 16 , Jan 3, 2003
                              • 0 Attachment
                                From: "Draigh" <draigh@...>
                                >Registered. It will run the file automatically.
                                >But the email software doesnt do that....

                                Heh. Considered running a different SMTP server? :)

                                I'll look into this a bit later, I don't have time today. Got up late, kids
                                have to go to the dentist, then i have to go to work...
                              • Andrey Repin
                                Greetings, Draigh! D This is written in the .bat file? Yes ;) D I will try it. Hopefully it works. D What does it mean anyway? :D It is external processor
                                Message 15 of 16 , Jan 3, 2003
                                • 0 Attachment
                                  Greetings, Draigh!

                                  D> This is written in the .bat file?

                                  Yes ;)

                                  D> I will try it. Hopefully it works.
                                  D> What does it mean anyway? :D

                                  It is "external processor" support available in NT's cmd.exe and in 4NT (as
                                  it is sucessor/replacement for default/stupid/non-intuitive cmd.exe)


                                  --
                                  WBR,

                                  Andrey Repin (yahoo@...-net.ru) 03.01.2003, <23:53>
                                  Sorry for my terrible english...
                                • Andrey Repin
                                  Greetings, Rick C! RC Draig, do you have python.exe registered to handle .py files? (IE, if you RC double-click a python script in Windows Explorer, will it
                                  Message 16 of 16 , Jan 3, 2003
                                  • 0 Attachment
                                    Greetings, Rick C!

                                    RC> Draig, do you have python.exe registered to handle .py files? (IE, if you
                                    RC> double-click a python script in Windows Explorer, will it run, or will you
                                    RC> get the "please choose a handler" dialog?)

                                    You are pointed out of range available for services in NT environment, AFAIK.
                                    Service will try to use CreatePrecess*, instead of ShellExecute (but, IE WILL
                                    use ShellExecute*).

                                    .bat file can be executed through CreateProcess by default - see PATHEXT
                                    variable for complete list of extensins, but if .py not present in this list
                                    (in words - no ActiveScript support available for python on this machine),
                                    you cannot "run" python script directly and you must use ShellExecute*
                                    instead of CreateProcess* to run .py scripts.


                                    --
                                    WBR,

                                    Andrey Repin (yahoo@...-net.ru) 04.01.2003, <00:03>
                                    Sorry for my terrible english...
                                  Your message has been successfully submitted and would be delivered to recipients shortly.