On 15/11/17 22:16, Eddio 0141 wrote:
> Hi.
> I've been searching on google about inputting to own stdin and press enter
> but so far i haven't found anything at all.
You need to give us a bit more context. This doesn't look like
standard library stuff so which package are you using? (Is that
what
Hi.
I've been searching on google about inputting to own stdin and press enter
but so far i haven't found anything at all.
so what im trying to do is the chatterbot function i got on python doesn't
seem to accept string as an input and always wants a console input and
Enter
(the line -> response =
niyanax...@gmail.com wrote:
> How do I know write the loop code for the table for both inputfiles,
> Table1.txt and Table2.txt and make a third table from the elements
> multiplied in table1.txt and table2.txt. I'm trying to Check the size of
> the two tables to make sure they both have the same n
How do I know write the loop code for the table for both inputfiles, Table1.txt
and Table2.txt and make a third table from the elements multiplied in
table1.txt and table2.txt. I'm trying to Check the size of the two tables to
make sure they both have the same number of rows and columns o If the
Ian D Wrote in message:
> ___
> Tutor maillist - Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
When making an amendment to a post, please reply to that post;
don't start a new
On 04/02/14 09:01, Ian D wrote:
I used to use 2.7 and the input was pretty when inputting a numeric
value, it would just get cast to an int.
Just to be picky it would get converted to an int not cast
as an int.
casting and converting are two very different things.
casting means treat a bit pa
Ian D wrote:
> Hello
>
> I used to use 2.7 and the input was pretty when inputting a numeric value,
> it would just get cast to an int.
>
> Seems that 3.3 I have to cast each input so :
> float(num1 = input("Enter a number")
You mean
num1 = float(input("Enter a number"))
> Is this just t
num1 = float(input("enter a number "))
I meant
not
float(num1 = input("Enter a number"))
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org
Hello
I used to use 2.7 and the input was pretty when inputting a numeric value, it
would just get cast to an int.
Seems that 3.3 I have to cast each input so :
float(num1 = input("Enter a number")
Is this just they way it is now? Is there a way to get back to just typing:
num1 = input("Ent
On 01/09/13 22:53, Nick Wilson wrote:
Enter command: print
--
Code Price Quant Value
--
The bit above needs to be printed once, at the start
TPW 2.00 5 10.00
This bit needs to be repeated for eac
On 1/9/2013 17:53, Nick Wilson wrote:
> Hi,
Welcome.
Please start over with a text message. Your html email is useless to
me, and probably most people on this newsgroup.
5
10.00--Total
cost:
10.00==**(T
Hi,
I am trying to create a portfolio of shares, each share is entered manually
while checking it against a list of actual share codes.Its working mostly as
intended at the moment, except when I print the table out at the end, I want
all entered details printed as such
Enter command: addEnter sh
Hey Dave, you're right. I worked through this with a for loop and set the
contents of a dict's key as the input.
Thanks!
Leam
On Thu, Aug 15, 2013 at 8:28 PM, Dave Angel wrote:
> leam hall wrote:
>
> > I'm trying to take input from a file (CSV spreadsheet) and use the first
> > line inputs (h
leam hall wrote:
> I'm trying to take input from a file (CSV spreadsheet) and use the first
> line inputs (header) as the names of lists. So far I'm not successful. :)
>
> How do I take line_list[0], the result of "line.split(',')" and use it as
> the name of a list? Does that make sense?
>
No,
On 13/08/13 16:46, leam hall wrote:
I'm trying to take input from a file (CSV spreadsheet) and use the first
line inputs (header) as the names of lists. So far I'm not successful. :)
Have you tried the csv module?
Usually you use a dictionary keyed by the first line values though.
But i#'m s
I'm trying to take input from a file (CSV spreadsheet) and use the first
line inputs (header) as the names of lists. So far I'm not successful. :)
How do I take line_list[0], the result of "line.split(',')" and use it as
the name of a list? Does that make sense?
Thanks!
Leam
--
Mind on a Mis
Thanks for everything. I'll keep this in mind as I continue coding.___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Tue, Sep 18, 2012 at 1:23 PM, Scott Yamamoto
wrote:
>
> 1) expect: raw_input to assign the variable to ""
> 2)No output to stderr; has a loading symbol after hitting enter without input
> (tried both input and raw_input)
> Doesn't affect active interpreter. Only affects the screen with the run
0) using mobile yahoo mail
1) expect: raw_input to assign the variable to ""
2)No output to stderr; has a loading symbol after hitting enter without input
(tried both input and raw_input)
Doesn't affect active interpreter. Only affects the screen with the run
option.
3)
def simulation():
import
On Sep 18, 2012 10:02 AM, "Oscar Benjamin"
wrote:
>
>
> On Sep 18, 2012 7:14 AM, "Steven D'Aprano"
wrote:
> >
Apologies for gmail screwing up your name. I wish I could use mutt on this
machine.
Oscar
___
Tutor maillist - Tutor@python.org
To unsubscr
On Sep 18, 2012 7:14 AM, "Steven D'Aprano" wrote:
>
> On Tue, Sep 18, 2012 at 12:04:22AM -0400, Dave Angel wrote:
> > Somehow you managed to put your other message in its own thread, instead
> > of adding to this one.
>
> Not all mail clients support threading, either when receiving or
> sending.
On 09/18/2012 02:12 AM, Steven D'Aprano wrote:
> On Tue, Sep 18, 2012 at 12:04:22AM -0400, Dave Angel wrote:
>> On 09/17/2012 11:11 PM, Scott Yamamoto wrote:
>>> I've been trying to find possible erros with input(such as NameError or
>>> SyntaxError) to handle them with an except clause. however,
On Mon, Sep 17, 2012 at 09:19:41PM -0700, Scott Yamamoto wrote:
> 2.7.2 on python for ios(platform is darwin)
> problem reoccured
What problem? Your code works for me.
Please describe:
1) what you expect to happen
2) what actually happens
3) if there is a traceback, COPY AND PASTE the ENTIRE tra
On Tue, Sep 18, 2012 at 12:04:22AM -0400, Dave Angel wrote:
> On 09/17/2012 11:11 PM, Scott Yamamoto wrote:
> > I've been trying to find possible erros with input(such as NameError or
> > SyntaxError) to handle them with an except clause. however, I've found
> > that hitting enter/return while pr
2.7.2 on python for ios(platform is darwin)
problem reoccured
Script:
import random
username = ""
def playername():
global username
Mlist = ["name1","name2","name3"]
Flist = ["name4","name5", "name6"]
Llist = ["Lname1","Lname2","Lname3"]
username = raw_input("input your desired username:
On 09/17/2012 11:11 PM, Scott Yamamoto wrote:
> I've been trying to find possible erros with input(such as NameError or
> SyntaxError) to handle them with an except clause. however, I've found
> that hitting enter/return while prompted without inputting creates some kind
> of problem.
usern
Didnt show up at first. Result was an eof error (using input not raw_input)
Found with interactive interpreter___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
I've been trying to find possible erros with input(such as NameError or
SyntaxError) to handle them with an except clause. however, I've found that
hitting enter/return while prompted without inputting creates some kind of
problem.
>>>username = raw_input("Input a username: ")
Input a username:
> 3. fake defrag revisited (R. Alan Monroe)
> 4. Re: guess age programme (please help) (Alan Gauld)
>
>
> --
>
> Message: 1
> Date: Sat, 01 Oct 2011 12:36:57 +1000
> From: Steven D'Aprano
> To: tutor@pyt
Cameron Macleod wrote:
Hi,
When you type
Input("\n\nPress The Enter Key To Exit")
it forces you to press the enter key to close the program. Why is it the
enter key instead of e.g. the 'esc' key?
Because the convention is that you use the Enter key to ENTER
information. That's why it is cal
To:
Cc:
Subject: Re: [Tutor] Input
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
There is apparently a livewires package that may be of someuse.
On Sep 30, 2011 1:25 PM, "Dave Angel" wrote:
> On 09/30/2011 03:24 PM, Cameron Macleod wrote:
>> Hi,
>>
>> When you type
>>
>> Input("\n\nPress The Enter Key To Exit")
>>
>> it forces you to press the enter key to close the program. W
On 09/30/2011 03:24 PM, Cameron Macleod wrote:
Hi,
When you type
Input("\n\nPress The Enter Key To Exit")
it forces you to press the enter key to close the program. Why is it the
enter key instead of e.g. the 'esc' key?
The input() function (not the Input()) function accepts a line of text
Hi,
When you type
Input("\n\nPress The Enter Key To Exit")
it forces you to press the enter key to close the program. Why is it the
enter key instead of e.g. the 'esc' key?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o
you can use an re split...
import re
a=raw_input("Enter the number of your class in the school:")
regex = re.compile("[ ,]") #sets the delimeters to a single space or comma
m = regex.split(a)
if you want to use any white space character than you can use "[\s,]"
2010/9/23 Ahmed AL-Masri
> Hi,
Brian Jones wrote:
> No need for the 're' module. Even in the case where both can be used
> together, you can still just use string methods:
>
s
> '12, 13 14'
s.replace(',', '').split(' ')
> ['12', '13', '14']
I think to replace "," with " " and then split() without explicit separator
> > any one have an idea about how we can input many number in the one time and
> > change it to list.
> > for example:
> >
> > a=input("Enter the number of your class in the school:") # the number
> > can be enter as: 12,13,14 or 12 13 14 with a space in between.
> >
> > now how I can put th
On Sat, Sep 25, 2010 at 9:40 AM, Evert Rol wrote:
> > any one have an idea about how we can input many number in the one time
> and change it to list.
> > for example:
> >
> > a=input("Enter the number of your class in the school:") # the number
> can be enter as: 12,13,14 or 12 13 14 with a
> any one have an idea about how we can input many number in the one time and
> change it to list.
> for example:
>
> a=input("Enter the number of your class in the school:") # the number can
> be enter as: 12,13,14 or 12 13 14 with a space in between.
>
> now how I can put these numbers
Hi,
any one have an idea about how we can input many number in the one time and
change it to list.
for example:
a=input("Enter the number of your class in the school:") # the number can
be enter as: 12,13,14 or 12 13 14 with a space in between.
now how I can put these numbers into list like
"ANKUR AGGARWAL" wrote
Suppose i am taking input or various variables like
a=raw_input("...") //hello
b=raw_input("")//hi
but i want to run a common function when input is hello
so instead of
if a=="hello":
fun()
then again for b and then again for c then d and so
On Tue, Sep 14, 2010 at 6:45 AM, ANKUR AGGARWAL wrote:
> Suppose i am taking input or various variables like
> a=raw_input("...") //hello
> b=raw_input("")//hi
> c=raw_input("...")//hello
> d=raw_input("..")//hello
> but i want to run a common functi
ANKUR AGGARWAL wrote on 09/13/2010 04:45:41 PM:
> Suppose i am taking input or various variables like
> a=raw_input("...") //hello
> b=raw_input("")//hi
> c=raw_input("...")//hello
> d=raw_input("..")//hello
> but i want to run a common function when
Suppose i am taking input or various variables like
a=raw_input("...") //hello
b=raw_input("")//hi
c=raw_input("...")//hello
d=raw_input("..")//hello
but i want to run a common function when input is hello
so instead of
if a=="hello":
fun()
then aga
Please try and reply to the list instead of just me.
raw_input did not the trick.
fruit.count is the next exercise.
Oke, I deleted the initialazion and change teller into letter.
Roelof
Should be alright now.. Hmmm
Can you paste your exact code AND the error you're getting? As I
understand
On 08/22/2010 09:35 PM, Roelof Wobben wrote:
Hello,
I made this programm :
def count_letters(n,a):
count = 0
for char in n:
if char == a:
count += 1
return count
fruit=""
letter=""
fruit= input("Enter a sort of fruit: ")
teller = input("Enter the character which
On 8/22/10, Roelof Wobben wrote:
>
> Hello,
>
>
>
> I made this programm :
>
>
>
> def count_letters(n,a):
> count = 0
> for char in n:
> if char == a:
> count += 1
> return count
>
> fruit=""
> letter=""
> fruit= input("Enter a sort of fruit: ")
> teller = input("E
On 08/22/2010 09:35 PM, Roelof Wobben wrote:
Hello,
I made this programm :
def count_letters(n,a):
count = 0
for char in n:
if char == a:
count += 1
return count
fruit=""
letter=""
fruit= input("Enter a sort of fruit: ")
teller = input("Enter the character which
Hello,
I made this programm :
def count_letters(n,a):
count = 0
for char in n:
if char == a:
count += 1
return count
fruit=""
letter=""
fruit= input("Enter a sort of fruit: ")
teller = input("Enter the character which must be counted: ")
x=count_letters (f
Thanks for try but print without () does not work at all, at least in newer
version of python (3.1)
Anyway source of problem is now discovered: Komodo Edit tool, in Python
shell (IDLE) everything works fine. Perhaps anyone has any ideas why?
On Mon, Feb 15, 2010 at 10:02 PM, Grigor Kolev wrote:
В 10:06 -0500 на 15.02.2010 (пн), bob gailer написа:
> Yaraslau Shanhin wrote:
>
> > Hello All,
>
> Hello.
>
> Suggestion for future questions - just include enough to identify the
> problem. We don't need to know that this is from a tutorial or what the
> exercise is. Also (at least I prefer
On 15 February 2010 15:15, Yaraslau Shanhin wrote:
> Code:
> text = str(input("Type in some text: "))
> number = int(input("How many times should it be printed? "))
> print (text * number)
> Output:
> Type in some text: some
> How many times should it be printed? 5
> Traceback (most recent call la
Code:
text = str(input("Type in some text: "))
number = int(input("How many times should it be printed? "))
print (text * number)
Output:
Type in some text: some
How many times should it be printed? 5
Traceback (most recent call last):
File "test4.py", line 2, in
number = int(input("How ma
Yaraslau Shanhin wrote:
> Hello All,
Hello.
Suggestion for future questions - just include enough to identify the
problem. We don't need to know that this is from a tutorial or what the
exercise is. Also (at least I prefer) plain text without formatting or
color.
Sufficient therefore is:
Yaraslau Shanhin wrote:
Hello All,
I am working with Python tutorial in wiki and one of the exercises is as
follows:
Ask the user for a string, and then for a number. Print out that string,
that many times. (For example, if the string is hello and the number is 3 you
should print out hellohello
On Mon, Feb 15, 2010 at 8:23 AM, Yaraslau Shanhin <
yaraslau.shan...@gmail.com> wrote:
> Hello All,
>
> I am working with Python tutorial in wiki and one of the exercises is as
> follows:
>
> Ask the user for a string, and then for a number. Print out that string,
> that many times. (For example,
Hello All,
I am working with Python tutorial in wiki and one of the exercises is as
follows:
Ask the user for a string, and then for a number. Print out that string,
that many times. (For example, if the string is hello and the number is 3 you
should print out hellohellohello.)
Solution for this
2009/9/3 Albert-Jan Roskam :
> Hi,
>
> I'm wondering what is the most common method of input validation. See the
> example below.
> -Is the code below the most common/recognizable way something like this is
> done?
> -Which of the options #1 and #2 is the preferred method? Option #2 looks less
>
"Albert-Jan Roskam" wrote
I'm wondering what is the most common method of input validation.
Any and all of the methods will work in different situations but its
generally best to use duck typing and try to write code that works
for any type as far as possible.
Then use exceptions to catc
Hi,
I'm wondering what is the most common method of input validation. See the
example below.
-Is the code below the most common/recognizable way something like this is done?
-Which of the options #1 and #2 is the preferred method? Option #2 looks less
esoteric, but #1 seems better when you have
"Brain Stormer" <[EMAIL PROTECTED]> wrote
> Thanks for the file direction method but how do I get the names of
> the files
> so I can use it inside my program.
I'm not sure I understand.
Thepoint of using redirection is that your code doesn't need to know
anything about the files, it just read
Actually, Let me take that back with the raw_input comment since it is not
the idle issue but I didn't want to the program to be interactive so I
didn't want to wait for someone to put the information and press enter.
Thanks for the file direction method but how do I get the names of the files
so I
"Brain Stormer" <[EMAIL PROTECTED]> wrote
>I have a python program which works fine when run using idle but I
>would
> like call the program from the terminal.
>
> python test.py -i inputfile -o outputfile
Easier to use file redirection:
python test.py < inputfile > outputfile
The -i flag in
I used the optparse module since that is exactly what I wanted. Here is my
code:
import sys
from optparse import OptionParser
import os
parser = OptionParser()
parser.add_option("-i", "--input", dest="infile",
help="input FILE to convert", metavar="FILE")
parser.add_option("-o", "--output", dest
On Mon, Apr 14, 2008 at 12:55 PM, Brain Stormer <[EMAIL PROTECTED]> wrote:
> I have a python program which works fine when run using idle but I would
> like call the program from the terminal.
>
> python test.py -i inputfile -o outputfile
>
> I tried with raw_input but that only works in idle. Can
i think you need to try :
cat input.txt | /usr/bin/python test.py >output.txt
>
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
look at the OptParse module, with this u can easily realize such things.
http://docs.python.org/lib/module-optparse.html
On Mon, Apr 14, 2008 at 12:55:07PM -0400, Brain Stormer wrote:
> I have a python program which works fine when run using idle but I would
> like call the program from the termi
I have a python program which works fine when run using idle but I would
like call the program from the terminal.
python test.py -i inputfile -o outputfile
I tried with raw_input but that only works in idle. Can this be achieved?
Thanks
___
Tutor maill
Kent Johnson wrote:
> Ricardo Aráoz wrote:
>
>> _validChars = {
>> 'X' :
>> 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
>> , '9' : '1234567890'
>> , '-' : '-1234567890'
>> , 'A' :
>> 'abcdefghijklmnopqrstuvwxyzABC
"Tiger12506" <[EMAIL PROTECTED]> wrote
>> Of course I know and use reg. exps., the point of the function is
>> not to
>> validate input but to force the proper input.
>
> So? Are you going to try to tell me that you can force particular
> input
> without actually determining if its valid or not f
Tiger12506 wrote:
>> Of course I know and use reg. exps., the point of the function is not to
>> validate input but to force the proper input.
>
> So? Are you going to try to tell me that you can force particular input
> without actually determining if its valid or not first? ;-)
>
> Just a thou
> Of course I know and use reg. exps., the point of the function is not to
> validate input but to force the proper input.
So? Are you going to try to tell me that you can force particular input
without actually determining if its valid or not first? ;-)
Just a thought.
___
Ricardo Aráoz wrote:
> _validChars = {
> 'X' :
> 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
> , '9' : '1234567890'
> , '-' : '-1234567890'
> , 'A' :
> 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
>
Tiger12506 wrote:
> Try regular expressions in the re module. This should make this code below
> much much simpler. Downside is you have to learn a slightly different
> syntax. Upside is - regular expressions are very powerful.
>
Of course I know and use reg. exps., the point of the function is
Try regular expressions in the re module. This should make this code below
much much simpler. Downside is you have to learn a slightly different
syntax. Upside is - regular expressions are very powerful.
> Last week someone had an issue with raw_input() and how to get input for
> a number. So
Last week someone had an issue with raw_input() and how to get input for
a number. So I remembered my CP/M times and got to think of a little
function I had there. The function is lost and my time is scarce but I
made a little effort and here you have the results. It has loads of room
for improveme
> Not sure what you mean by "standard encoding" (is this an Ubuntu
> thing?) but essentially whenever you're pulling stuff into Python
As it was lined out by others I was printing to a linux terminal which
had the encoding set to UTF-8.
Therefore and for further processing of the data I had to ope
Tim Golden wrote:
> Ah, I see. I'm so used to Windows where there is, technically an encoding
> for the console window, but you can't really do anything about
> it (apart from the awkward chcp) and it isn't really in your face. I
> do *use* Linux sometimes, but I don't really think in it :)
Actua
Kent Johnson wrote:
> Tim Golden wrote:
>> Not sure what you mean by "standard encoding" (is this an Ubuntu
>> thing?)
>
> Probably referring to the encoding the terminal application expects -
> writing latin-1 chars when the terminal expects utf-8 will not work well.
Ah, I see. I'm so used to
Tim Golden wrote:
> Tim Michelsen wrote:
>> Hello,
>> I want to process some files encoded in latin-1 (iso-8859-1) in my
>> python script that I write on Ubuntu which has UTF-8 as standard encoding.
>
> Not sure what you mean by "standard encoding" (is this an Ubuntu
> thing?)
Probably referrin
Tim Michelsen wrote:
> Hello,
> I want to process some files encoded in latin-1 (iso-8859-1) in my
> python script that I write on Ubuntu which has UTF-8 as standard encoding.
Not sure what you mean by "standard encoding" (is this an Ubuntu
thing?) but essentially whenever you're pulling stuff in
Hello,
I want to process some files encoded in latin-1 (iso-8859-1) in my
python script that I write on Ubuntu which has UTF-8 as standard encoding.
When I use the "print lines_in_myfile" is get some wired symbols.
How shold I read those files in or convert their encoding to utf-8?
Thanks in ad
govind goyal wrote:
> hi,
>
> 1) I want to read data not from but from a file which is in
> specified directory.
> 2) I want to redirect my output(which is by default STDOUT) to a file.
>
> Can anybody suggest these queries?
One way to redirect stdin and stdout is just to do it on the comman
hi,
1) I want to read data not from but from a file which is in
specified directory.
2) I want to redirect my output(which is by default STDOUT) to a file.
Can anybody suggest these queries?
Thanks
Regards,
Govind
___
Tutor maillist - Tutor@python.
The chosen solution was posted by kent... he said getpass.getpass().
As far as a "sample" password... how do I display something I was asking how to hide? =P
>>> Enter Password: "nothing seen here" =D
On 9/14/06, Tiago Saboga <[EMAIL PROTECTED]> wrote:
Em Quarta 13 Setembro 2006 21:55, Chris H
Em Quarta 13 Setembro 2006 21:55, Chris Hengge escreveu:
> nevermind.. figured it out.. Thanks.
Hi Chris,
It's not just for you, but I'd like to make a comment. When you write to this
list, remember that other people read your questions too, and may be
interested in the answers. By the way, I'v
I'm assuming I can use that like
usrpass = getpass.getpass(raw_input("Password: "))
On Wed, 2006-09-13 at 19:48 -0400, Kent Johnson wrote:
> Chris Hengge wrote:
> > I need either a way to mask the input from a console, or a method to not
> > display the typed characters to the screen. Someone po
nevermind.. figured it out.. Thanks.
On Wed, 2006-09-13 at 19:48 -0400, Kent Johnson wrote:
> Chris Hengge wrote:
> > I need either a way to mask the input from a console, or a method to not
> > display the typed characters to the screen. Someone point me in the
> > right direction?
>
> getpass.g
Chris Hengge wrote:
> I need either a way to mask the input from a console, or a method to not
> display the typed characters to the screen. Someone point me in the
> right direction?
getpass.getpass() ?
Kent
___
Tutor maillist - Tutor@python.org
htt
I need either a way to mask the input from a console, or a method to not
display the typed characters to the screen. Someone point me in the
right direction?
Thanks.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
>> With raw_input(), it allows to input value. Can it be used to input value
>> with default value option?
>>
> response = raw_input("Enter some data:")
> if not response: response = "default value"
This is one of the few places where I do use the short-circuit evaluation
trick:
val = raw_input
> With raw_input(), it allows to input value. Can it be used to input
> value with default value option?
Hi Phon,
We can build your own function to do this. Bob showed how to set up code
so that the default's taken if the user just presses enter in his reply.
Let's take a look at it again:
Keo Sophon wrote:
> Hi,
>
> With raw_input(), it allows to input value. Can it be used to input value
> with default value option?
>
response = raw_input("Enter some data:")
if not response: response = "default value"
___
Tutor maillist - Tutor@pyt
Hi,
With raw_input(), it allows to input value. Can it be used to input value with
default value option?
Phon
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> Another newbe question! I use "while True: " to evaluate an
> expression, I see that you used while 1: .. what's the diffrence if
> any?!
Python only provided boolean literal values (True, False) relatively
recently.
Long time Python programmers, especially those with a C background(*)
are used
At 11:28 AM 12/23/2005, Panagiotis Atmatzidis wrote:
>On 12/23/05, Panagiotis Atmatzidis <[EMAIL PROTECTED]> wrote:
> > Hello Dany :-)
> >
> > On 12/23/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
>[...]
> > >
> > >
> > > Hello Bob and Panagiotis,
> > >
> > > It might be good to make this number-readin
Panagiotis Atmatzidis wrote:
> Hello,
>
> Can someone provide me with an error checking example about an x
> variable that needs to be number only? I used something like:
>
> def useridf():
> print ""
> print "WARNING: If you don't understand why this must be unique,
> exit and read th
On 12/23/05, Panagiotis Atmatzidis <[EMAIL PROTECTED]> wrote:
> Hello Dany :-)
>
> On 12/23/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
[...]
> >
> >
> > Hello Bob and Panagiotis,
> >
> > It might be good to make this number-reading thing a function, just to
> > make it easier to reuse (and test!) it.
At 11:16 AM 12/23/2005, Panagiotis Atmatzidis wrote:
>Hello there,
>
>Thank you for the prompt response.
>
>On 12/23/05, bob <[EMAIL PROTECTED]> wrote:
>[snip]
> > print input("x ; ")
> > and enter "Hello world"
>
> >>> x = input("x: ")
>x: hello world
>Traceback (most recent call last):
> File "
Yeah works you're right. :-)
On 12/23/05, bob <[EMAIL PROTECTED]> wrote:
> At 11:16 AM 12/23/2005, Panagiotis Atmatzidis wrote:
> >Hello there,
> >
> >Thank you for the prompt response.
> >
> >On 12/23/05, bob <[EMAIL PROTECTED]> wrote:
> >[snip]
> > > print input("x ; ")
> > > and enter "Hello wo
1 - 100 of 125 matches
Mail list logo