in python , could I accomplish the purpose that "a=Console.read()" used in C?

Discussion in 'Python' started by python, Jun 4, 2006.

  1. python

    python Guest

    in python , could I accomplish the purpose that "a=Console.read()" used
    in C?
    when program is running, I wanna add a statement like
    "a=Console.read()" in C language,it will wait for user's input, after
    user's typing a character , and click "enter" key, the program will go
    on running.
     
    python, Jun 4, 2006
    #1
    1. Advertising

  2. Re: in python , could I accomplish the purpose that "a=Console.read()"used in C?

    python wrote:
    > in python , could I accomplish the purpose that "a=Console.read()" used
    > in C?
    > when program is running, I wanna add a statement like
    > "a=Console.read()" in C language,it will wait for user's input, after
    > user's typing a character , and click "enter" key, the program will go
    > on running.
    >



    Use raw_input() <http://docs.python.org/lib/built-in-funcs.html>:

    age = raw_input("Your age: ")
    print age


    Bye,
    Dennis
     
    Dennis Benzinger, Jun 4, 2006
    #2
    1. Advertising

  3. Re: [OT] in python , could I accomplish the purpose that "a=Console.read()"used in C?

    python a écrit :
    > in python , could I accomplish the purpose that "a=Console.read()" used
    > in C?


    <ot mode='pedantic'>
    There's nothing like "Console.read()" in ansi-C.
    </ot>

    (see Dennis's post for the answer to your question)
     
    Bruno Desthuilliers, Jun 5, 2006
    #3
  4. python

    Ravi Teja Guest

    Bruno Desthuilliers wrote:
    > python a écrit :
    > > in python , could I accomplish the purpose that "a=Console.read()" used
    > > in C?

    >
    > <ot mode='pedantic'>
    > There's nothing like "Console.read()" in ansi-C.
    > </ot>


    He probably got it mixed up with C# which ( almost - Console.Read() )
    has that.
     
    Ravi Teja, Jun 5, 2006
    #4
  5. Re: in python , could I accomplish the purpose that "a=Console.read()"used in C?

    Ravi Teja a écrit :
    > Bruno Desthuilliers wrote:
    >
    >>python a écrit :
    >>
    >>>in python , could I accomplish the purpose that "a=Console.read()" used
    >>>in C?

    >>
    >><ot mode='pedantic'>
    >>There's nothing like "Console.read()" in ansi-C.
    >></ot>

    >
    >
    > He probably got it mixed up with C# which ( almost - Console.Read() )
    > has that.
    >

    Yeps. Or may be MS-C++ too AFAICT.
     
    Bruno Desthuilliers, Jun 5, 2006
    #5
    1. Advertising

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. shland
    Replies:
    4
    Views:
    583
    shland
    Oct 20, 2003
  2. Biffo

    Best method to accomplish?

    Biffo, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    331
    Biffo
    Feb 3, 2005
  3. glunk
    Replies:
    4
    Views:
    409
    Steve Horsley
    Jun 30, 2004
  4. Sid
    Replies:
    5
    Views:
    1,087
  5. Augustine Kaplan

    what could you accomplish with a degree?

    Augustine Kaplan, May 19, 2004, in forum: Python
    Replies:
    0
    Views:
    313
    Augustine Kaplan
    May 19, 2004
Loading...

Share This Page