Às 20:35 de 07/01/21, Terry Reedy escreveu:
> On 1/7/2021 4:20 AM, Terry Reedy wrote:
>> On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
>>> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>>>
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in t
On Fri, Jan 8, 2021 at 11:31 AM Greg Ewing wrote:
>
> Another way to approach this problem is using recursion, e.g.
>
> def find_combinations(items, n, comb, result):
>if n == 0:
> result.append(comb)
>else:
> for item in items:
>find_combinations(items, n - 1, comb + [it
Another way to approach this problem is using recursion, e.g.
def find_combinations(items, n, comb, result):
if n == 0:
result.append(comb)
else:
for item in items:
find_combinations(items, n - 1, comb + [item], result)
words = []
find_combinations(['a', 'b', 'c'], 3, [], words
I have added you to the EMAIL list, so when I have questions.
Just learn for fun.
Craig Hatch
--
https://mail.python.org/mailman/listinfo/python-list
On 1/7/2021 4:20 AM, Terry Reedy wrote:
On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why
On 08/01/2021 05.52, Bischoop wrote:
> On 2021-01-07, Chris Angelico wrote:
>>
>> True. Unfortunately, it doesn't work, so what you'd have is something
>> that can be easily parameterized to not work on other numbers of
>> characters too. :)
>>
>
> My bad is I'm kinda maniac and have to know how
I find a parallel to counting useful. Let letters be '0' to '9'
and think of manual (in contrast to formatting range(0, 10))
construction of list of strings "" to ""
Let's start with . How do you compute the next item? Start
looking from its end. I stop here in order to leave space fo
On 2021-01-07, Bischoop wrote:
> On 2021-01-07, Chris Angelico wrote:
>>
>> True. Unfortunately, it doesn't work, so what you'd have is something
>> that can be easily parameterized to not work on other numbers of
>> characters too. :)
>>
>
> My bad is I'm kinda maniac and have to know how to, I
Às 07:29 de 07/01/21, Paulo da Silva escreveu:
> Hi!
>
> Does anybody know why cmd method isn't called when I change the button
> state (clicking on it) in this example?
> I know that this seems a weird class use. But why doesn't it work?
> Thanks.
>
> class C:
> from tkinter import Checkbutt
On 2021-01-07, David Raymond wrote:
> I think you might want to check out itertools.product()
> https://docs.python.org/3.9/library/itertools.html#itertools.product
Thanks David for contribution I find it very convenient but not knowing
how to solve solution without itertools for:
for a i :
On 2021-01-07, Chris Angelico wrote:
>
> True. Unfortunately, it doesn't work, so what you'd have is something
> that can be easily parameterized to not work on other numbers of
> characters too. :)
>
My bad is I'm kinda maniac and have to know how to, I know best solution
itertool but... I just
Às 16:02 de 07/01/21, Peter Otten escreveu:
> On 07/01/2021 08:42, Christian Gollwitzer wrote:
>> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>>
...
>
> I recommend that the OP use a more conventional stye and do the setup
> outside the class or, better, in an instance of the class.
>
There are
Às 09:20 de 07/01/21, Terry Reedy escreveu:
> On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
>> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>>
>>> Does anybody know why cmd method isn't called when I change the button
>>> state (clicking on it) in this example?
>>> I know that this seems a weird
Às 07:42 de 07/01/21, Christian Gollwitzer escreveu:
> Am 07.01.21 um 08:29 schrieb Paulo da Silva:
>
>> Does anybody know why cmd method isn't called when I change the button
>> state (clicking on it) in this example?
>> I know that this seems a weird class use. But why doesn't it work?
>> Thanks
On 2021-01-07, Dario Dario wrote:
> Sir, I am one of the user of your python program, that is after completion
> of installation I got some statement like "you got code execution problem
> ". I don't know how to rectify this problem.so please help me to rectify
> this problem .
> You send me the s
On 07/01/2021 22.44, Dario Dario wrote:
> Sir, I am one of the user of your python program, that is after completion
> of installation I got some statement like "you got code execution problem
> ". I don't know how to rectify this problem.so please help me to rectify
> this problem .
> You send me
On 07/01/2021 08:42, Christian Gollwitzer wrote:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why doesn't it work?
Thanks.
class C:
On Wed, 6 Jan 2021, Terry Reedy wrote:
'underline' has nothing to do with looking up the command in
self.callbacks. It is a keyword parameter for the add_command method, and
is handled like all other values passed by name, and as you did for the
other arguments
file_menu.add_command(
On Fri, Jan 8, 2021 at 2:12 AM Bischoop wrote:
>
> On 2021-01-07, Chris Angelico wrote:
>
> This could allow easy to change the number of characters in
> combination, just pass n argument to range where n is how many characters.
>
True. Unfortunately, it doesn't work, so what you'd have is some
I think you might want to check out itertools.product()
https://docs.python.org/3.9/library/itertools.html#itertools.product
import itertools
import string
passe = 'pass'
for p in itertools.product(string.ascii_lowercase, repeat = 4):
p = "".join(p)
if p == passe:
print("Found it:"
On 2021-01-07, Chris Angelico wrote:
This could allow easy to change the number of characters in
combination, just pass n argument to range where n is how many characters.
--
https://mail.python.org/mailman/listinfo/python-list
On 1/7/2021 2:42 AM, Christian Gollwitzer wrote:
Am 07.01.21 um 08:29 schrieb Paulo da Silva:
Does anybody know why cmd method isn't called when I change the button
state (clicking on it) in this example?
I know that this seems a weird class use. But why doesn't it work?
Thanks.
class C:
Sir, I am one of the user of your python program, that is after completion
of installation I got some statement like "you got code execution problem
". I don't know how to rectify this problem.so please help me to rectify
this problem .
You send me the solution in this email ID itself .
--
https:/
On 1/6/2021 4:17 PM, Terry Reedy wrote:
On 1/6/2021 4:03 PM, Rich Shepard wrote:
On Thu, 7 Jan 2021, Chris Angelico wrote:
Are you sure that this works? It's syntactically valid, but I don't
think it means what you think it does.
ChrisA,
I'm always open to learning. There's no error generat
On 2021-01-07, Chris Angelico wrote:
>
> I'd recommend having just a string, rather than a list; it'll behave
> identically for what you're doing, and it'll be a lot easier to see
> when you have all the right letters.
>
Yes that's definitely better, I've done so.
>> mineset= set()
>> for a in le
On Thu, 7 Jan 2021, Peter Otten wrote:
Spoiler: unless the name 'underline' is defined you get a NameError:
NameError: name 'underline' is not defined
If it is defined and self.callbacks is a dict you get a TypeError:
TypeError: unhashable type: 'slice'
because that's what a colon means in a con
We are currently working out the format for this year’s online
EuroPython conference. The conference will be run using online
conference tools during the week of July 26 - August 1 and we would like
to learn about your preferences regarding the overall structure.
For this reason, we’re running a p
On Thu, Jan 7, 2021 at 8:46 PM Bischoop wrote:
> What I want to learn is if I need get for example four combinations, so
> how to get in a loop first letter 'a',then another step'a' and again 'a'
> and 'a', to have '' later on'abaa' etc.
So you want every possible four-letter combination?
>
On 06/01/2021 22:03, Grant Edwards wrote:
I'm completely baffled by that. Can somebody explain how this
expression is evaluated?
self.callbacks['file->new', underline: 0]
It appears that the dict callbacks is being accessed with the key of
a tuple comprising a string and a slice.
Huh?
Y
On 06/01/2021 22:03, Rich Shepard wrote:
On Thu, 7 Jan 2021, Chris Angelico wrote:
Are you sure that this works? It's syntactically valid, but I don't
think it means what you think it does.
ChrisA,
I'm always open to learning. There's no error generated ... yet the
application doesn' open so
I was practising for educational purpose with simply password cracker.
I know that I could use itertool but in my case when I'm learning I
would miss facing problems and learning on them and indeed I've met one
which is not giving me a peace.
What I want to learn is if I need get for example fou
31 matches
Mail list logo