[issue4485] fast swap of "default" Windows python versions

2008-12-05 Thread Mark Tolonen

Mark Tolonen <[EMAIL PROTECTED]> added the comment:

An extension to this idea:  Support parsing #! lines in Windows and 
select the version of Python used.  python.exe could examine:

#!/usr/bin/python30

pattern match "python##", look in the registry to see if that version 
of python is installed, and launch that python.exe instead.

--
nosy: +metolone

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



[issue4485] fast swap of "default" Windows python versions

2008-12-05 Thread Mark Tolonen

Mark Tolonen <[EMAIL PROTECTED]> added the comment:

I see it as primarily useful in this transition period between 2.x and 
3.0, since py3 scripts aren't backward compatible and I see both being 
installed for the few years.  It could be a front-end launcher 
suitable for "ftype Python.File" that inspects the script for #! and 
checks the registry for installed python versions.  That would make it 
work with older versions as well.  Probably better suited to 
discussion on c.l.p than here, but at least recorded as an idea in 
this feature request.

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



[issue43087] ctypes documentation error

2021-01-31 Thread Mark Tolonen


New submission from Mark Tolonen :

At the following documentation link:

https://docs.python.org/3/library/ctypes.html#incomplete-types

The last example should have byte strings:

>>> c1 = cell()
>>> c1.name = b"foo"
>>> c2 = cell()
>>> c2.name = b"bar"

--
messages: 386037
nosy: metolone
priority: normal
severity: normal
status: open
title: ctypes documentation error

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



[issue43087] ctypes documentation error

2021-01-31 Thread Mark Tolonen


Change by Mark Tolonen :


--
assignee:  -> docs@python
components: +Documentation, ctypes
nosy: +docs@python
versions: +Python 3.9

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



[issue14227] console w/ cp65001 displays extra characters for non-ascii strings.

2012-03-07 Thread Mark Tolonen

New submission from Mark Tolonen :

This is on Windows 7 SP1.  Run 'chcp 65001' then Python from a console.  Note 
the extra characters when non-ASCII characters are in the string.  At a guess 
it appears to be using the UTF-8 byte length of the internal representation 
instead of the character count.

Python 3.3.0a1 (default, Mar  4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello')
hello
>>> print('p\u012bny\u012bn')
pīnyīn
n
>>> print('\u012b'*10)
īī
�
�ī

--
components: IO, Unicode, Windows
messages: 155149
nosy: ezio.melotti, metolone
priority: normal
severity: normal
status: open
title: console w/ cp65001 displays extra characters for non-ascii strings.
type: behavior
versions: Python 3.3

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



[issue15828] imp.load_module doesn't support C_EXTENSION type

2012-08-31 Thread Mark Tolonen

New submission from Mark Tolonen:

I built a C extension using SWIG for both Python 3.2 and Python 3.3.  The 
Python file supplying class proxies uses imp.load_module and fails with the 
following traceback on 3.3.0rc1, but works on 3.2.3:

   Traceback (most recent call last):
 File "", line 1, in 
 File ".\Widget.py", line 26, in 
   _Widget = swig_import_helper()
 File ".\Widget.py", line 22, in swig_import_helper
   _mod = imp.load_module('_Widget', fp, pathname, description)
 File "D:\dev\python33\lib\imp.py", line 171, in load_module
   raise ImportError(msg, name=name)
   ImportError: Don't know how to import _Widget (type code 3

It looks like imp.py is new in Python 3.3, and imp.load_module no longer 
supports the C_EXTENSION type.  It looks like a regression.

To reproduce, I was able to run the following lines with the .pyd file in the 
current directory:

   import imp
   fp, pathname, description = imp.find_module('_Widget')
   imp.load_module('_Widget', fp, pathname, description)

Nit: Also note the missing final ')' in the ImportError message.

--
components: Library (Lib)
messages: 169506
nosy: metolone
priority: normal
severity: normal
status: open
title: imp.load_module doesn't support C_EXTENSION type
type: behavior
versions: Python 3.3

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



[issue6345] extra characters displayed when writing to sys.stdout.buffer

2009-06-25 Thread Mark Tolonen

Mark Tolonen  added the comment:

Sorry, msg.replace('Issue ','Issue 4571').

--

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



[issue6345] extra characters displayed when writing to sys.stdout.buffer

2009-06-25 Thread Mark Tolonen

New submission from Mark Tolonen :

According to Issue , sys.stdout.buffer is the binary stream 
underlying stdout.  I see the following behavior on 3.0.1 and 3.1rc2 
when writing to a console window:

Python 3.1rc2 (r31rc2:73414, Jun 13 2009, 16:43:15) [MSC v.1500 32 bit 
(Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> 
sys.stdout.buffer.write('hello\u200bworld'.encode('cp437','replace'))
hello?world11

Notice the extra '11' at the end of the string.

--
components: IO
messages: 89719
nosy: metolone
severity: normal
status: open
title: extra characters displayed when writing to sys.stdout.buffer
type: behavior
versions: Python 3.1

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