From f105e5e2148095792f211b1402598a7222d96caf Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 29 Sep 2014 23:14:10 +0800 Subject: [PATCH] language: add std module with common user features --- artiq/language/std.py | 3 +++ examples/al_spectroscopy.py | 3 +-- examples/compiler_test.py | 3 +-- examples/dds_test.py | 3 +-- examples/mandelbrot.py | 2 +- examples/photon_histogram.py | 3 +-- examples/simple_simulation.py | 3 +-- 7 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 artiq/language/std.py diff --git a/artiq/language/std.py b/artiq/language/std.py new file mode 100644 index 000000000..866e20e2c --- /dev/null +++ b/artiq/language/std.py @@ -0,0 +1,3 @@ +from artiq.language.core import * +from artiq.language.units import microcycle, ps, ns, us, ms, s +from artiq.language.units import Hz, kHz, MHz, GHz diff --git a/examples/al_spectroscopy.py b/examples/al_spectroscopy.py index 73b95b12d..6b23c1f69 100644 --- a/examples/al_spectroscopy.py +++ b/examples/al_spectroscopy.py @@ -1,5 +1,4 @@ -from artiq.language.units import * -from artiq.language.core import * +from artiq.language.std import * class AluminumSpectroscopy(AutoContext): diff --git a/examples/compiler_test.py b/examples/compiler_test.py index f7856fa0c..0d7d9e513 100644 --- a/examples/compiler_test.py +++ b/examples/compiler_test.py @@ -1,5 +1,4 @@ -from artiq.language.units import * -from artiq.language.core import * +from artiq.language.std import * my_range = range diff --git a/examples/dds_test.py b/examples/dds_test.py index 8b1869eb4..225b86f6a 100644 --- a/examples/dds_test.py +++ b/examples/dds_test.py @@ -1,5 +1,4 @@ -from artiq.language.units import * -from artiq.language.core import * +from artiq.language.std import * from artiq.devices import corecom_serial, core, dds_core, gpio_core diff --git a/examples/mandelbrot.py b/examples/mandelbrot.py index 9a50cc7e5..a1bc2bc44 100644 --- a/examples/mandelbrot.py +++ b/examples/mandelbrot.py @@ -1,6 +1,6 @@ import sys -from artiq.language.core import * +from artiq.language.std import * from artiq.devices import corecom_serial, core class Mandelbrot(AutoContext): diff --git a/examples/photon_histogram.py b/examples/photon_histogram.py index 336160f80..54a61c2c4 100644 --- a/examples/photon_histogram.py +++ b/examples/photon_histogram.py @@ -1,5 +1,4 @@ -from artiq.language.core import * -from artiq.language.units import * +from artiq.language.std import * from artiq.devices import corecom_serial, core, dds_core, rtio_core diff --git a/examples/simple_simulation.py b/examples/simple_simulation.py index 5d1142233..ec4534f04 100644 --- a/examples/simple_simulation.py +++ b/examples/simple_simulation.py @@ -1,5 +1,4 @@ -from artiq.language.units import * -from artiq.language.core import * +from artiq.language.std import * class SimpleSimulation(AutoContext):