wolframclient.language package¶
Submodules¶
wolframclient.language.decorators module¶
wolframclient.language.exceptions module¶
-
exception
wolframclient.language.exceptions.
WolframLanguageException
(payload, exec_info=None)[source]¶ Bases:
wolframclient.serializers.serializable.WLSerializable
,Exception
The most generic exception raised by the Wolfram Client Library.
This class is
WLSerializable
and will automatically serialize to a failure box when evaluated in Wolfram Desktop.
wolframclient.language.expression module¶
-
class
wolframclient.language.expression.
WLSymbol
(name)[source]¶ Bases:
wolframclient.language.expression.WLExpressionMeta
Represent a Wolfram Language symbol in Python.
-
name
¶
-
-
class
wolframclient.language.expression.
WLFunction
(head, *args, **opts)[source]¶ Bases:
wolframclient.language.expression.WLExpressionMeta
Represent a Wolfram Language function with its head and arguments.
-
args
¶
-
head
¶
-
-
class
wolframclient.language.expression.
WLSymbolFactory
(name=None)[source]¶ Bases:
wolframclient.language.expression.WLSymbol
Provide a convenient way to build objects representing arbitrary Wolfram Language expressions through the use of attributes.
This class is conveniently instantiated at startup as
wl
,Global
andSystem
. It should be instantiated only to represent many symbols belonging to the same specific context.Example:
>>> dev = WLSymbolFactory('Developer') >>> dev.PackedArrayQ Developer`PackedArrayQ
Alternative:
>>> wl.Developer.PackedArrayQ Developer`PackedArrayQ
wolframclient.language.side_effects module¶
wolframclient.language.traceback module¶
Module contents¶
-
wolframclient.language.
wl
¶ A factory of
WLSymbol
instances without any particular context.This instance of
WLSymbolFactory
is conveniently used by calling its attributes. The following code represents various Wolfram Language expressions:# Now wl.Now # Quantity[3, "Hours"] wl.Quantity(3, "Hours") # Select[PrimeQ, {1,2,3,4}] wl.Select(wl.PrimeQ, [1, 2, 3, 4])
Represent symbols in various contexts:
>>> wl.Developer.PackedArrayQ Developer`PackedArrayQ >>> wl.Global.f Global`f
Specify a context and a subcontext:
>>> wl.MyContext.MySubContext.SymbolName MyContext`MySubContext`SymbolName
-
wolframclient.language.
System
¶ A factory of
WLSymbol
instances havingSystem`
context.See
WLSymbolFactory
for more details.Represent a symbol in the System context:
>>> System.ImageIdentify System`ImageIdentify
-
wolframclient.language.
Global
¶ A factory of
WLSymbol
instances havingGlobal`
context.See
WLSymbolFactory
andWLSymbolFactory
for more details.Represent a symbol in the Global context:
>>> Global.mySymbol Global`mySymbol
Represent a function call to a function:
>>> Global.myFunction('foo') Global`myFunction['foo']
-
wolframclient.language.
wlexpr
¶ alias of
wolframclient.language.expression.WLInputExpression