Re: [Tutor] Counter not defined error

2015-02-21 Thread Mark Lawrence
tement is outside of that scope. Shifting the print statement right four spaces should do the trick. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist -

Re: [Tutor] Rearranging a list

2015-02-26 Thread Mark Lawrence
k 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

Re: [Tutor] Use python to parse the subject line of emails, listen for and react to commands

2015-02-26 Thread Mark Lawrence
meone point me in the right direction Will this https://docs.python.org/3/library/email-examples.html at least get you going? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: [Tutor] List of ints

2015-03-02 Thread Mark Lawrence
value to a list of ints? You are trying to increment the first element of count which is itself a list containing one element. You actually need:- count[0][0] +=1 -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Re: [Tutor] How to test a class in python?

2015-03-03 Thread Mark Lawrence
Unit forms a part of the Python Standard Library as of Python version 2.1." so for the latest version see https://docs.python.org/3/library/unittest.html -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our

Re: [Tutor] codecs.open vs io.open

2015-03-03 Thread Mark Lawrence
o for our language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] List of ints

2015-03-03 Thread Mark Lawrence
On 03/03/2015 23:09, Phil wrote: On 03/03/15 17:46, Mark Lawrence wrote: You are trying to increment the first element of count which is itself a list containing one element. You actually need:- count[0][0] +=1 Thank you Lawrence, Alan, and Danny, The solution is embarrassingly obvious

Re: [Tutor] List of ints

2015-03-04 Thread Mark Lawrence
calls when debugging. About time we threw in the use of the interactive interpreter for trying code snippets as well, just for good measure :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence _

Re: [Tutor] Python 3 - bugs or installation problem

2015-03-05 Thread Mark Lawrence
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

Re: [Tutor] Strengths & weaknesses of Python lists compared to "old school" arrays [Was "Fixed Vector Array"]

2015-03-05 Thread Mark Lawrence
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

Re: [Tutor] Idle - ImportError: No module named numpy

2015-03-06 Thread Mark Lawrence
istas, 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

Re: [Tutor] String method "strip()" not working

2015-03-07 Thread Mark Lawrence
n 2 (or earlier Python 3) help output. In Python 3 strings are always unicode, so that last line has gone. -- 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

[Tutor] Daft subjects (Was Help)

2015-03-07 Thread Mark Lawrence
other? What's wrong with this? def f(i, n): values = [] for x in range(i, n+1, 1): values.append(x**2) return values -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mar

Re: [Tutor] Help

2015-03-07 Thread Mark Lawrence
If zero based indexing is an issue I'd just write:- values = [None] to start with. -- 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

Re: [Tutor] print method in Python2.7 problem

2015-03-15 Thread Mark Lawrence
simply becomes. print 'DSB "HI;" %s' % Stat['Vbatt'] I'll leave you to come back with the next problem as I haven't worked out what the solution is yet :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do

Re: [Tutor] print method in Python2.7 problem

2015-03-15 Thread Mark Lawrence
On 15/03/2015 17:40, Mark Lawrence wrote: On 15/03/2015 16:46, Doug Basberg wrote: Nothing because it was in a completely unnecessary attachment (some people won't even receive it), so here's the code. Stat = {'Vbatt': 51.24, 'Ichrg': 6.75} print ' SOLA

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Mark Lawrence
ven if not expected). I must turn off that relay or harm may occur. Thanks, Doug https://docs.python.org/3/library/atexit.html -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Mark Lawrence
change course to take effect. -- 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

Re: [Tutor] List comprehensions to search a list--amazing!

2015-03-18 Thread Mark Lawrence
ode compare to the bisect module https://docs.python.org/3/library/bisect.html#module-bisect ? -- 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.or

Re: [Tutor] What is the best approach to organizing the order of functions in a module?

2015-03-19 Thread Mark Lawrence
as good as any, so if it fits your mind set, 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 subscripti

Re: [Tutor] Reversi Game Logic

2015-03-19 Thread Mark Lawrence
else : row += rowInc col += colInc if row < 0 or row > 7 or col < 0 or col > 7 : return False return False -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence _

Re: [Tutor] Fastest find in 2 2D lists with else statement

2015-03-20 Thread Mark Lawrence
ld do the trick. However, I can't figure out how to use next for finding in two 2d arrays. -From my understanding, for this use, b needs to be a list. However, each line is unique, so it could be a set if necessary. Thanks in advance. Best, Kale -- My fellow Pythonistas, ask not w

Re: [Tutor] Python OO

2015-03-28 Thread Mark Lawrence
r 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

Re: [Tutor] Python OO

2015-03-29 Thread Mark Lawrence
On 29/03/2015 02:32, Juan C. wrote: On Sat, Mar 28, 2015 at 10:26 PM Mark Lawrence wrote: If your classes are small put them in one source file, which is clearly simpler than your proposed structure. Why over-engineer something if there is no need to? Well, my classes won't be that small

Re: [Tutor] Why does print(a_list.sort()) return None?

2015-03-29 Thread 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

Re: [Tutor] Python OO

2015-03-29 Thread Mark Lawrence
nfusing errors later. As Peter said, I'm using __main__.py so that I can invoke the the app like 'python pycinema' in the console. A bunch of people recommend this approach. On Sun, Mar 29, 2015 at 11:31 AM Mark Lawrence wrote: No. We're talking Python, not Java. Some modules

Re: [Tutor] lamda in list comp

2015-03-29 Thread Mark Lawrence
hink you need a lambda function? [x**2 for x in range(10)] should do the trick. -- 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

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread Mark Lawrence
ing things but there are other options. As an example you might like to see the pairwise function here http://pythonhosted.org//more-itertools/api.html with the code available on pypi if you'd like to play. -- My fellow Pythonistas, ask not what our language can do for you, ask what you

Re: [Tutor] Python Idioms?

2015-04-01 Thread Mark Lawrence
ired items, overlapping, from the original >>> take(4, pairwise(count())) [(0, 1), (1, 2), (2, 3), (3, 4)] -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor

Re: [Tutor] Python Idioms?

2015-04-01 Thread Mark Lawrence
On 01/04/2015 14:16, Steven D'Aprano wrote: On Wed, Apr 01, 2015 at 12:06:33PM +0100, Mark Lawrence wrote: In which case I'll stick with the more-itertools pairwise() function which I pointed out on another thread just yesterday. From http://pythonhosted.org//more-itertools/api.html

Re: [Tutor] Python serial interface

2015-04-01 Thread Mark Lawrence
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

Re: [Tutor] Python serial interface

2015-04-01 Thread Mark Lawrence
you please stop top posting, it's extremely irritating trying to follow fairly long threads like this, thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor mai

Re: [Tutor] Python Idioms?

2015-04-01 Thread Mark Lawrence
On 01/04/2015 18:20, Roel Schroeven wrote: Mark Lawrence schreef: On 01/04/2015 11:50, Alan Gauld wrote: On 01/04/15 11:04, Wolfgang Maier wrote: On 04/01/2015 11:04 AM, Alan Gauld wrote: On 01/04/15 05:50, Jim Mooney wrote: s = [1,2,3,4,5,6,7,8] list(zip(*[iter(s)]*2)) [(1, 2), (3, 4), (5

Re: [Tutor] Use of "or" in a lambda expression

2015-04-04 Thread Mark Lawrence
On 04/04/2015 17:49, boB Stepp wrote: Windows 7, Python 3.4.3 This code snippet is "Example 7-13" on page 383 from "Programming Python, 4th ed." by Mark Lutz : import sys from tkinter import * widget = Button(None, text='Hello event world!',

Re: [Tutor] Loops

2015-04-05 Thread Mark Lawrence
t that to an int (or some other numeric type) before you can add it to your total. -- 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

Re: [Tutor] Why is it invalid syntax to have a particular dictionary value as an argument?

2015-04-06 Thread Mark Lawrence
its" or "license" for more information. >>> d = {'a':'123'} >>> def func(s=d['a']): ... print s ... >>> func() 123 Emile Dreadful advice. There have always have been and always will be questions from newbies as they do

Re: [Tutor] list semantics

2015-04-11 Thread Mark Lawrence
tely after the call to list(), that makes p a tuple. -- 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 subscripti

Re: [Tutor] Regular expression on python

2015-04-14 Thread Mark Lawrence
t seems to be similar in purpose yet it is different to your style above (no parens for example)? https://docs.python.org/3/library/re.html#module-contents re.X and re.VERBOSE are together. -- My fellow Pythonistas, ask not what our language can do f

[Tutor] confused about Pypi

2017-10-28 Thread Mark Anderson
understand it I have to write certain text into the command prompt (I’m using windows 10). It tells me that python -m is not recognised. Can anyone help please Regards Mark Anderson Sent from Mail for Windows 10 ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] confused about Pypi

2017-10-28 Thread Mark Lawrence
On 28/10/17 21:43, Mark Anderson wrote: Hello, I am currently doing an online course to learn Python. Generally ive followed it well and am enjoying my first go at programming. However the description of how to get modules from PyPi has left me confused. Ive only recently downloaded python so

Re: [Tutor] confused about Pypi

2017-10-29 Thread Mark Anderson
Hi In short I am trying to download a third party package that is recommended for a program I am writing on the course. The text is C:\Users\marka> python -m pip "Pyglet" 'python' is not recognized as an internal or external command, operable program or batch file. Ho

[Tutor] FW: confused about Pypi

2017-10-29 Thread Mark Anderson
Apologies I missed a word out (added below) but error message the same anyway Sent from Mail for Windows 10 From: Mark Anderson Sent: 29 October 2017 07:57 To: tutor@python.org Subject: RE: [Tutor] confused about Pypi Hi In short I am trying to download a third party package that is

Re: [Tutor] QT5 pyqt5 for python 2.7

2017-11-18 Thread Mark Lawrence
the quotes, there's loads of hits for linux and its variants, mac and windows. -- 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 unsubs

Re: [Tutor] QT5 pyqt5 for python 2.7

2017-11-19 Thread Mark Lawrence
On 18/11/17 18:03, adam ghering wrote: I have what seems like two responses but there are no text at all in the body of the messages. Is there a way I am supposed to see these? Best, From: Tutor on behalf of Mark Lawrence Sent: Saturday, November 18, 2017

Re: [Tutor] Need assistance

2017-11-20 Thread Mark Lawrence
assignment is and show us the code that you have written, then we give you hints on how to proceed. -- 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

Re: [Tutor] Python

2017-11-30 Thread Mark Lawrence
be 0. Example: Input: 10 5 11 4 2 8 10 7 4 3 6 Output: 17 Kind Regards Jeroen van de Ven (beginner) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist -

Re: [Tutor] python gui Tkinter

2018-01-13 Thread Mark Lawrence
k 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

Re: [Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread Mark Lawrence
= '2018' >>> monthdate = '0211' # skipping the input code. >>> from datetime import datetime >>> datetime.strptime(year + monthdate, '%Y%m%d') datetime.datetime(2018, 2, 11, 0, 0) >>> datetime.strptime(year + month

Re: [Tutor] can someone explain the reason for error

2018-02-07 Thread Mark Lawrence
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

Re: [Tutor] Creating a DataFrame from excel file

2018-02-09 Thread Mark Lawrence
nto a pandas DataFrame" so you just have to assign the return value from the call to a variable. -- 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@

Re: [Tutor] I have a problem with def

2018-02-23 Thread Mark Lawrence
is a keyword in Python, but that doesn't happen, anyone else having this problem Anyone know what I should do or look for The colon is missing. def func(): ... -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our lang

Re: [Tutor] List vs. Set:

2018-02-25 Thread Mark Lawrence
nth gets input, yet produces the traceback when a valid day and month is input. God Bless: James Lundy jalu...@computer.org<mailto:jalu...@computer.org> -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence __

Re: [Tutor] Using the Nimblenet Library in Python 3.6

2018-04-04 Thread Mark Lawrence
2.7 and 3.6 are chalk and cheese. Nothing could be further from the truth and has regrettably been one of the reasons for the dreadfully slow uptake of Python 3. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark

Re: [Tutor] Using the Nimblenet Library in Python 3.6

2018-04-05 Thread Mark Lawrence
On 05/04/18 09:39, Alan Gauld via Tutor wrote: On 05/04/18 04:02, Mark Lawrence wrote: Python 3.6 has more functionality than 2.7 by definition, but your comment implies, at least to me, that 2.7 and 3.6 are chalk and cheese. Nothing could be further from the truth and has regrettably been one

Re: [Tutor] Extract main text from HTML document

2018-05-06 Thread Mark Lawrence
my.com/software/BeautifulSoup/bs4/doc/ should fit the bill. Both are installable with pip and are regarded as best of breed. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor mai

Re: [Tutor] How to separate UI code from program logic?

2018-05-06 Thread Mark Lawrence
view controller pattern. First hit on google https://www.tomdalling.com/blog/software-design/model-view-controller-explained/ seems as good as any. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: [Tutor] Choice of tools

2018-05-10 Thread Mark Lawrence
tas, 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

Re: [Tutor] Question about a python finction

2018-05-11 Thread Mark Lawrence
thon.org/3/library/stdtypes.html#typesseq -- 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 opti

Re: [Tutor] Recursion depth exceeded in python web crawler

2018-06-14 Thread Mark Lawrence
ng functions) The interpreter returned this error: *RuntimeError: maximum recursion depth exceeded while calling a Python object* After calling crawl() and create_jobs() a bunch of times? How can I resolve this? Thanks Just a quick glance but crawl calls create_jobs which calls crawl... -- My

Re: [Tutor] C++ or Python?

2018-07-04 Thread Mark Lawrence
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

Re: [Tutor] Is there a better way to write my code?

2018-08-13 Thread Mark Lawrence
Tiger", "SuperLion", "Cow", "Panda"] animals_lol = [] for animal in animals: animals_lol.append((animal, len(animal))) print(animals_lol) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: [Tutor] Python programming help!

2018-09-23 Thread Mark Lawrence
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

Re: [Tutor] Installing new modules

2018-09-28 Thread Mark Lawrence
On 28/09/18 20:03, Rahul Koparde wrote: How to install twilio module in python? pip I'll let you do the rest of the research. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Law

Re: [Tutor] tkinter

2018-09-30 Thread Mark Lawrence
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

Re: [Tutor] coding problem

2018-10-04 Thread Mark Lawrence
, 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

Re: [Tutor] [spoiler] Re: Shifting arrays as though they are a 'word'

2018-10-09 Thread Mark Lawrence
On 09/10/18 17:10, Alan Gauld via Tutor wrote: On 09/10/18 13:45, Chip Wachob wrote: Another related question. How do I know I want to do dir(int) vs.. I don't know dir(long)? Because you want to convert the byte array into an int. And there is no long in Python... Really? :) mark

Re: [Tutor] Advanced python recommendations

2018-10-10 Thread Mark Lawrence
e out with the Python 3 book you reference above, presumably because he was losing cash. -- 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

Re: [Tutor] Python

2018-10-12 Thread Mark Lawrence
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

Re: [Tutor] Help please

2018-10-12 Thread Mark Lawrence
ou," + new_food) Also, colons and spaces are good practices when using input boxes, such as food_1=raw_input("Sushi: ") Please don't top post as it makes reading long threads really irritating. -- My fellow Pythonistas, ask not what our language can do for you, ask what

Re: [Tutor] problem with creating paths

2018-10-17 Thread Mark Lawrence
a problem with this? -- 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.

Re: [Tutor] Installing python

2018-11-02 Thread Mark Lawrence
added for security reasons. -- 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.pytho

Re: [Tutor] Pythonic way

2018-11-20 Thread Mark Lawrence
. String methods https://docs.python.org/3/library/stdtypes.html#string-methods Any advance on five anybody? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist

Re: [Tutor] learning languages

2018-11-22 Thread Mark Lawrence
language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] writer overloaded

2018-11-29 Thread Mark Lawrence
On 29/11/2018 02:04, Avi Gross wrote: [another massive snip] Please take this some place else as I see no place on this *TUTOR* list for your ramblings. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: [Tutor] Trouble about creating database

2018-11-29 Thread Mark Lawrence
s the problem and either the complete traceback or the error message. -- 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 c

Re: [Tutor] Borrowing restricted code

2018-12-05 Thread Mark Lawrence
On 05/12/2018 16:22, Avi Gross wrote: [huge snip] Please take yourself to another forum, your ramblings have no place on the *PYTHON TUTOR* mailing list. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: [Tutor] Open webpage and save CSV

2018-12-13 Thread Mark Lawrence
. Failing that send a large cheque to the PSF and no doubt somebody will help you out. -- 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

Re: [Tutor] Long Lines techniques

2018-12-13 Thread Mark Lawrence
Indentation is only significant if it starts at the beginning of a statement. Hope this helps Bob gailer Big +1 from me :-) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___

Re: [Tutor] look back comprehensively

2018-12-27 Thread Mark Lawrence
On 25/12/2018 00:45, Avi Gross wrote: Please go away as you are so boring :-( -- 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

Re: [Tutor] decomposing a problem

2018-12-27 Thread Mark Lawrence
On 26/12/2018 00:00, Avi Gross wrote: [Long enough that some should neither read nor comment on.] PLEASE GO AWAY YOU ARE REALLY IRRITATING. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: [Tutor] Defining variable arguments in a function in python

2018-12-30 Thread Mark Lawrence
On 30/12/2018 17:26, Avi Gross wrote: Replying to Steve's points. Again, it was not a serious design and said so but was an ACADEMIC exploration of what could be done. I fully agree with Steve that it is probably not a great idea to do this but note the original request might not have been a grea

Re: [Tutor] Not able to get to Script Mode

2019-01-29 Thread Mark Lawrence
istas, 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

Re: [Tutor] How to get Selenium to wait for page load

2019-01-31 Thread Mark Lawrence
t top post here as it's so damn irritating when reading long threads. -- 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

Re: [Tutor] text processing lines variable content

2019-02-06 Thread Mark Lawrence
Tutor maillist  -  Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor -- 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

Re: [Tutor] text processing lines variable content

2019-02-06 Thread Mark Lawrence
On 06/02/2019 18:51, ingo janssen wrote: On 06/02/2019 19:07, Mark Lawrence wrote: That's going to a lot of work slicing and dicing the input lists. Perhaps a chunked recipe like this https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.chunked would be better.

Re: [Tutor] Help Please

2019-02-20 Thread Mark Lawrence
utf: fiter = iter(lines) line = next(fiter) outf.write(line) for line in fiter: if "Void" not in line and "Disconnected" not in line and "Error" not in line: # probably a simpler way of writing this but I'm knackered :-) outf.write(l

Re: [Tutor] import failure

2019-02-23 Thread Mark Lawrence
at the problem might be or how to investigate further would be very much appreciated. Cheers, Alex Just to follow up there are some useful tips in this https://mail.python.org/pipermail/python-list/2019-February/739643.html as to how to debug these type of problems. -- My fellow Pythoni

Re: [Tutor] Visual studio Code -Python

2019-02-23 Thread Mark Lawrence
2500 times ? Set a breakpoint on the first line after the loop, please see https://code.visualstudio.com/docs/python/debugging#_invoking-a-breakpoint-in-code -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Law

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread Mark Lawrence
curses before you try using the Python wrapper? -- 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

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Mark Lawrence
lendar.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

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Mark Lawrence
, THURSDAY, FRIDAY, SATURDAY, and SUNDAY are provided for convenience. For example, to set the first weekday to Sunday: import calendar calendar.setfirstweekday(calendar.SUNDAY) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark

Re: [Tutor] How to create a structure from a Log file

2019-03-09 Thread Mark Lawrence
please let us know and we'll get you sorted :) -- 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

[Tutor] help with colormode

2019-04-25 Thread Mark Alderson
any help would be appreciated, thanks Mark City of Glasgow College | Scottish Charity Number SCO36198 | VAT Number 59677128 DISCLAIMER :- This email, together with any attachments, may be confidential and the subject of legal privilege. If you are not the intended recipient, please notify the se

Re: [Tutor] Finding unique strings.

2019-05-03 Thread Mark Lawrence
out https://docs.python.org/3/library/collections.html#collections.defaultdict as I think it's right up your street. Examples are given at the link :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Law

Re: [Tutor] How arguments to the super() function works?

2019-05-18 Thread Mark Lawrence
eck this https://www.youtube.com/watch?v=EiOglTERPEo out. If that doesn't answer your question please ask again. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist

Re: [Tutor] which of these is more efficient?

2019-08-19 Thread Mark Lawrence
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

Re: [Tutor] What is Curses and why do they call it that.

2009-10-12 Thread Mark K. Zanfardino
Curses is a pun on the term "cursor optimization". It is a library of functions that manage an application's display on character-cell terminals (e.g., VT100). On Mon, 2009-10-12 at 17:13 -0500, Luke Paireepinart wrote: > Not sure what curses means but that module only works on Unix. It does > do

Re: [Tutor] First line of a python program

2009-10-12 Thread Mark K. Zanfardino
e presence of these two characters as an indication that the file is a script, and tries to execute that script using the interpreter specified by the rest of the first line in the file. Mark On Mon, 2009-10-12 at 14:49 -0700, Katt wrote: > Hello all, > > Numerous times I see the follo

Re: [Tutor] Help with pexpect

2009-10-16 Thread Mark K. Zanfardino
authenticated based on the key pair. Check out ssh-copy-id. Mark On Fri, 2009-10-16 at 13:45 -0600, Nathan Farrar wrote: > I'm trying to automate the collection of data to remote devices over > ssh via pexpect. I had originally attempted (with limited success) to > use paramiko, however

Re: [Tutor] Tokenizing a imple string with split()

2007-04-02 Thread Jean Mark Gawron
The split method in the "re" module does what you want here. This is a method on compiled re_patterns, so first you construct a regular expression that matches any of the desired separators: >>> s = "spam;egg mail" >>> x_re = re.compile(r'[; ]') >>> s.split("; ") ['spam;egg ma

<    6   7   8   9   10   11   12   >