Re: IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.

2016-04-04 Thread Mark Lawrence via Python-list
for the answer. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread Mark Lawrence via Python-list
-map.html http://www.tkdocs.com/tutorial/styles.html In the latter you might like to note that there is a section called "Sound Difficult to you?". It's well worth the read. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter Entry validation modes

2016-04-05 Thread Mark Lawrence via Python-list
On 02/04/2016 19:45, Terry Reedy wrote: On 4/2/2016 11:11 AM, Mark Lawrence via Python-list wrote: A typical call to create an Entry field would be:- e = Entry(master, validate='all', ...) Once this call has been made is it possible to change the validation mode at runtime? AF

Re: python script for .dat file

2016-04-05 Thread Mark Lawrence via Python-list
language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Install request

2016-04-05 Thread Mark Lawrence via Python-list
of months. For those who disagree, they can provide the patches, or the edits to a wiki as appropriate. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Best Practices for Internal Package Structure

2016-04-05 Thread Mark Lawrence via Python-list
source file, running the risk of circular imports, feel free, I won't lose any sleep over it, but give me one, clean file any day of the week. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.pytho

Re: python script for .dat file

2016-04-05 Thread Mark Lawrence via Python-list
On 05/04/2016 21:35, Michael Selik wrote: What code have you written so far? Would you please not top post on this list, it drives me nuts!!! -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org

Re: Promoting Python

2016-04-06 Thread Mark Lawrence via Python-list
27;ll cope with ordinary coding as well, although such programs seem to be frowned upon here; they are not 'Pythonic'. How can you (plural) write Python code when you don't know Python? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our lang

Re: Checking function's parameters (type, value) or not ?

2016-04-06 Thread Mark Lawrence via Python-list
er in the function or worse provide a meaningless result. What library designers do ? Please see http://ftp.dev411.com/t/python/python-list/13bhcknhan/when-to-use-assert -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Ma

Re: Promoting Python

2016-04-06 Thread Mark Lawrence via Python-list
of GOTO will certainly help in that area. How does it go, something like "always consider that the person maintaining your code in six months time is a homicidal maniac armed with an axe"? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Promoting Python

2016-04-06 Thread Mark Lawrence via Python-list
On 06/04/2016 15:34, Ned Batchelder wrote: On Wednesday, April 6, 2016 at 10:25:13 AM UTC-4, Mark Lawrence wrote: On 06/04/2016 14:54, BartC wrote: On 06/04/2016 12:46, Marko Rauhamaa wrote: BartC : It'll cope with ordinary coding as well, although such programs seem to be frowned

Re: Promoting Python

2016-04-06 Thread Mark Lawrence via Python-list
let alone write decent code. Until such time as I see proof that he has any idea at all as to what he's talking about, he stays firmly in my dream team. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mai

Re: deque is not a subclass of Sequence.

2016-04-07 Thread Mark Lawrence via Python-list
ssubclass(deque, Sequence) True -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: how to convert code that uses cmp to python3

2016-04-07 Thread Mark Lawrence via Python-list
low Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: how to convert code that uses cmp to python3

2016-04-07 Thread Mark Lawrence via Python-list
se the two tuples almost always twice. Once to find out if they are equal and if not a second time to find out which is greater. Have you read this https://wiki.python.org/moin/HowTo/Sorting ? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: [beginner] What's wrong?

2016-04-08 Thread Mark Lawrence via Python-list
On 08/04/2016 23:59, [email protected] wrote: On Friday, April 1, 2016 at 3:57:40 PM UTC-7, Mark Lawrence wrote: On 01/04/2016 23:44, [email protected] wrote: On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: Nevermind. for j in range(1,8) should be for j in range

Re: QWERTY was not designed to intentionally slow typists down

2016-04-09 Thread Mark Lawrence via Python-list
what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Find the number of robots needed to walk through the rectangular grid

2016-04-09 Thread Mark Lawrence via Python-list
/wiki/Disjoint-set_data_structure Could you post a formal solution of disjoint-set using my algorithm You write the code, we comment on it. No code, no comment. Got the message? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Law

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-09 Thread Mark Lawrence via Python-list
on in this discussion, as we're on the main Python mailing list? Please can the moderators take this stuff out, it is getting beyond the pale. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/m

Re: QWERTY was not designed to intentionally slow typists down

2016-04-09 Thread Mark Lawrence via Python-list
On 09/04/2016 20:25, Tim Golden wrote: On 09/04/2016 20:13, Mark Lawrence via Python-list wrote: On 09/04/2016 01:43, Ben Finney wrote: Dennis Lee Bieber writes: Yet another completely irrelevant thread that has nothing to do with Python. As this is meant to be the main Python mailing

Re: Find the number of robots needed to walk through the rectangular grid

2016-04-09 Thread Mark Lawrence via Python-list
, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: QWERTY was not designed to intentionally slow typists down

2016-04-09 Thread Mark Lawrence via Python-list
On 09/04/2016 21:22, alister wrote: On Sat, 09 Apr 2016 20:13:15 +0100, Mark Lawrence wrote: On 09/04/2016 01:43, Ben Finney wrote: Dennis Lee Bieber writes: Yet another completely irrelevant thread that has nothing to do with Python. As this is meant to be the main Python mailing list

Network protocols, sans I/O,(Hopefully) the future of network protocols in Python

2016-08-08 Thread Mark Lawrence via Python-list
This may be of interest to some of you http://www.snarky.ca/network-protocols-sans-i-o -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

dict.get(key, default) evaluates default even if key exists

2020-12-15 Thread Mark Polesky via Python-list
else default.  Nothing in that docstring suggests that the default value is evaluated even if the key exists, and I can't think of any good reason to do so. Am I missing something? Thanks, Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: dict.get(key, default) evaluates default even if key exists

2020-12-15 Thread Mark Polesky via Python-list
I see. Perhaps counterintuitive, but implemented consistently. Add it to the list of gotchas, I guess. By the way... four helpful responses in under an hour, very impressive. Nice community here. Thanks to all who answered. Mark On Tuesday, December 15, 2020, 11:05:10 AM PST, Serhiy

Re: Popping key causes dict derived from object to revert to object

2024-03-22 Thread Mark Bourne via Python-list
ce_state'] (There's not really any point popping the value if you're not going to do anything with it - just delete the key from the dictionary) -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: Using a background thread with asyncio/futures with flask

2024-03-22 Thread Mark Bourne via Python-list
;: main() ``` By default, the main process won't exit until there are no non-daemon threads still running. You can either send some sort of signal to the threads signal the threads to exit the loop and return cleanly (you'd also need a timeout on the queue `get()` calls). Or you can create the threads as "daemon" threads (as in the commented-out lines), in which case they'll be killed when all non-daemon threads have exited. Daemon threads don't get a chance to do any cleanup, close resources, etc. when they're killed, though, so aren't always appropriate. -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: A missing iterator on itertools module?

2024-04-01 Thread Mark Bourne via Python-list
may be that it also uses `__all__` to determine a module's public API. In that case, setting `__all__ = ["f"]` in `A` should prevent it from offering `math` as a completion (nor any other name that's not in the `__all__` list). -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: A technique from a chatbot

2024-04-04 Thread Mark Bourne via Python-list
t expression, you'd need to pass the generator to tuple's constructor: tuple(word for word in list_ if word[0] == 'e') (You don't need to include an extra set of brackets when passing a generator a the only argument to a function). -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: A technique from a chatbot

2024-04-05 Thread Mark Bourne via Python-list
[email protected] wrote: That is an excellent point, Mark. Some of the proposed variants to the requested problem, including mine, do indeed find all instances only to return the first. This can use additional time and space but when done, some of the overhead is also gone. What I mean is

Re: A technique from a chatbot

2024-04-05 Thread Mark Bourne via Python-list
Stefan Ram wrote: Mark Bourne wrote or quoted: I don't think there's a tuple being created. If you mean: ( word for word in list_ if word[ 0 ]== 'e' ) ...that's not creating a tuple. It's a generator expression, which generates the next value each time it&#

Trouble getting to windows My Documents directory

2015-07-10 Thread Mark Storkamp via Python-list
I'm just learning Python, and I've run into trouble trying to change directory to the windows My Documents directory. There's likely a better way to do this, but this is what I've tried so far: - from tkinter import Tk from tkinter.filedialog import as

Re: Trouble getting to windows My Documents directory

2015-07-10 Thread Mark Storkamp via Python-list
In article , MRAB wrote: > On 2015-07-10 15:27, Mark Storkamp via Python-list wrote: > > I'm just learning Python, and I've run into trouble trying to change > > directory to the windows My Documents directory. There's likely a better > > way to do this

Re: Rosetta: Sequence of non-squares

2017-05-02 Thread Mark Summerfield via Python-list
On Monday, May 1, 2017 at 9:47:10 PM UTC+1, [email protected] wrote: > On Monday, May 1, 2017 at 11:27:01 AM UTC-7, Robert L. wrote: > [no Python] > > Do you ever plan to ask any questions about Python? Or are you just using a > few lines of code as a fig leaf for the race baiting that you post in

Re: Why am I getting a 'sqlite3.OperationalError'?

2017-05-11 Thread Mark Summerfield via Python-list
The ? is indeed for variable substitution, but AFAIK only for field values, not for table names, which is why your first example doesn't work and your second and third examples do work. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to install Python package from source on Windows

2017-05-16 Thread Mark Summerfield via Python-list
I think the problem that Deborah has encountered is a more general one on Windows: many pip-installable packages assume that a C compiler is available. Now an "obvious" solution is for pip to recognise that a C compiler is needed and give an appropriate error message. But while that may reduce con

Re: sqlite3 is non-transactional??

2017-06-15 Thread Mark Summerfield via Python-list
On Thursday, June 15, 2017 at 9:50:18 AM UTC+1, Michele Simionato wrote: > Thanks. I suspected the culprit was executescript, but I did not see it > documented in > https://docs.python.org/3/library/sqlite3.html#connection-objects. Although the standard library's sqlite3 module is useful, person

Re: sqlite in 2.7 on redhat 6

2017-06-15 Thread Mark Summerfield via Python-list
On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, [email protected] wrote: > I am trying to use sqlite > > $ python2.7 > Python 2.7.10 (default, Feb 22 2016, 12:13:36) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>>

Re: Chardet oddity

2024-10-24 Thread Mark Bourne via Python-list
ge': ''} # Terminal $ python -m chardet FILENAME FILENAME: MacRoman with confidence 0.7167379080370483 Thanks! Albert-Jan -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble with mocking

2024-09-20 Thread Mark Bourne via Python-list
n2_to_mock` won't call `function1_to_mock` (or its mock) regardless of whether `function1_to_mock` has been patched, unless you set the mock of `function2_to_mock` to do so. You don't necessarily need to patch `function1_to_mock`, unless of course there are other calls to it that you need to mock. -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: Division-Bug in decimal and mpmath

2024-12-15 Thread Mark Bourne via Python-list
[email protected] wrote: On 2024-12-14 at 12:08:29 +, Mark Bourne via Python-list wrote: Martin Ruppert wrote: Hi, the division 0.4/7 provides a wrong result. It should give a periodic decimal fraction with at most six digits, but it doesn't. Below is the comparis

Re: Division-Bug in decimal and mpmath

2024-12-14 Thread Mark Bourne via Python-list
Martin Ruppert wrote: Hi, the division 0.4/7 provides a wrong result. It should give a periodic decimal fraction with at most six digits, but it doesn't. Below is the comparison of the result of decimal, mpmath, dc and calc. 0.0571428571428571460292086417861615440675190516880580357142857 decim

<    54   55   56   57   58   59