str().join() isn't working

Robert Dailey rcdailey at gmail.com
Mon Aug 20 20:16:50 CEST 2007


here is a more realized example of the lists I'm trying to join:


_user_includes = [
	"../src",
	"../resource",
	"../inc",
	"../src",
	"../data",
	"../gui",
	"../script",
	"../script/actions",
	"../gui/dispatch",
	"../gui/factories",
	"../gui/frames",
	"../gui/getters",
	"../gui/localization",
	"../gui/player",
	"../gui/setters",
	"../gui/utilities",
	"../sis",
	"../player",
	"../platform/ngi",
	"../../engine",
	"../../engine/audio/NGI",
	"../../engine/io",
	"../../engine/io\NGI",
	"../../engine/math",
	"../../engine/math/fixed",
	"../../engine/path/NGI",
	"../../engine/text/NGI",
	"../../engine/mem",
	"../../engine/text",
	"../../engine/observer",
	"../../sdk/tiny_xml",
	"../../sdk/zlib",
	"../../sdk/lpng",
	"../../sdk/IFDLib/Source/Precompile",
	"../../sdk/IFDLib/Source/CoreLib",
	"../../sdk/IFDLib/inc",
	"../../sdk/IFDLib/Source/UtilLib",
	"../../sdk/IFDLib/Source/GameLib",
	"../../sdk/IFDlib/Source/OSLib/_NGI",
	"../../sdk/stl-port/NGI",
	"../../sdk/mini-boost/NGI",
	"../../sdk/mini-boost/COMMON",
	]

_system_includes = [
	"../../../../../../Symbian/9.1/NGAGE_SDK_1.1/EPOC32/include",
	"../../../../../../Symbian/9.1/NGAGE_SDK_1.1/EPOC32/include/osextensions/rga",
	"../../../../../../Symbian/9.1/NGAGE_SDK_1.1/EPOC32/include/osextensions/stdapis",
	"../../../../../../Symbian/9.1/NGAGE_SDK_1.1/EPOC32/include/osextensions/stdapis/stlport",
	"../../../../../../Symbian/9.1/NGAGE_SDK_1.1/epoc32/include/variant"
	]





On 8/20/07, Robert Dailey <rcdailey at gmail.com> wrote:
> Hi,
>
> First have a look at the following code:
>
>
> In main.py:
> -----------------------------------------------------------------------------------
>     space = " "
>
>     includes = space.join ( system._user_includes ) + " " + space.join(
> system._system_includes )
>
>
> In system.py:
> -----------------------------------------------------------------------------------
> _user_includes = [
>     ]
>
> _system_includes = [
>     ]
>
>
> The above does not work. The interpreter states: "TypeError: sequence item
> 0: expected string, list found". I'm not sure what this means. Can anyone
> help me figure out what I'm doing wrong? Thanks.
>
> PS: I've also tried putting strings in the lists above just to make sure
> that them being empty wasn't the problem. I got no different results.
>



More information about the Python-list mailing list