Wolfram Computation Meets Knowledge

The Wolfram Language:
Fast Introduction for Programmers

Show additional notes for:
All sections 
Get Started

External Connections View as Video

Import and Export automatically handle hundreds of formats from files, programs, the web, etc.:

In[1]:=1
Import["https://www.nps.gov", "Images"]
Out[1]=1

Notes for Java programmers:

The Wolfram Language unifies importing and exporting different file types with Import and Export. Java's file format support is spread across different packages and libraries, often with different semantics for how the data is represented.

Notes for Python programmers:

The Wolfram Language unifies importing and exporting hundreds of different file types with the Import and Export functions. Python's file format support is spread across different packages and libraries, often with different semantics for how the data is represented.


The Wolfram Language curates connections to many external APIs:

In[1]:=1
SocialMediaData["Facebook", "FriendNetwork"]
Out[1]=1

The Device Framework allows direct input from connected devices:

In[1]:=1
DeviceReadTimeSeries["GPIO",{10,1},4]
Out[1]=1

Notes for Java programmers:

The built-in connections and configurations of the Wolfram Language allow seamless access to devices and APIs that would require custom code or third-party libraries in Java.

Notes for Python programmers:

The Wolfram Language's built-in curated connections and configurations allow seamless access to thousands of devices and external APIs that would require extra tools and libraries to achieve in Python.


Use EmbedCode to create code to call an instant API from another language:

In[1]:=1
EmbedCode[APIFunction[{"x"->"Number"}, #x! &, "PNG"], "Java"]
Out[1]=1

Use WSTP for two-way communication between the Wolfram Engine and other programs.
Use C/Link, J/Link, etc. to create external code to interact with WSTP.

Notes for Java programmers:

J/Link provides a comprehensive seamless interface between Java and the Wolfram Language, allowing any Java classes and methods to be called from the Wolfram Language, and to call the Wolfram Language. Many Java developers find the Wolfram notebook environment and J/Link to be an ideal environment for exploring Java classes and libraries.

Notes for Python programmers:

In addition to using WSTP and calling instant APIs, the Wolfram Language can be called from Python code by using WolframScript to evaluate commands on local or cloud-based Wolfram Engines.


Type > at the beginning of a line to specify a system for external evaluation (Python, NodeJS, etc.):

The evaluator interprets input and returns a Wolfram Language expression:

In[1]:=1
[i/2 for i in range(10)]
Out[1]=1

Use ExternalEvaluate to specify options for the evaluator:

In[2]:=2
ExternalEvaluate[{"Python", "Version" -> "3.6"}, "[i/2 for i in range(10)]"]
Out[2]=2

Notes for Python programmers:

ExternalEvaluate supports Python 2.4+ and 3.6+, as well as direct integration of the NumPy and PIL packages.

QUICK REFERENCE: Calling External Programs


© 2019 Wolfram. All rights reserved.