SIGLENT
148 SSG5000X Programming Guide
4.2
Socket Examples
4.2.1
Python Example
Python is an interpreted programming language that lets you work quickly and is very
portable. Python has a low-level networking module that provides access to the socket
interface. Python scripts can be written for sockets to do a variety of test and
measurements tasks.
Environment: Win7 32bit system, Python v2.7.5
The functions of this example: Opens a socket, sends a query, and closes the socket. It
does this loop 10 times.
Below is
the
code of the script:
#!/usr/bin/env python
#-*- coding:utf-8 –*-
#-----------------------------------------------------------------------------
# The short script is an example that open a socket, sends a query,
# print the return message and closes the socket.
#-----------------------------------------------------------------------------
import socket # for sockets
Содержание SSG5000X Series
Страница 1: ...SSG5000X Series Signal Generator Programming Guide PG0805X E01A...
Страница 14: ...SIGLENT 14 SSG5000X Programming Guide...
Страница 131: ...SIGLENT SSG5000X Programming Guide 131...
Страница 152: ...SIGLENT 152 SSG5000X Programming Guide To close the normal telnet window type Quit and press Enter...