Re: user input string to function

2017-12-25 Thread Nico Vogeli
Am Montag, 25. Dezember 2017 16:56:19 UTC+1 schrieb Chris Angelico: > On Tue, Dec 26, 2017 at 2:04 AM, Nico Vogeli wrote: > > Am Montag, 25. Dezember 2017 15:58:26 UTC+1 schrieb Chris Angelico: > >> On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: > >> > Am Montag, 25. Dezember 2017 14:51:21 U

Re: user input string to function

2017-12-25 Thread Chris Angelico
On Tue, Dec 26, 2017 at 2:04 AM, Nico Vogeli wrote: > Am Montag, 25. Dezember 2017 15:58:26 UTC+1 schrieb Chris Angelico: >> On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: >> > Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: >> >> On Tue, Dec 26, 2017 at 12:36 AM, Nico Vo

Re: user input string to function

2017-12-25 Thread Nico Vogeli
Am Montag, 25. Dezember 2017 15:58:26 UTC+1 schrieb Chris Angelico: > On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: > > Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: > >> On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: > >> > Hi everybody. First ad foremost, happy

Re: user input string to function

2017-12-25 Thread Chris Angelico
On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: > Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: >> On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: >> > Hi everybody. First ad foremost, happy Christmas! >> >> Same to you! >> >> > I want to let the use input a functio

Re: user input string to function

2017-12-25 Thread Nico Vogeli
Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: > On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: > > Hi everybody. First ad foremost, happy Christmas! > > Same to you! > > > I want to let the use input a function (like x**2) and parse it after that > > through code (fo

Re: user input string to function

2017-12-25 Thread Chris Angelico
On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: > Hi everybody. First ad foremost, happy Christmas! Same to you! > I want to let the use input a function (like x**2) and parse it after that > through code (for my numeric class) > > def newton(x0, s, s2, tol, n = 2): > ''' > Näh

Re: User Input

2013-06-12 Thread Dave Angel
On 05/30/2013 10:03 AM, Eternaltheft wrote: do you think ti would be better if i call drawBoard? Better is meaningless without context. Are you being charged per keystroke? -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: User Input

2013-05-30 Thread Joshua Landau
On 30 May 2013 15:47, Eternaltheft wrote: >> And perhaps you meant for your function to CALL drawBoard(), rather than >> returning the function object drawBoard. >> >> DaveA > > do you think it would be better if i call drawBoard? Please read http://www.catb.org/esr/faqs/smart-questions.html, or

Re: User Input

2013-05-30 Thread Eternaltheft
> And perhaps you meant for your function to CALL drawBoard(), rather than > returning the function object drawBoard. > DaveA do you think it would be better if i call drawBoard? -- http://mail.python.org/mailman/listinfo/python-list

Re: User Input

2013-05-30 Thread Eternaltheft
> And perhaps you meant for your function to CALL drawBoard(), rather than > > returning the function object drawBoard. > > DaveA do you think it would be better if i call drawBoard? -- http://mail.python.org/mailman/listinfo/python-list

Re: User Input

2013-05-30 Thread Mark Lawrence
On 30/05/2013 15:03, Eternaltheft wrote: do you think ti would be better if i call drawBoard? How would I know if you don't quote any context? -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence -- http://mail.python.org/mailman/li

Re: User Input

2013-05-30 Thread Eternaltheft
do you think ti would be better if i call drawBoard? -- http://mail.python.org/mailman/listinfo/python-list

Re: User Input

2013-05-30 Thread Dave Angel
On 05/30/2013 09:10 AM, Eternaltheft wrote: yeah i found out why it wasn't defined before because i tried to put it into a function. That's not a sentence, and it doesn't make sense in any permutation I can do on it. this is my drawBoard function: import turtle as Turtle Turtle.title("Ch

Re: User Input

2013-05-30 Thread Chris Angelico
On Thu, May 30, 2013 at 10:37 PM, Eternaltheft wrote: > sorry about that, i got confused xD. yeah it works good now. > what i meant to say was can i return a function that i made, if the user > inputs nothing? Sure! Anything you want to do, you can do :) ChrisA -- http://mail.python.org/mailma

Re: User Input

2013-05-30 Thread Eternaltheft
yeah i found out why it wasn't defined before because i tried to put it into a function. this is my drawBoard function: import turtle as Turtle Turtle.title("Checkers") b = 75 def drawBoard(b): Turtle.speed(0) Turtle.up() Turtle.goto(-4 * b, 4 * b) Turtle.down() for i

Re: User Input

2013-05-30 Thread Dave Angel
On 05/30/2013 08:37 AM, Eternaltheft wrote: sorry about that, i got confused xD. yeah it works good now. what i meant to say was can i return a function that i made, if the user inputs nothing? There wouldn't be anything to stop you. However, if you have multiple returns from the same funct

Re: User Input

2013-05-30 Thread Eternaltheft
sorry about that, i got confused xD. yeah it works good now. what i meant to say was can i return a function that i made, if the user inputs nothing? -- http://mail.python.org/mailman/listinfo/python-list

Re: User Input

2013-05-30 Thread Chris Angelico
On Thu, May 30, 2013 at 10:19 PM, Eternaltheft wrote: > Ok thanks guys. but when i use > > filename = input('file name: ') > if not filename: #i get filename is not defined > return(drawBoard) #possible to return function when no file input from > user? Do you really want to return ther

Re: User Input

2013-05-30 Thread Fábio Santos
On 30 May 2013 13:24, "Eternaltheft" wrote: > > Ok thanks guys. but when i use > > filename = input('file name: ') > if not filename: #i get filename is not defined > return(drawBoard) #possible to return function when no file input from user? I don't really understand what you mean. Do

Re: User Input

2013-05-30 Thread Eternaltheft
Ok thanks guys. but when i use filename = input('file name: ') if not filename: #i get filename is not defined return(drawBoard) #possible to return function when no file input from user? -- http://mail.python.org/mailman/listinfo/python-list

Re: User Input

2013-05-30 Thread Fábio Santos
On 30 May 2013 12:58, "Eternaltheft" wrote: > > On Thursday, May 30, 2013 7:33:41 PM UTC+8, Eternaltheft wrote: > > Hi, I'm having trouble oh how prompt the user to enter a file name and how to set up conditions. For example, if there's no file name input by the user, a default is returned > > Tha

Re: User Input

2013-05-30 Thread MRAB
On 30/05/2013 12:48, Eternaltheft wrote: On Thursday, May 30, 2013 7:33:41 PM UTC+8, Eternaltheft wrote: Hi, I'm having trouble oh how prompt the user to enter a file name and how to set up conditions. For example, if there's no file name input by the user, a default is returned Thanks for suc

Re: User Input

2013-05-30 Thread Chris Angelico
On Thu, May 30, 2013 at 9:48 PM, Eternaltheft wrote: > On Thursday, May 30, 2013 7:33:41 PM UTC+8, Eternaltheft wrote: >> Hi, I'm having trouble oh how prompt the user to enter a file name and how >> to set up conditions. For example, if there's no file name input by the >> user, a default is re

Re: User Input

2013-05-30 Thread Eternaltheft
On Thursday, May 30, 2013 7:33:41 PM UTC+8, Eternaltheft wrote: > Hi, I'm having trouble oh how prompt the user to enter a file name and how to > set up conditions. For example, if there's no file name input by the user, a > default is returned Thanks for such a fast reply! and no im not using r

Re: User Input

2013-05-30 Thread Fábio Santos
On 30 May 2013 12:42, "Eternaltheft" wrote: > > Hi, I'm having trouble oh how prompt the user to enter a file name and how to set up conditions. For example, if there's no file name input by the user, a default is returned Are you using raw_input? It returns an empty string if the user enters not

Re: User input masks - Access Style

2011-01-01 Thread flebber
On Jan 1, 11:13 am, Tim Harig wrote: > On 2010-12-31, flebber wrote: > > > On Dec 28 2010, 12:21 am, Adam Tauno Williams > > wrote: > >> On Sun, 2010-12-26 at 20:37 -0800, flebber wrote: > >> > Is there anyay to use input masks in python? Similar to the function > >> > found in access where a us

Re: User input masks - Access Style

2010-12-31 Thread Tim Harig
On 2010-12-31, flebber wrote: > On Dec 28 2010, 12:21 am, Adam Tauno Williams > wrote: >> On Sun, 2010-12-26 at 20:37 -0800, flebber wrote: >> > Is there anyay to use input masks in python? Similar to the function >> > found in access where a users input is limited to a type, length and >> > form

Re: User input masks - Access Style

2010-12-31 Thread flebber
On Dec 28 2010, 12:21 am, Adam Tauno Williams wrote: > On Sun, 2010-12-26 at 20:37 -0800, flebber wrote: > > Is there anyay to use input masks in python? Similar to the function > > found in access where a users input is limited to a type, length and > > format. > >

Re: User input masks - Access Style

2010-12-31 Thread flebber
On Dec 28 2010, 12:21 am, Adam Tauno Williams wrote: > On Sun, 2010-12-26 at 20:37 -0800, flebber wrote: > > Is there anyay to use input masks in python? Similar to the function > > found in access where a users input is limited to a type, length and > > format. > >

Re: User input masks - Access Style

2010-12-27 Thread Adam Tauno Williams
On Sun, 2010-12-26 at 20:37 -0800, flebber wrote: > Is there anyay to use input masks in python? Similar to the function > found in access where a users input is limited to a type, length and > format. Typically this is handled by a call

Re: Fw: Re: User input masks - Access Style

2010-12-27 Thread flebber
On Dec 27, 7:57 pm, linmq wrote: > > On 2010-12-27, flebber   wrote: > > >  > Is there anyay to use input masks in python? Similar to the function > >  > found in access where a users input is limited to a type, length and > >  > format. > > >  > So in my case I want to ensure that numbers are sav

Fw: Re: User input masks - Access Style

2010-12-27 Thread linmq
> On 2010-12-27, flebber wrote: > > > Is there anyay to use input masks in python? Similar to the function > > found in access where a users input is limited to a type, length and > > format. > > > So in my case I want to ensure that numbers are saved in a basic > > format. > > 1) Currency

Re: User input masks - Access Style

2010-12-26 Thread flebber
On Dec 27, 6:01 pm, Tim Harig wrote: > On 2010-12-27, flebber wrote: > > > Is there anyay to use input masks in python? Similar to the function > > found in access where a users input is limited to a type, length and > > format. > > > So in my case I want to ensure that numbers are saved in a bas

Re: User input masks - Access Style

2010-12-26 Thread Tim Harig
On 2010-12-27, Tim Harig wrote: > ... if re.match(r'''^[0-9]{2}:[0-9]{2}:[0-9]{2}$''', timeInput) == None: [SNIP] > Currency works the same way using validating it against: > r'''[0-9]+\.[0-9]{2}''' Sorry, you need to check to make sure that there are no trailing characters as in the example abov

Re: User input masks - Access Style

2010-12-26 Thread Tim Harig
On 2010-12-27, flebber wrote: > Is there anyay to use input masks in python? Similar to the function > found in access where a users input is limited to a type, length and > format. > > So in my case I want to ensure that numbers are saved in a basic > format. > 1) Currency so input limited to 000

Re: User input with a default value that can be modified

2007-05-28 Thread half . italian
On May 28, 11:52 am, "Etienne Hilson" <[EMAIL PROTECTED]> wrote: > Hello the list :-) > > I do a little program that permit the user to manage list of sentences. > This program runs into a linux shell. > The user can add, modify and delete the sentences. > > What I want to do is : > > When the user

Re: User input with a default value that can be modified

2007-05-28 Thread half . italian
On May 28, 11:52 am, "Etienne Hilson" <[EMAIL PROTECTED]> wrote: > Hello the list :-) > > I do a little program that permit the user to manage list of sentences. > This program runs into a linux shell. > The user can add, modify and delete the sentences. > > What I want to do is : > > When the user