summaryrefslogtreecommitdiff
path: root/demos/python
Commit message (Collapse)AuthorAgeFilesLines
* Fix comment typolilinjie2023-01-041-1/+1
|
* Add copyright noticeChris Liddell2023-01-041-0/+2
|
* Remove unused assignment causing an lgtm warning.Robin Watts2021-10-111-1/+0
|
* LGTM fixes: 2 more warning suppressions.Robin Watts2021-10-021-1/+1
|
* demos/python/gsapi.py: fixed lgtm bug in gsapi_set_arg_encoding()Julian Smith2021-09-211-12/+10
| | | | | | | | Need 'global _encoding' before setting global variable _encoding, otherwise has no affect. Also default to user_errors=0 in various gsapi_run*() functions, for convenience.
* demos/python/examples.py: fixes for lgtm warnings.Julian Smith2021-09-211-2/+4
|
* demos/python/gsapi.py: fixed/improved some fn comments.Julian Smith2021-08-181-16/+47
|
* demos/python/gsapi.py: Improved loading of Ghostscript shared library.Julian Smith2021-04-131-16/+57
| | | | | | | | | Now works on MacOS - need to use default leafname libgs.dylib. Allow environmental variables to specify location of ghostscript shared lib or its containing directory. Give examples of running gsapi.py in Windows Powershell or Cmd window.
* demos/python: removed old unused code.Julian Smith2020-11-202-2054/+0
|
* demos/python/gsapi.py: match new handling of bool by gsapi_set_param().Julian Smith2020-08-141-3/+16
|
* demos/python/gsapi.py: added support for gsapi_get_param() and ↵Julian Smith2020-08-111-21/+296
| | | | | | | | | gsapi_enumerate_params(). Also: Wrote some very crude tests of new fns. Extended gsapi_set_param() to take optional <type_> arg. Fixed error in handling of word size on 64-bit Windows.
* Changed gsapi.py to raise exceptions instead of returning error numberJulian Smith2020-07-302-221/+219
| | | | | | | | | | | | | | | gsapi.py: Generate exceptions instead of returning error codes. Added python versions of gs_error_* codes. examples.py: Updated to match new API. Re-raise import error if 'import gsapi' fails. Patched up calls of run_gpdl() to pass in_filename because passing None caused underlying C to return an error. Marked as executable. Look for input files relative to top of ghospdl checkout (found using __file__).
* demos/python/gsapi.py: added detection of OS to import correct ↵Julian Smith2020-07-301-5/+15
| | | | libgs.so/gpdldll*.dll.
* Fix minor items in python demoMichael Vrhel2020-07-292-19/+27
| | | | | Remove ;'s at some line endings (a hard habit to break). Add try catch around import process. Update README
* Add Python examples and READMEMichael Vrhel2020-07-283-3/+282
| | | | Also fix typos in C# README
* demos/python/gsapi.py: improved encoding/decoding of strings.Julian Smith2020-07-241-30/+117
| | | | | | | | | | | | Set global _encoding to the encoding passed to gsapi_set_arg_encoding(), and use it where expected by the underlying C code. gsapi_set_stdio(): Pass bytes object to stdout and stderr callbacks for convenience, and document what expectations are. gsapi_run_string*(): Accept str or bytes; encode the former into bytes using utf-8 encoding.
* demos/python/gsapi.py: removed requirement for python-3.7.Julian Smith2020-07-211-29/+58
| | | | | Removed use of collections module, and instead use hand-written classes, which are clearer and don't require python-3.7.
* Fix two minor issues in python API demoMichael Vrhel2020-07-202-2/+3
|
* Introduce demos folder with csharp and python API examplesMichael Vrhel2020-07-023-0/+2591
Current csharp demo shows creation of wpf viewer. Goal will be to next show a Linux viewer using mono and the same API file. Python demo/API brought over from toolbin.