Re: [Python-Dev] A suggestion: Do proto-PEPs in Google Docs

2009-02-26 Thread Leif Walsh
On Thu, Feb 19, 2009 at 10:17 PM, Stephen J. Turnbull
 wrote:
> Overall, I recommend use of Google Docs for "Python-Ideas" level of
> PEP drafts.

+1!  I also like Google Sites for collaborative editing.

-- 
Cheers,
Leif
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] String conversion issues implementing new curses module method addchstr, etc.

2009-02-26 Thread Ulrich Eckhardt
On Wednesday 25 February 2009, Heracles wrote:
> addchstr((chtype*)PyString_AsString(pS))

You are effectively disabling the well-deserved warnings with the cast here. 
Don't do that.

> Now the thing is that when I make calls from python like so:
>
>curses.addchstr(5,10, "@ < Row 5, Col 10")
[...]
> What prints out on the screen is gobledygook not the strings you would
> expect below.
[...]
> Any thoughts on how to correctly convert the PyStringObject arguments to
> chtype* pointers so that the ncurses library will be able to understand
> them?

In this case, I suggest man ncurses:

| cchar_t
|corresponds to chtype.  However it is a structure, because more
|data is stored than can fit into an integer.  The characters are
|large enough to require a full  integer  value  -  and there may
|be more than one character per cell. The video attributes and
|color are stored in  separate fields of the structure.  

I'm pretty sure that you can find functions to generate such a string both 
from a char-string (with whatever encoding) or a wchar_t-string (using 
Unicode probably) in the curses library.

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**
   Visit our website at 
**
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten 
bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen 
Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein 
sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, 
weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte 
Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht 
verantwortlich.
**

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] String conversion issues implementing new curses module method addchstr, etc.

2009-02-26 Thread Heracles

Thank you, this is most helpful, and i will heed your advice about the cast.

Cheers!


Ulrich Eckhardt wrote:
> 
> On Wednesday 25 February 2009, Heracles wrote:
>> addchstr((chtype*)PyString_AsString(pS))
> 
> You are effectively disabling the well-deserved warnings with the cast
> here. 
> Don't do that.
> 
>> Now the thing is that when I make calls from python like so:
>>
>>curses.addchstr(5,10, "@ < Row 5, Col 10")
> [...]
>> What prints out on the screen is gobledygook not the strings you would
>> expect below.
> [...]
>> Any thoughts on how to correctly convert the PyStringObject arguments to
>> chtype* pointers so that the ncurses library will be able to understand
>> them?
> 
> In this case, I suggest man ncurses:
> 
> | cchar_t
> |corresponds to chtype.  However it is a structure, because more
> |data is stored than can fit into an integer.  The characters are
> |large enough to require a full  integer  value  -  and there may
> |be more than one character per cell. The video attributes and
> |color are stored in  separate fields of the structure.  
> 
> I'm pretty sure that you can find functions to generate such a string both 
> from a char-string (with whatever encoding) or a wchar_t-string (using 
> Unicode probably) in the curses library.
> 
> Uli
> 
> -- 
> Sator Laser GmbH
> Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
> 
> **
> Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
> Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
> **
>Visit our website at 
> **
> Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten
> bestimmt und kann vertrauliche Informationen enthalten. Bitte
> benachrichtigen Sie den Absender umgehend, falls Sie nicht der
> beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu
> löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder
> anderweitig benutzt werden.
> E-Mails können durch Dritte gelesen werden und Viren sowie
> nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese
> Folgen nicht verantwortlich.
> **
> 
> ___
> Python-Dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/lists%40nabble.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/String-conversion-issues-implementing-new-curses-module-method-addchstr%2C-etc.-tp22211983p5142.html
Sent from the Python - python-dev mailing list archive at Nabble.com.

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Adding support to curses library

2009-02-26 Thread A.M. Kuchling
On Wed, Feb 25, 2009 at 01:52:29PM -0800, [email protected] wrote:
> Are you up for helping a little more?

Sure, but please open an issue on http://bugs.python.org for this;
back-and-forth over a particular patch is done in the bug tracker, not
the python-dev mailing list.  http://www.python.org/dev/ discusses how
development is done.

We also don't send around modified
copies of entire files; http://www.python.org/dev/faq/#patches
discusses how to make patches.

--amk



___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] A suggestion: Do proto-PEPs in Google Docs

2009-02-26 Thread Aahz
On Sat, Feb 21, 2009, [email protected] wrote:
>
> Not that I'm expecting to be working on PEPs any time soon, but just as a
> different perspective, I would find the effort to open up Google docs to
> be a much higher barrier to doing some editing tweaks than the dvcs case.

For me, the big barrier to Google docs is the requirement to fire up a
GUI browser and log into Google.
-- 
Aahz ([email protected])   <*> http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Pybots link obsolete?

2009-02-26 Thread anatoly techtonik
Still actual.

On Wed, Jan 7, 2009 at 5:54 PM, Antoine Pitrou  wrote:
> Hello,
>
> In http://www.python.org/dev/buildbot/, there's a link suggesting to visit the
> pybots Web site for more information. However, http://www.pybots.org/ just 
> says
> "Nothing here #".
>
> Regards
>
> Antoine.
>
>
> ___
> Python-Dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/techtonik%40gmail.com
>



-- 
--anatoly t.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] OS X Installer for 3.0.1 and supported versions

2009-02-26 Thread Ned Deily
In article ,
 "Russell E. Owen"  wrote:
> I want to follow up on this a bit. In the past if the Mac Python 
> installer was built on a machine that did NOT have a locally installed 
> Tcl/Tk then it would fail to work with a locally installed Tcl/Tk: 
> Python would segfault when trying to use Tkinter.
> 
> The solution was to build the Mac python installer on a machine with a 
> locally installed Tcl/Tk. The resulting installer package would work on 
> all systems -- with or without locally installed Tcl/Tk.
> 
> So...has this problem been worked around, or is the Mac installer still 
> built on a machine that has a locally installed Tcl/Tk?

Ronald will have to answer that for sure since he built the installer 
for 3.0.1.

However, it seems to be true that the most recent python.org OS X 
installers will always favor a /System/Library/Frameworks/{Tcl/Tk}:

$ cd 
/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/lib-dynlo
ad
$ otool -L _tkinter.so 
_tkinter.so:
   /System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl 
(compatibility version 8.4.0, current version 8.4.0)
   /System/Library/Frameworks/Tk.framework/Versions/8.4/Tk 
(compatibility version 8.4.0, current version 8.4.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 88.3.10)

I'm certainly not a Tcl expert nor overly familiar with the history of 
this issue but here's what I see.  As a test, I installed the ActiveTcl 
8.4.19, which installs in /Library/Frameworks, and confirmed that a 
simple "import tkinter; root = tkinter.Tk()" for 3.0.1 does indeed use 
the Apple-supplied 8.4.7 Tcl.

Running similar tests and otool -L on _tkinter.so from the 2.6.1 and 
2.5.4 python.org installs gives similar results (both always use the 
Apple-supplied Tcl from /System/Library).  

However, the _tkinter.so from the 2.4.4 python.org installer is 
different:
$ cd 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynlo
ad
$ otool -L _tkinter.so 
_tkinter.so:
   /Library/Frameworks/Tcl.framework/Versions/8.4/Tcl (compatibility 
version 8.4.0, current version 8.4.13)
   /Library/Frameworks/Tk.framework/Versions/8.4/Tk (compatibility 
version 8.4.0, current version 8.4.13)
   /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 
47.1.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 88.1.3)

and it does in fact use the /Library 8.4.19 ActiveTcl framework if 
installed and, as expected, reverts to the Apple-supplied 8.4.7 
/System/Library framework version if the ActiveTcl framework is removed.

So it looks like you recall correctly that at least some earlier 
installers were built on a machine with a locally installed Tcl/Tk.  It 
should be an easy matter to do that for future 10.4-10.5 installers so 
that newer 8.4 versions can be used.

Note, there was a Tcl/Tk problem with the initial 2.6 OS X installer 
(http://bugs.python.org/issue4017) but in that case the locally 
installed Tcl/Tk version was 8.5 and the fallback to a system-supplied 
8.4 doesn't work across versions.

> Most people who makes serious use of Tkinter presumably have a locally 
> installed Tcl/Tk because the version that Apple provides is ancient and 
> is missing many important bug fixes and performance enhancements.
> 
> Also, a somewhat related issue: Tcl/Tk 8.4 is no longer maintained. All 
> development work is going on in Tcl/Tk 8.5. Presumably Apple will 
> transition one of these days, and at that point we may need a separate 
> Mac Python installer for the older operating systems vs. the newer.

Yes, something will need to be done for that if Snow Leopard does have 
newer versions.

Thanks for bringing this up!

-- 
 Ned Deily,
 [email protected]

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Distutils in PEP 291

2009-02-26 Thread Tarek Ziadé
Hello,

If no one objects, I would like to:

- put Distutils back into PEP 291 for Python 2.3 compatibility
- fix the two issues that prevent the current trunk to run with Python
2.3 to 2.5 (see http://bugs.python.org/issue5052 and the patch I
worked on)

Regards
Tarek

-- 
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Distutils in PEP 291

2009-02-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tarek Ziadé wrote:
> Hello,
> 
> If no one objects, I would like to:
> 
> - put Distutils back into PEP 291 for Python 2.3 compatibility
> - fix the two issues that prevent the current trunk to run with Python
> 2.3 to 2.5 (see http://bugs.python.org/issue5052 and the patch I
> worked on)

+1.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [email protected]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJp1QA+gerLs4ltQ4RAirAAJ99FomyrgYELjDITGBUtbmKtKlKOQCdHSjz
LsAgd1PFZFyvTgdaIMkw4/o=
=MKhZ
-END PGP SIGNATURE-
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Instructions on using git mirror

2009-02-26 Thread Neil Schemenauer
I've revised my instructions on using the experimental git mirror of
the Python SVN repository:

http://python.ca/nas/tmp/git-notes.txt

Stories of success or failure welcome.

  Neil
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com