From 5f9dcff39d5e25c6bef30d569e405635633f3c69 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Mon, 1 Aug 2016 04:59:13 +0200 Subject: VPP Python language binding - plugin support - Moved Python generator tool to tools directory - Added build-vpp-api Makefile target - Generator now only creates a Python representation of the .api the rest of the framework is in the vpp_papi script - Each plugin has its own namespace. - Plugin Python files are installed in vpp_papi_plugins for easy use inside the build tree. Change-Id: I272c83bb7e5d5e416bdbd8a790a3cc35c5a04e38 Signed-off-by: Ole Troan --- vppapigen/lex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vppapigen/lex.c') diff --git a/vppapigen/lex.c b/vppapigen/lex.c index 88744ff1029..b011044dd01 100644 --- a/vppapigen/lex.c +++ b/vppapigen/lex.c @@ -331,13 +331,17 @@ int main (int argc, char **argv) if (!strncmp (argv [curarg], "--python", 8)) { curarg++; if (curarg < argc) { - pythonfp = fopen (argv[curarg], "w"); + if (!strcmp(argv[curarg], "-")) { + pythonfp = stdout; + } else { + pythonfp = fopen(argv[curarg], "w"); + pythonfile = argv[curarg]; + } if (pythonfp == NULL) { fprintf (stderr, "Couldn't open python output file %s\n", argv[curarg]); exit (1); } - pythonfile = argv[curarg]; curarg++; } else { fprintf(stderr, "Missing filename after --python\n"); -- cgit 1.2.3-korg