diff --git a/ctypesgen/printer_python/printer.py b/ctypesgen/printer_python/printer.py index 374bc880..eb96cd7a 100755 --- a/ctypesgen/printer_python/printer.py +++ b/ctypesgen/printer_python/printer.py @@ -123,7 +123,7 @@ def print_info(self, argv): # TODO(py38) consider shlex.join() argv = [self._strip_private_path(a) for a in argv] argv_str = ' '.join([f'"{a}"' if ' ' in a else a for a in argv]) - self.file.write(f"# Auto-generated by: ctypesgen {argv_str}") + self.file.write(f'r"""\nAuto-generated by:\nctypesgen {argv_str}\n"""') def print_templates(self, opts, outpath):