Apache Mod-Python - Re: mod_python 3.2.3b available for testing

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > October 2005 > Re: mod_python 3.2.3b available for testing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: mod_python 3.2.3b available for testing
Indrek Järve

2005-10-25, 5:46 pm

This behaviour has been with Python for quite a while, so claiming it's
simply a Python bug will be the same as declaring we don't support Windows.

Our company's software that runs on Windows and uses mod_python simply
patches util.py with the following change:
227c227
< if isinstance(item.file, FileType):
---
> if isinstance(item.file, FileType) or

(hasattr(item.file, 'file') and isinstance(item.file.file, FileType)):

I haven't tried this with mp32 yet (we're still running on Python 2.3
and I haven't had time to investigate how to compile mp on Windows), but
on 3.0/3.1 it appears to work just fine for our customers.

Best regards,
Indrek Järve
Inversion Software OÜ

Nick wrote:
[vbcol=seagreen]
> More info:
>
> Python 2.4.2 on Linux:
> <open file '<fdopen>', mode 'w+b' at 0xb7df07b8>
> <type 'file'>
> ['__class__', '__delattr__', '__doc__', '__getattribute__',
> '__hash__', '__init__', '__iter__', '__new__', '__reduce__',
> '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'close',
> 'closed', 'encoding', 'fileno', 'flush', 'isatty', 'mode', 'name',
> 'newlines', 'next', 'read', 'readinto', 'readline', 'readlines',
> 'seek', 'softspace', 'tell', 'truncate', 'write', 'writelines',
> 'xreadlines']
>
> Python 2.4.1 on windows:
> <open file '<fdopen>', mode 'w+b' at 0x0099FBA8>
> <type 'instance'>
> ['__doc__', '__getattr__', '__init__', '__module__', '__repr__',
> 'close_called', 'file', 'name']
>
> So this is an inconsistency within Python. Should mod_python attempt
> to correct it, or just claim a Python bug?
>
> Nick
>
> Nick wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com