[issue45480] Missing link(s) to the "Python Module Index" page

2021-10-15 Thread Mark Summerfield


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 find this last page the most important page for 
looking things up, so I really hope the 'modules' link is restored.

--
assignee: docs@python
components: Documentation
messages: 403977
nosy: docs@python, mark
priority: normal
severity: normal
status: open
title: Missing link(s) to the "Python Module Index" page
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45480>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41765] XFCE task switcher shows 'Tk' insteadl of Window title

2020-09-12 Thread Mark Summerfield


Mark Summerfield  added the comment:

Same applied to IDLE for Python 3.8

--

___
Python tracker 
<https://bugs.python.org/issue41765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41765] XFCE task switcher shows 'Tk' insteadl of Window title

2020-09-12 Thread Mark Summerfield


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 the title 'Toplevel'.

--

___
Python tracker 
<https://bugs.python.org/issue41765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41765] XFCE task switcher shows 'Tk' insteadl of Window title

2020-09-11 Thread Mark Summerfield


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 shows the text 'Test App', but 
the task switcher shows 'Tk' rather than the title text.

--
components: Tkinter
messages: 376745
nosy: mark
priority: normal
severity: normal
status: open
title: XFCE task switcher shows 'Tk' insteadl of Window title
type: behavior
versions: Python 3.6, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2019-06-17 Thread Mark Summerfield


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 mention it here because it may be part of the same problem.
I'm using Python 3.7.2.

--
nosy: +mark
versions: +Python 3.7 -Python 3.3

___
Python tracker 
<https://bugs.python.org/issue4198>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28895] Two suggestions for windows.html

2016-12-07 Thread Mark Summerfield

New submission from Mark Summerfield:

This document is v. useful for Windows Python users:
https://docs.python.org/dev/using/windows.html

However, I think it could be improved as follows:

(1) Explain which Python installer to get (since there are so many)! Even a 
"get the Windows x86 executable installer if you just want it now!". 
Alternatively, the https://www.python.org/downloads/windows/ page could begine 
with a brief explanation of the differences.

(2) Explain the trade-offs between Admin & User install & the effect this has 
on using pip (e.g., an Admin install may require pip to be used in an Admin 
console or to be used with the --user option).

--
assignee: docs@python
components: Documentation
messages: 282625
nosy: docs@python, mark
priority: normal
severity: normal
status: open
title: Two suggestions for windows.html
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27980] Add better pythonw support to py launcher

2016-09-06 Thread Mark Summerfield

Mark Summerfield added the comment:

Sorry, I didn't even know that pyw.exe existed. Naturally pyw -h produces no 
output, but maybe py -h could mention it?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27980] Add better pythonw support to py launcher

2016-09-06 Thread Mark Summerfield

New submission from Mark Summerfield:

The excellent py.exe launcher on Windows always uses a python.exe interpreter 
(although another issue suggests it will use pythonw.exe when the python file 
has a .pyw suffix which is good).

However, if one wanted to provide a .bat file like this:

@echo off
pushd %~dp0
py -3 MyGuiApp.pyw %*
popd

python.exe would be used rather than pythonw.exe.

My suggestion is to add a -w and/or --win(dows) flag which forces the use of 
pythonw.exe.

--
components: Windows
messages: 274602
nosy: mark, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add better pythonw support to py launcher
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27259] Possible missing deprecation warnings?

2016-06-07 Thread Mark Summerfield

New submission from Mark Summerfield:

In the docs for the array module:
https://docs.python.org/dev/library/array.html#module-array
Note 1 in the table of type codes says that the 'u' type is deprecated and will 
go in Python 4.0.

Since the array.fromunicode() and array.tounicode() methods depend on type code 
'u' shouldn't they also be marked as deprecated?

If people use the 'u' type code maybe it would be helpful to provide an example 
of how to store unicode chars in an array.array? (Presumably they'd use type 
code 'L' and use ord() and chr()?)

--
assignee: docs@python
components: Documentation
messages: 267738
nosy: docs@python, mark
priority: normal
severity: normal
status: open
title: Possible missing deprecation warnings?
type: enhancement
versions: Python 3.6

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27259>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread Mark Summerfield

New submission from Mark Summerfield:

I am using Python 3.4.3 on Xubuntu 14.04 LTS 64-bit.

I have a program that when run repeatedly sometimes what I expect, and 
sometimes does not:

$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
BUG ('The aenid oevre', '!=', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')
$ ~/tmp/normbug.py 
BUG ('The aenid oevre', '!=', 'The AEnid oevre')
$ ~/tmp/normbug.py 
BUG ('The aenid oevre', '!=', 'The AEnid oevre')
$ ~/tmp/normbug.py 
OK ('The AEnid oevre', '==', 'The AEnid oevre')

As you can see, sometimes the left (actual) is case-folded, and sometimes it 
isn't which is surprising given the code (which is attached).

Of course this could be a mistake on my part; maybe I've misunderstood how the 
unicode normalizing works.

--
files: normbug.py
messages: 258314
nosy: mark
priority: normal
severity: normal
status: open
title: Possible subtle bug when normalizing and str.translate()ing
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file41627/normbug.py

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread Mark Summerfield

Mark Summerfield added the comment:

Thanks for looking at this. In my full translation dict I had some other 
mistakes of case, now all fixed:-)

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20607] multiprocessing cx_Freeze windows GUI bug (& easy fixes)

2015-12-28 Thread Mark Summerfield

Mark Summerfield added the comment:

Thanks Davin. I have indeed moved to 3.4 which does not seem to have the bug. 
(I can't move to 3.5 because I can't install 32- and 64-bit versions as I can 
with 3.4 due to the new installers -- or rather I can, but this confuses the 
pywin32 and apsw installers both of which I need.)

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20607] multiprocessing cx_Freeze windows GUI bug (& easy fixes)

2015-11-05 Thread Mark Summerfield

Mark Summerfield added the comment:

No, I'm sorry I haven't tried with 3.5; in fact, there doesn't seem to be a 
cx_Freeze available for 3.5 yet.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13828] Further improve casefold documentation

2015-10-29 Thread Mark Summerfield

Mark Summerfield added the comment:

I think the str.casefold() docs are fine as far as they go, rightly covering 
what it _does_ rather than _how_, yet providing a reference for the details. 
But what they lack is more complete information. For example I discovered this:

>>> x = "files and shuffles"
>>> x
'files and shuffles'
>>> x.casefold()
'files and shuffles'

In view of this I would add one sentence:

In addition to lowercasing, this function also expands ligatures, for 
example, "fi" becomes "fi".

--
nosy: +mark

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13828>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20607] multiprocessing cx_Freeze windows GUI bug (& easy fixes)

2015-10-28 Thread Mark Summerfield

Mark Summerfield added the comment:

I've now signed the contributor agreement.

However, with Python 3.4 I don't seem to get the same problem anymore even 
though there are a few places in the code where sys.std{err,out} are used 
without if ... is not None guards.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20366] SQLite FTS (full text search)

2015-07-24 Thread Mark Summerfield

Changes by Mark Summerfield m...@qtrac.eu:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20366
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23292] Enum doc suggestion

2015-01-26 Thread Mark Summerfield

Mark Summerfield added the comment:

Nice answer Ethan (but I can't vote you up since stack overflow won't let me 
vote or even comment anymore).

As for adding export_to(), it seems like a good idea. However, personally, I 
think the signature should be

hoist_into(namespace, cls, *clses)

to allow multiple enums in the same module to be exported in one go. (Just 
kidding about the new name though.)

PS I should have said earlier, thanks Eli:-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23292] Enum doc suggestion

2015-01-25 Thread Mark Summerfield

Mark Summerfield added the comment:

Since this is a bit controversial, I've tried marking it as 'rejected' with 
this comment.

I've also added a very brief explanation and link back to here on my web site: 
http://www.qtrac.eu/pyenum.html

--
resolution:  - rejected

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23292] Enum doc suggestion

2015-01-25 Thread Mark Summerfield

Changes by Mark Summerfield m...@qtrac.eu:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23292] Enum doc suggestion

2015-01-21 Thread Mark Summerfield

Mark Summerfield added the comment:

Georg said to assign this to Ethan Furman but I don't seem to have that 
facility.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23292] Enum doc suggestion

2015-01-21 Thread Mark Summerfield

New submission from Mark Summerfield:

I think it would be worth documenting
globals().update(MyEnumeration.__members__) in the Interesting
Examples section of the enum docs.

I suspect that most people will find that importing enums is annoying
because they'll get

import A
print(A.MyEnumeration.MAX)

when they're more used to

import A
print(A.MAX)

Of course the latter is easily achieved using the globals().update()
trick (as used in signals.py in 3.5).

Georg suggested I add this to the tracker.

--
assignee: docs@python
components: Documentation
files: py-enum.tar.gz
messages: 234442
nosy: docs@python, mark
priority: normal
severity: normal
status: open
title: Enum doc suggestion
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file37809/py-enum.tar.gz

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17914] add os.cpu_count()

2014-12-12 Thread Mark Summerfield

Mark Summerfield added the comment:

In message
http://bugs.python.org/issue17914#msg188626
Victor Stenner says

On Windows, GetSystemInfo() is called instead of reading an environment 
variable. I suppose that this function is more reliable.

From my reading, and based on feedback from one of my customers, I believe he 
is correct and that GetSystemInfo() ought to be used on Windows. (It is 
available in pywin32 win32api.)

--
nosy: +mark

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17914
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23037] cpu_count() unreliable on Windows

2014-12-12 Thread Mark Summerfield

New submission from Mark Summerfield:

In message
http://bugs.python.org/issue17914#msg188626
Victor Stenner says

On Windows, GetSystemInfo() is called instead of reading an environment 
variable. I suppose that this function is more reliable.

From my reading, and based on feedback from one of my customers, I believe he 
is correct and that GetSystemInfo() ought to be used on Windows. (It is 
available in pywin32 win32api.)

--
components: Library (Lib), Windows
messages: 232540
nosy: mark, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23037
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17914] add os.cpu_count()

2014-12-12 Thread Mark Summerfield

Mark Summerfield added the comment:

Since this is closed I've created a new issue as requested:
http://bugs.python.org/issue23037

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17914
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield

New submission from Mark Summerfield:

When I try to build APSW (http://rogerbinns.github.io/apsw/index.html) with 
Python 3.3 or 3.4 on Debian stable 64-bit I get the error output shown below.

I dug into the source and it seems that the problem is that 
distutils/ccompiler.py's gen_preprocess_options() functions expects to get a 
sequence of macros and each macro *must* be a 1 or 2 item tuple.

But for some reason during the APSW build it gets a 2 item list which it then 
chokes on.

Now, the code really does need a tuple because in some cases it uses Python's % 
print formatting option as in -D%s=%s % macro -- and this won't work if macro 
is a list.

I solved this problem for me by adding two lines, shown here in context:

pp_opts = []
for macro in macros:
if isinstance(macro, list): # NEW
macro = tuple(macro)# NEW

I don't know how safe or wise a fix this is, but it did work for me for a 
locally built (from www.python.org tarball) 3.3 and 3.4.


$ /home/mark/opt/python34/bin/python3 setup.py fetch --all build 
--enable-all-extensions install
running fetch
  Getting download page to work out current SQLite version
Fetching https://sqlite.org/download.html
Version is 3.8.7.1
  Getting the SQLite amalgamation
Fetching https://sqlite.org/2014/sqlite-autoconf-3080701.tar.gz
Length: 1998389  SHA1: 5601be1263842209d7c5dbf6128f1cc0b6bbe2e5  MD5: 
8ee4541ebb3e5739e7ef5e9046e30063
Checksums verified
Running configure to work out SQLite compilation flags
setup.py:53: DeprecationWarning: 'U' mode is deprecated
  f=open(name, mode)
running build
running build_ext
SQLite: Using amalgamation /home/mark/zip/apsw-3.8.7.1-r1/sqlite3/sqlite3.c
setup.py:624: ResourceWarning: unclosed file _io.TextIOWrapper name=4 
encoding='UTF-8'
  for part in shlex.split(os.popen(icu-config --cppflags, r).read()):
setup.py:637: ResourceWarning: unclosed file _io.TextIOWrapper name=4 
encoding='UTF-8'
  for part in shlex.split(os.popen(icu-config --ldflags, r).read()):
ICU: Added includes, flags and libraries from icu-config
building 'apsw' extension
Traceback (most recent call last):
  File setup.py, line 862, in module
'win64hackvars': win64hackvars}
  File /home/mark/opt/python34/lib/python3.4/distutils/core.py, line 148, in 
setup
dist.run_commands()
  File /home/mark/opt/python34/lib/python3.4/distutils/dist.py, line 955, in 
run_commands
self.run_command(cmd)
  File /home/mark/opt/python34/lib/python3.4/distutils/dist.py, line 974, in 
run_command
cmd_obj.run()
  File /home/mark/opt/python34/lib/python3.4/distutils/command/build.py, line 
126, in run
self.run_command(cmd_name)
  File /home/mark/opt/python34/lib/python3.4/distutils/cmd.py, line 313, in 
run_command
self.distribution.run_command(command)
  File /home/mark/opt/python34/lib/python3.4/distutils/dist.py, line 974, in 
run_command
cmd_obj.run()
  File setup.py, line 661, in run
v=beparent.run(self)
  File /home/mark/opt/python34/lib/python3.4/distutils/command/build_ext.py, 
line 339, in run
self.build_extensions()
  File /home/mark/opt/python34/lib/python3.4/distutils/command/build_ext.py, 
line 448, in build_extensions
self.build_extension(ext)
  File /home/mark/opt/python34/lib/python3.4/distutils/command/build_ext.py, 
line 503, in build_extension
depends=ext.depends)
  File /home/mark/opt/python34/lib/python3.4/distutils/ccompiler.py, line 
566, in compile
depends, extra_postargs)
  File /home/mark/opt/python34/lib/python3.4/distutils/ccompiler.py, line 
341, in _setup_compile
pp_opts = gen_preprocess_options(macros, incdirs)
  File /home/mark/opt/python34/lib/python3.4/distutils/ccompiler.py, line 
1061, in gen_preprocess_options
% macro)
TypeError: bad macro definition '['_FORTIFY_SOURCE', '2']': each element of 
'macros' list must be a 1- or 2-tuple

--
components: Distutils
messages: 231008
nosy: dstufft, eric.araujo, mark
priority: normal
severity: normal
status: open
title: distutils needlessly fails to build apsw
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22846
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield

Mark Summerfield added the comment:

The first person I asked was the author of APSW (Roger Binns). He told me:

The ultimate cause of that is some interaction with the compilation
environment.  Some sort of CFLAGS is ultimately ending up in some
Python code like above when it should be [ ('_FORTIFY_SOURCE', '2') ].
 Note this is not part of the APSW source - it is something external.

I have seen it before when using the Ubuntu PPA build service.  When
building locally everything was fine, but the build service injected
_FORTIFY_SOURCE like above and got it wrong.  I presume your version
of Debian is doing something similar.  Sadly I have no idea how to fix it.

So clearly he believes it is not a problem with his setup.py file.

Also, it strikes me as a bit unpythonic that a function should demand a 
specific type (i.e., tuple) especially when this is just for the convenience of 
being able to use % formatting.

I'm not asking or expecting you to add my change to distutils; but at least now 
if someone encounters the same problem, they will have a potential fix.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22846
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield

Mark Summerfield added the comment:

Here are the flags you asked for:

$ icu-config --cppflags
-D_FORTIFY_SOURCE=2 -D_REENTRANT  -I/usr/include 
$ icu-config --ldflags
-Wl,-z,relro  -ldl -lm   -L/usr/lib/x86_64-linux-gnu -licui18n -licuuc 
-licudata  -ldl -lm

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22846
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Mark Summerfield

Mark Summerfield added the comment:

I've notified APSW's author and I'm sure he'll fix it. Thanks!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22846
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-07 Thread Mark Summerfield

Mark Summerfield added the comment:

I'd be happy to draft a PEP if it is needed, if no one else has the 
time/inclination.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22122] turtle module examples should all begin from turtle import *

2014-08-03 Thread Mark Summerfield

Mark Summerfield added the comment:

Ah, we're slightly at cross purposes. I showed them purely in terms of the 
procedural API. However, I can see now that I could have begun with:

import turtle
...
jane = turtle.Turtle()
jane.fd(100)

So, to teach their turtle how to go in a square, I guess they'd do:

def square(who, size=100):
for n in range(4):
who.fd(100)
who.rt(90)

square(jane)

That seems reasonable, but then why isn't the first (and only complete) example 
done in this OO-ish style?

Anyway, I've marked this closed and will switch to this approach in future.

Thanks.

--
resolution:  - not a bug
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22122
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Mark Summerfield

Mark Summerfield added the comment:

I changed my suggestion but did so on the mailing list instead of here:

This (importing  using types.SimpleNamespace()) is too much for children ( 
beginners).

But perhaps what I should be asking for is for a new built-in that does what 
types.SimpleNamespace() does, so that without any import you can write, say,

foo = namespace(a=1, b=2)
# or
bar = namespace()
bar.a = 1

where under the hood namespace has the same behavior as types.SimpleNamespace().

Naturally, I understand that adding a new name is a big deal and may be too 
much to ask for beginners. 

I've renamed the issue to reflect this (although I don't know if that will 
work).

Alternatively, I (or someone) could just close the issue as won't fix; it was 
just an idea.

--
title: Make object() behave exactly like types.SimpleNamespace() if given 
kwargs - Provide a direct function for types.SimpleNamespace()

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Mark Summerfield

New submission from Mark Summerfield:

On Windows IDLE's working directory is Python's install directory, e.g., 
C:\Python34. ISTM that this is the wrong directory for 99% of general users and 
for 100% of beginners since this is _not_ the directory where people should 
save their own .py files (unless they are experts, in which case they know 
better and won't anyway).

I think that IDLE should start out in the user's home directory (ideally on all 
platforms).

--
components: IDLE
messages: 224537
nosy: mark
priority: normal
severity: normal
status: open
title: IDLE should start with HOME as the initial working directory
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22121
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22122] turtle module examples should all begin from turtle import *

2014-08-02 Thread Mark Summerfield

New submission from Mark Summerfield:

The turtle module is aimed primarily at young beginners to Python. Making them 
type turtle.this and turtle.that all over the place is tedious and unhelpful.

At the start of the turtle docs there's a nice example that begins
from turtle import *
and the following code is all the better for it.

But none of the other examples do this. I realise that this would make the 
module's docs inconsistent, but given the target audience and given that we 
surely want to lower the barrier to entry, it would be a reasonable concession 
to make?

--
assignee: docs@python
components: Documentation
messages: 224538
nosy: docs@python, mark
priority: normal
severity: normal
status: open
title: turtle module examples should all begin from turtle import *
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22122
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Mark Summerfield

New submission from Mark Summerfield:

Right now object() does not accept any args and returns the lightest possible 
featureless object (i.e., without even a __dict__).

This is great.

However, it is really useful sometimes to be able to create an object to hold 
some editable state (so not a namedtuple). Right now this can be done with 
types.SimpleNamespace().

I think it would be a useful enhancement to have object() work as it does now, 
but to allow it to accept kwargs in which case it would provide identical 
functionality to types.SimpleNamespace().

This arises from an email I wrote to the python mailinglist:
https://groups.google.com/d/msg/comp.lang.python/9pY7hLp8lDg/voYF8nMO6x8J

But I also think it would be useful more generally.

--
components: Interpreter Core
messages: 224539
nosy: mark
priority: normal
severity: normal
status: open
title: Make object() behave exactly like types.SimpleNamespace() if given kwargs
type: enhancement
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602] windows console doesn't print or input Unicode

2014-07-25 Thread Mark Summerfield

Mark Summerfield added the comment:

I used pip to install the win_unicode_console package on windows 7 python 3.3.

It works but wouldn't freeze with cx_freeze because there's no __init__.py file 
in the win_unicode_console directory.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1602
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20366] SQLite FTS (full text search)

2014-07-10 Thread Mark Summerfield

Mark Summerfield added the comment:

Just to mention that I don't need this feature anymore since I've now switched 
to using APSW which includes it and also has much fuller SQLite support than 
the sqlighe3 module. (I haven't closed it though since other people have 
participated in some way.)
See http://rogerbinns.github.io/apsw/index.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20366
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20607] multiprocessing cx_Freeze windows GUI bug ( easy fixes)

2014-02-12 Thread Mark Summerfield

New submission from Mark Summerfield:

I have a Python Windows GUI application (using PySide) that uses 
multiprocessing.

When I freeze the application I get error messages, in particular that 
mulitprocessing cannot call flush on a null object.

ISTM That in a Windows GUI application, sys.stdout and sys.stderr may well be 
None since there is no attached console.

So, I added guards to accesses to sys.stdout and sys.stderr and the problems 
went away.

I'm not used to creating patch diffs but hopefully the attached (with just a 
few lines of changes) will be easy to understand.

--
components: Windows
files: multiprocessing.diff
keywords: patch
messages: 211089
nosy: mark
priority: normal
severity: normal
status: open
title: multiprocessing cx_Freeze windows GUI bug ( easy fixes)
versions: Python 3.3
Added file: http://bugs.python.org/file34060/multiprocessing.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20607
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20607] multiprocessing cx_Freeze windows GUI bug ( easy fixes)

2014-02-12 Thread Mark Summerfield

Mark Summerfield added the comment:

My change to managers.py is redundant; sorry about that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20607
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20366] SQLite FTS (full text search)

2014-01-23 Thread Mark Summerfield

New submission from Mark Summerfield:

This is a feature request that future versions of SQLite 3 that are bundled 
with Python 3 in the Windows binary packages (.msi files) has been build with 
the FTS4 (full text search version 4) enabled.

--
components: Extension Modules
messages: 208946
nosy: mark
priority: normal
severity: normal
status: open
title: SQLite FTS (full text search)
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20366
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15380] bytes/str mismatch in distribute

2012-07-17 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

I tried installing CherryPy into my local Python 3.2 build. I don't know if 
this is a problem with CherryPy's setup.py or with distribute but suspect the 
latter since I've had similar problems before.

$ /home/mark/opt/python32/bin/python3 setup.py install
running install
running bdist_egg
running egg_info
writing CherryPy.egg-info/PKG-INFO
writing top-level names to CherryPy.egg-info/top_level.txt
writing dependency_links to CherryPy.egg-info/dependency_links.txt
reading manifest file 'CherryPy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'CherryPy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/cherrypy
copying cherrypy/_cperror.py - build/lib/cherrypy
...
byte-compiling build/bdist.linux-x86_64/egg/cherrypy/_cperror.py to _cperror.pyc
...
installing package data to build/bdist.linux-x86_64/egg
running install_data
copying cherrypy/cherryd - build/bdist.linux-x86_64/egg/cherrypy
...
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-3.2
copying and adjusting cherrypy/cherryd - build/scripts-3.2
changing mode of build/scripts-3.2/cherryd from 644 to 755
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.2/cherryd - 
build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/cherryd to 755
copying CherryPy.egg-info/PKG-INFO - build/bdist.linux-x86_64/egg/EGG-INFO
copying CherryPy.egg-info/SOURCES.txt - build/bdist.linux-x86_64/egg/EGG-INFO
copying CherryPy.egg-info/dependency_links.txt - 
build/bdist.linux-x86_64/egg/EGG-INFO
copying CherryPy.egg-info/top_level.txt - build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
cherrypy._cpmodpy: module references __file__
...
creating dist
creating 'dist/CherryPy-3.2.2-py3.2.egg' and adding 
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing CherryPy-3.2.2-py3.2.egg
creating 
/home/mark/opt/python32/lib/python3.2/site-packages/CherryPy-3.2.2-py3.2.egg
Extracting CherryPy-3.2.2-py3.2.egg to 
/home/mark/opt/python32/lib/python3.2/site-packages
Adding CherryPy 3.2.2 to easy-install.pth file
Traceback (most recent call last):
  File setup.py, line 144, in module
main()
  File setup.py, line 139, in main
cmdclass=cmd_class,
  File /home/mark/opt/python32/lib/python3.2/distutils/core.py, line 148, in 
setup
dist.run_commands()
  File /home/mark/opt/python32/lib/python3.2/distutils/dist.py, line 917, in 
run_commands
self.run_command(cmd)
  File /home/mark/opt/python32/lib/python3.2/distutils/dist.py, line 936, in 
run_command
cmd_obj.run()
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/install.py,
 line 73, in run
self.do_egg_install()
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/install.py,
 line 101, in do_egg_install
cmd.run()
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 236, in run
self.easy_install(spec, not self.no_deps)
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 452, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 503, in install_item
self.process_distribution(spec, dist, deps)
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 522, in process_distribution
self.install_egg_scripts(dist)
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 401, in install_egg_scripts
dist.get_metadata('scripts/'+script_name)
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 615, in install_script
script_text = get_script_header(script_text) + (
  File 
/home/mark/opt/python32/lib/python3.2/site-packages/distribute-0.6.10-py3.2.egg/setuptools/command/easy_install.py,
 line 1449, in get_script_header
match = first_line_re.match(first)
TypeError: can't use a bytes pattern on a string-like object

--
assignee: eric.araujo
components: Distutils
messages: 165693
nosy: eric.araujo, mark, tarek
priority: normal
severity: normal
status: open
title: bytes/str mismatch in distribute
type: behavior
versions: Python 3.2

[issue15189] tkinter.messagebox does not use the application's icon

2012-07-12 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

I think there is a solution to this that can be applied in one's own code:

app = tkinter.Tk()
icon = tkinter.PhotoImage(file=icon.gif)
app.tk.call(wm, iconphoto, app, -default, icon)

According to the docs (and it seems to be true), the icon thus set will be used 
for *all* the applications top-level windows.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3405] Add support for the new data option supported by event generate (Tk 8.5)

2012-07-11 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 hope you add a data field for user created virtual events.

--
nosy: +mark

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15189] tkinter.messagebox does not use the application's icon

2012-07-09 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 instead. For one's own code this can be fixed by using the iconbitmap() 
function, but for the tkinter convenience dialogs (e.g., askyesno()), this 
cannot be done. So, my suggestion is to make the convenience dialogs use the 
same icon as the application (if the application has one).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15189] tkinter.messagebox does not use the application's icon

2012-06-26 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

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 is easy enough to write 
one's own replacement with the code like this:

try:
tkinter._default_root.iconbitmap(iconName)
except tk.TclError as err:
print(err)

(where iconName is path/to/icon.ico on windows, @path/to/icon.xbm on Unix; 
and this isn't done on Mac).

--
components: Tkinter
messages: 164053
nosy: mark
priority: normal
severity: normal
status: open
title: tkinter.messagebox does not use the application's icon
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15191] tkinter convenience dialogs don't use themed widgets

2012-06-26 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

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, ttk.Button, etc. Or if that is risky for 
compatibility, then couldn't they be copied to tkinter.ttk and the copies 
themized?

--
components: Tkinter
messages: 164057
nosy: mark
priority: normal
severity: normal
status: open
title: tkinter convenience dialogs don't use themed widgets
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-25 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 rep...@bugs.python.org
http://bugs.python.org/issue15133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 that DoubleVar.set(x) should do float(x) and should return a 
float.

I will mention this issue on tkinter-discuss and encourage people to comment.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 rep...@bugs.python.org
http://bugs.python.org/issue15133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-23 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 class 'int'
1 class 'int'
0 class 'int'

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15133] tkinter.BooleanVar.get() docstring is wrong

2012-06-22 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

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 module tkinter:

get(self)
Return the value of the variable as a bool.

On my system it actually returns an int. (I wish it did return a bool though.)

--
components: Tkinter
messages: 163387
nosy: mark
priority: normal
severity: normal
status: open
title: tkinter.BooleanVar.get() docstring is wrong
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10926] Some Invalid Relative Imports succeed in Py 3.0 3.1 [ correctly fail in 3.2rc1]

2011-01-17 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

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

The Svg.py file has this content:

#!/usr/bin/env python3
from ..Graphics import Xpm
SVG = 1

Here are 3 interactive actions, one each for 3.0, 3.1, and 3.2rc1:

$ python30
Python 3.0.1 (r301:69556, Jul 15 2010, 10:31:51) 
[GCC 4.4.4] on linux2
Type help, copyright, credits or license for more information.
 from Graphics.Vector import *
 Svg.SVG
1

$ python31
Python 3.1.2 (r312:79147, Jul 15 2010, 10:56:05) 
[GCC 4.4.4] on linux2
Type help, copyright, credits or license for more information.
 from Graphics.Vector import *
 Svg.SVG
1

$ ~/opt/python32rc1/bin/python3
Python 3.2rc1 (r32rc1:88035, Jan 16 2011, 08:32:59) 
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 from Graphics.Vector import *
Traceback (most recent call last):
  File stdin, line 1, in module
  File Graphics/Vector/Svg.py, line 2, in module
from ..Graphics import Xpm
ImportError: No module named Graphics

So clearly 3.0 and 3.1 have the same behavior as each other; and this is 
different from 3.2rc1, and Georg says that 3.0 and 3.1 have a bug and that 
3.2rc1 is correct.

PS R. David Murray suggests that this might be related to
http://bugs.python.org/issue7902

--
components: Interpreter Core
files: py-import-bug.tar.gz
messages: 126399
nosy: mark
priority: normal
severity: normal
status: open
title: Some Invalid Relative Imports succeed in Py 3.0  3.1 [ correctly fail 
in 3.2rc1]
type: behavior
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file20424/py-import-bug.tar.gz

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10926] Some Invalid Relative Imports succeed in Py 3.0 3.1 [ correctly fail in 3.2rc1]

2011-01-17 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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.
 from Graphics.Vector import *
Traceback (most recent call last):
  File stdin, line 1, in module
  File Graphics/Vector/Svg.py, line 2, in module
from ..Graphics import Xpm
ImportError: No module named Graphics

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-12 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 xml.etree.ElementTree as etree
xml_tree = etree.ElementTree(in_filehandle)
# process the tree
xml_tree.write(out_filehandle, encoding=xml_tree.encoding)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-12 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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) property.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9521] xml.etree.ElementTree strips XML declaration and procesing instructions

2010-08-05 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

If you read in an XML file using xml.etree.ElementTree.parse() and then write 
it out again using xml.etree.ElementTree.write() what is written may not be the 
same as what was read. In particular any XML declaration and processing 
instructions are stripped.

It seems to me that the parser should at least preserve any declaration and 
processing instructions so that reading and writing match up.

Here's an example:

Python 3.1.2 (r312:79147, Jul 15 2010, 10:56:05) 
[GCC 4.4.4] on linux2
Type copyright, credits or license() for more information.
 file = control-center.xml
 open(file).read()[:500]
'?xml version=1.0 encoding=utf-8?\n!DOCTYPE article PUBLIC 
-//OASIS//DTD DocBook XML V4.1.2//EN 
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; [\n!ENTITY VERSION 
1.5.7\n]\narticle id=index lang=en_GB\n  \n  articleinfo\n
abstract role=description\n  paraThe GNOME Control Centre provides a 
central place for the user to setup their GNOME experience. It can let you 
configure anything from the behaviour of your window borders to the default 
font type./para\n   '
 import xml.etree.ElementTree as etree
 xml = etree.parse(file)
 temp = temp.xml
 xml.write(temp.xml, encoding=utf-8)
 open(temp).read()[:500]
'article id=index lang=en_GB\n  \n  articleinfo\nabstract 
role=description\n  paraThe GNOME Control Centre provides a central 
place for the user to setup their GNOME experience. It can let you configure 
anything from the behaviour of your window borders to the default font 
type./para\n/abstract\ntitleControl Centre/title\n
authorgroup\n  
author\n\tfirstnameKevin/firstnamesurnameBreit/surname\n  
/author\n/authorgroup\ncopyright\n  y'


--
components: Library (Lib)
messages: 112961
nosy: mark
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree strips XML declaration and procesing instructions
type: behavior
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9521
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-05 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

If you read in an XML file that specifies its encoding and then later on use 
xml.etree.ElementTree.write(), it is always written using US-ASCII. 

I think the behaviour should be different:
(1) If the XML that was read included an encoding, that encoding should be 
remembered and used when writing.
(2) If there is no encoding the default for writing should be UTF-8 (which is 
the standard for XML files).
(3) For non-XML files use US-ASCII.

Naturally, any of these could be overridden using an encoding argument to the 
write() method.

--
components: Library (Lib)
messages: 112962
nosy: mark
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree forgets the encoding
type: behavior
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

On the PyPI page:
http://pypi.python.org/pypi/regex/0.1.20100706.1
in the Subscripting for groups bullet it gives this pattern:

r(?before.*?)(?num\\d+)(?after.*)

Shouldn't this be:

r(?Pbefore.*?)(?Pnum\\d+)(?Pafter.*)

Or has a new syntax been introduced?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

If you do:

 import regex as re
 dir(re)

you get over 160 items, many of which begin with an underscore and so are 
private. Couldn't __dir__ be reimplemented to eliminate them. (I know that the 
current re module's dir() also returns private items, but I guess this is a 
legacy of not having the __dir__ special method?)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

I was wrong about r(?name.*). It is valid in the new engine. And the PyPI 
docs do say so immediately _following_ the example.

I've tried all the examples in Programming in Python 3 second edition using 
import regex as re and they all worked.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9112] argparse missing documentation for error() method

2010-06-29 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

The argparse module's ArgumentParser class has an error() method that appears 
to have the same behavior as the optparse error() method, but this method is 
not mentioned in the documentation.

--
assignee: d...@python
components: Documentation
messages: 108896
nosy: d...@python, mark
priority: normal
severity: normal
status: open
title: argparse missing documentation for error() method
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9112
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9114] br string literals don't appear to be documented

2010-06-29 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

It appears that br (raw bytes) isn't documented, at least not along with 
string and bytes literals:
http://docs.python.org/py3k/reference/lexical_analysis.html#literals

Yet they are supported:
http://mail.python.org/pipermail/python-ideas/2010-June/007529.html

--
assignee: d...@python
components: Documentation
messages: 108902
nosy: d...@python, mark
priority: normal
severity: normal
status: open
title: br string literals don't appear to be documented
versions: Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9114
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8557] subprocess portability issue

2010-04-28 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

IMO there's another problem with subprocess portablity---the lack of control 
over encodings: see issue 6135.

--
nosy: +mark

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8557
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

I agree with Florian Mayer that the encoding handling should be
stream-specific. You could easily be reading the stdout of some third
party program that uses, say, latin1, but want to do your own output in,
say, utf-8.

One solution that builds on what Amaury Forgeot d'Arc has done (i.e.,
the encoding and errors parameters) by allowing those parameters to
accept either a single string (as now), or a dict with keys 'stdin',
'stdout', 'stderr'. Of course it is possible that the client might not
specify all the dict's keys in which case those would use the normal
default (local 8-bit etc.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

On Thu, Dec 31, 2009 at 1:30 PM, Amaury Forgeot d'Arc
rep...@bugs.python.org wrote:

 Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

 I don't understand. How is the subprocess stdout related to the main
 program output?
 Stream-specific encoding could be useful for subprocesses that expect
 latin-1 from stdin but write utf-8 to stdout. I'm not sure we should
 support this.

Yes, you're right.

(What I had in mind was a scenario where you read one process's stdout
and wrote to another process's stdin; but of course using your errors
 encoding arguments this will work because there'll be two separate
process objects each of which can have its encoding and errors set
separately.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602] windows console doesn't print utf8 (Py30a2)

2009-10-26 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

Glenn Linderman's fix pretty well works for me on XP Home. I can print
every Unicode character up to and including U+D7FF (although most just
come out as rectangles, at least I don't get encoding errors).

It fails at U+D800 with message:

UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in
position 17: surrogates not allowed

I also tried U+D801 and got the same error.

Nonetheless, this is *much* better than before.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1602
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

Hi,

I've noticed 3 differences between the re and regex engines. 
I don't know if they are intended or not, but thought it best to mention
them. (I used the issue2636-20090810#3.zip version.)

Python 2.6.2 (r262:71600, Apr 20 2009, 09:25:38) 
[GCC 4.3.2 20081105 (Red Hat 4.3.2-7)] on linux2
IDLE 2.6.2  
 import re, regex
  1 of 3
 re1= re.compile(r
(?!\w)(?Pname[-\w]+)=
(?Pquote(?Psingle')|(?Pdouble))?
(?Pvalue(?(single)[^']+?|(?(double)[^]+?|\S+)))
(?(quote)(?P=quote))
, re.VERBOSE)
 re2= regex.compile(r
(?!\w)(?Pname[-\w]+)=
(?Pquote(?Psingle')|(?Pdouble))?
(?Pvalue(?(single)[^']+?|(?(double)[^]+?|\S+)))
(?(quote)(?P=quote))
, re.VERBOSE)
 text = table border='1'
 re1.findall(text)
[('border', ', ', '', '1')]
 re2.findall(text)
[]
 text = table border=1
 re1.findall(text)
[('border', '', '', '', '1')]
 re2.findall(text)
[]
  2 of 3
 re1 = re.compile(r^[ \t]*
 (?Pparenthesis\()?
 [- ]?
 (?Parea\d{3})
 (?(parenthesis)\))
 [- ]?
 (?Plocal_a\d{3})
 [- ]?
 (?Plocal_b\d{4})
 [ \t]*$
 , re.VERBOSE)
 re2 = regex.compile(r^[ \t]*
 (?Pparenthesis\()?
 [- ]?
 (?Parea\d{3})
 (?(parenthesis)\))
 [- ]?
 (?Plocal_a\d{3})
 [- ]?
 (?Plocal_b\d{4})
 [ \t]*$
 , re.VERBOSE)
 data = (179-829-2116, (187) 160 0880, (286)-771-3878,
(291) 835-9634, 353-896-0505, (555) 555 , (555) 555-,
(555)-555-, 555 555 , 555 555-, 555-555-,
601 805 3142, (675) 372 3135, 810 329 7071, (820) 951 3885,
942 818-5280, (983)8792282)
 for d in data:
ans1 = re1.findall(d)
ans2 = re2.findall(d)
print re=%s rx=%s %d % (ans1, ans2, ans1 == ans2)

re=[('', '179', '829', '2116')] rx=[('', '179', '829', '2116')] 1
re=[('(', '187', '160', '0880')] rx=[] 0
re=[('(', '286', '771', '3878')] rx=[('(', '286', '771', '3878')] 1
re=[('(', '291', '835', '9634')] rx=[] 0
re=[('', '353', '896', '0505')] rx=[('', '353', '896', '0505')] 1
re=[('(', '555', '555', '')] rx=[] 0
re=[('(', '555', '555', '')] rx=[] 0
re=[('(', '555', '555', '')] rx=[('(', '555', '555', '')] 1
re=[('', '555', '555', '')] rx=[] 0
re=[('', '555', '555', '')] rx=[] 0
re=[('', '555', '555', '')] rx=[('', '555', '555', '')] 1
re=[('', '601', '805', '3142')] rx=[] 0
re=[('(', '675', '372', '3135')] rx=[] 0
re=[('', '810', '329', '7071')] rx=[] 0
re=[('(', '820', '951', '3885')] rx=[] 0
re=[('', '942', '818', '5280')] rx=[] 0
re=[('(', '983', '879', '2282')] rx=[('(', '983', '879', '2282')] 1
  3 of 3
 re1 = re.compile(r
img\s+[^]*?src=(?:(?Pquote['])(?Pqimage[^\1]+?)   
(?P=quote)|(?Puimage[^' ]+))[^]*?, re.VERBOSE)
 re2 = regex.compile(r
img\s+[^]*?src=(?:(?Pquote['])(?Pqimage[^\1]+?)   
(?P=quote)|(?Puimage[^' ]+))[^]*?, re.VERBOSE)
 data = body img src='a.png' img alt='picture' src=b.png
  img alt=picture src=Big C.png other=xyx
  img src=icon.png alt=icon
  img src=I'm here!.jpg alt=aren't I?
 data = data.split(\n)
 data = [x.strip() for x in data]
 for d in data:
ans1 = re1.findall(d)
ans2 = re2.findall(d)
print re=%s rx=%s %d % (ans1, ans2, ans1 == ans2)

re=[(', 'a.png', '')] rx=[(', 'a.png', '')] 1
re=[('', 'b.png', '')] rx=[('', 'b.png', '')] 1
re=[('', 'Big C.png', '')] rx=[('', 'Big C.png', '')] 1
re=[('', '', 'icon.png')] rx=[('', '', 'icon.png alt=icon')] 0
re=[('', I'm here!.jpg, '')] rx=[('', I'm here!.jpg, '')] 1

I'm sorry I haven't had the time to try to minimize the examples, but I
hope that at least they will prove helpful.

Number 3 looks like a problem with non-greedy matching; I don't know
about the others.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6436] trace module doesn't seem to produce .cover files for Py3 (but does for Py2)

2009-07-08 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

When I execute the following command line (Linux, Fedora 10) using
Python 2.5 or 2.6, I get a .cover file:

python2.5 -m trace --count MyModule.py

But when I do this with Python 3.0 or 3.1, no .cover file is output.

I didn't notice anything in the documentation suggesting a change in
behaviour, but I'm not familiar with this module, so perhaps I've missed
something.

--
components: Library (Lib)
messages: 90252
nosy: mark
severity: normal
status: open
title: trace module doesn't seem to produce .cover files for Py3 (but does for 
Py2)
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-05-28 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

When I start a process with subprocess.Popen() and pipe the stdin and
stdout, it always seems to use the local 8-bit encoding.

I tried setting process.stdin.encoding = utf8 and the same for stdout
(where process is the subprocess object), but to no avail.

I also tried using shell=True since on Mac, Terminal.app is fine with
Unicode, but that didn't work.

So basically, I have programs that output Unicode and run fine on the
Mac terminal, but that cannot be executed by subprocess because
subprocess uses the mac_roman encoding instead of Unicode.

I wish it were possible to specify the stdin and stdout encoding that is
used; then I could use the same one on all platforms. (But perhaps it is
possible, and I just haven't figured out how?)

--
components: Library (Lib)
messages: 88466
nosy: mark
severity: normal
status: open
title: subprocess seems to use local 8-bit encoding and gives no choice
type: behavior
versions: Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2009-03-29 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

I agree that control of the blink _rate_ isn't needed. I would certainly
welcome a [X] blinking cursor checkbox that defaulted to being checked
so that existing behaviour is unchanged, but at the same time offering
an easier solution (i.e., no blinking if the user unchecks  of course
saving and restoring this setting with the other IDLE settings) for
those of us who can't work with cursor blink instead of forcing us to
edit EditWindow.py for every version of Python we install on all our
partitions  machines.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4630
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5594] IDLE startup configuration

2009-03-29 Thread Mark Summerfield

New submission from Mark Summerfield m...@qtrac.eu:

My suggestion is to add somewhere in the configuration dialog when users
can enter a block of Python code to be executed at startup and whenever
Restart Shell is executed.

Use case: for people who use IDLE for calculations/experiments they
might like to always have certain module imported. For me personally, it
would be:

   import os
   import re
   import sys
   from math import *

but of course the whole point is that people can write any code they
like. (Some people might want to do various from __future__ imports in
Python 2.6 to get various Python 3 features for example.)

I know that you can use the -c option, but that only works at startup,
not every time you Restart Shell.

--
components: IDLE
messages: 84367
nosy: mark
severity: normal
status: open
title: IDLE startup configuration
type: feature request
versions: Python 2.7, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5594
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2009-03-24 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

Py2.6: idlelib/EditorWindow.py

change line 110 from: width=self.width,
to: width=self.width, insertofftime=0,

Py3.0
apply the same change to line 112

This will switch off cursor blink (and annoy people who want cursor
blink). So really instead of setting it to 0 you should set it to a
variable. On Windows the Win32 API has a function you can call to find
out the user's preferred blink rate and you can use that. On Mac OS X
there's no such thing so you would need to add an option to IDLE's
configuration dialog. On Linux the .Xdefaults file should be read and
*insertOffTime respected. But since for Mac you have to add it to the
configuration dialog, it might just be easier to just do that for all
platform a simple [ ] blinking cursor check box would suffice.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4630
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2009-03-24 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu added the comment:

Yes, blinking cursors are torture for me too. Fortunately you can switch
them off globally in Windows, and in most cases on Linux (which is what
I use). But not on Mac OS X, and not it seems for Java apps. This site
has some tips: http://www.jurta.org/en/prog/noblink

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4630
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2008-12-13 Thread Mark Summerfield

Mark Summerfield m...@qtrac.eu 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 stopped.

However, that is no help to people using Windows for whom the only
solution is to manually edit the EditorWindow.py file every time they
install a new version of Python.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4630
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3955] maybe doctest doesn't understand unicode_literals?

2008-09-24 Thread Mark Summerfield

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
doctest.testmod()


But if you put the statement from __future__ import unicode_literals
at the start then it fails:
File /tmp/test.py, line 5, in __main__.f
Failed example:
f()
Expected:
'xyz'
Got:
u'xyz'

I don't know if it is a bug or a feature but I didn't see any mention of
it in the bugs or docs so thought I'd mention it.

--
components: Library (Lib)
messages: 73710
nosy: mark
severity: normal
status: open
title: maybe doctest doesn't understand unicode_literals?
type: behavior
versions: Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3955
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3930] urllib.request.urlopen() different on Windows than Linux

2008-09-22 Thread Mark Summerfield

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 me that the same type of file object should be returned on all
platforms, otherwise you have to test the platform and use str.encode()
or bytes.decode() depending on where the code is running.

--
components: Library (Lib)
messages: 73565
nosy: mark
severity: normal
status: open
title: urllib.request.urlopen() different on Windows than Linux
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3930
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3930] urllib.request.urlopen() different on Windows than Linux

2008-09-22 Thread Mark Summerfield

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/bin/env python3
import sys
import urllib.request
print(sys.version)
fh = urllib.request.urlopen(http://www.python.org/index.html;)
data = fh.read()
fh.close()
print(type(data))

# output when run on Linux:
3.0rc1 (r30rc1:66499, Sep 18 2008, 17:45:22)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
class 'bytes'

# output when run on Windows:
3.0rc1 (r30rc1:66507, Sep 18 2008, 14:47:08) [MSC v.1500 32 bit (Intel)]
class 'bytes'

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3930
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3628] IDLE does not run with Py30b3

2008-08-21 Thread Mark Summerfield

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 string, line 1, in module
  File /home/mark/opt/python30b3/lib/python3.0/idlelib/run.py, line
76, in main
sockthread.set_daemon(True)
AttributeError: 'Thread' object has no attribute 'set_daemon'

It looks like there's been some mixup with threading... in an earlier
beta there was setDaemon(), then it became set_daemon(), and now it is
back to setDaemon() again. And unfortunately, the obvious fix (change
the name to setDaemon()), although it gets past this problem, just leads
to another:

$ ~/opt/python30b3/bin/idle # using setDaemon
Traceback (most recent call last):
  File string, line 1, in module
  File /home/mark/opt/python30b3/lib/python3.0/idlelib/run.py, line
76, in main
sockthread.setDaemon(True)
  File /home/mark/opt/python30b3/lib/python3.0/threading.py, line 674,
in setDaemon
Thread.daemon property, DeprecationWarning)
  File /home/mark/opt/python30b3/lib/python3.0/warnings.py, line 18,
in showwarning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: idle_formatwarning_subproc() takes exactly 4 positional
arguments (5 given)

I did run make test and got 300 tests OK with 22 skipped all expected on
linux2.

--
components: IDLE
messages: 71611
nosy: mark
severity: normal
status: open
title: IDLE does not run with Py30b3
type: crash
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3628
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3629] Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2

2008-08-21 Thread Mark Summerfield

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:

$ python -V
Python 2.5.2
$ python /tmp/retext.py
name=name1 value=value1
name=name2 value=value #2
name=name3 value=value '3'
$
$ ~/opt/python30b2/bin/python3.0 -V
Python 3.0b2
$ ~/opt/python30b2/bin/python3.0 /tmp/retext.py
name=name1 value=value1
name=name2 value=value #2
name=name3 value=value '3'
$
$ ~/opt/python30b3/bin/python3.0 /tmp/retext.py
Traceback (most recent call last):
  File /tmp/retext.py, line 8, in module
, re.VERBOSE)
  File /home/mark/opt/python30b3/lib/python3.0/re.py, line 203, in compile
return _compile(pattern, flags)
  File /home/mark/opt/python30b3/lib/python3.0/re.py, line 255, in
_compile
p = sre_compile.compile(pattern, flags)
  File /home/mark/opt/python30b3/lib/python3.0/sre_compile.py, line
520, in compile
groupindex, indexgroup
RuntimeError: invalid SRE code

--
components: Regular Expressions
files: retext.py
messages: 71614
nosy: mark
severity: normal
status: open
title: Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file11185/retext.py

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3628] IDLE does not run with Py30b3

2008-08-21 Thread Mark Summerfield

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 [EMAIL PROTECTED]
http://bugs.python.org/issue3628
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-08-20 Thread Mark Summerfield

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 bit since English isn't my mother
 tongue).

I've revised the ASCII and LOCALE-related texts in re.rst in r65903.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-08-20 Thread Mark Summerfield

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 bit since English isn't my mother
 tongue).

And two more (tiny) fixes in r65904; that's my lot:-)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3598] multiprocessing.Pool windows/linux behaviour difference

2008-08-19 Thread Mark Summerfield

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 there is no output at all; many processes seem to
be created but nothing seems to actually get done.

In both cases I'm using Py30b2.

--
components: Library (Lib)
files: mtest.py
messages: 71408
nosy: mark
severity: normal
status: open
title: multiprocessing.Pool windows/linux behaviour difference
versions: Python 3.0
Added file: http://bugs.python.org/file11154/mtest.py

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3598
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3598] multiprocessing.Pool windows/linux behaviour difference

2008-08-19 Thread Mark Summerfield

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

Ah yes, sorry I missed that.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3598
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3394] zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix

2008-07-25 Thread Mark Summerfield

Changes by Mark Summerfield [EMAIL PROTECTED]:


--
nosy: +mark

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3394
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Mark Summerfield

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() and bytes.to_str()) would be hard to confuse and IMO will
lead to fewer bug reports and complaints once Python 3.0 final comes out.

And there is a kind of precedent in that threading.isDaemon() became
threading.is_daemon() between 30a5 and 30b1.

--
components: Interpreter Core
messages: 69047
nosy: mark
severity: normal
status: open
title: str.tobytes() and bytes/bytearray.tostr()
type: feature request
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3252
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3000] 2to3 doesn't handle print(whatever); print nor string.* functions

2008-07-01 Thread Mark Summerfield

Changes by Mark Summerfield [EMAIL PROTECTED]:


--
type:  - behavior

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3198] strings don't seem to roundtrip with repr()

2008-06-25 Thread Mark Summerfield

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(x))
True
 x = Test Text
 x == str(repr(x))
False

The reason is that an extra set of enclosing quotes are added.

--
components: Interpreter Core
messages: 68728
nosy: mark
severity: normal
status: open
title: strings don't seem to roundtrip with repr()
type: behavior
versions: Python 2.5, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3198
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3175] multiprocessing build fails on Fedora 8 and Xubuntu 8 + solution

2008-06-23 Thread Mark Summerfield

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 modules:
_gestalt

which shouldn't matter because it is a Mac thing not a Linux thing (and
already reported)---there were no other error messages, so no warning
that multiprocessing wasn't working.

Running make test does _not_ indicate any problem with the
multiprocessing module (same output on both systems):

302 tests OK.
21 tests skipped:
test_bsddb3 test_cProfile test_codecmaps_cn test_codecmaps_hk
test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
test_kqueue test_normalization test_ossaudiodev test_pep277
test_socketserver test_startfile test_timeout test_urllib2net
test_urllibnet test_winreg test_winsound test_xmlrpc_net
test_zipfile64
Those skips are all expected on linux2.

If I run test_multiprocessing.py manually from the _build_ directory it
works fine.

But if I use the locally installed Python 3 (soft linked to python3 in
my PATH), on both systems I get this:

: python3 -V
Python 3.0b1
: python3 Lib/test/test_multiprocessing.py
Traceback (most recent call last):
  File Lib/test/test_multiprocessing.py, line 19, in module
import multiprocessing.dummy
ImportError: No module named multiprocessing.dummy

Now given that the tests all pass it seemed to me that the problem was
with the build rather than with the module itself, and that led to the
solution, which for both systems is the same simple command:

cp -R ~/download/Python-3.0b1/Lib/multiprocessing
~/opt/python30b1/lib/python3.0

So it seems that although the shared library is copied correctly from
the build directory, what has been forgotten is to copy the
multiprocessing directory itself.

--
components: Build
messages: 68618
nosy: mark
severity: normal
status: open
title: multiprocessing build fails on Fedora 8 and Xubuntu 8 + solution
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3175
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3140] str.format({0:n}) poss. bug with setlocale()

2008-06-19 Thread Mark Summerfield

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,1234567890,12345678900):
print([{0:20n}].format(x))


[1,234]
[   12,345]
[  123,456]
[ 1,234,567]
[12,345,678]
[   123,456,789]
[  1,234,567,890]
[ 12,345,678,900]

I expected that the commas would not increase the width, but maybe this
was the intended behaviour?

--
messages: 68403
nosy: mark
severity: normal
status: open
title: str.format({0:n}) poss. bug with setlocale()
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3140
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3141] Linux build requires Mac module _gestalt

2008-06-19 Thread Mark Summerfield

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 add this as a bug.

--
components: Build
messages: 68405
nosy: mark
severity: normal
status: open
title: Linux build requires Mac module _gestalt
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3141
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3142] urllib docs don't match the new modules

2008-06-19 Thread Mark Summerfield

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: georg.brandl, mark
severity: normal
status: open
title: urllib docs don't match the new modules
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3142
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-06-19 Thread Mark Summerfield

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. But (2) seems magical (i.e., Perl-like rather than
Pythonic) which I really don't like.

BTW I just noticed this:

'_sre.SRE_Pattern object at 0x9ded020'
 {0!r}.format(rx)
'_sre.SRE_Pattern object at 0x9ded020'
 {0!s}.format(rx)
'_sre.SRE_Pattern object at 0x9ded020'
 {0!a}.format(rx)

That's fair enough, but maybe for !s the output should be rx.pattern?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-06-18 Thread Mark Summerfield

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 3-
 tuples (unless only 1 group was requested).  It should default to all
 match groups (1..n, not group 0, the matching string).

:-)

[snip]
 Finally, I would like suggestions on how to handle name collisions when
 match group names are provided as attributes.  For instance, an
 expression like '(?Ppos.*)' would match more or less any string and
 assign it to the name pos.  But pos is already an attribute of the
 Match object, and therefore pos cannot be exposed as a named match group
 attribute, since match.pos will return the usual meaning of pos for a
 match object, not the value of the capture group names pos.

 I have 3 proposals as to how to handle this:

 a) Simply disallow the exposure of match group name attributes if the
 names collide with an existing member of the basic Match Object
 interface.

I don't like the prefix ideas and now that you've spelt it out I don't
like the sometimes m.foo will work and sometimes it won't. So I prefer
m['foo'] to be the canonical way because that guarantees your code is
always consistent.


BTW I wanted to do a simple regex to match a string that might or might
not be quoted, and that could contain quotes (but not those used to
delimit it). My first attempt was illegal:

(?Pquote['])?([^(?=quote)])+(?(quote)(?=quote))

It isn't hard to work round but it did highlight the fact that you can't
use captures inside character classes. I don't know if Perl allows this;
I guess if it doesn't then Python shouldn't either since GvR wants the
engine to be Perl compatible.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2999] Py30a5: str.replace() tiny doc error

2008-05-29 Thread Mark Summerfield

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 argument maxsplit is
given, only the first maxsplit occurrences are replaced.


The variable name maxsplit should be maxreplacements or similar.
Also - unicode should be - str

--
assignee: georg.brandl
components: Documentation
messages: 67491
nosy: georg.brandl, mark
severity: normal
status: open
title: Py30a5: str.replace() tiny doc error
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2999
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3000] 2to3 doesn't handle print(whatever); print nor string.* functions

2008-05-29 Thread Mark Summerfield

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 deprecated string functions,
string.capitalize(), string.count(), string.join(), string.lower(),
string.replace(), string.split(), and string.strip().

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 67493
nosy: collinwinter, mark
severity: normal
status: open
title: 2to3 doesn't handle print(whatever); print nor string.* functions
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-05-28 Thread Mark Summerfield

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 range(match.lastindex):
 print(i, match.group(i), d[match.group(i)])

One possible solution would be a grouptuples() function that returned a
tuple of 3-tuples (index, name, captured_text) with the name being None
for unnamed groups.

Anyway, good luck with all your improvements, I will be especially glad
if you manage to do (2) and (8) (and maybe (3)).

--
nosy: +mark

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2913] idlelib/EditorWindow.py uses xrange()

2008-05-19 Thread Mark Summerfield

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: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2913
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2806] Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows

2008-05-15 Thread Mark Summerfield

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, parent):
self.parent = parent
menu = Menu(self.parent)
self.parent.config(menu=menu)
fileMenu = Menu(menu)
for label, command in (
(New..., self.fileNew),
(Open..., self.fileOpen),
(Quit, self.fileQuit)):
fileMenu.add_command(label=label, command=command)
menu.add_cascade(label=File, menu=fileMenu, underline=0)

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2806
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2851] Eliminate Perl legacy in re flag names

2008-05-14 Thread Mark Summerfield

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 all the
other short names start with the same letter as the long name, e.g.,
re.I == re.IGNORECASE and re.M == re.MULTILINE.

Why not add re.V for re.VERBOSE and re.D for re.DOTALL and kill re.X and
re.S and say a final farewell to Perl?

--
components: Library (Lib)
messages: 66817
nosy: mark
severity: normal
status: open
title: Eliminate Perl legacy in re flag names
type: feature request
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2851
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Mark Summerfield

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, credits or license() for more information.
IDLE 3.0a5
 import webbrowser
 url = http://www.python.org;
 webbrowser.open(url)
Traceback (most recent call last):
  File pyshell#9, line 1, in module
webbrowser.open(url)
  File /home/mark/opt/python30a5/lib/python3.0/webbrowser.py, line 61,
in open
if browser.open(url, new, autoraise):
  File /home/mark/opt/python30a5/lib/python3.0/webbrowser.py, line
350, in open
devnull = open(os.devnull, r+)
  File /home/mark/opt/python30a5/lib/python3.0/webbrowser.py, line 61,
in open
if browser.open(url, new, autoraise):
  File /home/mark/opt/python30a5/lib/python3.0/webbrowser.py, line
350, in open
...
devnull = open(os.devnull, r+)
  File /home/mark/opt/python30a5/lib/python3.0/webbrowser.py, line 61,
in open
if browser.open(url, new, autoraise):

--
components: Library (Lib)
messages: 66716
nosy: mark
severity: normal
status: open
title: Py30a5: webbrowser.open() inf recursion
type: behavior
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2835
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >