help debugging stdin in Komodo, IDLE, or PythonWin

Discussion in 'Python' started by Pete Jereb, Oct 2, 2003.

  1. Pete Jereb

    Pete Jereb Guest

    I am really stuck here. I would love to use an IDE to debug my
    programs, but they are all set to accept input from stdin, ie

    python rdip.py < scriptfile.txt


    I can't figure out how to do this in PythonWin, IDLE, or Komodo.
    Help! I've been poring through manuals and google for hours trying to
    figure this out.
     
    Pete Jereb, Oct 2, 2003
    #1
    1. Advertisements

  2. Pete Jereb

    Nick Vargish Guest

    (Pete Jereb) writes:

    > I am really stuck here. I would love to use an IDE to debug my
    > programs, but they are all set to accept input from stdin, ie
    > python rdip.py < scriptfile.txt


    Okay, this doesn't actually solve your problem, but it's a
    work-around.

    sys.stdin = file('scriptfile.txt', 'r')

    Comment that line out when you aren't running under the IDE. It's a
    cheap hack, but at least you only need to add one line...

    Nick

    --
    # sigmask || 0.2 || 20030107 || public domain || feed this to a python
    print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
     
    Nick Vargish, Oct 2, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. stephan
    Replies:
    0
    Views:
    610
    stephan
    Jul 30, 2003
  2. Tuure Laurinolli

    IDLE; Pythonwin and windows network drives

    Tuure Laurinolli, Jul 1, 2004, in forum: Python
    Replies:
    3
    Views:
    506
    David Fraser
    Jul 1, 2004
  3. Thomas Lindgaard

    Komodo, debugging and multi-threading

    Thomas Lindgaard, Aug 9, 2004, in forum: Python
    Replies:
    2
    Views:
    407
    Thomas Lindgaard
    Aug 10, 2004
  4. Tim Rice
    Replies:
    1
    Views:
    514
    Tom B.
    Aug 28, 2004
  5. Will McGugan

    Slow debugging with Komodo

    Will McGugan, Oct 23, 2004, in forum: Python
    Replies:
    5
    Views:
    403
    Trent Mick
    Oct 26, 2004
  6. fortepianissimo
    Replies:
    2
    Views:
    492
    fortepianissimo
    Jan 3, 2006
  7. Replies:
    1
    Views:
    335
    Trent Mick
    Mar 10, 2007
  8. Eric Promislow
    Replies:
    2
    Views:
    186
    Gene Tani
    Oct 13, 2005
Loading...