4 Replies - 2120 Views - Last Post: 20 August 2012 - 01:56 PM Rate Topic: -----

#1 Region  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-July 12

Stuff about User Input

Posted 19 August 2012 - 08:54 PM

Is there any way that you can have a user input, well, input without it being a raw_, or normal input?
I'm trying to run a class file by opening the program and entering the part of the class.
There is also nothing special about what is inside of it, just some inputs, generations, and loops.
Is This A Good Question/Topic? 0
  • +

Replies To: Stuff about User Input

#2 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Stuff about User Input

Posted 19 August 2012 - 09:21 PM

I'm not totally sure I understand the question... but I think the answer might be command line arguments. Here's a quick tutorial on it and here's a library that might help.
Was This Post Helpful? 0
  • +
  • -

#3 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Stuff about User Input

Posted 20 August 2012 - 09:08 AM

I re-read your post and still don't fully understand it, but I did remember one other alternative. You can use sys.stdin if for some reason you don't want to use Python's clear and simple raw_input/input functions.
Was This Post Helpful? 0
  • +
  • -

#4 Region  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-July 12

Re: Stuff about User Input

Posted 20 August 2012 - 12:12 PM

Before i read the Tutorial, I'll try to clarify. I want to be able to call on a class in a program i opened by double clicking it.
Was This Post Helpful? 0
  • +
  • -

#5 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Stuff about User Input

Posted 20 August 2012 - 01:56 PM

define "call on a class"

Are you saying you want to:

double click on an icon (presumably from a windows desktop)
have a console open up
and have the code associated with creating an instance of a class execute?

This post has been edited by atraub: 20 August 2012 - 02:01 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1