summaryrefslogtreecommitdiff
path: root/documentation/shortintro.rst
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2015-08-04 03:32:02 +0200
committerChris Liechti <cliechti@gmx.net>2015-08-04 03:32:02 +0200
commit90570b9a7d663e52bdf70b6a6b877bfd3246521e (patch)
treea8f6ff00819025b355caf9228bf34f18bb7e7139 /documentation/shortintro.rst
parent70b892395deeaf3dc4967bd808101e61e4e1a53f (diff)
downloadpyserial-git-90570b9a7d663e52bdf70b6a6b877bfd3246521e.tar.gz
doc update: links, remove pyparallel page, rename README.txt to end in .rst
Diffstat (limited to 'documentation/shortintro.rst')
-rw-r--r--documentation/shortintro.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/documentation/shortintro.rst b/documentation/shortintro.rst
index 2d9dd1b..6b0d81f 100644
--- a/documentation/shortintro.rst
+++ b/documentation/shortintro.rst
@@ -9,8 +9,8 @@ Open port 0 at "9600,8,N,1", no timeout::
>>> import serial
>>> ser = serial.Serial(0) # open first serial port
- >>> print ser.name # check which port was really used
- >>> ser.write("hello") # write a string
+ >>> print(ser.name) # check which port was really used
+ >>> ser.write(b"hello") # write a string
>>> ser.close() # close port
Open named port at "19200,8,N,1", 1s timeout::
@@ -75,7 +75,7 @@ mode, it is advised to use io.TextIOWrapper_::
sio.write(unicode("hello\n"))
sio.flush() # it is buffering. required to get the data out *now*
hello = sio.readline()
- print hello == unicode("hello\n")
+ print(hello == unicode("hello\n"))
.. _io.TextIOWrapper: http://docs.python.org/library/io.html#io.TextIOWrapper
@@ -100,5 +100,5 @@ include entries that matched.
Accessing ports
---------------
pySerial includes a small console based terminal program called
-:ref:`miniterm`. It ca be started with ``python -m serial.tools.miniterm <port name>``
+:ref:`miniterm`. It ca be started with ``python -m serial.tools.miniterm <port_name>``
(use option ``-h`` to get a listing of all options).