File: GUID.txt

package info (click to toggle)
liblas 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,888 kB
  • ctags: 4,614
  • sloc: cpp: 31,630; xml: 4,195; python: 2,928; ansic: 2,439; cs: 2,411; sh: 143; makefile: 37
file content (23 lines) | stat: -rwxr-xr-x 588 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  >>> from liblas import guid
  >>> from liblas import header

  >>> g2 = guid.GUID(key=b'8388f1b8-aa1b-4108-bca3-6bc68e7b062e')
  >>> g2
  8388f1b8-aa1b-4108-bca3-6bc68e7b062e

  >>> header = header.Header()
  >>> header.guid = g2
  >>> header.guid
  8388f1b8-aa1b-4108-bca3-6bc68e7b062e
  >>> str(header.project_id.decode())
  '8388f1b8-aa1b-4108-bca3-6bc68e7b062e'

  >>> g3 = guid.GUID(key=b'8388f1b8-aa1b-4108-bca3-6bc68e7b062e')
  >>> g2 == g3
  True

  >>> try:
  ...     import uuid
  ...     g4 = guid.GUID(key=str(uuid.uuid1()).encode())
  ... except ImportError:
  ...    pass