Re: getting object instead of string from dir()

2008-12-17 Thread Andrew Nelis
On Dec 17, 5:16 pm, Rominsky john.romin...@gmail.com wrote: I am trying to use dir to generate a list of methods, variables, etc. I would like to be able to go through the list and seperate the objects by type using the type() command, but the dir command returns a list of strings.  When I ask

Re: getting object instead of string from dir()

2008-12-17 Thread david wright
--- On Wed, 12/17/08, Rominsky john.romin...@gmail.com wrote: From: Rominsky john.romin...@gmail.com Subject: getting object instead of string from dir() To: python-list@python.org Date: Wednesday, December 17, 2008, 12:16 PM I am trying to use dir to generate a list of methods, variables, etc

Re: getting object instead of string from dir()

2008-12-17 Thread Christian Heimes
Rominsky schrieb: I am trying to use dir to generate a list of methods, variables, etc. I would like to be able to go through the list and seperate the objects by type using the type() command, but the dir command returns a list of strings. When I ask for the type of an element, the answer

Re: getting object instead of string from dir()

2008-12-17 Thread Rominsky
On Dec 17, 10:59 am, Christian Heimes li...@cheimes.de wrote: Rominsky schrieb: I am trying to use dir to generate a list of methods, variables, etc. I would like to be able to go through the list and seperate the objects by type using the type() command, but the dir command returns a

Re: getting object instead of string from dir()

2008-12-17 Thread Jean-Paul Calderone
On Wed, 17 Dec 2008 11:52:17 -0800 (PST), Rominsky john.romin...@gmail.com wrote: On Dec 17, 10:59 am, Christian Heimes li...@cheimes.de wrote: Rominsky schrieb: I am trying to use dir to generate a list of methods, variables, etc. I would like to be able to go through the list and seperate

getting object instead of string from dir()

2008-12-17 Thread Rominsky
I am trying to use dir to generate a list of methods, variables, etc. I would like to be able to go through the list and seperate the objects by type using the type() command, but the dir command returns a list of strings. When I ask for the type of an element, the answer is always string. How

Re: getting object instead of string from dir()

2008-12-17 Thread Kurt Smith
On Wed, Dec 17, 2008 at 1:52 PM, Rominsky john.romin...@gmail.com wrote: On Dec 17, 10:59 am, Christian Heimes li...@cheimes.de wrote: Rominsky schrieb: I am trying to use dir to generate a list of methods, variables, etc. I would like to be able to go through the list and seperate the

Re: getting object instead of string from dir()

2008-12-17 Thread Rominsky
On Dec 17, 1:21 pm, Jean-Paul Calderone exar...@divmod.com wrote: On Wed, 17 Dec 2008 11:52:17 -0800 (PST), Rominsky john.romin...@gmail.com wrote: On Dec 17, 10:59 am, Christian Heimes li...@cheimes.de wrote: Rominsky schrieb: I am trying to use dir to generate a list of methods,

Re: getting object instead of string from dir()

2008-12-17 Thread Steven D'Aprano
On Wed, 17 Dec 2008 11:52:17 -0800, Rominsky wrote: I do have some understanding of the pythonic methodology of programming, though by far I still don't consider myself an expert. The problem at hand is that I am coming from a matlab world and trying to drag my coworkers with me. I have

Re: getting object instead of string from dir()

2008-12-17 Thread rdmurray
Quoth Rominsky john.romin...@gmail.com: vars seems to give an identical response as locals and globals, at least in my test name space. All three are new commands for me. I Without arguments vars() returns the same thing as locals(). like the idea of adopting either vars or locals instead

Re: getting object instead of string from dir()

2008-12-17 Thread Steve Holden
Steven D'Aprano wrote: On Wed, 17 Dec 2008 11:52:17 -0800, Rominsky wrote: I do have some understanding of the pythonic methodology of programming, though by far I still don't consider myself an expert. The problem at hand is that I am coming from a matlab world and trying to drag my

Re: getting object instead of string from dir()

2008-12-17 Thread André
On Dec 17, 3:52 pm, Rominsky john.romin...@gmail.com wrote: I do have some understanding of the pythonic methodology of programming, though by far I still don't consider myself an expert. The problem at hand is that I am coming from a matlab world and trying to drag my coworkers with me.  I