PacletSymbol

PacletSymbol[paclet,"sym"]

gives the symbol named "sym" in the primary context of paclet.

PacletSymbol[paclet,"sym",h]

wraps the head h around the symbol before returning it.

Details

  • PacletSymbol is a convenient shorthand that installs the paclet if necessary, calls Needs on its primary context and evaluates to the named symbol.
  • PacletSymbol loads the primary context of the paclet in a way that does not modify $ContextPath.
  • For paclets that are not already installed, the paclet is downloaded and loaded in the current session but not installed for future sessions.
  • PacletSymbol is a way to sample a paclet's functionality without permanently installing it or adding its context to the context path.
  • The paclet argument can have any of the following forms:
  • "name"name of the paclet or ResourceObject
    PacletObject[]a paclet object
    ResourceObject[]a resource object of type "Paclet"
    File[]a paclet in a given directory
  • PacletSymbol accepts the same options as ResourceObject.

Examples

open allclose all

Basic Examples  (2)

Retrieve a symbol from a paclet:

Use a function from a paclet:

Scope  (2)

Use a function from a PacletObject:

Hold the returned symbol:

Releasing the hold returns the value:

Properties & Relations  (1)

Using a symbol from a paclet typically requires calling Needs:

The Needs call modified $ContextPath:

Using PacletSymbol allows the symbol to work without modifying $ContextPath:

Wolfram Research (2021), PacletSymbol, Wolfram Language function, https://reference.wolfram.com/language/ref/PacletSymbol.html.

Text

Wolfram Research (2021), PacletSymbol, Wolfram Language function, https://reference.wolfram.com/language/ref/PacletSymbol.html.

CMS

Wolfram Language. 2021. "PacletSymbol." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PacletSymbol.html.

APA

Wolfram Language. (2021). PacletSymbol. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PacletSymbol.html

BibTeX

@misc{reference.wolfram_2024_pacletsymbol, author="Wolfram Research", title="{PacletSymbol}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/PacletSymbol.html}", note=[Accessed: 15-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_pacletsymbol, organization={Wolfram Research}, title={PacletSymbol}, year={2021}, url={https://reference.wolfram.com/language/ref/PacletSymbol.html}, note=[Accessed: 15-October-2024 ]}