[issue7877] Iterators over _winreg EnumKey and EnumValue results

2019-03-15 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2015-03-07 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +Claudiu.Popa

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2014-07-10 Thread Mark Lawrence

Mark Lawrence added the comment:

@Zach any interest in this?

--
nosy: +BreamoreBoy, zach.ware
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2011-02-15 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -BreamoreBoy
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-09-01 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

As most of the code in this patch was copied from EnumValue and EnumKey, it 
includes bugs from those functions that have since been fixed.  I'm thinking of 
Issue #2810, although there might have been other changes.

Instead of duplicating code, it would be better to abstract out some of the 
common elements so that in the future changes only need to be made in one place.

While winreg isn't very Pythonic, I imagine most users write a simple wrapper 
around the functions to give it a more Pythonic feel.  I have been using a 
home-brewed class that implements the MutableMapping ABC.  I just posted it as 
a recipe on ActiveState:

http://code.activestate.com/recipes/577381-collectionsmutablemapping-wrapper-around-_winreg/

--
nosy: +stutzbach

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-08-29 Thread Brian Curtin

Changes by Brian Curtin :


--
assignee:  -> brian.curtin
components: +Extension Modules -Library (Lib)
versions:  -Python 2.7

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-07-28 Thread Mark Lawrence

Mark Lawrence  added the comment:

@Brian: @Tim: just a gentle nudge in the ribs in case this has slipped under 
the radar.

--
nosy: +BreamoreBoy

___
Python tracker 

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




[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-02-08 Thread Brian Curtin

Brian Curtin  added the comment:

Interesting, I'll take a look and see why that's happening.

Good point about the names.

--

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-02-08 Thread Tim Golden

Tim Golden  added the comment:

Sorry; the email interface messed that up. The code
which triggered the error was:

import _winreg
list (
 _winreg.IterValue (
 _winreg.OpenKey (_winreg.HKEY_CURRENT_USER, "Console")
  )
)

--

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-02-08 Thread Tim Golden

Tim Golden  added the comment:

Traceback (most recent call last):
   File "", line 1, in 
WindowsError: [Error 6] The handle is invalid

I suspect that .iterkeys / .itervalues would be more
acceptable spellings as those mirror the dict methods.
Whether the idea of extending _winreg beyond the absolute
basics will fly I'm not sure. I don't often use it, but
this would be useful if I did...

#
On 07/02/2010 21:31, Brian Curtin wrote:
>
> New submission from Brian Curtin:
>
> While EnumKey and EnumValue directly implement the underlying Windows calls 
> of the same name, they don't feel very Pythonic. The user has to create their 
> own loop and increment a counter to get all of the keys or values, stopping 
> the loop when WindowsError is raised.
>
> I created IterKey and IterValue, iterators over RegEnumKeyEx and 
> RegEnumValueEx respectively. This mainly began as playing around with writing 
> Python iterators in C, but has proven to work pretty nicely so I figured I'd 
> put it out there.
>
> Patch includes docs and tests. Comments/suggestions welcome and appreciated.
>
> --
> components: Library (Lib), Windows
> files: keyvalue_iterators.diff
> keywords: needs review, patch, patch
> messages: 99020
> nosy: brian.curtin
> priority: normal
> severity: normal
> stage: patch review
> status: open
> title: Iterators over _winreg EnumKey and EnumValue results
> type: feature request
> versions: Python 2.7, Python 3.2
> Added file: http://bugs.python.org/file16170/keyvalue_iterators.diff
>
> ___
> Python tracker
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-bugs-list/mail%40timgolden.me.uk

--
nosy: +tim.golden

___
Python tracker 

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



[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-02-07 Thread Brian Curtin

New submission from Brian Curtin :

While EnumKey and EnumValue directly implement the underlying Windows calls of 
the same name, they don't feel very Pythonic. The user has to create their own 
loop and increment a counter to get all of the keys or values, stopping the 
loop when WindowsError is raised.

I created IterKey and IterValue, iterators over RegEnumKeyEx and RegEnumValueEx 
respectively. This mainly began as playing around with writing Python iterators 
in C, but has proven to work pretty nicely so I figured I'd put it out there.

Patch includes docs and tests. Comments/suggestions welcome and appreciated.

--
components: Library (Lib), Windows
files: keyvalue_iterators.diff
keywords: needs review, patch, patch
messages: 99020
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: Iterators over _winreg EnumKey and EnumValue results
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file16170/keyvalue_iterators.diff

___
Python tracker 

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