On 1/16/2021 9:17 PM, 2qdxy4rzwzuui...@potatochowder.com wrote:
A bare minimum skeleton might look something like this:
with open(filename) as f:
for line in f.readlines():
handle_one_line(f)
f.readlines() reads the entire file into a list of lines (strings). If
On 2021-01-16 at 17:46:13 -0500,
DonK wrote:
> On Sat, 16 Jan 2021 14:56:37 -0600, 2qdxy4rzwzuui...@potatochowder.com
> wrote:
>
> >On 2021-01-16 at 15:42:44 -0500,
> >DonK wrote:
> >> For example, I've found a need to parse text documents quite a number
> >> of times over the years. Basic/VB
On Sat, 16 Jan 2021 14:56:37 -0600, 2qdxy4rzwzuui...@potatochowder.com
wrote:
>On 2021-01-16 at 15:42:44 -0500,
>DonK wrote:
>
>> Yes, Windows. Iterating open windows with the Window's API is easy the
>> hard (very hard) part is sending keystrokes to those windows to Save
>> them. It's very
On Tue, 12 Jan 2021 10:16:47 +0400, Abdur-Rahmaan Janhangeer
wrote:
>Greetings,
>
>Web with Python is really easy to get started with, here
>is a simple endpoint with a framework called Flask
>
>from flask import Flask
>app = Flask(__name__)
>
>@app.route('/')
>def hello_world():
> return
On 2021-01-16 at 15:42:44 -0500,
DonK wrote:
> Yes, Windows. Iterating open windows with the Window's API is easy the
> hard (very hard) part is sending keystrokes to those windows to Save
> them. It's very tricky because the timing is critical.
>
> You have to use one of those "spy" utilities
On Mon, 11 Jan 2021 21:56:48 -0800, Paul Rubin
wrote:
>DonK writes:
>> My problem is that I don't understand how Python programs are
>> used. (i.e user input and output) Is Python mainly used for backends?
>> I've seen some Python gui frameworks like Tkinter, PyQt, etc
>
>I would say at
On Tue, 12 Jan 2021 09:26:18 +1100, Chris Angelico
wrote:
>On Tue, Jan 12, 2021 at 7:41 AM DonK wrote:
>> Hi, I'm thinking about learning Python but I'm 74 years old and will
>> very likely not ever have a programming job again. I used to program
>> in Visual Basic, C\C++, Delphi, etc. and some
On 14/01/21 11:49 am, Cameron Simpson wrote:
The "pure" OOP approach, where method calls are used as messages to set
or fetch aspects of the object, is usually does with getter and setter
methods like:
x = o.getX()
o.setX(9)
People use get and set methods, not because it's somehow
On Wed, 13 Jan 2021 21:46:08 - (UTC), Grant Edwards wrote:
> On 2021-01-13, Peter Pearson wrote:
[snip]
>> Browsergui is not widely popular (I don't think anybody but me has
>> mentioned it on this newsgroup), but it was written to be simple and
>> Pythonic, and has served me well.
On 14/01/21 11:09 am, Grant Edwards wrote:
Perhaps I need to recalibrate my adjectives, but with
256KB+ of flash and 32KB+ of RAM, I wouldn't call them "small"
It's small by today's standards, when you consider that
multiple GB of RAM is commonplace now in most "real" computers.
--
Greg
--
On 13/01/21 7:57 pm, Christian Gollwitzer wrote:
What do you mean, "until" ?
https://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c
He's using Micropython. That's cheating! :-)
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 14 Jan 2021, dn via Python-list wrote:
Concerning the definition of "old"
- when I'm having a 'good day', it's anyone several years my senior (and
above)
- when I'm creaking and groaning, it's anyone remotely my age, and older.
About 45 years ago a 25-year-older friend of mine offered
On 2021-01-13, Peter Pearson wrote:
> On Mon, 11 Jan 2021 15:37:58 -0500, DonK
> wrote:
> [snip]
>>
>> I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they
>> look kinda like adding a family room onto a 1986 double wide mobile
>> home,
>
> Agreed.
>
> Browsergui is not widely
On 2021-01-13, Dennis Lee Bieber wrote:
> On Tue, 12 Jan 2021 15:18:05 - (UTC), Grant Edwards
> declaimed the following:
>>On 2021-01-12, songbird wrote:
>>
>>> it can be used for pretty much anything except perhaps high
>>> pressure real time things, but i bet someone else will know that
On 14/01/2021 04.54, Grimble wrote:
> On 11/01/2021 20:37, DonK wrote:
>>
>> Hi, I'm thinking about learning Python but I'm 74 years old and will
>> very likely not ever have a programming job again.
> At 83, I have no intention of having a programming job again! I last
> coded something
On 13Jan2021 10:37, songbird wrote:
> my momentary conceptual problem is that to me OOP means
>being able to encapsulate data structures and code from
>other parts of the program, but to me it doesn't look like
>that is how python is designed. this is probably a complete
>aside to this whole
On Mon, 11 Jan 2021 15:37:58 -0500, DonK wrote:
[snip]
>
> I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they
> look kinda like adding a family room onto a 1986 double wide mobile
> home,
Agreed.
Browsergui is not widely popular (I don't think anybody but me has
mentioned
Christian Gollwitzer wrote:
> Am 13.01.21 um 06:24 schrieb Greg Ewing:
>> On 13/01/21 4:18 am, Grant Edwards wrote:
>>
>>> AFAIK, Python can't be used to write device drivers for any popular OS
>>
>> At least not until some crazy person embeds Python in the
>> Linux kernel...
>
>
> What do you
On 11/01/2021 20:37, DonK wrote:
Hi, I'm thinking about learning Python but I'm 74 years old and will
very likely not ever have a programming job again.
At 83, I have no intention of having a programming job again! I last
coded something professionally 45 years ago, but it hasn't lost its
Chris Angelico wrote:
...projects that fade...
> That's not really something Python can ever control, but I can say
> with some confidence that the big libraries like Qt and GTK are going
> to adapt, one way or another. And perhaps more importantly: Neither
> input()/print() nor web applications
On 11/01/2021 20:37, DonK wrote:
So, what do you folks use Python for?
I've written a shopping list script with auto-completion and a couple of
web-scraping applications that support a weather reporting application
interfacing with various 1Wire sensors transcribed from an initial Ruby
Am 13.01.21 um 06:24 schrieb Greg Ewing:
On 13/01/21 4:18 am, Grant Edwards wrote:
AFAIK, Python can't be used to write device drivers for any popular OS
At least not until some crazy person embeds Python in the
Linux kernel...
What do you mean, "until" ?
On 13/01/21 4:18 am, Grant Edwards wrote:
AFAIK, Python can't be used to write device drivers for any popular OS
At least not until some crazy person embeds Python in the
Linux kernel...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On 2021-01-12, Chris Angelico wrote:
> * Command-line calculator - pressing Ctrl-Alt-P will open up a
> terminal with Python, and that's the normal way that I do quick
> calculations
I do that a lot too.
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list
On 12Jan2021 10:40, Michael F. Stemper wrote:
>On 11/01/2021 14.37, DonK wrote:
>>I've installed Python 3.7, the PyCharm IDE and watched some Youtube
>>tutorials
>
>I would suggest that instead of watching tutorials, you open up your IDE
>and start writing stuff.
I would second that. Maybe this
On 12Jan2021 15:18, Grant Edwards wrote:
>On 2021-01-12, songbird wrote:
>> it can be used for pretty much anything except perhaps
>> high pressure real time things, but i bet someone else will
>> know that is being done too, i've just not heard of it. :)
>
>AFAIK, Python can't be used to
On Tue, Jan 12, 2021 at 7:41 AM DonK wrote:
> So, what do you folks use Python for?
>
Since everyone else is, I'll add my list.
* API lookups of various sorts (usually via HTTP requests)
* Audio analysis. Calculate the maximum and average volume of each of
many songs.
* Code generation. The
On 2021-01-12, Chris Angelico wrote:
> On Wed, Jan 13, 2021 at 3:18 AM Grant Edwards
> wrote:
>>
>> On 2021-01-12, songbird wrote:
>>
>> > it can be used for pretty much anything except perhaps
>> > high pressure real time things, but i bet someone else will
>> > know that is being done too,
On 12/01/2021 10.40, Michael F. Stemper wrote:
Modeling of electric power systems:
- load behavior in response to conservation load reduction
Sorry, that should have been "conservation voltage reduction".
--
Michael F. Stemper
Psalm 82:1-4
--
On 2021-01-11 20:37, DonK wrote:
[snip]
So, what do you folks use Python for?
Since we're sharing:
- Personal information manager in the form of a tree of pages. Each page
can have code associated with it which defines functions to call when
shortcut keys are pressed, giving
On 11/01/2021 14.37, DonK wrote:
I've installed Python 3.7, the PyCharm IDE and watched some Youtube
tutorials
I would suggest that instead of watching tutorials, you open up your IDE
and start writing stuff. Get an introductory python book (I used the
O'Reilly _Introducing Python_), start at
On Wed, Jan 13, 2021 at 3:18 AM Grant Edwards wrote:
>
> On 2021-01-12, songbird wrote:
>
> > it can be used for pretty much anything except perhaps
> > high pressure real time things, but i bet someone else will
> > know that is being done too, i've just not heard of it. :)
>
> AFAIK, Python
On 2021-01-12, songbird wrote:
> it can be used for pretty much anything except perhaps
> high pressure real time things, but i bet someone else will
> know that is being done too, i've just not heard of it. :)
AFAIK, Python can't be used to write device drivers for any popular OS
(Linux,
On 2021-01-11, DonK wrote:
> So, what do you folks use Python for?
I mainly use it for writing command-line utilities. Many of them work
on either Windows or Linux, but are mostly used on Linux:
* Two-pass symbolic assembler and dissassembler for a proprietary
communications controller.
On Tue, Jan 12, 2021 at 5:26 PM songbird wrote:
> for python i just spend too much time fumbling around
> and i don't really know what is current and if i'm using
> something that will be kept up for the future or if the
> project is going away or in a direction that i won't like
> (both KDE
DonK wrote:
>
> Hi, I'm thinking about learning Python but I'm 74 years old and will
> very likely not ever have a programming job again. I used to program
> in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe"
> languages. It's been about 18-19 years since my last programming job.
>
Greetings,
Web with Python is really easy to get started with, here
is a simple endpoint with a framework called Flask
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World’
if __name__ == '__main__':
app.run()
As for Tkinter, it's really
On Tue, Jan 12, 2021 at 3:16 PM Greg Ewing wrote:
> > Currently I'd like to write something to iterate
> > through open windows and save them to different folders depending on
> > if the titlebar contains certain strings.
>
> That sounds like it should be doable if you can get access to the
>
On 12/01/21 9:37 am, DonK wrote:
I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they
look kinda like adding a family room onto a 1986 double wide mobile
home, and they look even more complicated than creating a GUI from
scratch in C++ with a message loop, raising events . . .
On 11Jan2021 15:52, Dan Stromberg wrote:
>On Mon, Jan 11, 2021 at 2:22 PM Cameron Simpson wrote:
>> >I've seen some Python gui frameworks like Tkinter, PyQt, etc. but
>> >they
>> >look kinda like adding a family room onto a 1986 double wide mobile
>> >home, and they look even more complicated
On Mon, Jan 11, 2021 at 2:22 PM Cameron Simpson wrote:
> >I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they
> >look kinda like adding a family room onto a 1986 double wide mobile
> >home, and they look even more complicated than creating a GUI from
> >scratch in C++ with a
On Tue, Jan 12, 2021 at 7:41 AM DonK wrote:
> Hi, I'm thinking about learning Python but I'm 74 years old and will
> very likely not ever have a programming job again. I used to program
> in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe"
> languages.
BTW, from my experience,
On 11Jan2021 15:37, DonK wrote:
>Hi, I'm thinking about learning Python but I'm 74 years old and will
>very likely not ever have a programming job again. I used to program
>in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe"
>languages.
Therefore you're happy with classes, and are
On 12/01/2021 09.37, DonK wrote:
>
> Hi, I'm thinking about learning Python but I'm 74 years old and will
> very likely not ever have a programming job again. I used to program
> in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe"
> languages. It's been about 18-19 years since my
On Tue, Jan 12, 2021 at 7:41 AM DonK wrote:
>
>
> Hi, I'm thinking about learning Python but I'm 74 years old and will
> very likely not ever have a programming job again. I used to program
> in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe"
> languages. It's been about 18-19
Hi, I'm thinking about learning Python but I'm 74 years old and will
very likely not ever have a programming job again. I used to program
in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe"
languages. It's been about 18-19 years since my last programming job.
I do understand
On Sunday, January 19, 2014 10:29:58 AM UTC+5:30, Chris Angelico wrote:
On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote:
Because these two pieces of code
def foo(x): print x+1
def bar(x): return x+1
look identical (to a beginner at least)
foo(3)
4
bar(3)
4
As do these pieces
On Sun, Jan 19, 2014 at 7:26 PM, Rustom Mody rustompm...@gmail.com wrote:
If you want to give an irrelevant example at least give a correct one :D
the difference between str and hex is an arcane difference (Ive never used
hex)
the difference between functions and procedures is absolutely
On 2014-01-18, Terry Reedy tjre...@udel.edu wrote:
On 1/18/2014 1:30 PM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Homework problems (and 'toy' programs, such
On 01/19/2014 12:26 AM, Rustom Mody wrote:
On Sunday, January 19, 2014 10:29:58 AM UTC+5:30, Chris Angelico wrote:
On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote:
As do these pieces of code:
-- def quux1(x): return str(x+1)
-- def quux2(x): return hex(x+1)[2:]
They do?
-- quux1(2.3)
On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman et...@stoneleaf.us wrote:
-- def quux1(x): return str(x+1)
-- quux1(2.3)
'3.3'
(Will be) fixed in 3.5 [1] :)
[1] Which is to say, both will raise an exception.
Why would that raise?
ChrisA
--
On 2014-01-19, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Sun, 19 Jan 2014 16:14:48 + (UTC), Grant Edwards
invalid@invalid.invalid declaimed the following:
On 2014-01-18, Terry Reedy tjre...@udel.edu wrote:
On 1/18/2014 1:30 PM, Roy Smith wrote:
Pardon me for being cynical, but in
On Mon, Jan 20, 2014 at 4:42 AM, Grant Edwards invalid@invalid.invalid wrote:
2) I didn't claim that sys.stdin.readline() was as simple as using
input. I didn't claim it was preferable. I merely presented it as
a refutation to the argument that if you don't use input/raw_input
then
On 18/01/2014 18:41, Mark Lawrence wrote:
On 18/01/2014 18:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Not me personally. I guess raw_input must have been
On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote:
On 18/01/2014 18:41, Mark Lawrence wrote:
On 18/01/2014 18:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework
On 01/19/2014 08:38 AM, Chris Angelico wrote:
On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman et...@stoneleaf.us wrote:
-- def quux1(x): return str(x+1)
-- quux1(2.3)
'3.3'
(Will be) fixed in 3.5 [1] :)
[1] Which is to say, both will raise an exception.
Why would that raise?
Sorry, should
In article lbh4oc$nqv$1...@reader1.panix.com,
Grant Edwards invalid@invalid.invalid wrote:
I can still remember the point in my first trip to the UK when I
accidentally stumbled across darts on TV. Given the endless variety
(and quantity) of pointless crap that people watch here in the US, I
On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman et...@stoneleaf.us wrote:
The difference I was thinking of is:
%h % 3.14 # this works
vs.
hex(3.14) # this raises
In 3.5 both will raise.
Now you have me *thoroughly* intrigued. It's not %h (incomplete format
- h is a modifier), nor %H
On Mon, Jan 20, 2014 at 5:37 AM, Roy Smith r...@panix.com wrote:
What's so complicated?
points = 501
for dart in throws():
if points - dart == 0 and dart.is_double():
raise YouWin
if points - dart 0:
continue
points -= dart
beer.drink()
assert victory
raise beer
On 2014-01-19, Roy Smith r...@panix.com wrote:
In article lbh4oc$nqv$1...@reader1.panix.com,
Grant Edwards invalid@invalid.invalid wrote:
I can still remember the point in my first trip to the UK when I
accidentally stumbled across darts on TV. Given the endless variety
(and quantity) of
On 19/01/2014 18:15, Grant Edwards wrote:
On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote:
On 18/01/2014 18:41, Mark Lawrence wrote:
On 18/01/2014 18:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:
On 19/01/2014 18:15, Grant Edwards wrote:
On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote:
Actually, to go off at a tangent, I'm just getting into GUIs via
wxPython. I've discovered there are distinct
On 19/01/2014 19:24, Larry Martell wrote:
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:
On 19/01/2014 18:15, Grant Edwards wrote:
On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote:
Actually, to go off at a tangent, I'm just getting into GUIs via
On 01/19/2014 10:41 AM, Chris Angelico wrote:
On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman et...@stoneleaf.us wrote:
The difference I was thinking of is:
%h % 3.14 # this works
vs.
hex(3.14) # this raises
In 3.5 both will raise.
Now you have me *thoroughly* intrigued. It's not %h
On Sunday 19 January 2014 15:11:52 Larry Martell did opine:
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk
wrote:
On 19/01/2014 18:15, Grant Edwards wrote:
On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote:
Actually, to go off at a tangent, I'm just
On Sunday 19 January 2014 15:08:31 Roy Smith did opine:
In article lbh4oc$nqv$1...@reader1.panix.com,
Grant Edwards invalid@invalid.invalid wrote:
I can still remember the point in my first trip to the UK when I
accidentally stumbled across darts on TV. Given the endless variety
(and
On Sun, Jan 19, 2014 at 1:12 PM, Gene Heskett ghesk...@wdtv.com wrote:
On Sunday 19 January 2014 15:11:52 Larry Martell did opine:
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk
wrote:
On 19/01/2014 18:15, Grant Edwards wrote:
On 2014-01-19, Mark Lawrence
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
--
https://mail.python.org/mailman/listinfo/python-list
On 18/01/2014 18:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Not me personally. I guess raw_input must have been used somewhere at
some time for something,
On 01/18/2014 10:30 AM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Yes - routinely.
Emile
--
https://mail.python.org/mailman/listinfo/python-list
Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
I use it for pointless throwaway tools, sometimes via the cmd module,
sometimes directly.
I like that you can add
On 1/18/2014 1:30 PM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Homework problems (and 'toy' programs, such as hangman), whether in a
programming class or
On Sun, Jan 19, 2014 at 8:33 AM, Terry Reedy tjre...@udel.edu wrote:
On 1/18/2014 1:30 PM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Homework problems (and
On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Similar 'cynicism' regarding print would be salutary for producing
On Sun, Jan 19, 2014 at 3:15 PM, Rustom Mody rustompm...@gmail.com wrote:
On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework
On Sunday, January 19, 2014 9:51:36 AM UTC+5:30, Chris Angelico wrote:
On Sun, Jan 19, 2014 at 3:15 PM, Rustom Mody wrote:
On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used
On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody rustompm...@gmail.com wrote:
Because these two pieces of code
def foo(x): print x+1
def bar(x): return x+1
look identical (to a beginner at least)
foo(3)
4
bar(3)
4
As do these pieces of code:
def quux(x): return str(x+1)
def quux(x):
On Sat, 18 Jan 2014 13:30:20 -0500, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Yes. They are excellent for interactive command line tools.
--
Steven
--
On Sun, Jul 19, 2009 at 7:07 PM, Richel Satumbagarlsatumb...@yahoo.com wrote:
I am just learning python then I encountered an certain point in terms of
using the input function of python.
the source code:
eq = input(enter an equation:);
print the
On Mon, 20 Jul 2009, Richel Satumbaga wrote:
I am just learning python then I encountered an certain point in terms of
using the input function of python. the source code:
eq = input(enter an equation:);
print the result is : ;
the output seen
On 23 Sty, 10:59, [EMAIL PROTECTED] wrote:
Hello everyone!
I have a piece of code that looks like this:
if len(BuildList) 0:
print The script found %d game directories: % len(BuildList)
print
num = 0
for i in BuildList:
print str(num) ++ i
num =
Hello everyone!
I have a piece of code that looks like this:
if len(BuildList) 0:
print The script found %d game directories: % len(BuildList)
print
num = 0
for i in BuildList:
print str(num) ++ i
num = num + 1
print
print Select a build number
I have a piece of code that looks like this:
if len(BuildList) 0:
print The script found %d game directories: % len(BuildList)
print
num = 0
for i in BuildList:
print str(num) ++ i
num = num + 1
print
print Select a build number from 0 to
[EMAIL PROTECTED] writes:
print Select a build number from 0 to + str(len(BuildList) - 1)
buildNum = int(raw_input('Select build # '))
while buildNum (len(BuildList) -1) or buildNum = -1:
print
print Error: Invalid build number!
print Select a build
Ah, thank you for the respone!
I have not gotten around to test it yet, but I hope it will work! :)
-Daniel
2007-01-23 10:59:37
[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]
Hello everyone!
I have a piece of code that looks like this:
if len(BuildList) 0:
print The script
Nathan Pinno [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I use input() all the time. I know many people say it ain't safe, but
whose going to use it to crash their own comp? Only an insane person
would,
This is usage Guido intended it for, not for production apps distributed
On 15/07/05, Terry Hancock [EMAIL PROTECTED] wrote:
On Thursday 14 July 2005 07:00 am, Michael Hoffman wrote:
Devan L wrote:
Use raw_input instead. It returns a string of whatever was typed. Input
expects a valid python expression.
Who actually uses this? It's equivalent to
- Original Message -
From: Stephen Thorne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: python-list@python.org
Sent: Sunday, July 17, 2005 11:12 PM
Subject: Re: Who uses input()? [was Re: question on input]
On 15/07/05, Terry Hancock [EMAIL PROTECTED] wrote:
On Thursday
Devan L wrote:
Use raw_input instead. It returns a string of whatever was typed. Input
expects a valid python expression.
Who actually uses this? It's equivalent to eval(raw_input(prompt)) but
causes a lot of newbie confusion. Python-dev archives revealed that
someone tried to get this
On Thursday 14 July 2005 07:00 am, Michael Hoffman wrote:
Devan L wrote:
Use raw_input instead. It returns a string of whatever was typed. Input
expects a valid python expression.
Who actually uses this? It's equivalent to eval(raw_input(prompt)) but
causes a lot of newbie confusion.
Hi,
I want to accept the user's answer yes or no.
If I do this:
answer = input('y or n?')
and type y on the keyboard, python complains
Traceback (most recent call last):
File stdin, line 1, in ?
File string, line 0, in ?
NameError: name 'y' is not defined
It seems like input only accepts
On 12 Jul 2005 07:31:47 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi,
I want to accept the user's answer yes or no.
If I do this:
answer = input('y or n?')
Use raw_input instead:
answer = raw_input(y or n?)
y or n?y
answer
'y'
Check out the documentation of both functions at
Use raw_input instead. It returns a string of whatever was typed. Input
expects a valid python expression.
--
http://mail.python.org/mailman/listinfo/python-list
93 matches
Mail list logo