3 | ЕГАИС - это Единая государственная автоматизированная информационная система учета оборота алкогольной продукции. Торговля крепким алкоголем возможна только при наличии ключа ЭЦП JaCarta, который привязан к конкретному магазину.
4 | Внешне JaCarta выглядит как обычная флешка. Обратите внимание - в рабочем состоянии на JaCarta должна гореть лампочка. Если лампочка не горит - перезагрузите компьютер или вставьте ее в другое гнездо USB.
5 | Также необходимым требованием для продажи крепкого алкоголя является наличие сканера двухмерных штрихкодов. Кроме этого, на компьютере должен быть запущен сервис (программа) для обмена данными с сервером ЕГАИС.
6 | Программа эта называется "Универсальный транспортный модуль", сокращенно УТМ. Работоспособность УТМ можно проверить, если зайти в пункт меню ЕГАИС. Если УТМ не работает, вы увидите соответствующую надпись.
7 | Можно попробовать перезапустить сервис. Для этого в меню "Сервис" нужно выбрать пункт "Перезапуск ЕГАИС".
8 |
9 |
Продажа крепкого алкоголя
10 |
11 | Продажа крепкого алкоголя происходит следующим образом. Сначала вы считываете сканером обычный штрихкод на бутылке. Если в прайсе этот товар внесен как "АЛКОГОЛЬ", то программа запросит дополнительный код, который нужно считать
12 | 2D сканером с бутылки. Если код считан верно, то позиция появится в чеке. Повторно отбитую бутылку в чек добавлять нельзя, так как каждая бутылка содержит свою уникальную марку. После оплаты и распечатки основного чека, принтер
13 | чеков выдаст ЕГАИС чек, на котором будет распечатан QR-код со ссылкой на чек в интернете.
14 |
15 |
Подтверждение приходов
16 |
17 | Приходы на кассе прогружаются автоматически. Если у вас есть не подтвержденные документы, соответсвующее сообщение появится на экране. Для подтверждения нужно выбрать пункт меню "ЕГАИС" и нажать "Просмотр".
18 | В диалоговом окне выберите статус "Новые" и нажмите кнопку просмотр. На экране появится список не подтвержденных документов. Раскройте докумет, ознакомьтесь с его содержимым, сверьте с реальным документом.
19 | Если документа нет у вас на руках, созвонитесь с офисом и уточните объемы прихода. Если приход указан верно, выставьте статус "Закрыто", опрерацию "Подтвердить"
20 | и нажмите кнопку "Сохранить". В случае отказа от поставки, в статусе выставляйте "Отвергнуть". Документы автоматически уйдут поставщику.
21 |
3 | ЕГАИС - это Единая государственная автоматизированная информационная система учета оборота алкогольной продукции. Торговля крепким алкоголем возможна только при наличии ключа ЭЦП JaCarta, который привязан к конкретному магазину.
4 | Внешне JaCarta выглядит как обычная флешка. Обратите внимание - в рабочем состоянии на JaCarta должна гореть лампочка. Если лампочка не горит - перезагрузите компьютер или вставьте ее в другое гнездо USB.
5 | Также необходимым требованием для продажи крепкого алкоголя является наличие сканера двухмерных штрихкодов. Кроме этого, на компьютере должен быть запущен сервис (программа) для обмена данными с сервером ЕГАИС.
6 | Программа эта называется "Универсальный транспортный модуль", сокращенно УТМ. Работоспособность УТМ можно проверить, если зайти в пункт меню ЕГАИС. Если УТМ не работает, вы увидите соответствующую надпись.
7 | Можно попробовать перезапустить сервис. Для этого в меню "Сервис" нужно выбрать пункт "Перезапуск ЕГАИС".
8 |
9 |
Продажа крепкого алкоголя
10 |
11 | Продажа крепкого алкоголя происходит следующим образом. Сначала вы считываете сканером обычный штрихкод на бутылке. Если в прайсе этот товар внесен как "АЛКОГОЛЬ", то программа запросит дополнительный код, который нужно считать
12 | 2D сканером с бутылки. Если код считан верно, то позиция появится в чеке. Повторно отбитую бутылку в чек добавлять нельзя, так как каждая бутылка содержит свою уникальную марку. После оплаты и распечатки основного чека, принтер
13 | чеков выдаст ЕГАИС чек, на котором будет распечатан QR-код со ссылкой на чек в интернете.
14 |
15 |
Подтверждение приходов
16 |
17 | Приходы на кассе прогружаются автоматически. Если у вас есть не подтвержденные документы, соответсвующее сообщение появится на экране. Для подтверждения нужно выбрать пункт меню "ЕГАИС" и нажать "Просмотр".
18 | В диалоговом окне выберите статус "Новые" и нажмите кнопку просмотр. На экране появится список не подтвержденных документов. Раскройте докумет, ознакомьтесь с его содержимым, сверьте с реальным документом.
19 | Если документа нет у вас на руках, созвонитесь с офисом и уточните объемы прихода. Если приход указан верно, выставьте статус "Закрыто", опрерацию "Подтвердить"
20 | и нажмите кнопку "Сохранить". В случае отказа от поставки, в статусе выставляйте "Отвергнуть". Документы автоматически уйдут поставщику.
21 |
92 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-i686-2.7/usb/_debug.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | __author__ = 'Wander Lairson Costa'
30 |
31 | __all__ = ['methodtrace', 'functiontrace']
32 |
33 | import logging
34 | import usb._interop as _interop
35 |
36 | _enable_tracing = False
37 |
38 | def enable_tracing(enable):
39 | global _enable_tracing
40 | _enable_tracing = enable
41 |
42 | def _trace_function_call(logger, fname, *args, **named_args):
43 | logger.debug(
44 | # TODO: check if 'f' is a method or a free function
45 | fname + '(' + \
46 | ', '.join((str(val) for val in args)) + \
47 | ', '.join((name + '=' + str(val) for name, val in named_args.items())) + ')'
48 | )
49 |
50 | # decorator for methods calls tracing
51 | def methodtrace(logger):
52 | def decorator_logging(f):
53 | if not _enable_tracing:
54 | return f
55 | def do_trace(*args, **named_args):
56 | # this if is just a optimization to avoid unecessary string formatting
57 | if logging.DEBUG >= logger.getEffectiveLevel():
58 | fn = type(args[0]).__name__ + '.' + f.__name__
59 | _trace_function_call(logger, fn, *args[1:], **named_args)
60 | return f(*args, **named_args)
61 | _interop._update_wrapper(do_trace, f)
62 | return do_trace
63 | return decorator_logging
64 |
65 | # decorator for methods calls tracing
66 | def functiontrace(logger):
67 | def decorator_logging(f):
68 | if not _enable_tracing:
69 | return f
70 | def do_trace(*args, **named_args):
71 | # this if is just a optimization to avoid unecessary string formatting
72 | if logging.DEBUG >= logger.getEffectiveLevel():
73 | _trace_function_call(logger, f.__name__, *args, **named_args)
74 | return f(*args, **named_args)
75 | _interop._update_wrapper(do_trace, f)
76 | return do_trace
77 | return decorator_logging
78 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-armv7l-2.7/usb/_debug.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | __author__ = 'Wander Lairson Costa'
30 |
31 | __all__ = ['methodtrace', 'functiontrace']
32 |
33 | import logging
34 | import usb._interop as _interop
35 |
36 | _enable_tracing = False
37 |
38 | def enable_tracing(enable):
39 | global _enable_tracing
40 | _enable_tracing = enable
41 |
42 | def _trace_function_call(logger, fname, *args, **named_args):
43 | logger.debug(
44 | # TODO: check if 'f' is a method or a free function
45 | fname + '(' + \
46 | ', '.join((str(val) for val in args)) + \
47 | ', '.join((name + '=' + str(val) for name, val in named_args.items())) + ')'
48 | )
49 |
50 | # decorator for methods calls tracing
51 | def methodtrace(logger):
52 | def decorator_logging(f):
53 | if not _enable_tracing:
54 | return f
55 | def do_trace(*args, **named_args):
56 | # this if is just a optimization to avoid unecessary string formatting
57 | if logging.DEBUG >= logger.getEffectiveLevel():
58 | fn = type(args[0]).__name__ + '.' + f.__name__
59 | _trace_function_call(logger, fn, *args[1:], **named_args)
60 | return f(*args, **named_args)
61 | _interop._update_wrapper(do_trace, f)
62 | return do_trace
63 | return decorator_logging
64 |
65 | # decorator for methods calls tracing
66 | def functiontrace(logger):
67 | def decorator_logging(f):
68 | if not _enable_tracing:
69 | return f
70 | def do_trace(*args, **named_args):
71 | # this if is just a optimization to avoid unecessary string formatting
72 | if logging.DEBUG >= logger.getEffectiveLevel():
73 | _trace_function_call(logger, f.__name__, *args, **named_args)
74 | return f(*args, **named_args)
75 | _interop._update_wrapper(do_trace, f)
76 | return do_trace
77 | return decorator_logging
78 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-x86_64-2.7/usb/_debug.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | __author__ = 'Wander Lairson Costa'
30 |
31 | __all__ = ['methodtrace', 'functiontrace']
32 |
33 | import logging
34 | import usb._interop as _interop
35 |
36 | _enable_tracing = False
37 |
38 | def enable_tracing(enable):
39 | global _enable_tracing
40 | _enable_tracing = enable
41 |
42 | def _trace_function_call(logger, fname, *args, **named_args):
43 | logger.debug(
44 | # TODO: check if 'f' is a method or a free function
45 | fname + '(' + \
46 | ', '.join((str(val) for val in args)) + \
47 | ', '.join((name + '=' + str(val) for name, val in named_args.items())) + ')'
48 | )
49 |
50 | # decorator for methods calls tracing
51 | def methodtrace(logger):
52 | def decorator_logging(f):
53 | if not _enable_tracing:
54 | return f
55 | def do_trace(*args, **named_args):
56 | # this if is just a optimization to avoid unecessary string formatting
57 | if logging.DEBUG >= logger.getEffectiveLevel():
58 | fn = type(args[0]).__name__ + '.' + f.__name__
59 | _trace_function_call(logger, fn, *args[1:], **named_args)
60 | return f(*args, **named_args)
61 | _interop._update_wrapper(do_trace, f)
62 | return do_trace
63 | return decorator_logging
64 |
65 | # decorator for methods calls tracing
66 | def functiontrace(logger):
67 | def decorator_logging(f):
68 | if not _enable_tracing:
69 | return f
70 | def do_trace(*args, **named_args):
71 | # this if is just a optimization to avoid unecessary string formatting
72 | if logging.DEBUG >= logger.getEffectiveLevel():
73 | _trace_function_call(logger, f.__name__, *args, **named_args)
74 | return f(*args, **named_args)
75 | _interop._update_wrapper(do_trace, f)
76 | return do_trace
77 | return decorator_logging
78 |
--------------------------------------------------------------------------------
/site_icerest/autosets.html:
--------------------------------------------------------------------------------
1 |
77 |
78 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/usb/_lookup.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Walker Inman
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""usb._lookups - Lookup tables for USB
30 | """
31 |
32 | descriptors = {
33 | 0x1 : "Device",
34 | 0x2 : "Configuration",
35 | 0x3 : "String",
36 | 0x4 : "Interface",
37 | 0x5 : "Endpoint",
38 | 0x6 : "Device qualifier",
39 | 0x7 : "Other speed configuration",
40 | 0x8 : "Interface power",
41 | 0x9 : "OTG",
42 | 0xA : "Debug",
43 | 0xB : "Interface association",
44 | 0xC : "Security",
45 | 0xD : "Key",
46 | 0xE : "Encryption type",
47 | 0xF : "Binary device object store (BOS)",
48 | 0x10 : "Device capability",
49 | 0x11 : "Wireless endpoint companion",
50 | 0x30 : "SuperSpeed endpoint companion",
51 | }
52 |
53 | device_classes = {
54 | 0x0 : "Specified at interface",
55 | 0x2 : "Communications Device",
56 | 0x9 : "Hub",
57 | 0xF : "Personal Healthcare Device",
58 | 0xDC : "Diagnostic Device",
59 | 0xE0 : "Wireless Controller",
60 | 0xEF : "Miscellaneous",
61 | 0xFF : "Vendor-specific",
62 | }
63 |
64 | interface_classes = {
65 | 0x0 : "Reserved",
66 | 0x1 : "Audio",
67 | 0x2 : "CDC Communication",
68 | 0x3 : "Human Interface Device",
69 | 0x5 : "Physical",
70 | 0x6 : "Image",
71 | 0x7 : "Printer",
72 | 0x8 : "Mass Storage",
73 | 0x9 : "Hub",
74 | 0xA : "CDC Data",
75 | 0xB : "Smart Card",
76 | 0xD : "Content Security",
77 | 0xE : "Video",
78 | 0xF : "Personal Healthcare",
79 | 0xDC : "Diagnostic Device",
80 | 0xE0 : "Wireless Controller",
81 | 0xEF : "Miscellaneous",
82 | 0xFE : "Application Specific",
83 | 0xFF : "Vendor Specific",
84 | }
85 |
86 | ep_attributes = {
87 | 0x0 : "Control",
88 | 0x1 : "Isochronous",
89 | 0x2 : "Bulk",
90 | 0x3 : "Interrupt",
91 | }
92 |
93 | MAX_POWER_UNITS_USB2p0 = 2 # mA
94 | MAX_POWER_UNITS_USB_SUPERSPEED = 8 # mA
95 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/README.rst:
--------------------------------------------------------------------------------
1 | =======================================
2 | PyUSB 1.0 - Easy USB access from Python
3 | =======================================
4 |
5 | Introduction
6 | ============
7 |
8 | The PyUSB module provides for Python easy access to the host
9 | machine's Universal Serial Bus (USB) system.
10 |
11 | Until 0.4 version, PyUSB used to be a thin wrapper over libusb.
12 | With 1.0 version, things changed considerably. Now PyUSB is an
13 | API rich, backend neutral Python USB module easy to use.
14 |
15 | As with most Python modules, PyUSB's documentation is based on Python
16 | doc strings and can therefore be manipulated by tools such as pydoc.
17 |
18 | You can also find a tutorial at:
19 | https://github.com/walac/pyusb/blob/master/docs/tutorial.rst.
20 |
21 | PyUSB is being developed and tested on Linux and Windows, but it should work
22 | fine on any platform running Python >= 2.4, ctypes and at least one of the
23 | builtin backends.
24 |
25 | PyUSB supports libusb 0.1, libusb 1.0 and OpenUSB, but the user does not need
26 | to worry about that, unless in some corner cases.
27 |
28 | If you have any question about PyUSB, you can use the PyUSB mailing list
29 | hosted in the SourceForge. In the PyUSB website (http://walac.github.io/pyusb)
30 | you can find instructions on how to subscribe to the mailing list.
31 |
32 | Installing PyUSB on GNU/Linux Systems
33 | =====================================
34 |
35 | These instructions are for Debian-based systems. Instructions for
36 | other flavors of GNU/Linux should be similar.
37 |
38 | You will first need to install the following packages:
39 |
40 | 1) python (PyUSB is useless without it), version >= 2.4
41 | 2) At least one of the supported libraries (libusb 1.0, libusb 0.1 or OpenUSB)
42 | 3) If your Python version is < 2.5, you have to install ctypes as a separate
43 | package, because these versions of Python does not ship it.
44 |
45 | For example, the command::
46 |
47 | $ sudo apt-get install python libusb-1.0-0
48 |
49 | should install all these packages on most Debian-based systems with
50 | access to the proper package repositories.
51 |
52 | Once the above packages are installed, you can install PyUSB
53 | with the command::
54 |
55 | $ sudo python setup.py install
56 |
57 | Run it as root from within the same directory as this README file.
58 |
59 | You can also use `pip `_ to
60 | install PyUSB::
61 |
62 | $ sudo pip install pyusb --pre
63 |
64 | Just bear in mind that you still follow to procedure to install the
65 | libusb library.
66 |
67 | Installing PyUSB on Windows
68 | ===========================
69 |
70 | Now that PyUSB is 100% written in Python, you install it on Windows
71 | in the same way you do on Linux::
72 |
73 | python setup.py install
74 |
75 | If you get some kind of "command not found" error, make sure to add
76 | the Python install directory to your PATH environment variable or
77 | give the complete path to the Python interpreter.
78 |
79 | Remember that you need libusb (1.0 or 0.1) or OpenUSB running on your
80 | system. For Windows users, libusb 0.1 is provided through
81 | `libusb-win32 `_
82 | package. Check the libusb website for updates
83 | (http://www.libusb.org).
84 |
85 | Reporting bugs/Submitting patches
86 | =================================
87 |
88 | Some people have been sending patches and reporting bugs directly
89 | at my email. Please, do it through
90 | `github `_, I had a hardtime tracking
91 | their names to put them in the acknowledgments file. ;-)
92 |
93 | PS: this README file was based on the great Josh Lifton's one... ^_^
94 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-i686-2.7/usb/_lookup.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Walker Inman
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""usb._lookups - Lookup tables for USB
30 | """
31 |
32 | descriptors = {
33 | 0x1 : "Device",
34 | 0x2 : "Configuration",
35 | 0x3 : "String",
36 | 0x4 : "Interface",
37 | 0x5 : "Endpoint",
38 | 0x6 : "Device qualifier",
39 | 0x7 : "Other speed configuration",
40 | 0x8 : "Interface power",
41 | 0x9 : "OTG",
42 | 0xA : "Debug",
43 | 0xB : "Interface association",
44 | 0xC : "Security",
45 | 0xD : "Key",
46 | 0xE : "Encryption type",
47 | 0xF : "Binary device object store (BOS)",
48 | 0x10 : "Device capability",
49 | 0x11 : "Wireless endpoint companion",
50 | 0x30 : "SuperSpeed endpoint companion",
51 | }
52 |
53 | device_classes = {
54 | 0x0 : "Specified at interface",
55 | 0x2 : "Communications Device",
56 | 0x9 : "Hub",
57 | 0xF : "Personal Healthcare Device",
58 | 0xDC : "Diagnostic Device",
59 | 0xE0 : "Wireless Controller",
60 | 0xEF : "Miscellaneous",
61 | 0xFF : "Vendor-specific",
62 | }
63 |
64 | interface_classes = {
65 | 0x0 : "Reserved",
66 | 0x1 : "Audio",
67 | 0x2 : "CDC Communication",
68 | 0x3 : "Human Interface Device",
69 | 0x5 : "Physical",
70 | 0x6 : "Image",
71 | 0x7 : "Printer",
72 | 0x8 : "Mass Storage",
73 | 0x9 : "Hub",
74 | 0xA : "CDC Data",
75 | 0xB : "Smart Card",
76 | 0xD : "Content Security",
77 | 0xE : "Video",
78 | 0xF : "Personal Healthcare",
79 | 0xDC : "Diagnostic Device",
80 | 0xE0 : "Wireless Controller",
81 | 0xEF : "Miscellaneous",
82 | 0xFE : "Application Specific",
83 | 0xFF : "Vendor Specific",
84 | }
85 |
86 | ep_attributes = {
87 | 0x0 : "Control",
88 | 0x1 : "Isochronous",
89 | 0x2 : "Bulk",
90 | 0x3 : "Interrupt",
91 | }
92 |
93 | MAX_POWER_UNITS_USB2p0 = 2 # mA
94 | MAX_POWER_UNITS_USB_SUPERSPEED = 8 # mA
95 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-armv7l-2.7/usb/_lookup.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Walker Inman
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""usb._lookups - Lookup tables for USB
30 | """
31 |
32 | descriptors = {
33 | 0x1 : "Device",
34 | 0x2 : "Configuration",
35 | 0x3 : "String",
36 | 0x4 : "Interface",
37 | 0x5 : "Endpoint",
38 | 0x6 : "Device qualifier",
39 | 0x7 : "Other speed configuration",
40 | 0x8 : "Interface power",
41 | 0x9 : "OTG",
42 | 0xA : "Debug",
43 | 0xB : "Interface association",
44 | 0xC : "Security",
45 | 0xD : "Key",
46 | 0xE : "Encryption type",
47 | 0xF : "Binary device object store (BOS)",
48 | 0x10 : "Device capability",
49 | 0x11 : "Wireless endpoint companion",
50 | 0x30 : "SuperSpeed endpoint companion",
51 | }
52 |
53 | device_classes = {
54 | 0x0 : "Specified at interface",
55 | 0x2 : "Communications Device",
56 | 0x9 : "Hub",
57 | 0xF : "Personal Healthcare Device",
58 | 0xDC : "Diagnostic Device",
59 | 0xE0 : "Wireless Controller",
60 | 0xEF : "Miscellaneous",
61 | 0xFF : "Vendor-specific",
62 | }
63 |
64 | interface_classes = {
65 | 0x0 : "Reserved",
66 | 0x1 : "Audio",
67 | 0x2 : "CDC Communication",
68 | 0x3 : "Human Interface Device",
69 | 0x5 : "Physical",
70 | 0x6 : "Image",
71 | 0x7 : "Printer",
72 | 0x8 : "Mass Storage",
73 | 0x9 : "Hub",
74 | 0xA : "CDC Data",
75 | 0xB : "Smart Card",
76 | 0xD : "Content Security",
77 | 0xE : "Video",
78 | 0xF : "Personal Healthcare",
79 | 0xDC : "Diagnostic Device",
80 | 0xE0 : "Wireless Controller",
81 | 0xEF : "Miscellaneous",
82 | 0xFE : "Application Specific",
83 | 0xFF : "Vendor Specific",
84 | }
85 |
86 | ep_attributes = {
87 | 0x0 : "Control",
88 | 0x1 : "Isochronous",
89 | 0x2 : "Bulk",
90 | 0x3 : "Interrupt",
91 | }
92 |
93 | MAX_POWER_UNITS_USB2p0 = 2 # mA
94 | MAX_POWER_UNITS_USB_SUPERSPEED = 8 # mA
95 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-x86_64-2.7/usb/_lookup.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Walker Inman
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""usb._lookups - Lookup tables for USB
30 | """
31 |
32 | descriptors = {
33 | 0x1 : "Device",
34 | 0x2 : "Configuration",
35 | 0x3 : "String",
36 | 0x4 : "Interface",
37 | 0x5 : "Endpoint",
38 | 0x6 : "Device qualifier",
39 | 0x7 : "Other speed configuration",
40 | 0x8 : "Interface power",
41 | 0x9 : "OTG",
42 | 0xA : "Debug",
43 | 0xB : "Interface association",
44 | 0xC : "Security",
45 | 0xD : "Key",
46 | 0xE : "Encryption type",
47 | 0xF : "Binary device object store (BOS)",
48 | 0x10 : "Device capability",
49 | 0x11 : "Wireless endpoint companion",
50 | 0x30 : "SuperSpeed endpoint companion",
51 | }
52 |
53 | device_classes = {
54 | 0x0 : "Specified at interface",
55 | 0x2 : "Communications Device",
56 | 0x9 : "Hub",
57 | 0xF : "Personal Healthcare Device",
58 | 0xDC : "Diagnostic Device",
59 | 0xE0 : "Wireless Controller",
60 | 0xEF : "Miscellaneous",
61 | 0xFF : "Vendor-specific",
62 | }
63 |
64 | interface_classes = {
65 | 0x0 : "Reserved",
66 | 0x1 : "Audio",
67 | 0x2 : "CDC Communication",
68 | 0x3 : "Human Interface Device",
69 | 0x5 : "Physical",
70 | 0x6 : "Image",
71 | 0x7 : "Printer",
72 | 0x8 : "Mass Storage",
73 | 0x9 : "Hub",
74 | 0xA : "CDC Data",
75 | 0xB : "Smart Card",
76 | 0xD : "Content Security",
77 | 0xE : "Video",
78 | 0xF : "Personal Healthcare",
79 | 0xDC : "Diagnostic Device",
80 | 0xE0 : "Wireless Controller",
81 | 0xEF : "Miscellaneous",
82 | 0xFE : "Application Specific",
83 | 0xFF : "Vendor Specific",
84 | }
85 |
86 | ep_attributes = {
87 | 0x0 : "Control",
88 | 0x1 : "Isochronous",
89 | 0x2 : "Bulk",
90 | 0x3 : "Interrupt",
91 | }
92 |
93 | MAX_POWER_UNITS_USB2p0 = 2 # mA
94 | MAX_POWER_UNITS_USB_SUPERSPEED = 8 # mA
95 |
--------------------------------------------------------------------------------
/skserv.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8
3 | # Simple multithreading socket server v 1.5
4 | # max buffer 16k, encode/decode utf8
5 | # separator \t
6 | import string
7 | import sys
8 | import socket
9 | import threading
10 | import time
11 |
12 | msg_ok='ok'
13 | msg_err='err'
14 | separator="\t"
15 |
16 | MAX_BUFFER=16000
17 | CONNECT_TIMEOUT=8
18 |
19 | class SockSrv:
20 | def __init__(self,ip,port,maxc):
21 | if ip=='':
22 | ip=''
23 | self.soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
24 | self.soc.bind((ip,port))
25 | self.soc.listen(maxc)
26 | self.maxc=maxc
27 | self.connections=0
28 |
29 | def start(self):
30 | print "skserv.start"
31 | while 1:
32 | (conn,addr) = self.soc.accept()
33 | if self.maxc<=self.connections:
34 | conn.send(msg_err)
35 | conn.close()
36 | else:
37 | self.connections=self.connections+1
38 | thr = CThread(self,conn)
39 | thr.start()
40 | conn.send(msg_ok)
41 | print 'skserv.close'
42 | self.soc.close()
43 |
44 | def process(self,ct,arr):
45 | pass
46 |
47 |
48 | class CThread(threading.Thread):
49 | def __init__(self,socksrv,c):
50 | self.MAXSIZE = MAX_BUFFER
51 | threading.Thread.__init__(self)
52 | self.conn = c
53 | self.stopIt=False
54 | self.arr=[]
55 | self.socksrv=socksrv
56 |
57 | def mrecv(self):
58 | data = self.conn.recv(self.MAXSIZE)
59 | #data=data.decode('utf8')
60 | s = data.rstrip("\r\n")
61 | self.arr = s.split(separator)
62 | return data
63 |
64 | def run(self):
65 | print "skserv.connect"
66 | while not self.stopIt:
67 | data = self.mrecv()
68 | if not data:
69 | self.stopIt=True
70 | break
71 | #print data
72 | self.socksrv.process(self,self.arr)
73 | self.conn.close()
74 | self.socksrv.connections=self.socksrv.connections-1
75 | print "skserv.disconnect [%s]" % (self.socksrv.connections)
76 |
77 | def msend(self,msg):
78 | if len(msg)<=self.MAXSIZE and len(msg)>0:
79 | try:
80 | m=msg.encode('utf8')
81 | except:
82 | m=msg
83 | msg=m
84 |
85 | self.conn.send(msg)
86 |
87 |
88 | class SockClient:
89 | def __init__(self,ip,port):
90 | self.MAXSIZE = MAX_BUFFER
91 | if ip=='':
92 | ip='127.0.0.1'
93 | #print ip+":"+str(port)
94 | self.soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
95 | self.soc.settimeout(CONNECT_TIMEOUT)
96 | try:
97 | self.soc.connect((ip,port))
98 | except:
99 | self.soc = None
100 |
101 |
102 | def mrecv(self):
103 | data = self.soc.recv(self.MAXSIZE)
104 | #data=data.decode('utf8')
105 | s = data.rstrip("\r\n")
106 | self.arr = s.split(separator)
107 | return data
108 |
109 | def msend(self,msg):
110 | if len(msg)<=self.MAXSIZE and len(msg)>0:
111 | self.soc.send(msg)
112 |
113 | def run(self):
114 | pass
115 |
116 | def close(self):
117 | try:
118 | self.soc.close()
119 | except:
120 | pass
121 |
122 | #if len(sys.argv) > 1:
123 | # ip=sys.argv[1]
124 | #else:
125 | # ip=''
126 | #
127 | #if len(sys.argv) > 2:
128 | # port=sys.argv[2]
129 | #else:
130 | # port=7171
131 | #
132 | #try:
133 | # srv=SockSrv(ip,port,1)
134 | # print "starting socket server"
135 | # srv.start()
136 | #except:
137 | # print "error socket server"
138 | #
139 |
140 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/usb/_interop.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | # All the hacks necessary to assure compatibility across all
30 | # supported versions come here.
31 | # Please, note that there is one version check for each
32 | # hack we need to do, this makes maintenance easier... ^^
33 |
34 | import sys
35 | import array
36 |
37 | __all__ = ['_reduce', '_set', '_next', '_update_wrapper']
38 |
39 | # we support Python >= 2.4
40 | assert sys.hexversion >= 0x020400f0
41 |
42 | # On Python 3, reduce became a functools module function
43 | try:
44 | import functools
45 | _reduce = functools.reduce
46 | except (ImportError, AttributeError):
47 | _reduce = reduce
48 |
49 | # all, introduced in Python 2.5
50 | try:
51 | _all = all
52 | except NameError:
53 | _all = lambda iter_ : _reduce( lambda x, y: x and y, iter_, True )
54 |
55 | # we only have the builtin set type since 2.5 version
56 | try:
57 | _set = set
58 | except NameError:
59 | import sets
60 | _set = sets.Set
61 |
62 | # On Python >= 2.6, we have the builtin next() function
63 | # On Python 2.5 and before, we have to call the iterator method next()
64 | def _next(iter):
65 | try:
66 | return next(iter)
67 | except NameError:
68 | return iter.next()
69 |
70 | # functools appeared in 2.5
71 | try:
72 | import functools
73 | _update_wrapper = functools.update_wrapper
74 | except (ImportError, AttributeError):
75 | def _update_wrapper(wrapper, wrapped):
76 | wrapper.__name__ = wrapped.__name__
77 | wrapper.__module__ = wrapped.__module__
78 | wrapper.__doc__ = wrapped.__doc__
79 | wrapper.__dict__ = wrapped.__dict__
80 |
81 | # this is used (as of May 2015) twice in core, once in backend/openusb, and in
82 | # some unit test code. It would probably be clearer if written in terms of some
83 | # definite 3.2+ API (bytearrays?) with a fallback provided for 2.4+.
84 | def as_array(data=None):
85 | if data is None:
86 | return array.array('B')
87 |
88 | if isinstance(data, array.array):
89 | return data
90 |
91 | try:
92 | return array.array('B', data)
93 | except TypeError:
94 | # When you pass a unicode string or a character sequence,
95 | # you get a TypeError if the first parameter does not match
96 | a = array.array('B')
97 | a.fromstring(data) # deprecated since 3.2
98 | return a
99 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-armv7l-2.7/usb/_interop.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | # All the hacks necessary to assure compatibility across all
30 | # supported versions come here.
31 | # Please, note that there is one version check for each
32 | # hack we need to do, this makes maintenance easier... ^^
33 |
34 | import sys
35 | import array
36 |
37 | __all__ = ['_reduce', '_set', '_next', '_update_wrapper']
38 |
39 | # we support Python >= 2.4
40 | assert sys.hexversion >= 0x020400f0
41 |
42 | # On Python 3, reduce became a functools module function
43 | try:
44 | import functools
45 | _reduce = functools.reduce
46 | except (ImportError, AttributeError):
47 | _reduce = reduce
48 |
49 | # all, introduced in Python 2.5
50 | try:
51 | _all = all
52 | except NameError:
53 | _all = lambda iter_ : _reduce( lambda x, y: x and y, iter_, True )
54 |
55 | # we only have the builtin set type since 2.5 version
56 | try:
57 | _set = set
58 | except NameError:
59 | import sets
60 | _set = sets.Set
61 |
62 | # On Python >= 2.6, we have the builtin next() function
63 | # On Python 2.5 and before, we have to call the iterator method next()
64 | def _next(iter):
65 | try:
66 | return next(iter)
67 | except NameError:
68 | return iter.next()
69 |
70 | # functools appeared in 2.5
71 | try:
72 | import functools
73 | _update_wrapper = functools.update_wrapper
74 | except (ImportError, AttributeError):
75 | def _update_wrapper(wrapper, wrapped):
76 | wrapper.__name__ = wrapped.__name__
77 | wrapper.__module__ = wrapped.__module__
78 | wrapper.__doc__ = wrapped.__doc__
79 | wrapper.__dict__ = wrapped.__dict__
80 |
81 | # this is used (as of May 2015) twice in core, once in backend/openusb, and in
82 | # some unit test code. It would probably be clearer if written in terms of some
83 | # definite 3.2+ API (bytearrays?) with a fallback provided for 2.4+.
84 | def as_array(data=None):
85 | if data is None:
86 | return array.array('B')
87 |
88 | if isinstance(data, array.array):
89 | return data
90 |
91 | try:
92 | return array.array('B', data)
93 | except TypeError:
94 | # When you pass a unicode string or a character sequence,
95 | # you get a TypeError if the first parameter does not match
96 | a = array.array('B')
97 | a.fromstring(data) # deprecated since 3.2
98 | return a
99 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-i686-2.7/usb/_interop.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | # All the hacks necessary to assure compatibility across all
30 | # supported versions come here.
31 | # Please, note that there is one version check for each
32 | # hack we need to do, this makes maintenance easier... ^^
33 |
34 | import sys
35 | import array
36 |
37 | __all__ = ['_reduce', '_set', '_next', '_update_wrapper']
38 |
39 | # we support Python >= 2.4
40 | assert sys.hexversion >= 0x020400f0
41 |
42 | # On Python 3, reduce became a functools module function
43 | try:
44 | import functools
45 | _reduce = functools.reduce
46 | except (ImportError, AttributeError):
47 | _reduce = reduce
48 |
49 | # all, introduced in Python 2.5
50 | try:
51 | _all = all
52 | except NameError:
53 | _all = lambda iter_ : _reduce( lambda x, y: x and y, iter_, True )
54 |
55 | # we only have the builtin set type since 2.5 version
56 | try:
57 | _set = set
58 | except NameError:
59 | import sets
60 | _set = sets.Set
61 |
62 | # On Python >= 2.6, we have the builtin next() function
63 | # On Python 2.5 and before, we have to call the iterator method next()
64 | def _next(iter):
65 | try:
66 | return next(iter)
67 | except NameError:
68 | return iter.next()
69 |
70 | # functools appeared in 2.5
71 | try:
72 | import functools
73 | _update_wrapper = functools.update_wrapper
74 | except (ImportError, AttributeError):
75 | def _update_wrapper(wrapper, wrapped):
76 | wrapper.__name__ = wrapped.__name__
77 | wrapper.__module__ = wrapped.__module__
78 | wrapper.__doc__ = wrapped.__doc__
79 | wrapper.__dict__ = wrapped.__dict__
80 |
81 | # this is used (as of May 2015) twice in core, once in backend/openusb, and in
82 | # some unit test code. It would probably be clearer if written in terms of some
83 | # definite 3.2+ API (bytearrays?) with a fallback provided for 2.4+.
84 | def as_array(data=None):
85 | if data is None:
86 | return array.array('B')
87 |
88 | if isinstance(data, array.array):
89 | return data
90 |
91 | try:
92 | return array.array('B', data)
93 | except TypeError:
94 | # When you pass a unicode string or a character sequence,
95 | # you get a TypeError if the first parameter does not match
96 | a = array.array('B')
97 | a.fromstring(data) # deprecated since 3.2
98 | return a
99 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-x86_64-2.7/usb/_interop.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | # All the hacks necessary to assure compatibility across all
30 | # supported versions come here.
31 | # Please, note that there is one version check for each
32 | # hack we need to do, this makes maintenance easier... ^^
33 |
34 | import sys
35 | import array
36 |
37 | __all__ = ['_reduce', '_set', '_next', '_update_wrapper']
38 |
39 | # we support Python >= 2.4
40 | assert sys.hexversion >= 0x020400f0
41 |
42 | # On Python 3, reduce became a functools module function
43 | try:
44 | import functools
45 | _reduce = functools.reduce
46 | except (ImportError, AttributeError):
47 | _reduce = reduce
48 |
49 | # all, introduced in Python 2.5
50 | try:
51 | _all = all
52 | except NameError:
53 | _all = lambda iter_ : _reduce( lambda x, y: x and y, iter_, True )
54 |
55 | # we only have the builtin set type since 2.5 version
56 | try:
57 | _set = set
58 | except NameError:
59 | import sets
60 | _set = sets.Set
61 |
62 | # On Python >= 2.6, we have the builtin next() function
63 | # On Python 2.5 and before, we have to call the iterator method next()
64 | def _next(iter):
65 | try:
66 | return next(iter)
67 | except NameError:
68 | return iter.next()
69 |
70 | # functools appeared in 2.5
71 | try:
72 | import functools
73 | _update_wrapper = functools.update_wrapper
74 | except (ImportError, AttributeError):
75 | def _update_wrapper(wrapper, wrapped):
76 | wrapper.__name__ = wrapped.__name__
77 | wrapper.__module__ = wrapped.__module__
78 | wrapper.__doc__ = wrapped.__doc__
79 | wrapper.__dict__ = wrapped.__dict__
80 |
81 | # this is used (as of May 2015) twice in core, once in backend/openusb, and in
82 | # some unit test code. It would probably be clearer if written in terms of some
83 | # definite 3.2+ API (bytearrays?) with a fallback provided for 2.4+.
84 | def as_array(data=None):
85 | if data is None:
86 | return array.array('B')
87 |
88 | if isinstance(data, array.array):
89 | return data
90 |
91 | try:
92 | return array.array('B', data)
93 | except TypeError:
94 | # When you pass a unicode string or a character sequence,
95 | # you get a TypeError if the first parameter does not match
96 | a = array.array('B')
97 | a.fromstring(data) # deprecated since 3.2
98 | return a
99 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/usb/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""PyUSB - Easy USB access in Python
30 |
31 | This package exports the following modules and subpackages:
32 |
33 | core - the main USB implementation
34 | legacy - the compatibility layer with 0.x version
35 | backend - the support for backend implementations.
36 | control - USB standard control requests.
37 | libloader - helper module for backend library loading.
38 |
39 | Since version 1.0, main PyUSB implementation lives in the 'usb.core'
40 | module. New applications are encouraged to use it.
41 | """
42 |
43 | import logging
44 | import os
45 |
46 | __author__ = 'Wander Lairson Costa'
47 |
48 | # Use Semantic Versioning, http://semver.org/
49 | version_info = (1, 0, 0, 'rc1')
50 | __version__ = '%d.%d.%d%s' % version_info
51 |
52 | __all__ = ['legacy', 'control', 'core', 'backend', 'util', 'libloader']
53 |
54 | def _setup_log():
55 | from usb import _debug
56 | logger = logging.getLogger('usb')
57 | debug_level = os.getenv('PYUSB_DEBUG')
58 |
59 | if debug_level is not None:
60 | _debug.enable_tracing(True)
61 | filename = os.getenv('PYUSB_LOG_FILENAME')
62 |
63 | LEVELS = {'debug': logging.DEBUG,
64 | 'info': logging.INFO,
65 | 'warning': logging.WARNING,
66 | 'error': logging.ERROR,
67 | 'critical': logging.CRITICAL}
68 |
69 | level = LEVELS.get(debug_level, logging.CRITICAL + 10)
70 | logger.setLevel(level = level)
71 |
72 | try:
73 | handler = logging.FileHandler(filename)
74 | except:
75 | handler = logging.StreamHandler()
76 |
77 | fmt = logging.Formatter('%(asctime)s %(levelname)s:%(name)s:%(message)s')
78 | handler.setFormatter(fmt)
79 | logger.addHandler(handler)
80 | else:
81 | class NullHandler(logging.Handler):
82 | def emit(self, record):
83 | pass
84 |
85 | # We set the log level to avoid delegation to the
86 | # parent log handler (if there is one).
87 | # Thanks to Chris Clark to pointing this out.
88 | logger.setLevel(logging.CRITICAL + 10)
89 |
90 | logger.addHandler(NullHandler())
91 |
92 |
93 | _setup_log()
94 |
95 | # We import all 'legacy' module symbols to provide compatibility
96 | # with applications that use 0.x versions.
97 | from usb.legacy import *
98 |
--------------------------------------------------------------------------------
/site/autosets.html:
--------------------------------------------------------------------------------
1 |
85 |
86 |
--------------------------------------------------------------------------------
/DTPrint/vikitest.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf8 -*-
3 | # frk object v 2.0.007
4 | import kkmdrv
5 | import serial
6 | import time
7 | from PIL import Image
8 | import qrcode
9 |
10 | const_error=1
11 | const_cmd={'sale':11,'return':13,'X':60,'Z':61,'close_check':55,'cancel_check':56,}
12 |
13 | const_code = u' Код:'
14 | const_count = u' Количество'
15 | const_price = u' Цена'
16 | const_vsego = u' Всего'
17 | const_itogo = u'Итого'
18 |
19 | MAXWIDTH = 48
20 | CMDERR_NO=0
21 |
22 | NULL= chr(0x00)
23 | ENQ = chr(0x05)
24 | STX = chr(0x02)
25 | ETX = chr(0x03)
26 | ACK = chr(0x06)
27 | NAK = chr(0x15)
28 | FS = chr(0x1c)
29 |
30 | """ Конвертация рисунка в массив битов """
31 | def convert_image(im,img_size):
32 | """ Parse image and prepare it to a printable format """
33 | pix_line=""
34 | for y in range(img_size[1]):
35 | pix=""
36 | for x in range(img_size[0]):
37 | RGB = im.getpixel((x, y))
38 | im_color = (RGB[0] + RGB[1] + RGB[2])
39 | if im_color<600:
40 | b="1"
41 | else:
42 | b="0"
43 | pix += b
44 | pix_line +=pix
45 | return pix_line
46 |
47 | def nd_concat(title,value):
48 | return title.ljust(kkmdrv.MAXWIDTH-len(value),'.')+value
49 |
50 | def _crc(s):
51 | #import pdb; pdb.set_trace()
52 | c=25
53 | for i in s:
54 | c^=ord(i)
55 | sc=(hex(c)).upper()
56 | r=sc[2:]
57 | return r
58 |
59 | class frk:
60 |
61 | def __init__(self,port,speed):
62 | self.MAX_WIDTH=MAXWIDTH
63 | self.password = 'PIRI'
64 | self.admin_password = 'PIRI'
65 | self.port = '/dev/ttyACM0'
66 | self.speed = '57600'
67 |
68 | self.salelines=[]
69 | self.a_startus=['ready','check','error']
70 | self.error=0
71 |
72 | def connect(self):
73 | try:
74 | self.ser = serial.Serial(self.port, int(self.speed),\
75 | parity=serial.PARITY_NONE,\
76 | stopbits=serial.STOPBITS_ONE,\
77 | timeout=0.2,\
78 | writeTimeout=0.2)
79 | except:
80 | return False
81 |
82 | try:
83 | #self.kkm=kkmdrv.KKM(self.ser,password=self.password,wide=self.MAX_WIDTH)
84 | #s='RI'+chr(28)+'00'+chr(0x3)
85 | op1=''
86 | for i in range(16):
87 | op1+=FS
88 | kassir=chr(136)+chr(162)+chr(160)+chr(173)+chr(174)+chr(228)+chr(228)+chr(32)+chr(136)+chr(46)+chr(136)+chr(46)+op1
89 | s='RI'+chr(0x29)+'21'+kassir+ETX
90 | path='/home/user/Desktop/WORK/VikiPrint/'
91 | fn=path+"cmd21.viki"
92 | f=open(fn,"w")
93 | crc=_crc(s)
94 | #import pdb; pdb.set_trace()
95 | s=STX+'PI'+s+crc #'\x0d\x0a'
96 | # self.ser.write(ENQ)
97 | # time.sleep(0.1)
98 | # ot=self.ser.read(1)
99 | # t = time.strftime("%d%m%y%H%M%S", time.localtime())
100 | # bw0='RI&10'+t+ETX
101 | # crc=_crc(bw0)
102 | # bw=STX+'PI'+bw0+crc
103 | # self.ser.write(bw)
104 | # ot=self.ser.read(1)
105 | # import pdb; pdb.set_trace()
106 | #f.write(bw+'\n')
107 | f.write(s)
108 | f.close()
109 | #import pdb; pdb.set_trace()
110 | self.ser.write(s)
111 | #time.sleep(0.5)
112 | err=0
113 | #self._status_ready()
114 | print "connect frk"
115 | except:
116 | err=const_error
117 | #self._status_error()
118 | print "not connect frk"
119 | return True
120 |
121 | #Подключаемся
122 | D=frk('/dev/ttyACM0','57600')
123 | D.connect()
124 | print D.error
125 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-i686-2.7/usb/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""PyUSB - Easy USB access in Python
30 |
31 | This package exports the following modules and subpackages:
32 |
33 | core - the main USB implementation
34 | legacy - the compatibility layer with 0.x version
35 | backend - the support for backend implementations.
36 | control - USB standard control requests.
37 | libloader - helper module for backend library loading.
38 |
39 | Since version 1.0, main PyUSB implementation lives in the 'usb.core'
40 | module. New applications are encouraged to use it.
41 | """
42 |
43 | import logging
44 | import os
45 |
46 | __author__ = 'Wander Lairson Costa'
47 |
48 | # Use Semantic Versioning, http://semver.org/
49 | version_info = (1, 0, 0, 'rc1')
50 | __version__ = '%d.%d.%d%s' % version_info
51 |
52 | __all__ = ['legacy', 'control', 'core', 'backend', 'util', 'libloader']
53 |
54 | def _setup_log():
55 | from usb import _debug
56 | logger = logging.getLogger('usb')
57 | debug_level = os.getenv('PYUSB_DEBUG')
58 |
59 | if debug_level is not None:
60 | _debug.enable_tracing(True)
61 | filename = os.getenv('PYUSB_LOG_FILENAME')
62 |
63 | LEVELS = {'debug': logging.DEBUG,
64 | 'info': logging.INFO,
65 | 'warning': logging.WARNING,
66 | 'error': logging.ERROR,
67 | 'critical': logging.CRITICAL}
68 |
69 | level = LEVELS.get(debug_level, logging.CRITICAL + 10)
70 | logger.setLevel(level = level)
71 |
72 | try:
73 | handler = logging.FileHandler(filename)
74 | except:
75 | handler = logging.StreamHandler()
76 |
77 | fmt = logging.Formatter('%(asctime)s %(levelname)s:%(name)s:%(message)s')
78 | handler.setFormatter(fmt)
79 | logger.addHandler(handler)
80 | else:
81 | class NullHandler(logging.Handler):
82 | def emit(self, record):
83 | pass
84 |
85 | # We set the log level to avoid delegation to the
86 | # parent log handler (if there is one).
87 | # Thanks to Chris Clark to pointing this out.
88 | logger.setLevel(logging.CRITICAL + 10)
89 |
90 | logger.addHandler(NullHandler())
91 |
92 |
93 | _setup_log()
94 |
95 | # We import all 'legacy' module symbols to provide compatibility
96 | # with applications that use 0.x versions.
97 | from usb.legacy import *
98 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-armv7l-2.7/usb/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""PyUSB - Easy USB access in Python
30 |
31 | This package exports the following modules and subpackages:
32 |
33 | core - the main USB implementation
34 | legacy - the compatibility layer with 0.x version
35 | backend - the support for backend implementations.
36 | control - USB standard control requests.
37 | libloader - helper module for backend library loading.
38 |
39 | Since version 1.0, main PyUSB implementation lives in the 'usb.core'
40 | module. New applications are encouraged to use it.
41 | """
42 |
43 | import logging
44 | import os
45 |
46 | __author__ = 'Wander Lairson Costa'
47 |
48 | # Use Semantic Versioning, http://semver.org/
49 | version_info = (1, 0, 0, 'rc1')
50 | __version__ = '%d.%d.%d%s' % version_info
51 |
52 | __all__ = ['legacy', 'control', 'core', 'backend', 'util', 'libloader']
53 |
54 | def _setup_log():
55 | from usb import _debug
56 | logger = logging.getLogger('usb')
57 | debug_level = os.getenv('PYUSB_DEBUG')
58 |
59 | if debug_level is not None:
60 | _debug.enable_tracing(True)
61 | filename = os.getenv('PYUSB_LOG_FILENAME')
62 |
63 | LEVELS = {'debug': logging.DEBUG,
64 | 'info': logging.INFO,
65 | 'warning': logging.WARNING,
66 | 'error': logging.ERROR,
67 | 'critical': logging.CRITICAL}
68 |
69 | level = LEVELS.get(debug_level, logging.CRITICAL + 10)
70 | logger.setLevel(level = level)
71 |
72 | try:
73 | handler = logging.FileHandler(filename)
74 | except:
75 | handler = logging.StreamHandler()
76 |
77 | fmt = logging.Formatter('%(asctime)s %(levelname)s:%(name)s:%(message)s')
78 | handler.setFormatter(fmt)
79 | logger.addHandler(handler)
80 | else:
81 | class NullHandler(logging.Handler):
82 | def emit(self, record):
83 | pass
84 |
85 | # We set the log level to avoid delegation to the
86 | # parent log handler (if there is one).
87 | # Thanks to Chris Clark to pointing this out.
88 | logger.setLevel(logging.CRITICAL + 10)
89 |
90 | logger.addHandler(NullHandler())
91 |
92 |
93 | _setup_log()
94 |
95 | # We import all 'legacy' module symbols to provide compatibility
96 | # with applications that use 0.x versions.
97 | from usb.legacy import *
98 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/build/lib.linux-x86_64-2.7/usb/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2014 Wander Lairson Costa
2 | #
3 | # The following terms apply to all files associated
4 | # with the software unless explicitly disclaimed in individual files.
5 | #
6 | # The authors hereby grant permission to use, copy, modify, distribute,
7 | # and license this software and its documentation for any purpose, provided
8 | # that existing copyright notices are retained in all copies and that this
9 | # notice is included verbatim in any distributions. No written agreement,
10 | # license, or royalty fee is required for any of the authorized uses.
11 | # Modifications to this software may be copyrighted by their authors
12 | # and need not follow the licensing terms described here, provided that
13 | # the new terms are clearly indicated on the first page of each file where
14 | # they apply.
15 | #
16 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
17 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
18 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
19 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
20 | # POSSIBILITY OF SUCH DAMAGE.
21 | #
22 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
23 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
24 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
25 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
26 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27 | # MODIFICATIONS.
28 |
29 | r"""PyUSB - Easy USB access in Python
30 |
31 | This package exports the following modules and subpackages:
32 |
33 | core - the main USB implementation
34 | legacy - the compatibility layer with 0.x version
35 | backend - the support for backend implementations.
36 | control - USB standard control requests.
37 | libloader - helper module for backend library loading.
38 |
39 | Since version 1.0, main PyUSB implementation lives in the 'usb.core'
40 | module. New applications are encouraged to use it.
41 | """
42 |
43 | import logging
44 | import os
45 |
46 | __author__ = 'Wander Lairson Costa'
47 |
48 | # Use Semantic Versioning, http://semver.org/
49 | version_info = (1, 0, 0, 'rc1')
50 | __version__ = '%d.%d.%d%s' % version_info
51 |
52 | __all__ = ['legacy', 'control', 'core', 'backend', 'util', 'libloader']
53 |
54 | def _setup_log():
55 | from usb import _debug
56 | logger = logging.getLogger('usb')
57 | debug_level = os.getenv('PYUSB_DEBUG')
58 |
59 | if debug_level is not None:
60 | _debug.enable_tracing(True)
61 | filename = os.getenv('PYUSB_LOG_FILENAME')
62 |
63 | LEVELS = {'debug': logging.DEBUG,
64 | 'info': logging.INFO,
65 | 'warning': logging.WARNING,
66 | 'error': logging.ERROR,
67 | 'critical': logging.CRITICAL}
68 |
69 | level = LEVELS.get(debug_level, logging.CRITICAL + 10)
70 | logger.setLevel(level = level)
71 |
72 | try:
73 | handler = logging.FileHandler(filename)
74 | except:
75 | handler = logging.StreamHandler()
76 |
77 | fmt = logging.Formatter('%(asctime)s %(levelname)s:%(name)s:%(message)s')
78 | handler.setFormatter(fmt)
79 | logger.addHandler(handler)
80 | else:
81 | class NullHandler(logging.Handler):
82 | def emit(self, record):
83 | pass
84 |
85 | # We set the log level to avoid delegation to the
86 | # parent log handler (if there is one).
87 | # Thanks to Chris Clark to pointing this out.
88 | logger.setLevel(logging.CRITICAL + 10)
89 |
90 | logger.addHandler(NullHandler())
91 |
92 |
93 | _setup_log()
94 |
95 | # We import all 'legacy' module symbols to provide compatibility
96 | # with applications that use 0.x versions.
97 | from usb.legacy import *
98 |
--------------------------------------------------------------------------------
/install/pyusb-1.0.0rc1/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright (C) 2009-2014 Wander Lairson Costa
4 | #
5 | # The following terms apply to all files associated
6 | # with the software unless explicitly disclaimed in individual files.
7 | #
8 | # The authors hereby grant permission to use, copy, modify, distribute,
9 | # and license this software and its documentation for any purpose, provided
10 | # that existing copyright notices are retained in all copies and that this
11 | # notice is included verbatim in any distributions. No written agreement,
12 | # license, or royalty fee is required for any of the authorized uses.
13 | # Modifications to this software may be copyrighted by their authors
14 | # and need not follow the licensing terms described here, provided that
15 | # the new terms are clearly indicated on the first page of each file where
16 | # they apply.
17 | #
18 | # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
19 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
20 | # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
21 | # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
22 | # POSSIBILITY OF SUCH DAMAGE.
23 | #
24 | # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
25 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
26 | # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
27 | # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
28 | # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
29 | # MODIFICATIONS.
30 |
31 | from distutils.core import setup
32 |
33 | import usb
34 |
35 |
36 | setup(
37 | name='pyusb',
38 | version=usb.__version__,
39 | description='Python USB access module',
40 | author='Wander Lairson Costa',
41 | author_email='wander.lairson@gmail.com',
42 | license = 'BSD',
43 | url='http://pyusb.sourceforge.net',
44 | packages=['usb', 'usb.backend'],
45 | long_description =
46 | """
47 | PyUSB offers easy USB devices communication in Python.
48 | It should work without additional code in any environment with
49 | Python >= 2.4, ctypes and an pre-built usb backend library
50 | (currently, libusb 0.1.x, libusb 1.x, and OpenUSB).
51 | """,
52 | classifiers=[
53 | 'Development Status :: 4 - Beta',
54 | 'Intended Audience :: Developers',
55 | 'Intended Audience :: Information Technology',
56 | 'Intended Audience :: Manufacturing', # USB automation, or mfg USB devs
57 | 'Intended Audience :: Science/Research', # interface with instruments
58 | 'Intended Audience :: System Administrators', # integrate strange devs
59 | 'Intended Audience :: Telecommunications Industry', # telecomm devs
60 | 'License :: OSI Approved :: BSD License',
61 | 'Natural Language :: English',
62 | # try to union the OSes that can build any of the backend libraries...
63 | 'Operating System :: MacOS :: MacOS X',
64 | 'Operating System :: Microsoft :: Windows :: Windows Vista',
65 | 'Operating System :: Microsoft :: Windows :: Windows 7',
66 | 'Operating System :: POSIX :: BSD :: FreeBSD',
67 | 'Operating System :: POSIX :: BSD :: NetBSD',
68 | 'Operating System :: POSIX :: BSD :: OpenBSD',
69 | 'Operating System :: POSIX :: Linux',
70 | 'Operating System :: POSIX :: SunOS/Solaris',
71 | 'Programming Language :: Python :: 2.4',
72 | 'Programming Language :: Python :: 2.5',
73 | 'Programming Language :: Python :: 2.6',
74 | 'Programming Language :: Python :: 2.7',
75 | 'Programming Language :: Python :: 3',
76 | # source(CPython,Jython,IronPython,PyPy): "The Long Term" section of
77 | # http://ojs.pythonpapers.org/index.php/tpp/article/viewFile/23/23
78 | 'Programming Language :: Python :: Implementation :: CPython',
79 | 'Programming Language :: Python :: Implementation :: IronPython',
80 | 'Programming Language :: Python :: Implementation :: Jython',
81 | 'Programming Language :: Python :: Implementation :: PyPy',
82 | 'Topic :: Scientific/Engineering :' \
83 | ': Interface Engine/Protocol Translator',
84 | 'Topic :: Software Development :: Libraries',
85 | 'Topic :: Software Development :: Libraries :: Python Modules',
86 | 'Topic :: System :: Hardware :: Hardware Drivers'
87 | ]
88 | )
89 |
90 |
--------------------------------------------------------------------------------
/site_icerest/js/funct.js:
--------------------------------------------------------------------------------
1 | function _putfile(page) {
2 | var file = document.getElementById("file");
3 | file=file.files[0]
4 | if (!file) { return; }
5 | var xhr = new XMLHttpRequest();
6 | xhr.open("POST", page, false);
7 | var formData = new FormData();
8 | formData.append("file", file);
9 | xhr.send(formData);
10 | return xhr.responseText;
11 | }
12 |
13 | function _getdata(page){
14 | var xhrp = new XMLHttpRequest();
15 | xhrp.open('GET', page, false);
16 | xhrp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
17 | xhrp.send();
18 | if (xhrp.status != 200) {
19 | alert( xhrp.status + ': ' + xhrp.statusText );
20 | return '#err';
21 | } else {
22 | return xhrp.responseText;
23 | }
24 | return '#err';
25 | }
26 |
27 | function _postdata(page,a_params,a_values){
28 | var xhrp = new XMLHttpRequest();
29 | xhrp.open('POST', page, false);
30 | xhrp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
31 | body="";
32 | for(var i=0; i0){add="&";}else{add="";}
36 | body = body + add + n + "=" + encodeURIComponent(v);
37 | }
38 | xhrp.send(body);
39 | if (xhrp.status != 200) {
40 | alert( xhrp.status + ': ' + xhrp.statusText );
41 | return '#err';
42 | } else {
43 | return xhrp.responseText;
44 | }
45 | return '#err';
46 | }
47 |
48 | function _relocate(page){
49 | window.location=page;
50 | }
51 |
52 | function showdoc(d){
53 | content=_getdata("/help?id="+d);
54 | doctext.innerHTML=content;
55 | doc.hidden=false;
56 | }
57 | function edit_user(iduser){
58 | ed_content=_getdata("/user?iduser="+iduser);
59 | ed_user.innerHTML="