From 5ac42e42c171a83cd8c9259b6d5dcb7e7c04c292 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 30 Sep 2014 17:38:02 +0800 Subject: [PATCH] rename artiq.language.std -> artiq --- artiq/__init__.py | 3 +++ artiq/language/std.py | 3 --- doc/manual/tutorial.rst | 4 ++-- examples/al_spectroscopy.py | 2 +- examples/compiler_test.py | 2 +- examples/dds_test.py | 2 +- examples/mandelbrot.py | 4 +++- examples/photon_histogram.py | 2 +- examples/simple_simulation.py | 2 +- test/full_stack.py | 3 +-- 10 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 artiq/language/std.py diff --git a/artiq/__init__.py b/artiq/__init__.py index e69de29bb..866e20e2c 100644 --- a/artiq/__init__.py +++ b/artiq/__init__.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/artiq/language/std.py b/artiq/language/std.py deleted file mode 100644 index 866e20e2c..000000000 --- a/artiq/language/std.py +++ /dev/null @@ -1,3 +0,0 @@ -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/doc/manual/tutorial.rst b/doc/manual/tutorial.rst index acc221910..a6e9fd2fd 100644 --- a/doc/manual/tutorial.rst +++ b/doc/manual/tutorial.rst @@ -6,7 +6,7 @@ Connecting to the core device As a very first step, we will turn on a LED on the core device. Create a file ``led.py`` containing the following: :: - from artiq.language.std import * + from artiq import * from artiq.devices import corecom_serial, core, gpio_core class LED(AutoContext): @@ -81,7 +81,7 @@ The point of running code on the core device is the ability to meet demanding re Create a new file ``rtio.py`` containing the following: :: - from artiq.language.std import * + from artiq import * from artiq.devices import corecom_serial, core, rtio_core class Tutorial(AutoContext): diff --git a/examples/al_spectroscopy.py b/examples/al_spectroscopy.py index 6b23c1f69..e0ed120b7 100644 --- a/examples/al_spectroscopy.py +++ b/examples/al_spectroscopy.py @@ -1,4 +1,4 @@ -from artiq.language.std import * +from artiq import * class AluminumSpectroscopy(AutoContext): diff --git a/examples/compiler_test.py b/examples/compiler_test.py index 0d7d9e513..c9258fa63 100644 --- a/examples/compiler_test.py +++ b/examples/compiler_test.py @@ -1,4 +1,4 @@ -from artiq.language.std import * +from artiq import * my_range = range diff --git a/examples/dds_test.py b/examples/dds_test.py index 225b86f6a..fd9427480 100644 --- a/examples/dds_test.py +++ b/examples/dds_test.py @@ -1,4 +1,4 @@ -from artiq.language.std import * +from artiq import * from artiq.devices import corecom_serial, core, dds_core, gpio_core diff --git a/examples/mandelbrot.py b/examples/mandelbrot.py index a1bc2bc44..be2e2b0bb 100644 --- a/examples/mandelbrot.py +++ b/examples/mandelbrot.py @@ -1,8 +1,9 @@ import sys -from artiq.language.std import * +from artiq import * from artiq.devices import corecom_serial, core + class Mandelbrot(AutoContext): def col(self, i): sys.stdout.write(" .,-:;i+hHM$*#@ "[i]) @@ -36,6 +37,7 @@ class Mandelbrot(AutoContext): self.col(i) self.row() + if __name__ == "__main__": with corecom_serial.CoreCom() as com: exp = Mandelbrot(core=core.Core(com)) diff --git a/examples/photon_histogram.py b/examples/photon_histogram.py index ace0b03fa..cb81841b1 100644 --- a/examples/photon_histogram.py +++ b/examples/photon_histogram.py @@ -1,4 +1,4 @@ -from artiq.language.std import * +from artiq 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 ec4534f04..1992b7459 100644 --- a/examples/simple_simulation.py +++ b/examples/simple_simulation.py @@ -1,4 +1,4 @@ -from artiq.language.std import * +from artiq import * class SimpleSimulation(AutoContext): diff --git a/test/full_stack.py b/test/full_stack.py index 88c029c5c..58c8cf40f 100644 --- a/test/full_stack.py +++ b/test/full_stack.py @@ -1,7 +1,6 @@ import unittest -from artiq.language.core import * -from artiq.language.units import * +from artiq import * from artiq.devices import corecom_serial, core, runtime_exceptions, rtio_core from artiq.sim import devices as sim_devices