Re: Question : Input after all prompts in python

2018-06-12 Thread mohan4h
On Tuesday, June 12, 2018 at 7:37:25 PM UTC+8, Bart wrote: > On 11/06/2018 12:16, Steven D'Aprano wrote: > > On Mon, 11 Jun 2018 01:44:19 -0700, mohan4h wrote: > > > >> Everyone, > >> > >> I am very new to python. I am trying to achieve the below in it, but i > >> am unable to find suitable docume

Re: Question : Input after all prompts in python

2018-06-12 Thread Bart
On 11/06/2018 12:16, Steven D'Aprano wrote: On Mon, 11 Jun 2018 01:44:19 -0700, mohan4h wrote: Everyone, I am very new to python. I am trying to achieve the below in it, but i am unable to find suitable documentation to guide me on the same. I want to prompt 3 questions together and then get

Re: Question : Input after all prompts in python

2018-06-11 Thread Steven D'Aprano
On Mon, 11 Jun 2018 07:19:15 -0700, mohan4h wrote: > print(u"\u001b[{}A".format(n), flush=True, end="") > ^ > SyntaxError :invalid syntax My crystal ball tell me you are using Python 2. Is that right? -- Steven D'Aprano "Ever since I learne

Re: Question : Input after all prompts in python

2018-06-11 Thread Wolfgang Maier
On 06/11/2018 04:19 PM, moha...@gmail.com wrote: BTW i tried the code above, but i encountered a syntax error. print(u"\u001b[{}A".format(n), flush=True, end="") ^ SyntaxError :invalid syntax That's probably because you have been running

Re: Question : Input after all prompts in python

2018-06-11 Thread mohan4h
On Monday, June 11, 2018 at 9:13:04 PM UTC+8, Karsten Hilbert wrote: > On Mon, Jun 11, 2018 at 02:52:53PM +0200, Peter Otten wrote: > > > If the above hack works in the OP's environment it's certainly as easy as > > it > > can get; he just has to copy the up() and right() functions, and maybe >

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
On Mon, Jun 11, 2018 at 02:52:53PM +0200, Peter Otten wrote: > If the above hack works in the OP's environment it's certainly as easy as it > can get; he just has to copy the up() and right() functions, and maybe adapt > the arguments. > > The learning curve for tkinter or curses is steep by co

Re: Question : Input after all prompts in python

2018-06-11 Thread Peter Otten
Karsten Hilbert wrote: > On Mon, Jun 11, 2018 at 02:14:26PM +0200, Peter Otten wrote: > >> >> print("1. Enter your name :") >> >> print("2. Enter your age :") >> >> print("3. Enter your gender :") >> >> name = input("") >> >> age = input("") >> >> gender = input("") >> > >> > That doesn't solve

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
On Mon, Jun 11, 2018 at 02:14:26PM +0200, Peter Otten wrote: > >> print("1. Enter your name :") > >> print("2. Enter your age :") > >> print("3. Enter your gender :") > >> name = input("") > >> age = input("") > >> gender = input("") > > > > That doesn't solve the "next to" part in > > > > get i

Re: Question : Input after all prompts in python

2018-06-11 Thread Peter Otten
Karsten Hilbert wrote: > On Mon, Jun 11, 2018 at 11:16:39AM +, Steven D'Aprano wrote: > >> > I want to prompt 3 questions together and then get input for the first >> > question next to question as below. >> > >> > 1. Enter your name : _ >> > 2. Enter your age : >> > 3. Enter your gender : >

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
On Mon, Jun 11, 2018 at 11:16:39AM +, Steven D'Aprano wrote: > > I want to prompt 3 questions together and then get input for the first > > question next to question as below. > > > > 1. Enter your name : _ > > 2. Enter your age : > > 3. Enter your gender : > > > > After showing the below pr

Re: Question : Input after all prompts in python

2018-06-11 Thread Steven D'Aprano
On Mon, 11 Jun 2018 01:44:19 -0700, mohan4h wrote: > Everyone, > > I am very new to python. I am trying to achieve the below in it, but i > am unable to find suitable documentation to guide me on the same. > > I want to prompt 3 questions together and then get input for the first > question next

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
On Mon, Jun 11, 2018 at 01:44:19AM -0700, moha...@gmail.com wrote: > I am very new to python. I am trying to achieve the below in it, but i am > unable to find suitable documentation to guide me on the same. > > I want to prompt 3 questions together and then get input for the first > question n

Question : Input after all prompts in python

2018-06-11 Thread mohan4h
Everyone, I am very new to python. I am trying to achieve the below in it, but i am unable to find suitable documentation to guide me on the same. I want to prompt 3 questions together and then get input for the first question next to question as below. 1. Enter your name : _ 2. Enter your age