On 07/10/2012 02:50, Steven D'Aprano wrote:
On 07/10/12 12:08, Richard D. Moores wrote:
On Sat, Oct 6, 2012 at 4:42 PM, Mark
Lawrence wrote:
Use calendar.day_name.
How?
By reading the Fine Manual.
http://docs.python.org/library/calendar.html#calendar.day_name
which is so short t
different, e.g. FIFO is often used for first
in, first out.
Thx in advance.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Cheers.
Mark Lawrence.
__
n text:
if '0' <= ch <= '9':
doSomething(ch)
If you want to use the offset for any reason use enumerate:-
for i, ch in enumerate(text):
etc.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python
.org/mailman/listinfo/tutor
Create an empty list at the top of your loop. Store your b_total in the
list inside the loop with the append method. When the loop finishes use
the built-in sum function to get the final total.
--
Cheers.
Mark Lawrence.
_
n over the list
of items. Other than setting up a counter and calling len() each loop, is
there some way to have the changing list recognized within the for loop?
Thanks in advance for any help.
Ed
___
Tutor maillist - Tutor@python.org
To unsubscrib
s & Cs in the
first place? And what has this got to do with Python?
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 03/10/2012 04:15, boB Stepp wrote:
After much diddling around I have finally settled on a text to study
(Programming in Python 3, 2nd edition, by Mark Summerfield) and have
defaulted to using IDLE, deferring worrying about editors/IDEs until I
feel comfortable in Python.
I've been
subscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
I'm reminded of the film Coogan's Bluff. I have the Lee J Cobb role,
you're Clint Eastwood.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 13/10/2012 06:54, Devin Jeanpierre wrote:
Do your own homework.
-- Devin
Manners if you don't mind. We don't want to drive newbies away from
Python by being harsh towards them. So it's do your own homework, please :)
--
Cheers.
de that you've shown. Got it?
I'll leave you to sort out your code. If you still have problems please
come back and ask, my barks's much worse than my bite :)
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 15/10/2012 02:21, Salinas, Erwin d wrote:
Further to the information provided by Bob Gailer, please don't shout,
as in TYPING THINGS IN UPPERCASE, as it's considered rude, thanks.
--
Cheers.
Mark Lawrence.
___
Tutor maillist
alled Alex
Martelli reckons http://code.activestate.com/lists/python-list/48130/,
so please don't shoot the messenger:)
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.
On 17/10/2012 09:23, Dae James wrote:
I found that VPython is not in PyPI(python packet index from www.python.org).
Why ?
Dae James
The author(s) have chosen not to place it there.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor
On 17/10/2012 03:22, Alexander wrote:
On Tue, Oct 16, 2012 at 20:43 EST, Mark Lawrence
wrote:
For the record Access is not a database, or so some geezer called Alex
Martelli reckons http://code.activestate.com/lists/python-list/48130/, so
please don't shoot the messenger:)
Cheers.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Please send me a cheque for £1000 sterling and I'll send you the program.
--
Cheers.
Mark Law
use pip or easy_install from the command line
rather than mess around with unpacking .tar.gz files, especially if it
involves having to compile anything as opposed to having a pre-built binary.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@pyt
n the subject I suggest you take a look at PEPs 7 and 8.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
irst hit on google for "python dateutils install windows" is
http://stackoverflow.com/questions/879156/how-to-install-python-dateutil-on-windows
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subsc
On 19/10/2012 02:55, Richard D. Moores wrote:
On Thu, Oct 18, 2012 at 6:08 PM, Mark Lawrence wrote:
Could you please take a training course on how to use a search engine. First
hit on google for "python dateutils install windows" is
http://stackoverflow.com/questions/879156/how-
fo/tutor
See this http://docs.python.org/tutorial/modules.html specifically
section 6.1.1. "Executing modules as scripts".
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http
estion but a different subject, please
don't do that, thanks.
Regards,
Nitin
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 24/10/2012 04:01, Matthew D wrote:
big top post snipped.
Any chance of your prof teaching you *NOT* to top post and to use plain
English while you're at it?
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.o
ass...
If you can't be bothered to check up before you post and you can't write
in plain English then yes.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.pytho
On 24/10/2012 12:15, Morten Engvoldsen wrote:
[duplicate question snipped]
Thanks for asking the same question here that you asked on c.l.py 38
minutes previously.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe
ubprocess.call(["ssh", hostTarg, package])
process()
I'd use http://docs.python.org/library/time.html#time.strftime to do the
timestamp formatting and put some print statements into the code so you
know what's going on. Having said that it looks as
code in exchange for a cheque for £1000 sterling,
payable in advance :) If you can't afford my services I understand that
there are several modern tools called "search engines" that help you
find this sort of thing. Do you need a tutorial on how to use one of these?
--
Ch
read from it:
scoresFile.read() It comes up with a blank string: ' ' Can anyone help me?
Myles Broomes
Works fine for me.
c:\Users\Mark\MyPython>type highScores.txt
120
74
57
44
12
c:\Users\Mark\MyPython>type mytest.py
from __futur
me or you're in the wrong directory surely
you'll get something like this depending on your OS.
c:\Users\Mark>MyPython\mytest.py
Traceback (most recent call last):
File "C:\Users\Mark\MyPython\mytest.py", line 2, in
scoresFile=open('highScores.txt',
the third letter of the English alphabet :)
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
g lists,
there are many references to Phoenix on the development list
http://wxpython.org/maillist.php
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
#3: Chris
Hurray for Chris! Hurray for John! Hurray for Lewis!
Many Thanks!
In your original getNames do something like this.
Initialise a counter to zero.
Every time you get a valid name increment the count.
If the count is three you're finished.
--
Cheers.
Mark Lawrence.
such as banning
the use of len().
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
heque with the areas for the payment
left blank so that I can fill them in myself.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
x27;s 16 digits with 3.3.0.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
".format(x))
or similar, ie, that it operates only on the values I'd like output
that way.
If you're more comfortable with C you can use printf style formatting
see http://docs.python.org/2/library/stdtypes.html#string-formatting
you had to change some code and use the Decimal class from the
decimal module it would soon become a major issue as Python is case
sensitive, even on Windows. Just hoping I've got my dS in the RiGhT cAsE :)
--
Cheers.
Mark Lawrence.
___
example...
set1 = Set()
Please tell us what this Set() is, then we'll attempt to answer your
questions.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/ma
ivatives on the Python ideas mailing list. Ensure
you have copious supplies of coffee, sandwiches and possibly painkillers
for the headache if you take this route :)
--
Cheers.
Mark Lawrence.
___
Tutor maillist - Tutor@python.org
To unsubs
ode as if the person who ends up
maintaining your code is a violent psychopath who knows where you live."
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tuto
ppropriate than defining a new wrapper function.
Sorry, for the bad example.
Bah, that'll teach me to read more closely in the future :(
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
27;t know you can use any character as the delimiter and
any character as the quote, see
https://docs.python.org/3/library/csv.html#csv.reader
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
ot what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
missing something obvious here?
No, you were missing something needlessly obscured by the badly-written
code. Which book is this? I will be sure never to recommend it.
Hope that helps.
I agree entirely so a big +1 from me.
--
My fellow Pythonistas, ask not what our language can do for yo
ampaign for a peter() builtin?
Only if you provide an itertools version first :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscr
as, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
atchelder.com/text/unipain.html
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
st in Python 2 but it doesn't matter here as
sum() accepts any iterable, not just a list.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@pyt
what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
it. Look very
carefully at "order=..." and "drink=..." and I'm sure you'll spot the
difference.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
if there is a much
better way! ~(:>))
Thanks!
This isn't a job for Bicycle Repair Man!!! It smacks to me of
dictionaries and the operator module but I'm too bone idle to look it up
myself, so try here https://docs.python.org/3/library/operator.html
D'oh :)
--
My f
, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
l to
know.
I went a further step from the recipes linked to above and got here
https://pypi.python.org/pypi/readchar
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor mai
with http://conemu.github.io/
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail
Python that hasn't had a beta release
yet? Or have you simply mistyped the version number?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.o
at you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
t work" we could easily clarify the situation for you.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
eave
out the error handling to start with and just let your programming
errors bubble up as stack traces. Then add in appropriate things to
catch. In the above FileNotFoundError amongst others seems suitable.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do
uestions/26289473/pycharm-error-while-importing-matplotlib-pyplot-as-plt
"There is a package called six which matplotlib depends on. Check to
make sure it's installed...".
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mar
out the problems that you have, "that
didn't work" is usually less than useless. However on this occasion it
seems that all you have to do is pass the file handle, it's a standard
way of doing things.
--
My fellow Pythonistas, ask not what our language can do for you, as
sk not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ize
https://github.com/epsy/clize which I've never tried.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
On 29/05/2015 01:16, Felix Dietrich wrote:
Mark Lawrence writes:
optparse is deprecated, from
https://docs.python.org/3/library/optparse.html "Deprecated since
version 3.2: The optparse module is deprecated and will not be
developed further; development will continue with the argparse
m
language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
guage.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
lling function 2. It's
the DRY principle, see http://c2.com/cgi/wiki?DontRepeatYourself
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@pyt
t
see the output because your monitor has failed :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change su
ps://pypi.python.org/pypi/requests
https://pypi.python.org/pypi/beautifulsoup4
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscri
7;re using dates
and/or times it's certainly far easier to use the built-in functions
rather than try to roll your own.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
__
>>
>>> sorted(student_tuples, key=itemgetter(1,2))
[('john', 'A', 15), ('dave', 'B', 10), ('jane', 'B', 12)]
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawre
erful situations. I never use it.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mai
gs instead of the actual variable
names. Get rid of the single quotes.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
r on the next line. I'm suspicious of { "id" : "mw-pages" } as it's
a Python dict comprehension with one entry of key "id" and value "mw-pages".
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mar
On 22/06/2015 02:41, Alex Kleider wrote:
On 2015-06-21 15:55, Mark Lawrence wrote:
On 21/06/2015 21:04, Joshua Valdez wrote:
I'm having trouble making this script work to scrape information from a
series of Wikipedia articles.
What I'm trying to do is iterate over a series of wik
Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
.append("www." + str(domain)) # add to the end of the list
for url in urls:
doWhatever(url)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tu
nistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
hat I can able to put all this
database. I need some guidance of which area of coding I should look into.
Thank you
Hank
Start here
https://docs.python.org/3/library/html.parser.html#example-html-parser-application
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you
er more expensive in the USA than the UK :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscri
, please don't top post here, in can get irritating trying to
follow long threads, thanks.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@pytho
On 07/07/2015 03:16, Sahil Chauhan wrote:
Hi,
I am trying to use py.test for writing some selenium webdriver tests. I
wrote my first test and
pytest is deselecting that test even though I didn't mark any test.
How can I resolve this issue? Is there some default setting used by
py.test,
Hence:-
>>> a,b,*c=[1,2]
>>> a,b,c
(1, 2, [])
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
no) = xxx_todo_changeme.args
+print('Error: Could not open file to read --->', self._ifile)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist -
...@gmail.com
Good to hear, but would you please not top post here, it drives me
insane trying to read things that are arse about face, thank you.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
And I've just remembered http://www.erlang.org/
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription op
scule that possibility might actually be).
Definitely.
Thanks!
boB
No problem. Once again my invoice is in the post, your cheque by return
please :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
*
import matplotlib.pyplot as plt
The first was designed to make matplotlib easy to use interactively,
especially in iPython, the second in a script. IIRC the former is
deprecated so I suggest you stick with the latter.
--
My fellow Pythonistas, ask not what our language can do for you, as
rom iterable's items
Type: type
In [3]: help(list)
Help on class list in module builtins:
class list(object)
| list() -> new empty list
| list(iterable) -> new list initialized from iterable's items
|
| Methods defined here:
|
| __add__(self, value, /)
On 29/07/2015 19:38, ltc.hots...@gmail.com wrote:
I have no intention of answering a question that contains massives of
whitespace and no code. Please post your code inline.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark
On 30/07/2015 20:07, ltc.hots...@gmail.com wrote:
When you post here can you please find a mechanism that gives us more
text than whitespace, thank you.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
On 30/07/2015 23:34, ltc.hots...@gmail.com wrote:
sure
Sent from Surface
From: Mark Lawrence
Sent: Thursday, July 30, 2015 3:25 PM
To: Tutor@python.org
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
LGTM.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist
eight of your choice at the
start. I do know one thing, you won't find out until you try it :)
--
boB
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor
kinter and how to
desplay records on GUIs ?
Combine these two.
http://zetcode.com/gui/tkinter/
http://zetcode.com/db/sqlitepythontutorial/
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
d i
i += 1
Having said that what are you trying to achieve? If you tell us we may
be able to suggest a cleaner solution.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawre
means that the following slice returns a new (shallow)
copy of the list:
>>> squares = [1, 4, 9, 16, 25]
>>> squares[:]
[1, 4, 9, 16, 25]
Hence:-
for x in xlist[:]:
etc.
--
My fellow Pythonistas, ask not what our language can do for you, ask
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 05/08/2015 23:58, Ltc Hotspot wrote:
Hi Mark,
Address identifies the email address with the maximum number of sends:
c...@iupui.edu.
Secondly, we are missing a count on the number of messages sent by
c...@iupui.edu, i.e., 5.
Thirdly, maxval 'none' is not defined on line # 24
401 - 500 of 1119 matches
Mail list logo