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

6400Re: [edit+] perl newbie question

Expand Messages
  • peter anderson
    Sep 8, 2009
    • 0 Attachment
      Some programming languages (Python is one) whose code expects user
      input in the EditPlus "Output Window" will not run. Normal
      print("...") type statements work but input("...") does not. The
      following lines of Python demonstrate the problem:

      # Get the message to decode
      inString = raw_input("Please enter the ASCII encoded message: ")

      results in the following message

      ---------- Python 3 ----------
      This script ...

      Traceback (most recent call last):
      File "numbers2text.py", line 40, in <module>
      File "numbers2text.py", line 28, in main
      inString = raw_input("Please enter the ASCII encoded message: ")
      NameError: global name 'raw_input' is not defined

      Output completed (0 sec consumed) - Normal Termination

      I get round this by using GUI dialogues for user input; messy but I
      set up Clip Lib code to make it easier.


      There is nothing more difficult to take in hand, more perilous to
      conduct, or more uncertain in its success, than to take the lead in
      the introduction of a new order of things -- Niccolo Machiavelli, The
      Prince, ch. 6
    • Show all 5 messages in this topic