Jesse Aldridge wrote:
from my_paths import *
def get_selected_paths():
return [home, desktop, project1, project2]
---
So I have a function like this which returns a list containing a bunch
of variables. The real list has around 50 entries. Occasionally I'll
remove a variable from my_
On Apr 20, 3:46 pm, Chris Rebert wrote:
> On Mon, Apr 20, 2009 at 1:36 PM, Jesse Aldridge
> wrote:
> > from my_paths import *
>
> > def get_selected_paths():
> > return [home, desktop, project1, project2]
>
> > ---
>
> > So I have a function like this which returns a list containing a bun
Nevermind, I figured it out right after I clicked the send button :\
from my_paths import *
def get_selected_paths():
return [globals()[s] for s in
["home", "desktop", "project1", "project2"]
if s in globals()]
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 20, 2009 at 1:36 PM, Jesse Aldridge wrote:
> from my_paths import *
>
> def get_selected_paths():
> return [home, desktop, project1, project2]
>
> ---
>
> So I have a function like this which returns a list containing a bunch
> of variables. The real list has around 50 entries.
from my_paths import *
def get_selected_paths():
return [home, desktop, project1, project2]
---
So I have a function like this which returns a list containing a bunch
of variables. The real list has around 50 entries. Occasionally I'll
remove a variable from my_paths and cause get_sele