How can I have more than one optional argument to be passed to \lstnewenvironment?
I only need a fixed number of options and all will be present.
I want to pass the frame type and font size as arguments to my custom lstlisting.
Update
My current definition. I am currently passing the font size. I need frame type also (like single, leftline etc.)
\lstnewenvironment{pyout}[1][\tiny]{
\lstset{ %
basicstyle=\ttfamily#1\setstretch{1},
showstringspaces=false,
upquote=true,
aboveskip=0pt,
belowskip=2pt,
breaklines=true,
frame=leftline,
}
}{}

[2]or[3]or …. Keep in mind that if you specify the second optional argument (here:\tiny) the first argument of thepyoutenvironment will be optional, but only the first one. You can’t specify more than one optional argument with\lstnewenvironment. I’d advise you to use the key-value system. – Qrrbrbirlbel Mar 3 at 14:57[2],[3]. Is that the[1]in current definition? I don't know what thenumbermeans. – ATOzTOA Mar 3 at 15:08\lstnewenvironment{pyout}[1][,]{\lstset{..,#1}}{}which would allow you to use\begin{pyout}[..,frame=leftline,..]...\end{pyout}? If need be, you can define your own shorter versions of the keys. – Werner Mar 3 at 16:04