[Python-Dev] Adding a C Module to python source distribution

2009-08-28 Thread Shashank Singh
Hi All,

I am trying to add a module written in c to python source on Win32 using
VC++ 9 Pro.
I went through the available documentation but there doesn't seem to be any
clear instruction on how to do that.

Basically I opened pcbuild.sln in vc++, added the c file (xxx.c) to Modules/
directory.
Building the solution after that works fine: xxx.c is compiled (no errors,
no warnings) and
the python executable gets created. But I am not able to import the module
defined
in xxx.c using that executable.

Do I need to register this module some place else too (setup.py?) ?

Any hints and pointers will be appreciated :)

--shashank
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

2009-08-28 Thread Nick Coghlan
Peter Moody wrote:
> If there are any more suggestions on the PEP or the code, please let me know.

I noticed the new paragraphs on the IPv4 vs IPv6 types not being
comparable - is there a canonical ordering for mixed address lists
defined anywhere (e.g. an RFC)?

If there is, then it should be possible to implement that on BaseIP and
BaseNet so that comparisons work as canonically defined. If there isn't,
then that should be mentioned in the PEP as the reason why the PEP
deliberately isn't trying to invent a convention.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---
___
Python-Dev mailing list
Python-Dev@python.org
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 a C Module to python source distribution

2009-08-28 Thread Christian Heimes
Shashank Singh wrote:
> Do I need to register this module some place else too (setup.py?) ?
> 
> Any hints and pointers will be appreciated :)

You have to add the module and its initializer to PC/config.c, too.

Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Summary of Python tracker Issues

2009-08-28 Thread Python tracker

ACTIVITY SUMMARY (08/21/09 - 08/28/09)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue 
number.  Do NOT respond to this message.


 2370 open (+23) / 16247 closed (+15) / 18617 total (+38)

Open issues with patches:   935

Average duration of open issues: 657 days.
Median duration of open issues: 410 days.

Open Issues Breakdown
   open  2339 (+23)
pending30 ( +0)

Issues Created Or Reopened (39)
___

add conversion table to time module docs 08/22/09
   http://bugs.python.org/issue5365reopened cvrebert
  
   

implement new setuid-related calls and a standard way to drop al 08/21/09
CLOSED http://bugs.python.org/issue6758created  solinym 
  
   

zipfile.ZipExtFile.read() is missing universal newline support   08/22/09
   http://bugs.python.org/issue6759created  ryles   
  
   patch   

patch to subprocess docs to better explain Popen's 'args' argume 08/22/09
   http://bugs.python.org/issue6760created  cvrebert
  
   patch   

Class calling08/22/09
   http://bugs.python.org/issue6761created  onlyme  
  
   

strange string representation of  xrange in print08/22/09
CLOSED http://bugs.python.org/issue6762created  mintaka 
  
   

Crash on mac os x leopard in mimetypes.guess_type (or PyObject_M 08/22/09
   http://bugs.python.org/issue6763created  santagada   
  
   

os.path.join should callos.path.normpath on result  08/22/09
CLOSED http://bugs.python.org/issue6764created  michael.foord   
  
   easy

math.log, log10 inconsistency08/23/09
CLOSED http://bugs.python.org/issue6765created  steve21 
  
   

Cannot modify dictionaries inside dictionaries using Managers fr 08/23/09
   http://bugs.python.org/issue6766created  carlosdf
  
   

Python as zip package08/23/09
   http://bugs.python.org/issue6767created  Joe 
  
   

asyncore file_wrapper leaking file descriptors?  08/23/09
   http://bugs.python.org/issue6768created  keysers 
  
   

in xmlrpclib.py: NameError: global name 'HTTPSConnection' is not 08/23/09
   http://bugs.python.org/issue6769created  ivank   
  
   

PDF download links of docs for 3.1.1 are broken  08/24/09
CLOSED http://bugs.python.org/issue6770created  Radiant 
  
   

documentation/implementation error   08/24/09
   http://bugs.python.org/issue6771created  steve21 
  
   

Missing alias  utf-8 in  Standard Encodings list.08/24/09
CLOSED http://bugs.python.org/issue6772created  mintaka 
  
   

subprocess issue on Win 7 x6408/24/09
   http://bugs.python.org/issue6773created  tesla   
  
   

socket.shudown documentation: on some platforms, closing one hal 08/24/09
   http://bugs.python.org/issue6774created  nicdumz 
  
   patch   

readme: correct python.org/community/lists url   08/24/09
CLOSED http://bugs.python.org/issue6775created  nicdumz 
  
   patch  

[Python-Dev] timed_command.py: consider for inclusion in std. library?

2009-08-28 Thread Charles Waldman

Here's a module "timed_command" I wrote a while ago and is generally
useful and might be a good addition to the standard library.  It is 
like commands.getstatusoutput but lets you run a command with an
optional timeout.  Useful for systems programming where a sub-process 
might hang.  Only works on POSIX, but could perhaps be modified to run
on other platforms (I don't have the knowledge of Windows to do this).
If you would like to add this to the library, I relinquish all rights
to it.

Here's a link to the source repository:

 http://repo.mwt2.org/viewvc/Python/timed_command.py?view=markup




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


Re: [Python-Dev] deprecated methods on array objects

2009-08-28 Thread Brett Cannon
On Thu, Aug 27, 2009 at 14:15, Jake McGuire wrote:
> The python documentation says that the read() and write() methods on array
> objects have been deprecated since 1.5.1.  I assume this is because their
> semantics are almost the exact opposite of read() and write() on a file-like
> object; array.read() reads data from a file into the array and array.write()
> writes data from the array to a file.
> This causes fatal confusion in code that checks for the existence of read()
> and write() to determine whether an object is file-like.  Code such as
> httplib.
> What is the timeline for removing these methods from array?  It has been 11
> years now.

They are gone from Python 3.x, so they have been removed where it
counts. Bothering with 2.x is not worth it at this point.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] timed_command.py: consider for inclusion in std. library?

2009-08-28 Thread Brett Cannon
To get a module included in the standard library you need to have it
out for about a year, have the community consider it best-of-breed,
and write a PEP passed through python-ideas.

On Fri, Aug 28, 2009 at 10:40, Charles Waldman wrote:
>
> Here's a module "timed_command" I wrote a while ago and is generally
> useful and might be a good addition to the standard library.  It is
> like commands.getstatusoutput but lets you run a command with an
> optional timeout.  Useful for systems programming where a sub-process
> might hang.  Only works on POSIX, but could perhaps be modified to run
> on other platforms (I don't have the knowledge of Windows to do this).
> If you would like to add this to the library, I relinquish all rights
> to it.
>
> Here's a link to the source repository:
>
>  http://repo.mwt2.org/viewvc/Python/timed_command.py?view=markup
>
>
>
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/brett%40python.org
>
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] functools.compose to chain functions together

2009-08-28 Thread Peter Harris
I am personally indifferent to this, even though I had in mind in 
PEP309, that compose would probably end up in there too.


On the one hand, some people will keep on expecting it to be there. The 
ones that care about it will not be confused: they'll expect 
compose(f,g)(x) to be f(g(x)) as is proposed.  It can't do any 
significant harm.


On the other hand it's not likely to be used even as often as partial, 
which I always wanted mostly to make anonymous callables for Tkinter, 
not because of any ivory-tower functional programming bias.  And the 
most common use case of compose() is covered by a one-liner that really 
doesn't need to be in the standard library.


I'll say +0, with the + because if new Python programmers run across 
compose() in the docs, and aren't familiar with the idea, they can 
follow a link from there to Wikipedia, and maybe it will give them an 
idea we haven't thought of for something cool to do with it.


Peter Harris

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