30 Jun
2011
30 Jun
'11
11:38 a.m.
Often when exploring an object with the 'dir' function, particularly in large packages like SciPy, I find that I need to filter the outout. Since a dir reminds me of a dos 'dir' or linux 'ls', a glob feels like the most natural to use. For example, none of these would work:
dir(sp.fft.i*) # syntax error dir('sp.fft.i*') # returns the attributes a string
I believe a new dir functions is needed, or a change in the behviour of the current version. Of course a 'glob aware dir function' can be implemented by monitoring the call stack (cf. sys._getframe().f_back), but I think the problem is general enough to warrant an official sultion. Sturla
4645
Age (days ago)
4646
Last active (days ago)
26 comments
13 participants
participants (13)
-
Ben Finney
-
Georg Brandl
-
Joao S. O. Bueno
-
Masklinn
-
Mathias Panzenböck
-
Mike Graham
-
Nick Coghlan
-
Paul Moore
-
Peter Otten
-
Stefan Behnel
-
Steven D'Aprano
-
Sturla Molden
-
Terry Reedy