New submission from Mark Summerfield:
GvR asked me to add this to the bug tracker.
If you do this:
class A(ABCMeta): pass
A.register(list)
you get this error message:
Traceback (most recent call last):
File "", line 1, in
RuntimeError: maximum recursion depth e
Mark Summerfield added the comment:
Perhaps a useful compromise would be to add an "encoding" attribute that is set
to the encoding of the XML file that's read in (and with a default of "ascii").
That way it would be possible to preserve the encoding, e.g.:
import
Mark Summerfield added the comment:
I don't see how lxml is relevant here? lxml is a third party library, whereas
etree is part of the standard library. And according to the 3.1.2 docs etree
doesn't have a docinfo (or any other
New submission from Mark Summerfield :
I'm reporting this at Georg Brandl's suggestion.
If you unpack the attached (tiny) tarball you get this directory structure:
Graphics/
Graphics/Xpm.py
Graphics/Vector/
Graphics/Vector/__init__.py
Graphics/Vector/Svg.py
Graphics/__init__.py
Mark Summerfield added the comment:
I just installed 3.1.3 and it does indeed give the import error:
Python 3.1.3 (r313:86834, Jan 17 2011, 16:29:46)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>&
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
The re module has the following flags (amongst others):
re.X == re.VERBOSE
re.S == re.DOTALL
The short forms of both these flags are clearly taken from Perl, but
they don't seem necessary for Python and are confusing since al
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
This bug can be worked around by using the more modern style of menu
creation. If the program that exhibits the bug has its __init__()
replaced as follows it works correctly on both Linux and Windows:
def __init__(self,
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
In Py30a5 idlelib/EditorWindow.py line 292 uses xrange() when it should
use range().
--
components: IDLE
messages: 67060
nosy: mark
severity: normal
status: open
title: idlelib/EditorWindow.py uses xrange()
versions: Pyth
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
AFAIK if you have a regex with named capture groups there is no direct
way to relate them to the capture group numbers.
You could do (untested; Python 3 syntax):
d = {v: k for k, v in match.groupdict()}
for i in
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
>>> help(str.replace)
Help on method_descriptor:
replace(...)
S.replace (old, new[, maxsplit]) -> unicode
Return a copy of S with all occurrences of substring
old replaced by new. If the optional ar
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
Py30a5
2to3 currently does not cope correctly with this:
print whatever; print
which it converts to:
print(whatever); print
This is a subtle error since "print" on its own is valid.
Nor does it replace the d
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
[snip]
> 13) Implement a grouptuples(...) method as per Mark Summerfield's
> suggest on 2008-05-28 09:38. grouptuples would take the same filtering
> parameters as the other group* functions, and would return a list of
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
Python 30b1
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
'en_US.UTF-8'
>>> for x in
(1234,12345,123456,1234567,12345678,123456789,1234567
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
When you build 30b1 on Linux (I tried Fedora 8 and Xubuntu 8) you get a
message that make failed to find the bits to build "_gestalt", which I
think is a Mac-thing not a Linux thing.
Anyway, Barry asked me to a
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
Py30b1
The module renaming of urllib's modules (and the getting rid of urllib2)
has been done---but this isn't reflected in the docs.
--
assignee: georg.brandl
components: Documentation
messages: 68406
nosy: ge
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
[snip]
It seems to me that both using a special prefix or adding an option are
adding a lot of baggage and will increase the learning curve.
The nice thing about (3) (even without slicing) is that it seems a v.
natural extension.
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
I built Python 30b1 from the tarball on Fedora 8 and Xubuntu 8.
My only configure switch was --prefix to get a local build.
On both systems the only build error I got was:
Failed to find the necessary bits to build these m
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
With 2.5.2 and 30b1 strings don't round trip like numbers do.
I guess it has been like this a long time so isn't a bug, but it does
seem inconsistent.
Both 2.5.2 and 30b1:
>>> x = 5
>>> x == int(repr(
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
I know it is almost certainly too late, but I think a lot of people will
be confused by str.decode() and bytes.encode() (or was that the other
way around)?
Calling the methods str.tobytes() and bytes.tostr() (or nicer,
str.to_bytes
Changes by Mark Summerfield <[EMAIL PROTECTED]>:
--
type: -> behavior
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3000>
___
___
Changes by Mark Summerfield <[EMAIL PROTECTED]>:
--
nosy: +mark
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2834>
___
___
Python
Changes by Mark Summerfield <[EMAIL PROTECTED]>:
--
nosy: +mark
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3394>
___
___
Python
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
When the attached program is run on Linux it runs "instantly" and
outputs one line, e.g.:
$ python3 mtest.py
100 files, 1702627142 bytes
(The number of bytes will vary depending on the system.)
When run on Windows XP th
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-08-19, Antoine Pitrou wrote:
> Antoine Pitrou <[EMAIL PROTECTED]> added the comment:
>
> For what it's worth, this is documented in
> http://docs.python.org/dev/library/multiprocessing.html#windows
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-08-19, Antoine Pitrou wrote:
> Antoine Pitrou <[EMAIL PROTECTED]> added the comment:
>
> Fixed in r65860. Someone should check the docs though (at least try to
> generate them, and review my changes a bi
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-08-19, Antoine Pitrou wrote:
> Antoine Pitrou <[EMAIL PROTECTED]> added the comment:
>
> Fixed in r65860. Someone should check the docs though (at least try to
> generate them, and review my changes a bi
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
When I try to run IDLE in Py30b3 I get a traceback, then the main window
appears with an error message box and an OK button; once I click OK,
IDLE goes away.
$ ~/opt/python30b3/bin/idle
Traceback (most recent call last):
File &q
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
Here are the results of running the same tiny program against 2.5.2,
30b2, and 30b3. The program creates a regex and tries to match 3
strings. For 2.5.2 and 30b2 this works fine; for 30b3 the regex won't
even compile:
$ pytho
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
Just realised how to fix this. Change line 76 in idlelib/run.py:
# change this:
sockthread.set_daemon(True)
# to this:
sockthread.daemon = True
and IDLE runs fine.
___
Python tracker &
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
Py30rc1
On Windows the file object returned by urllib.request.urlopen() appears
to be in binary mode, so .read() returns a bytes object. But on Linux it
appears to be in text mode, so .read() returns a str object. It seeems
to m
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
Sorry, I now can't reproduce it. I made a tiny test script and it worked
fine on both Windows and Linux. Now when I run the real test that works
fine too. So could you close/remove this "bug" for me please?
#!/usr/b
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
# This program works fine with Python 2.5 and 2.6:
def f():
"""
>>> f()
'xyz'
"""
return "xyz"
if __name__ == "__main__":
import doctest
Mark Summerfield added the comment:
IMO there's another problem with subprocess portablity---the lack of control
over encodings: see issue 6135.
--
nosy: +mark
___
Python tracker
<http://bugs.python.org/i
Mark Summerfield added the comment:
On 2007-11-30, Christian Heimes wrote:
> Christian Heimes added the comment:
>
> Fixed in r59233. Please adjust the error message if you don't like it.
>
> TypeError: register() cannot be called on an ABCMeta subclass, use class
> Exampl
New submission from Mark Summerfield:
When I start IDLE I get this:
Python 3.0a2 (r30a2:59382, Dec 10 2007, 14:21:37)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
Type "copyright", "credits" or "licens
Mark Summerfield added the comment:
Amaury Forgeot d'Arc says he's fixed this in change 59456 (but I don't
know how---or if---I can change its status).
__
Tracker <[EMAIL PROTECTED]>
<http://b
New submission from Mark Summerfield:
When I do:
import sys; dir(sys)
everything is shown in plain black & white, but in the IDLE that came
with Py30a1 color syntax highlighting is used.
--
components: IDLE
messages: 58423
nosy: mark
severity: minor
status: open
title: IDL
New submission from Mark Summerfield:
>>> x = complex(1, 2/3)
>>> "{0} {0:.5}".format(x)
'(1+0.6667j) (1+0.'
The complex number is being formatted as if it were a string and simply
truncated to 5 characters. I would expect each part of the complex
n
Mark Summerfield added the comment:
On 2007-12-11, Guido van Rossum wrote:
> Guido van Rossum added the comment:
>
> This really is a feature request -- in Python 2.x there is no formatting
> code for complex numbers at all, and "%.5s" % complex(...) does the same
> t
Mark Summerfield added the comment:
On 2007-12-11, Guido van Rossum wrote:
> Guido van Rossum added the comment:
>
> This really is a feature request -- in Python 2.x there is no formatting
> code for complex numbers at all, and "%.5s" % complex(...) does the same
> th
New submission from Mark Summerfield:
(1) IDLE starts up on Windows OK, but if I press Alt+F the file menu
comes up giant sized (i.e., each menu entry is almost as tall as the
screen).
(2) If I open a file using Ctrl+O, the Open dialog pops up fine, but
when I select a file and click Open, IDLE
New submission from Mark Summerfield:
I don't know if this is a bug, but it is certainly a difference in
behavior between platforms:
Python 3.0a2 on linux2:
>>> "{0:.3e}".format(123.45678901)
'1.235e+02'
Python 3.0a2 on win32:
>>> "{0:.3e}&qu
New submission from Mark Summerfield:
I am not sure if this is a Python bug or simply a limitation of cmd.exe.
I am using Windows XP Home.
I run cmd.exe with the /u option and I have set my console font to
"Lucida Console" (the only TrueType font offered), and I run chcp 65001
to se
Mark Summerfield added the comment:
On 2007-12-12, Guido van Rossum wrote:
> Guido van Rossum added the comment:
>
> Again, a (not unreasonable) feature request. AFAIK %e behaves the same
> way. I'm sure if you submitted a patch it would be accepted happily.
Unfortunately, I
New submission from Mark Summerfield:
In the attached file there are two tiny functions, flatten1() and
flatten2(). There is only one difference between them:
flatten1() has the line:
if isinstance(x, list):
and flatten2() has this line instead:
if isinstance(x, collections.Sequence
Mark Summerfield added the comment:
I've looked into this a bit more, and from what I can see, code page
65001 just doesn't work---so it is a Windows problem not a Python problem.
A possible solution might be to read/write UTF16 which "managed" Windows
Mark Summerfield added the comment:
On 2007-12-15, Christian Heimes wrote:
> Christian Heimes added the comment:
>
> Guido is right. On Linux the system's sprintf() family prints %e, %g and
> %f with two or three digits while Windows always uses three digits:
>
>
Mark Summerfield added the comment:
On 2007-12-15, Christian Heimes wrote:
> Christian Heimes added the comment:
>
> Mark Summerfield wrote:
> > It seems to me that Python should provide consistent results across
> > platforms wherever possible and that this is a gra
Mark Summerfield added the comment:
On 2007-12-15, Christian Heimes wrote:
> Christian Heimes added the comment:
>
> Mark Summerfield wrote:
> > It seems to me that Python should provide consistent results across
> > platforms wherever possible and that this is a gra
Mark Summerfield added the comment:
Attached is new version of test_float.py with a few tests to check
str.format() with exponents formats, plus a diff. They test that the
exponent is always 3 digits and that the case of the e in the format is
respected.
Added file: http://bugs.python.org
Mark Summerfield added the comment:
My C is rusty! Attached is new pystrtod.c & diff, this time using
memset() instead of looping to padd with zeros.
Added file: http://bugs.python.org/file8971/pystrtod.c
Added file: http://bugs.python.org/file8972/pystrtod.
Mark Summerfield added the comment:
On 2007-12-17, Christian Heimes wrote:
> Christian Heimes added the comment:
>
> Hi Mark!
>
> In general the patch is fine but it has some small issues.
>
> * Your patches are all reversed. They remove (-) the new lines instead
> of add
New submission from Mark Summerfield:
I am using:
Python 3.0a2 (r30a2:59382, Dec 17 2007, 08:47:22)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
IDLE 3.0a1
This seems wrong:
>>> while False:
print("no")
else:
print("yes")
>
Mark Summerfield added the comment:
On 2008-02-18, Mark Dickinson wrote:
> Mark Dickinson added the comment:
>
> I know I'm coming a bit late to this discussion, but I wanted to point
> out that the C99 standard does actually specify how many digits should
> be in t
New submission from Mark Summerfield:
On Fedora 8 I get this message:
Failed to find the necessary bits to build these modules:
_bsddb
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.
On Kubuntu 6.06 LTS I get the same message, but about different mo
Mark Summerfield added the comment:
On 2008-03-03, Martin v. Löwis wrote:
> Martin v. Löwis added the comment:
>
> Modules/Setup is out of date; _bsddb supports anything between 3.3 and 4.5.
>
FYI, only now I've just realised that Fedora 8's db version is 4.6.21,
but I tho
Mark Summerfield added the comment:
On 2008-03-03, Martin v. Löwis wrote:
> Martin v. Löwis added the comment:
>
> Rereading your report, I cannot quite understand what issue specifically
> you are reporting. What error message do you find confusing, and what do
> you think should
New submission from Mark Summerfield:
In IDLE for Py30a3 if you enter:
>>> class A(
as soon as you type the ( you get the following output to stderr (on
Fedora 8 with Tcl/Tk 8.4):
: *** Internal Error: rpc.py:SocketIO.localcall()
Object: exec
Method: >
Args: ('A',)
Mark Summerfield added the comment:
On 2008-03-03, Martin v. Löwis wrote:
> Martin v. Löwis added the comment:
> > What I find confusing is:
> >
> > Failed to find the necessary bits to build these modules:
> >
> > To find the necessary bits, look in set
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
Here is how to reproduce the bug:
from xml.etree.ElementTree import parse
import io
xml1 = """
text"""
xml2 = """
text"""
f1 = io.StringIO(xml1)
f2 = io.StringIO(xml2)
tre
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
According to the docs lambda can handle the same parameter list as can
def. But this does not appear to be the case as the following (both
2.5.1 and 30a3) shows:
>>> def f(*a, **kw): return a, kw
>>> f(1,2,a=3,b
Changes by Mark Summerfield <[EMAIL PROTECTED]>:
--
type: -> behavior
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2283>
__
___
Python-b
Changes by Mark Summerfield <[EMAIL PROTECTED]>:
--
components: +Library (Lib), XML
type: -> behavior
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.py
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-03-13, Imri Goldberg wrote:
> Imri Goldberg <[EMAIL PROTECTED]> added the comment:
>
> This is not a bug, just missing parenthesis.
>
> >>> lambda x: x,x
>
> Traceback (most recent call l
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
You're right that the parser should not recognise "utf8" since it isn't
correct XML (as per the references you gave).
I made the mistake because I used the etree module and wrote an XML file
with encoding "u
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-03-20, Sean Reifschneider wrote:
> Sean Reifschneider <[EMAIL PROTECTED]> added the comment:
>
> Don't modify Modules/Setup*, do as the message says and modify setup.py.
> Search for "4, 5&quo
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
# If you run the code below on Py30a3 you get the output shown at the end
import calendar, datetime, time
pastdate = datetime.datetime(1969, 12, 31)
print(pastdate)
timestamp = calendar.timegm(pastdate.utctimetuple())
print(tim
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
The tiny program at the end of this message runs under Python 2.5 &
30a3. Under 2 it gives the following output:
: python sax.py test.xml
('+', u'document')
('+', u'outer')
('+'
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
>>> # Py30a3
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "en_US.UTF8")
'en_US.UTF8'
>>> locale.format("%d", 12345, True)
'12,345'
>>>
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
The 30a4 RELNOTES file doesn't cover 30a3 or 30a4.
--
assignee: georg.brandl
components: Documentation
messages: 64918
nosy: georg.brandl, mark
severity: normal
status: open
title: Py30a4 RELNOTES only cover 30a1 an
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
In Py30a4's trace.py there is this:
calls = self.calledfuncs.keys()
calls.sort()
which causes:
AttributeError: 'dict_keys' object has no attribute 'sort'
There are two other occurrences
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
A bare * in a parameter list behaves differently depending on what
follows it:
Py30a4:
>>> def f(*, a=1, b=2): return 1
>>> def g(*, **kwargs): return 1
SyntaxError: named arguments must follow bare * (, line
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
At the moment fnmatch.py (and therefore glob.py) support:
* . [chars] [!chars]
The attached version of fnmatch.py extends this to:
* . [chars] [!chars] {one,two,...}
There are 2 changes from the original fnmatch.py file:
(
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
The new method float.is_integer() introduced in Py30a5 behaves unexpectedly:
>>> x = 5.0
>>> x.as_integer_ratio()
(5, 1)
>>> x.is_integer()
Traceback (most recent call last):
File "", lin
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
In Py30a5 the 'n' format option is not v. useful for integers:
>>> for x in range(8):
print("{0:n} ".format(10**x), end="")
1 10 100 1,000 10,000 100,000 1e+06 1e+07
This is
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-05-09, Mark Dickinson wrote:
> Mark Dickinson <[EMAIL PROTECTED]> added the comment:
>
> Is this on Windows? I can't reproduce it on OS X 10.5.2:
>
> Python 3.0a5+ (py3k:62937M, May 9 2008, 09:32:27
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-05-09, Mark Dickinson wrote:
> Mark Dickinson <[EMAIL PROTECTED]> added the comment:
> > I think that n should stay the same for floats, but for integers should
> > never switch to g, but just use as many
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
OK, I've just built against your fix and it works fine now!
Python 3.0a5+ (py3k:60668:62940, May 9 2008, 15:48:15)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credit
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-05-09, Eric Smith wrote:
> Eric Smith <[EMAIL PROTECTED]> added the comment:
>
> The reason for this is that 'n' is defined in PEP 3101 as being a float
> format only, and the rule is that if
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
Unfortunately, this bug appears to affect Py30a5 too (at least on Win XP
Home):
Python 3.0a5 (py3k:62932M, May 9 2008, 16:23:11) [MSC v.1500 32 bit
(Intel)] on win32
IDLE 3.0a5
>>> import sqlite3
Traceback (most r
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
#Python 3.0a5 (py3k:62932M, May 9 2008, 16:23:11) [MSC v.1500 32 bit
#(Intel)] on win32
#
# If you run this tiny program on Linux and press Alt+F (Alt-f in Tk
# terminology) the File menu pops up as expected. But run it on
# W
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
There appears to be an infinite recursion in Py30a5 (doing the same
thing in Py2.5.1 works fine):
Python 3.0a5 (r30a5:62856, May 9 2008, 11:23:06)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "copyright&quo
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
I get the same bug on Fedora 8 (Python build 63161) and Kubuntu 8
(official Py30a5 release)---but not on Windows XP Home where the URL is
opened correctly.
Python 3.0a5+ (py3k:60668:63161, May 12 2008, 14:46:40)
[GCC 4.1.2 2007092
Mark Summerfield <[EMAIL PROTECTED]> added the comment:
On 2008-05-12, Amaury Forgeot d'Arc wrote:
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
>
> The traceback suggest a problem when using KDE: a call to file() was
> renamed to open(),
New submission from Mark Summerfield <[EMAIL PROTECTED]>:
IDLE's cursor blinks with Python 3.0 on Linux.
But it shouldn't (and doesn't for prior versions) because in my
.Xdefaults file I have the line:
*insertOffTime: 0
Now I have to manually edit idlelib/EditorWindow.
Mark Summerfield added the comment:
Although I stand by my criticism of IDLE not offering the option of
switching off cursor blink, I've now discovered that the problem was
with Fedora 10 no longer executing xrdb .Xdefaults; once I added that
line to my .bash_profile the cursor blinking st
New submission from Mark Summerfield :
I mostly use the Python 3.8 docs since that's the Python I use.
However, when I tried using the 3.9 and 3.10 docs I found that the top of each
page has a long search bar (presumably for mobile devices?) but _no_ link to
the python module index. I
New submission from Mark Summerfield :
This tiny test application illustrates the problem:
```python
#!/usr/bin/env python3
import tkinter as tk
app = tk.Tk()
app.withdraw()
app.title('Test App')
app.deiconify()
app.mainloop()
```
When run on Linux with XFCE the task bar entry show
Mark Summerfield added the comment:
I just ran IDLE and it seems to have the same problem. Although the taskbar
entry is 'Python 3.6.9 Shell' (ought really to be 'IDLE'), when context
switching the switcher shows the correct icon but
Mark Summerfield added the comment:
Same applied to IDLE for Python 3.8
--
___
Python tracker
<https://bugs.python.org/issue41765>
___
___
Python-bugs-list m
Mark Summerfield added the comment:
When running a VirtualBox Windows 7 guest on Linux I have found that
os.path.samefile() returns False when the filenames are the same, e.g.,
f = r'V:\pdfs\boson1.pdf'
same = os.path.samefile(f, f)
print(same) # expected True; got False
I menti
New submission from Mark Summerfield :
Python 3.2.2 (default, Jun 4 2012, 11:15:16)
[GCC 4.4.5] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> from tkinter import *
>>> help(BooleanVar.get)
Help on function get in
Mark Summerfield added the comment:
Did you mean formal test code? Or just an example like this:
from tkinter import *
tk = Tk()
bv = BooleanVar()
print(bv.get(), type(bv.get()))
bv.set(True)
print(bv.get(), type(bv.get()))
bv.set(False)
print(bv.get(), type(bv.get()))
### output ###
0
1
0
Mark Summerfield added the comment:
I think that BooleanVar.set(x) should do bool(x) on its argument (and raise an
exception if this isn't valid) and BooleanVar.get() should return a bool.
Similarly I think that IntVar.set(x) should do int(x) and IntVar.get() should
return an int, and
Mark Summerfield added the comment:
Oh, and I forgot to say that I think StringVar.set(x) should do str(x) and
StringVar.get() should return a str.
--
___
Python tracker
<http://bugs.python.org/issue15
Mark Summerfield added the comment:
How about a compromise? Deprecate (but keep BooleanVar) and add BoolVar with
proper True/False behavior to match the other *Vars?
--
___
Python tracker
<http://bugs.python.org/issue15
New submission from Mark Summerfield :
The tkinter.messagebox functions, e.g., askyesno(), do not use the
application's icon (if it has one). Nor do they accept a bitmapicon option, so
ISTM that it is "impossible" to set one.
The same is true of tkinter.dialog, but for that it
New submission from Mark Summerfield :
Some of the tkinter convenience dialogs, e.g., tkinter.filedialog.FileDialog,
tkinter.scrolledtext.ScrolledText, tkinter.simpledialog.SimpleDialog,
tkinter.simpledialog.Dialog, and tkinter.simpledialog._QueryDialog. Ideally
they should use ttk.Frame
Mark Summerfield added the comment:
On Linux & Windows every top-level window (including dialogs) normally has an
icon at the left of the title bar. Typically this icon is the application's
icon. But tkinter doesn't provide such an icon and so a system default icon is
used inst
Mark Summerfield added the comment:
According to the Tcl/Tk docs the 'data' field is a string (i.e., for any user
data) and the 'detail' field contains some internal data (so shouldn't be
messed with); see http://www.tcl.tk/man/tcl8.5/TkCmd/event.htm#M16
Anyway, I
1 - 100 of 154 matches
Mail list logo