Screen Input() for filling list to be used later in program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ballensr
    New Member
    • Mar 2012
    • 3

    Screen Input() for filling list to be used later in program

    Is it possible to use a screen input() function to enter data from the keyboard into a list consisting of multiple x and y positional values, i.e., ([x1,y1], [x2,y2], etc.) that can then be called for later processing?

    If so, please show a simple example in Python 2.6 source code.

    Thanks,



    end
    Last edited by bvdet; Mar 14 '12, 08:50 PM. Reason: Remove email address for protection of poster
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Yes. Show us what you have tried so far.

    I would suggest prompting the user for several entries in this format: "x,y" You can split the x and y values on the comma. If the user enters a blank, proceed to process the list.

    Comment

    • ballensr
      New Member
      • Mar 2012
      • 3

      #3
      Thanks for your response,

      The Python tutorial examples all show any lists included in a script before the script is run. I have written the Surveyor's Formula program in Liberty BASIC with a user's screen input function but cannot determine how to do the same in Python. I just need a simple example of a screen user forming and filling a list after a Python script has commenced.

      end

      Comment

      • dwblas
        Recognized Expert Contributor
        • May 2008
        • 626

        #4
        Try EasyGUI for the input http://easygui.sourceforge.net/tutorial/index.html If you don't know how to put the input into a list then you want to check out one of the tutorials as this is basic and in every complete Python book/tutorial.

        Comment

        • ballensr
          New Member
          • Mar 2012
          • 3

          #5
          I had considered EasyGUI Multienter. I had searched four Python books and two tutorials but have not found an example of what I need.

          Thanks for your response.

          WDA

          end

          Comment

          Working...