John wrote: > How could I simplify the code to get libs out of LDFLAGS > or vice versa automatically in the following python/scons code? > > if sys.platform[:5] == 'linux': > env.Append (CPPFLAGS = '-D__LINUX') > env.Append (LDFLAGS = '-lglut -lGLU -lGL -lm') > env.Append(CPPPATH=['include', 'include/trackball']) > libs = ['glut', > 'GLU', > 'GL', > 'm',]
>>> LDFLAGS = '-lglut -lGLU -lGL -lm' >>> libs = [flag[2:] for flag in LDFLAGS.split()] >>> libs ['glut', 'GLU', 'GL', 'm'] Kent -- http://mail.python.org/mailman/listinfo/python-list