dgement.
--
\ “An expert is a man who has made all the mistakes which can be |
`\ made in a very narrow field.” —Niels Bohr |
_o__) |
Ben Finney
___
Tutor mai
e for details” is notifying the reader without
over-burdening them every time they open the file.
--
\ “Theology is the effort to explain the unknowable in terms of |
`\ the not worth knowing.” —Henry L. Mencken |
_o__)
Initial Mystery that attends any journey is: how did the |
`\ traveller reach his starting point in the first place?” —Louise |
_o__) Bogan, _Journey Around My Room_ |
Ben Finney
___
Tutor maillist - Tutor@pyt
Hi,
When installing Python on a windows server, will the server require a
restart?
Thank you!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
s.read_sql` function to read data from a SQL
database into a pandas dataframe, which you then can manipulate:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html
Good luck!
--
Ben Hancock
https://elwha1.github.io
___
Tuto
dar/days/>
--
\ “I went to San Francisco. I found someone's heart.” —Steven |
`\Wright |
_o__) |
Ben Finney
__
I need to write code that runs a cost calculating program with many
different variables and I honestly don't understand it, my code is:
beefmeals=int(input("Enter number of beef meals: "))
shitmeals=int(input("Enter number of vegan meals: "))
party=beefmeals+shitmeals
print(party)
if party<=50
a=7
So I have to make a fibonacci sequence, and I'm not sure what is wrong with
my code
#This program illustrates the fibonacci sequence
nterms=int(input("Please enter how many terms you would like to know: "))
n1 = 1
n2 = 1
count = 0
if nterms <= 0:
print("Please enter a positive integer")
elif nterms
y
https://docs.python.org/3/glossary.html> can help with questions
like this.
--
\ “Not using Microsoft products is like being a non-smoker 40 or |
`\ 50 years ago: You can choose not to smoke, yourself, but it's |
_o__) hard to avoid second-hand sm
car in a tow-away zone. When I came back |
`\ the entire area was missing.” —Steven Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subsc
u're not |
`\aiming high enough.” —Alan Kay |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o
f you always want the latest and greatest, then you have to |
`\ buy a new iPod at least once a year.” —Steve Jobs, MSNBC |
_o__) interview 2006-05-25 |
Ben Finney
___
Tutor maillist - Tutor@python.
ach "if" until the
> problem became glaringly obvious.
>
> BTW, it isn't good to write tests like:
>
> if theo == True:
>
> "theo" a Boolean anyway. Just say:
>
> if theo:
>
> It reads more naturally as well.
>
> Cheers,
> Came
ignorant.” —Shaun Mason |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
“In the long run, the utility of all non-Free software |
`\ approaches zero. All non-Free software is a dead end.” —Mark |
_o__)Pilgrim, 2006 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
to be nurtured by delusion.” |
_o__) —Sam Harris, at _Beyond Belief 2006_ |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
rary Distutils. But not today.
--
\ “Nothing is more sacred than the facts.” —Sam Harris, _The End |
`\ of Faith_, 2004 |
_o__) |
Ben Finney
___
e know that ain't so.” —Artemus Ward |
_o__) (1834–1867), U.S. journalist |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
st Law of Technology |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
that, the definition is
unlikely to help because it's making distinctions below the level you're
used to thinking about.
Did the Wikipedia article help?
> In summary, and Ben will correct me if I'm wrong, a daemon is a
> computer program that runs as a background task.
That
ne 1
def foo(lorem, /, ipsum):
^
SyntaxError: invalid syntax
--
\ “Ignorance more frequently begets confidence than does |
`\ knowledge.” —Charles Darwin, _The Descent of Man_, 1871 |
_o__)
t block as small as possible.
Better than learning the idiom independently later on, and cramming half
their program into that block :-/
--
\“But it is permissible to make a judgment after you have |
`\examined the evidence. In some circles it is even encouraged.” |
_o__)
_Money: Whence It |
_o__) Came, Where It Went_, 1975 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Profundis_, 1897 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ld quickly cease to become stranger than fiction, |
`\ once we got as used to it.” —Henry L. Mencken |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
T
that
easy.
--
\ “Now Maggie, I’ll be watching you too, in case God is busy |
`\ creating tornadoes or not existing.” —Homer, _The Simpsons_ |
_o__) |
Ben Finney
___
Tutor
ill tired from the move. Day 2: Everybody |
_o__) talks to me like I'm an idiot.’” —Steven Wright |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
nities discussing how to do it.
--
\ “I distrust those people who know so well what God wants them |
`\to do to their fellows, because it always coincides with their |
_o__) own desires.” —Susan Brownell Anthony, 1896 |
Ben Finney
_
the status quo, |
`\ or die trying. Either is better than actually WORKING for a |
_o__) living.” —ringsnake.livejournal.com, 2007-11-12 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
Phil writes:
> Thank you Ben and Martin for your detailed replies. I was debating
> whether or not to post my question at all because it looked vague,
> even to me.
That's not the issue; the question was posed clearly enough. The problem
is that your purpose is opaque, and we
—_Pinky and The Brain_ |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Frustration_, H. G. Wells, 1936 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
o, and try to see what you're seeing
when you do it – then we may be able to help.
--
\ “To have the choice between proprietary software packages, is |
`\ being able to choose your master. Freedom means not having a |
_o__)master.” —Richard M. Stallman, 2
exactly, you might rule case sensitivity out.
Traceback (most recent call last):
File "testgrib.py", line 16, in
uwind = grbs.select(name='U-Component of wind')[0]
File "pygrib.pyx", line 609, in pygrib.open.select (pygrib.c:6175)
ValueError: no matches found
HTH,
-Ben I.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
“Firmness in decision is often merely a form of stupidity. It |
`\indicates an inability to think the same thing out twice.” |
_o__) —Henry L. Mencken |
Ben Finney
___
Tutor maillist - Tutor@
ll different.
https://en.wikipedia.org/wiki/The_Treachery_of_Images>
--
\ “Programs must be written for people to read, and only |
`\incidentally for machines to execute.” —Abelson & Sussman, |
_o__) _Structure and Interpretation of Computer Programs_ |
Ben Finney
to a text file, and execute
that.
--
\ “Nature is trying very hard to make us succeed, but nature does |
`\ not depend on us. We are not the only experiment.” —Richard |
_o__) Buckminster Fuller, 1978-04-30 |
Ben Finney
__
“I think it would be a good idea.” —Mohandas K. Gandhi (when |
`\asked what he thought of Western civilization) |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
cs.io/en/latest/examples.html#lock-decorator>
seem to be what you want.
--
\“… Nature … is seen to do all things Herself and through |
`\ herself of own accord, rid of all gods.” —Titus Lucretius |
_o__)
ght that he is unwilling to accord to |
`\ his fellow-men is dishonest and infamous.” —Robert G. |
_o__) Ingersoll, _The Liberty of Man, Woman and Child_, 1877 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
xley |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
en it.” —Steven |
_o__) Wright |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
le.” —Mark Twain, _Pudd'n'head Wilson_ |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
aviour.
--
\ “Try to learn something about everything and everything about |
`\ something.” —Thomas Henry Huxley |
_o__) |
Ben Finney
___
Tutor mai
is, so |
`\ why should they care about it?” —Thomas Hesse, Sony BMG, 2006 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
h
--
\ “The future always arrives too fast, and in the wrong order.” |
`\—Alvin Toffler |
_o__) |
Ben Finney
___
Tutor mailli
|
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
|
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
to the end of a long stick.” |
_o__) —Jack Handey |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Intellectual property is to the 21st century what the slave |
`\ trade was to the 16th.” —David Mertz |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change sub
e
message. So I'd say that is inferior to attaching the program text.
--
\ “Now Maggie, I’ll be watching you too, in case God is busy |
`\ creating tornadoes or not existing.” —Homer, _The Simpsons_ |
_o__)
obs/>.
--
\ “I was trying to daydream, but my mind kept wandering.” —Steven |
`\Wright |
_o__) |
Ben Finney
___
ger, 2001-11-05 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
o education.” —Alvin |
_o__)Toffler, _Future Shock_, 1970 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
we can test our ideas.… But |
`\ until we do, until we have data, it is just one more proposal.” |
_o__) —Darren Saunders, 2015-12-02 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
It does indeed cease executing the function, but that's because it
continues elsewhere (back at the site where the function was called).
--
\ “No smoothen the lion.” —lion cage, zoo, Czech Republic |
`\
f fear.” —Mark Twain, _Pudd'n'head Wilson_ |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
sts can do to weaken the hold of |
`\religion should be done and may in the end be our greatest |
_o__) contribution to civilization.” —Steven Weinberg |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or cha
me at chess, but it was no match for me |
`\ at kick boxing.” —Emo Philips |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or
s, so that all the small things go in the right |
_o__) direction.” —Alvin Toffler |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
tance’.
--
\ “I believe our future depends powerfully on how well we |
`\ understand this cosmos, in which we float like a mote of dust |
_o__) in the morning sky.” —Carl Sagan, _Cosmos_, 1980 |
Ben Finney
___
Tutor
rec.humor.oracle.d |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
or English!” “Pff! English, who needs |
`\ that? I'm never going to England!” —Barney & Homer, _The |
_o__) Simpsons_ |
Ben Finney
___
Tutor maillist - Tutor@python.org
To uns
artily, but good men; the rest love |
`\ not freedom, but license.” —John Milton |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or
ole in issues of state |
_o__)[of] a modern democracy.” —Lawrence M. Krauss, 2012-05-28 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Terry Carroll writes:
> Thanks to Alan, Danny, Albert-Jan and Ben for their suggestions. I've
> now gotten my feet wet in unittest and have gone from not quite
> knowing where to start to making substantial progress, with a small
> suite of tests up and running.
Great start!
any mangling.
--
\ “Give a man a fish, and you'll feed him for a day; give him a |
`\religion, and he'll starve to death while praying for a fish.” |
_o__) —Anonymous |
Ben Finney
__
tart, or you may be more comfortable
with Make.
--
\“The problem with television is that the people must sit and |
`\keep their eyes glued on a screen: the average American family |
_o__) hasn't time for it.” —_The New York Times_, 1939 |
Ben Finney
___
ing machine in my car. It says, ‘I'm home now. |
`\ But leave a message and I'll call when I'm out.’” —Steven Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.
“The best in us does not require the worst in us: Our love of |
`\ other human beings does not need to be nurtured by delusion.” |
_o__) —Sam Harris, at _Beyond Belief 2006_ |
Ben Finney
___
Tutor maillist - Tutor@pyth
een as far as others, it is because giants were |
`\ standing on my shoulders.” —Hal Abelson |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscr
ease not to read notice.” —hotel, |
_o__) Kowloon, Hong Kong |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Apologize, v. To lay the foundation for a future offense.” |
`\ —Ambrose Bierce, _The Devil's Dictionary_, 1906 |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Moriarty: “Forty thousand million billion dollars? That money |
`\must be worth a fortune!” —The Goon Show, _The Sale of |
_o__) Manhattan_ |
Ben Finney
___
Tutor maillist - Tuto
it seriously.” —Douglas Adams |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
them to sit down and shut up.” —Phyllis Diller |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Kulawiec |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
boB Stepp writes:
> On Sun, Mar 20, 2016 at 8:19 PM, Ben Finney
> wrote:
> > if rng is None:
> > rng = random._inst
> >
> > which is the default RNG instance in the module.
>
> Can I not use:
>
> if rng is None:
> rng = random.Random
Steven D'Aprano writes:
> On Mon, Mar 21, 2016 at 12:18:01AM +1100, Ben Finney wrote:
> > No, I meant what I wrote. The ‘rng’ parameter is expected to be
> > bound to a RNG. If the caller has not specified a custom RNG
> > instance, we bind ‘rng’ to the stan
boB Stepp writes:
> On Sat, Mar 19, 2016 at 8:03 AM, Steven D'Aprano wrote:
> > On Sat, Mar 19, 2016 at 04:05:58PM +1100, Ben Finney wrote:
> >> if rng is None:
> >> rng = random.random
> >
> > Typo: you want rng = random.
known seed.
Hopefully you can take this as an example of how to better design
systems so they don't have tightly-entangled external dependencies.
--
\ “The good thing about science is that it's true whether or not |
`\ you believe in it.” —Neil deGrasse Tyson, 2011-02-04 |
_o__)
Hi,
I'm having troubles with my code, specifically at the area with the comment
mark. Basically you are to enter three sides of a triangle, and have it
show if it is a equilateral, isosceles, or right triangle. I have it so
that it makes s1 the longest side, and s2 and s3 the other 2 sides. The
ri
ve only joined recently; so they do not automatically benefit from
past conversations here.
--
\ “DRM doesn't inconvenience [lawbreakers] — indeed, over time it |
`\ trains law-abiding users to become [lawbreakers] out of sheer |
_o__)frustration.” —Charles Stros
g; where would you put it?” —Steven |
`\Wright |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Ben Finney writes:
> The first one is defined (by the syntax for literals) to create a
> *single* string object. Semantically, the fragments are specifying one
> object in a single step.
>
> The second is semantically (i.e. by the semantics of how such
> expressions are defined
ution to mountains of waste is not more |
`\ landfill sites but fewer shopping centres.” —Clive Hamilton, |
_o__)_Affluenza_, 2005 |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Ben Finney writes:
> Hmm. That is a confusing inconsistency, I agree. It is deliberate, and
> explicitly documented:
>
> Note that leading zeros in a non-zero decimal number are not
> allowed. This is for disambiguation with C-style octal literals,
> which Python u
ion was
made, and on the face of it I disagree.
--
\“But it is permissible to make a judgment after you have |
`\examined the evidence. In some circles it is even encouraged.” |
_o__)—Carl Sagan, _The Burden of Skepticism_, 1987 |
Ben Finney
_
e very interested to see that.
--
\ “Pinky, are you pondering what I'm pondering?” “I think so, |
`\Brain, but don't you need a swimming pool to play Marco Polo?” |
_o__) —_Pinky and The Bra
Ben Finney writes:
> In that case, my recommendation is to learn a good programmer's
> editor, and let your students gain exposure to that.
>
> Emacs and Vim are the unchallenged masters here […]
>
> They aren't a small investment, though. […] it may be too much t
Ben Finney writes:
> Short of [the heavyweights Vim and Emacs], I'd still recommend a
> community-owned, free-software, highly flexible programmer's editor.
> If you're on GNU+Linux, use the Kate or GEdit editors; they integrate
> very nicely with the default desktop
Lisa Hasler Waters writes:
> Ben, in terms of time for learning curve, I suppose we do have some
> limitations as we are up against school schedules. However, if it is
> something I could learn in a reasonable time that I could then more
> quickly walk my students through then I
learn.
--
\ “Unix is an operating system, OS/2 is half an operating system, |
`\Windows is a shell, and DOS is a boot partition virus.” —Peter |
_o__)H. Coffin |
Ben Finney
___
Tutor ma
Namespaces are a honking good idea in Python, you
should not seek to avoid them.
--
\ “I may disagree with what you say, but I will defend to the |
`\death your right to mis-attribute this quote to Voltaire.” |
_o__) —A
o/testing-in-python>.
--
\ “I never forget a face, but in your case I'll be glad to make |
`\ an exception.” —Groucho Marx |
_o__) |
Ben Finney
_
the purpose. An opaque name like ‘n’ is not helpful.
--
\ “Why doesn't Python warn that it's not 100% perfect? Are people |
`\ just supposed to “know” this, magically?” —Mitya Sirenef, |
_o__)
1
>>> "Z"[:i] + "Z"[i+1:]
'Z'
Can you explain why that would be the case?
--
\ “I think a good gift for the President would be a chocolate |
`\ revolver. And since he's so busy, you'd pr
unbearable.” —hotel, Bucharest |
_o__) |
Ben Finney
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
“The generation of random numbers is too important to be left |
`\to chance.” —Robert R. Coveyou |
_o__) |
Ben Finney
___
Tutor maillist -
1 - 100 of 367 matches
Mail list logo