noob question How do I run a Python script.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CarlP

    #1

    noob question How do I run a Python script.

    How do I run a Python script. I have one that gmail loader needs to
    run on my email box. Here's the script

    In 2004, when Gmail was launched, I was amazed by the incredibly large 1GB capacity of the free service. The ability to instantly search a large volume of email was amazing. As someone who never de…


    I can't seem to find what I need to run it. I installed python, run
    the interpreter and the script , but all it will do is say invalid
    syntax.


    Thanks

  • kyosohma@gmail.com

    #2
    Re: noob question How do I run a Python script.

    On Jun 28, 12:17 pm, CarlP <carlpurp...@ho tmail.comwrote:
    How do I run a Python script. I have one that gmail loader needs to
    run on my email box. Here's the script
    >
    In 2004, when Gmail was launched, I was amazed by the incredibly large 1GB capacity of the free service. The ability to instantly search a large volume of email was amazing. As someone who never de…

    >
    I can't seem to find what I need to run it. I installed python, run
    the interpreter and the script , but all it will do is say invalid
    syntax.
    >
    Thanks
    Please post the traceback too. That will aid in helping you.

    Mike

    Comment

    • Matimus

      #3
      Re: noob question How do I run a Python script.

      I installed python, run the interpreter and the script...

      Are you trying to run the script from the interpreter? You _can_ run
      scripts from the interpreter, but it isn't as simple as typing the
      name of the script. To me, that is what it sounds like you are trying
      to do. I don't know what environment you are using, but at the command
      line (terminal) you should just type the following to run the script:

      python cleanmbox.py

      Actually, if you are using *nix use chmod +x chanmbox.py to tell the
      os it is executable, and then just run "cleanbox.p y". If you are using
      windows, then you don't even have to do that, just double click on it.

      -Matt


      Comment

      • Bruno Desthuilliers

        #4
        Re: noob question How do I run a Python script.

        CarlP a écrit :
        How do I run a Python script.
        usually, it's:

        $ python /path/to/somescript.py arg1 argN

        on a command line prompt.
        I have one that gmail loader needs to
        run on my email box. Here's the script
        >
        In 2004, when Gmail was launched, I was amazed by the incredibly large 1GB capacity of the free service. The ability to instantly search a large volume of email was amazing. As someone who never de…

        >
        I can't seem to find what I need to run it. I installed python, run
        the interpreter and the script , but all it will do is say invalid
        syntax.
        Am I right if I guess you did something like :

        bruno@bibi ~ $ python
        Python 2.4.3 (#1, Mar 12 2007, 23:32:01)
        [GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on
        linux2
        Type "help", "copyright" , "credits" or "license" for more information.
        >>cleanmbox.p y testmbox
        File "<stdin>", line 1
        cleanmbox.py testmbox
        ^
        SyntaxError: invalid syntax
        >>>
        ?-)


        FWIW, I ran the script (the correct way) on a copy of a mozilla mbox
        dir, and it seemed to work.

        Comment

        Working...