[issue6739] IDLE window won't start or show up after assgining new key in options v2.5.2 and 3.1.1

2009-08-22 Thread Guilherme Polo

Changes by Guilherme Polo :


--
stage: needs patch -> 
type: performance -> behavior

___
Python tracker 

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



[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-08-22 Thread Leonardo Santagada

Leonardo Santagada  added the comment:

Well, the mimetypes module from 2.6 maintenance branch make this problem
not show up with mimetypes.guess_type, but I still think this is a bug
because pure python code should not crash the interpreter right?

I'm attaching the file I mentioned, I hope this counts as a test (it
needs the mimetypes module from python 2.6.2). I can probably extract
just the needed functions from the old mimetypes module if requested.

--
Added file: http://bugs.python.org/file14774/threadboom.py

___
Python tracker 

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



[issue6626] show Python mimetypes module some love

2009-08-22 Thread R. David Murray

R. David Murray  added the comment:

See also issue 6763.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-08-22 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +jrus

___
Python tracker 

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



[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-08-22 Thread R. David Murray

R. David Murray  added the comment:

Seems like issue 6626 could be helpful here.

--
nosy: +r.david.murray
priority:  -> high
stage:  -> test needed

___
Python tracker 

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



[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-08-22 Thread Joshua Bronson

Changes by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue2560] removal of stale code from myreadline.c

2009-08-22 Thread Jessica McKellar

Jessica McKellar  added the comment:

Here's an updated patch against trunk that has 8 space tabs and doesn't
remove some of the existing comments like the other patch did. I checked
that the patch applies and that re-building doesn't error.

--
nosy: +jesstess
versions: +Python 3.2
Added file: http://bugs.python.org/file14773/myreadline-v2.patch

___
Python tracker 

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



[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Michael Foord

Michael Foord  added the comment:

Damn. :-)

Detecting the case where the normpath'd location is the same means
hitting the filesystem - and the current version just does string
manipulation so it doesn't seem like an acceptable change.

Still, compared to other languages the file handling in Python (spread
across os, os.path, shutil, stat) is clunky and verbose. Fixing that
means duplicating this functionality which makes it unlikely that we'll
get it in the standard library.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-22 Thread Art Gillespie

Art Gillespie  added the comment:

Patch for both zipfile.py and test_zipfile.py attached.

* The universal newline logic is now in read instead of readline.
* UniversalNewlineTests.read_test changed to check for \n rather than
unchanged eol.

--
keywords: +patch
nosy: +agillesp
type:  -> behavior
Added file: http://bugs.python.org/file14772/issue6759_1.diff

___
Python tracker 

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



[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Is there any problem with join always calling normpath on it's result?

Yes. If /usr/local/bin was a symlink to /net/x86, then
/usr/local/bin/../lib might not be /usr/local/lib, but /net/lib. So
calling normpath in the presence of symlinks might be incorrect.

--
nosy: +loewis
title: os.path.join should call os.path.normpath on result -> os.path.join 
should call  os.path.normpath on result

___
Python tracker 

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



[issue6762] strange string representation of xrange in print

2009-08-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I concur with Eric.  The eval(repr(obj)) should be made to work when
possible.  We do this with itertools.count() and other places where it
makes sense.

--
nosy: +rhettinger

___
Python tracker 

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



[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Michael Foord

New submission from Michael Foord :

os.path.join has very basic behavior in the handling of '..'

>>> import os
>>> os.path.join('/foo', '..')
'/foo/..'

For some usecases (comparing paths for example) this is not useful and
you have to manually call normpath on the results:

>>> os.path.normpath(os.path.join('/foo', '..'))
'/'

Because of this code gets littered with annoyingly long chained calls
which are a pain to both read and write.

Is there any problem with join always calling normpath on it's result?

--
components: Library (Lib)
keywords: easy
messages: 91877
nosy: michael.foord
severity: normal
status: open
title: os.path.join should call os.path.normpath on result
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-08-22 Thread Leonardo Santagada

New submission from Leonardo Santagada :

Python 2.6.2 (and the maint branch if using old mimetypes.py) crash
(with a bus error) on mac os x (10.5.7 & 10.5.8) with the file I posted.
The problem appears to be in the allocation of memory by the GC.

What I do is I call mimetypes.guess_type in more than one thread at the
same time, then I guess what is happening is this:

1. The first thread to run notices mimetypes.inited is false so it call
its init funtion.
2. Somehow the first thread loses the gil while still executing the init
3. Another thread tries to execute guess_type as it is already inited it
calls itself, in vain as the init still hasn't exchanged it value for
the new function so it goes into recursion
4. Somehow the allocator fails during the recursion

here is the final pieces of my stack trace (its a very long sequence of
recursions into guess_type):

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0xbffc
[Switching to process 61544 thread 0x117]
0x96912122 in szone_malloc ()

#0  0x96912122 in szone_malloc ()
#1  0x969120d8 in malloc_zone_malloc ()
#2  0x9691206c in malloc ()
#3  0x0006f32c in PyObject_Malloc (nbytes=376) at Objects/obmalloc.c:913
913 return (void *)malloc(nbytes);
#4  0x0006fe61 in _PyObject_DebugMalloc (nbytes=360) at
Objects/obmalloc.c:1347
1347p = (uchar *)PyObject_Malloc(total);
#5  0x00149b13 in _PyObject_GC_Malloc (basicsize=344) at
Modules/gcmodule.c:1351
1351g = (PyGC_Head *)PyObject_MALLOC(
#6  0x00149c24 in _PyObject_GC_NewVar (tp=0x193500, nitems=5) at
Modules/gcmodule.c:1383
1383PyVarObject *op = (PyVarObject *) _PyObject_GC_Malloc(size);
#7  0x00048a06 in PyFrame_New (tstate=0x33df30, code=0x473148,
globals=0x48e380, locals=0x0) at Objects/frameobject.c:642
642 f = PyObject_GC_NewVar(PyFrameObject,
&PyFrame_Type,
#8  0x00100816 in PyEval_EvalCodeEx (co=0x473148, globals=0x48e380,
locals=0x0, args=0x374fb4, argcount=2, kws=0x374fbc, kwcount=0,
defs=0x4a6f9c, defcount=1, closure=0x0) at Python/ceval.c:2755
2755f = PyFrame_New(tstate, co, globals, locals);

--
components: Interpreter Core
messages: 91876
nosy: santagada
severity: normal
status: open
title: Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-08-22 Thread Kevin Walzer

Changes by Kevin Walzer :


--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue6762] strange string representation of xrange in print

2009-08-22 Thread Mintaka

Mintaka  added the comment:

Thanks for clarification. I compared it with iter([0,1,2,3,4]).__str__()
which behaviour seems to me closer then list or tuple.

--

___
Python tracker 

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



[issue6498] Py_Main() does not return on SystemExit

2009-08-22 Thread Raphaela

Raphaela  added the comment:

bump =op

--

___
Python tracker 

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



[issue6498] Py_Main() does not return on SystemExit

2009-08-22 Thread Rogi

Rogi  added the comment:

bump

--

___
Python tracker 

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



[issue6762] strange string representation of xrange in print

2009-08-22 Thread Eric Smith

Eric Smith  added the comment:

For types where it's possible, the str or repr returns a string that can
be passed to eval:

>>> for i in eval(str(xrange(5))):
...   print i
... 
0
1
2
3
4

xrange (and list, and tuple, and others) fall into this category.

--
nosy: +eric.smith
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue6762] strange string representation of xrange in print

2009-08-22 Thread Mintaka

Changes by Mintaka :


--
type:  -> behavior

___
Python tracker 

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



[issue6762] strange string representation of xrange in print

2009-08-22 Thread Mintaka

New submission from Mintaka :

String representation of xrange return keyword with value.

foo = xrange(5)
print foo
>>> xrange(5)
foo.__str__() 
>>> xrange(5)

I think, that expected result should be somethink like this:
>>> 

--
components: Interpreter Core
messages: 91871
nosy: mintaka
severity: normal
status: open
title: strange string representation of  xrange in print
versions: Python 2.5, Python 2.6

___
Python tracker 

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



[issue700921] Wide-character curses

2009-08-22 Thread Guilherme Polo

Changes by Guilherme Polo :


--
status: open -> closed

___
Python tracker 

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



[issue700921] Wide-character curses

2009-08-22 Thread Guilherme Polo

Guilherme Polo  added the comment:

Closing this in favour of issue6755, it has been a long time since any
discussion took place here that I believe it is better to continue
somewhere else related to this.

--
nosy: +gpolo

___
Python tracker 

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



[issue700921] Wide-character curses

2009-08-22 Thread Iñigo Serna

Iñigo Serna  added the comment:

In issue6755 I provide a patch to support get_wch, which is the only
wide chars related feature I miss in current bindings (as python v2.6.2
or v3.1.1).

--
nosy: +inigoserna

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-22 Thread Iñigo Serna

Iñigo Serna  added the comment:

Thanks for the pointer, haven't seen anything when I searched for get_wch.

The patch provided here only adds this get_wch function, because as A.M.
Kuchling explained in issue700921, it's possible to use wide chars now,
the only feature missing is get_wch.

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-22 Thread Guilherme Polo

Guilherme Polo  added the comment:

Have you looked into issue700921 already ? It seems a lot of discussion
was generated there, but no patches.

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-22 Thread Guilherme Polo

Changes by Guilherme Polo :


--
nosy: +gpolo
versions:  -Python 2.6, Python 3.1

___
Python tracker 

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



[issue6739] IDLE window won't start or show up after assgining new key in options v2.5.2 and 3.1.1

2009-08-22 Thread Guilherme Polo

Guilherme Polo  added the comment:

Please, understand that the bug tracker is a place to provide help and
not to seek for help. The c.l.p newsgroup (more on
http://www.python.org/community/lists/) is a more appropriate place to
continue this discussion.

Nevertheless, the attached patch was generated from python trunk so if
you want to apply it by hand you will need to check what file it changed
(first lines on it) and then check line offsets (@@ ... @@) to know
where to hand-apply each hunk. Applying any patch this way may cause
more trouble than anything else, be careful.

--
status: pending -> open
versions: +Python 2.6, Python 2.7, Python 3.2

___
Python tracker 

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



[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-08-22 Thread Hagen Fürstenau

Hagen Fürstenau  added the comment:

Shouldn't r73896 be backported to the 3.1 branch? I still get "Unable to
find vcvarsall.bat" with Python 3.1.1.

--

___
Python tracker 

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



[issue6761] Class calling

2009-08-22 Thread Stephen Fairchild

New submission from Stephen Fairchild :

From:
http://docs.python.org/reference/datamodel.html#the-standard-type-hierarchy

"Class instances
Class instances are described below. Class instances are callable
only when the class has a __call__() method; x(arguments) is a shorthand
for x.__call__(arguments)."

The following program demonstrates otherwise regarding that last statement. 

def call(self):
print "inserted __call__ in object of class A"

class A(object):
def __call__(self):
print "__call__ method in class A"

x = A()   # Equates: x = type(A).__call__(A)
x.__call__ = call

x()   # Calls the method of class A.
x.__call__(x) # Calls function "call".
type(x).__call__(x)   # The correct longhand of x() IMHO


If I were to rephrase the documentation:
"Class instances
Class instances are described below. Class instances are callable
only when the class has a __call__() method; x(arguments) is a shorthand
for type(x).__call__(x, arguments)."

--
assignee: georg.brandl
components: Documentation
messages: 91864
nosy: georg.brandl, onlyme
severity: normal
status: open
title: Class calling
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue6626] show Python mimetypes module some love

2009-08-22 Thread Joshua Bronson

Changes by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue6739] IDLE window won't start or show up after assgining new key in options v2.5.2 and 3.1.1

2009-08-22 Thread CaribbeanCruise

CaribbeanCruise  added the comment:

Thanks for the help.

I removed that external row and now it's up and running again :D May I 
please have an explanation on what causes that behavior and why that 
solution on that file worked?

I'm just a n00b/beginner level on programming and I will someday try to 
understand that patch, how I can write that patch and put it in place to 
make it work.

Thank you very much for the help and guidance.

--
status: open -> pending
versions: +Python 2.5 -Python 2.6, Python 2.7, Python 3.2

___
Python tracker 

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



[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-22 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

I hope you'll also write some unit tests for privilege.py (actually, I
hope you'll do test driven development on it).

--

___
Python tracker 

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



[issue6688] Optimize PyBytes_FromObject.

2009-08-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Nice improvement!
Beware that _PyObject_LengthHint may set an exception, though.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-08-22 Thread Senthil

Changes by Senthil :


--
assignee:  -> orsenthil

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2009-08-22 Thread Chris Rebert

Changes by Chris Rebert :


--
type:  -> feature request

___
Python tracker 

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



[issue5365] add conversion table to time module docs

2009-08-22 Thread Chris Rebert

Chris Rebert  added the comment:

Added string conversions to table for good measure.

--
status: closed -> open
Added file: http://bugs.python.org/file14771/table.rst

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2009-08-22 Thread Chris Rebert

New submission from Chris Rebert :

>From what I've seen on several c.l.p threads, some people have a tough
time figuring the correct 'args' argument to subprocess.Popen's
constructor. In an effort to cut down on such discussions in the future,
I've written the attached docs patch to better explain the subject.

I'm not an rst/Sphinx guru and thus was unable to actually test the
patch, so there might be some (hopefully minor) formatting errors.

--
assignee: georg.brandl
components: Documentation
files: subprocess.rst.patch
keywords: patch
messages: 91859
nosy: cvrebert, georg.brandl
severity: normal
status: open
title: patch to subprocess docs to better explain Popen's 'args' argument
versions: Python 2.6
Added file: http://bugs.python.org/file14770/subprocess.rst.patch

___
Python tracker 

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



[issue6508] expose setresuid

2009-08-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Where would be the best place to put these non-POSIX calls?
> 
> I looked at posixmodule.c and it's a mess; much conditional CPP logic
> governing what gets compiled, not clear where I should add something
> like this there - if I should at all, since these routines are not POSIX
> routines.

Don't worry about that - the POSIX module is the right place, despite
it's name.

> Perhaps there should be a module called Unix or something?

That wouldn't reduce the need to remove CPP logic. I personally don't
find that CPP logic very messy - most of it is fairly clear (perhaps
with popen being the exception).

> Also, knowing whether the functions were avaiable at compile time would
> be tricky; some Unix OSes have them and others don't.

I don't understand. When you compile for a specific Unix, it either has
them or not, right? So you *can* test at compile time, and easily so
(the same way it test for about 20 other functions).

> It sounds like a
> job for autoconf to define HAVE_SETRESUID and other CPP definitions like
> that so we can compile cleanly and portably...

Correct - you need to change configure.in as well.

--

___
Python tracker 

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



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-08-22 Thread Shashank

Shashank  added the comment:

Works fine for me in 2.6 but fails as said by OP on 2.5.
(I came across this in the course of my work and am submitting a change
in a bug for the first time, pardon me if something is inappropriate :)

I used this modified codeblock:

--
import cookielib
import urllib2

cookiejar = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))
url = 'https://www.orange.sk/'
req = urllib2.Request(url, None)
s=opener.open(req)
print s.read();

---

2.6 gives a complete HTML page but 2.5 raises httplib.BadStatusLine
exception.

--
nosy: +shashank

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-22 Thread kai zhu

Changes by kai zhu :


Added file: http://bugs.python.org/file14769/_asciiporn.h

___
Python tracker 

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



[issue6239] c_char_p return value returns string, not bytes

2009-08-22 Thread kai zhu

kai zhu  added the comment:

wrote an extension application which relies on the patch (works after 
applying patch to python 3.1.1).

it converts png images to colorized ascii-art on ansi-compatible 
terminal.  requires the patch b/c a ctype function returns a c-string w/ 
ansi-escape characters.

>>> import ctypes
>>> lib = ctypes.cdll.LoadLibrary("_asciiporn.so")
>>> lib.img_read(b"foo.png") // load png image
>>> lib.asc_itp(4, 16)   // ascii-rize algorithm
>>> lib.asc_str.restype = ctypes.c_char_p
>>> print( lib.asc_str() )   // prints out ansi-colorized ascii-art

hopefully, this is more motivation to commit the patch to trunk

--
Added file: http://bugs.python.org/file14768/_asciiporn.c

___
Python tracker 

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



[issue6508] expose setresuid

2009-08-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Yes, just put it near the numerous set_XXXuid functions, protected with a 
HAVE_SETRESUID macro (you will have to modify configure.in as well)

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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