python: docs for python-error
parent
a530a10187
commit
43dc1ba259
|
@ -1,5 +1,5 @@
|
||||||
IN: python
|
IN: python
|
||||||
USING: python help.markup help.syntax ;
|
USING: python python.throwing help.markup help.syntax ;
|
||||||
|
|
||||||
HELP: py-initialize
|
HELP: py-initialize
|
||||||
{ $description "Initializes the python binding. This word must be called before any other words in the api can be used" } ;
|
{ $description "Initializes the python binding. This word must be called before any other words in the api can be used" } ;
|
||||||
|
@ -19,9 +19,16 @@ HELP: >py
|
||||||
}
|
}
|
||||||
{ $see-also py> } ;
|
{ $see-also py> } ;
|
||||||
|
|
||||||
|
HELP: python-error
|
||||||
|
{ $error-description "When Python throws an exception, it is translated to this Factor error. " { $slot "type" } " is the class name of the python exception object, " { $slot "message" } " its string and " { $slot "traceback" } " a sequence of traceback lines, if the error has one, or " { $link f } " otherwise." } ;
|
||||||
|
|
||||||
ARTICLE: "python" "Python binding"
|
ARTICLE: "python" "Python binding"
|
||||||
"The " { $vocab-link "python" } " vocab and its subvocabs implements a simple binding for libpython, allowing factor code to call native python."
|
"The " { $vocab-link "python" } " vocab and its subvocabs implements a simple binding for libpython, allowing factor code to call native python."
|
||||||
$nl
|
$nl
|
||||||
|
"Converting to and from Python:"
|
||||||
|
{ $subsections >py py> }
|
||||||
|
"Error handling:"
|
||||||
|
{ $subsections python-error }
|
||||||
"Initialization and finalization:"
|
"Initialization and finalization:"
|
||||||
{ $subsections py-initialize py-finalize }
|
{ $subsections py-initialize py-finalize }
|
||||||
"Module management:"
|
"Module management:"
|
||||||
|
|
|
@ -5,6 +5,8 @@ specialized-arrays strings vectors ;
|
||||||
IN: python
|
IN: python
|
||||||
QUALIFIED: math
|
QUALIFIED: math
|
||||||
|
|
||||||
|
ERROR: python-error type message traceback ;
|
||||||
|
|
||||||
SPECIALIZED-ARRAY: void*
|
SPECIALIZED-ARRAY: void*
|
||||||
|
|
||||||
! Borrowed from unix.utilities
|
! Borrowed from unix.utilities
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
USING: arrays kernel python python.ffi python.syntax sequences ;
|
USING: arrays kernel python python.ffi python.syntax sequences ;
|
||||||
IN: python.throwing
|
IN: python.throwing
|
||||||
|
|
||||||
ERROR: python-error type message traceback ;
|
|
||||||
|
|
||||||
PY-FROM: traceback => format_tb ( tb -- seq ) ;
|
PY-FROM: traceback => format_tb ( tb -- seq ) ;
|
||||||
|
|
||||||
PY-METHODS: obj =>
|
PY-METHODS: obj =>
|
||||||
|
|
Loading…
Reference in New Issue