├── .gitattributes
├── .gitignore
├── Documentation
├── LoRa_Gateway_1-Channel_Schematic.pdf
├── README.md
├── RFM95_96_97_98W.pdf
└── esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf
├── Firmware
├── ESP-1CH-TTN-Device-ABP
│ └── ESP-1CH-TTN-Device-ABP.ino
├── README.md
└── arduino-esp32
│ ├── boards.txt
│ └── variants
│ └── sparkx_esp32_lora
│ └── pins_arduino.h
├── Hardware
├── Board_Design_Checklist
│ ├── .gitignore
│ ├── Board_Design_Checklist.xls
│ ├── Board_Design_Checklist_ESP32 LoRa 1 Channel Gateway_v10.xls
│ ├── Board_Design_Checklist_ESP32 LoRa 1 Channel Gateway_v10_summary.txt
│ ├── Checklist.py
│ ├── Excel_Modules_Installation
│ │ ├── Install_Modules.bat
│ │ ├── xlrd-0.9.3
│ │ │ ├── PKG-INFO
│ │ │ ├── README.html
│ │ │ ├── scripts
│ │ │ │ └── runxlrd.py
│ │ │ ├── setup.py
│ │ │ ├── tests
│ │ │ │ ├── Formate.xls
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base.py
│ │ │ │ ├── formula_test_names.xls
│ │ │ │ ├── formula_test_sjmachin.xls
│ │ │ │ ├── issue20.xls
│ │ │ │ ├── merged_cells.xlsx
│ │ │ │ ├── picture_in_cell.xls
│ │ │ │ ├── profiles.xls
│ │ │ │ ├── ragged.xls
│ │ │ │ ├── reveng1.xlsx
│ │ │ │ ├── test_biffh.py
│ │ │ │ ├── test_cell.py
│ │ │ │ ├── test_comments_excel.xlsx
│ │ │ │ ├── test_comments_gdocs.xlsx
│ │ │ │ ├── test_formats.py
│ │ │ │ ├── test_formulas.py
│ │ │ │ ├── test_open_workbook.py
│ │ │ │ ├── test_sheet.py
│ │ │ │ ├── test_workbook.py
│ │ │ │ ├── test_xldate.py
│ │ │ │ ├── test_xldate_to_datetime.py
│ │ │ │ ├── test_xlsx_comments.py
│ │ │ │ ├── text_bar.xlsx
│ │ │ │ └── xf_class.xls
│ │ │ └── xlrd
│ │ │ │ ├── __init__.py
│ │ │ │ ├── biffh.py
│ │ │ │ ├── book.py
│ │ │ │ ├── compdoc.py
│ │ │ │ ├── formatting.py
│ │ │ │ ├── formula.py
│ │ │ │ ├── info.py
│ │ │ │ ├── licences.py
│ │ │ │ ├── sheet.py
│ │ │ │ ├── timemachine.py
│ │ │ │ ├── xldate.py
│ │ │ │ └── xlsx.py
│ │ ├── xlutils-1.7.1
│ │ │ ├── ._bootstrap.py
│ │ │ ├── .gitignore
│ │ │ ├── PKG-INFO
│ │ │ ├── README.txt
│ │ │ ├── bootstrap.py
│ │ │ ├── buildout.cfg
│ │ │ ├── docs
│ │ │ │ ├── Makefile
│ │ │ │ ├── api.txt
│ │ │ │ ├── changes.txt
│ │ │ │ ├── conf.py
│ │ │ │ ├── copy.txt
│ │ │ │ ├── description.txt
│ │ │ │ ├── development.txt
│ │ │ │ ├── display.txt
│ │ │ │ ├── filter.txt
│ │ │ │ ├── index.txt
│ │ │ │ ├── installation.txt
│ │ │ │ ├── license.txt
│ │ │ │ ├── make.bat
│ │ │ │ ├── margins.txt
│ │ │ │ ├── save.txt
│ │ │ │ ├── styles.txt
│ │ │ │ └── view.txt
│ │ │ ├── jenkins
│ │ │ ├── jenkins.bat
│ │ │ ├── setup.cfg
│ │ │ ├── setup.py
│ │ │ └── xlutils
│ │ │ │ ├── __init__.py
│ │ │ │ ├── copy.py
│ │ │ │ ├── display.py
│ │ │ │ ├── filter.py
│ │ │ │ ├── license.txt
│ │ │ │ ├── margins.py
│ │ │ │ ├── save.py
│ │ │ │ ├── styles.py
│ │ │ │ ├── tests
│ │ │ │ ├── __init__.py
│ │ │ │ ├── date.xls
│ │ │ │ ├── datetime.xls
│ │ │ │ ├── fixtures.py
│ │ │ │ ├── ragged.xls
│ │ │ │ ├── sample.xlsx
│ │ │ │ ├── test.xls
│ │ │ │ ├── test_copy.py
│ │ │ │ ├── test_docs.py
│ │ │ │ ├── test_filter.py
│ │ │ │ ├── test_save.py
│ │ │ │ ├── test_styles.py
│ │ │ │ ├── test_view.py
│ │ │ │ ├── testall.xls
│ │ │ │ └── testnoformatting.xls
│ │ │ │ ├── version.txt
│ │ │ │ └── view.py
│ │ └── xlwt-0.7.5
│ │ │ ├── HISTORY.html
│ │ │ ├── PKG-INFO
│ │ │ ├── README.html
│ │ │ ├── licences.py
│ │ │ ├── setup.py
│ │ │ ├── tests
│ │ │ ├── RKbug.py
│ │ │ └── RKbug1.xls
│ │ │ └── xlwt
│ │ │ ├── BIFFRecords.py
│ │ │ ├── Bitmap.py
│ │ │ ├── Cell.py
│ │ │ ├── Column.py
│ │ │ ├── CompoundDoc.py
│ │ │ ├── ExcelFormula.py
│ │ │ ├── ExcelFormulaLexer.py
│ │ │ ├── ExcelFormulaParser.py
│ │ │ ├── ExcelMagic.py
│ │ │ ├── Formatting.py
│ │ │ ├── Row.py
│ │ │ ├── Style.py
│ │ │ ├── UnicodeUtils.py
│ │ │ ├── Utils.py
│ │ │ ├── Workbook.py
│ │ │ ├── Worksheet.py
│ │ │ ├── __init__.py
│ │ │ ├── antlr.py
│ │ │ ├── doc
│ │ │ └── xlwt.html
│ │ │ ├── examples
│ │ │ ├── big-16Mb.py
│ │ │ ├── big-35Mb.py
│ │ │ ├── blanks.py
│ │ │ ├── col_width.py
│ │ │ ├── country.py
│ │ │ ├── dates.py
│ │ │ ├── format.py
│ │ │ ├── formula_names.py
│ │ │ ├── formulas.py
│ │ │ ├── hyperlinks.py
│ │ │ ├── image.py
│ │ │ ├── merged.py
│ │ │ ├── merged0.py
│ │ │ ├── merged1.py
│ │ │ ├── mini.py
│ │ │ ├── num_formats.py
│ │ │ ├── outline.py
│ │ │ ├── panes.py
│ │ │ ├── parse-fmla.py
│ │ │ ├── protection.py
│ │ │ ├── python.bmp
│ │ │ ├── row_styles.py
│ │ │ ├── row_styles_empty.py
│ │ │ ├── simple.py
│ │ │ ├── sst.py
│ │ │ ├── unicode0.py
│ │ │ ├── unicode1.py
│ │ │ ├── unicode2.py
│ │ │ ├── wsprops.py
│ │ │ └── xlwt_easyxf_simple_demo.py
│ │ │ └── excel-formula.g
│ ├── README.md
│ └── doc_images
│ │ ├── 01-link.png
│ │ ├── 02-who.png
│ │ ├── 03-default_location.png
│ │ ├── 04-path.png
│ │ ├── 05-control_panel.png
│ │ ├── 06-env_settings.png
│ │ ├── 07-env_variables.png
│ │ ├── 08-path.png
│ │ ├── 09-bad_path.png
│ │ └── 10-fixed-path.png
├── ESP32_LoRa_1_Channel_Gateway.brd
├── ESP32_LoRa_1_Channel_Gateway.sch
├── ESP32_LoRa_1_Channel_Gateway.zip
├── Production
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GBL
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GBO
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GBP
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GBS
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GKO
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GML
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GTL
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GTO
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GTP
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.GTS
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.TXT
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.brd
│ ├── 14119-ESP32_LoRa_1_Channel_Gateway-Panel.zip
│ └── ordering_instructions.txt
├── README.md
└── buzzard_labels.lbr
├── LICENSE.md
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore list for Eagle, a PCB layout tool
2 |
3 | # Backup files
4 | *.s#?
5 | *.b#?
6 | *.l#?
7 | *.b$?
8 | *.s$?
9 | *.l$?
10 |
11 | # Eagle project file
12 | # It contains a serial number and references to the file structure
13 | # on your computer.
14 | # comment the following line if you want to have your project file included.
15 | eagle.epf
16 |
17 | # Autorouter files
18 | *.pro
19 | *.job
20 |
21 | # CAM files
22 | *.$$$
23 | *.cmp
24 | *.ly2
25 | *.l15
26 | *.sol
27 | *.plc
28 | *.stc
29 | *.sts
30 | *.crc
31 | *.crs
32 |
33 | *.dri
34 | *.drl
35 | *.gpi
36 | *.pls
37 | *.ger
38 | *.xln
39 |
40 | *.drd
41 | *.drd.*
42 |
43 | *.s#*
44 | *.b#*
45 |
46 | *.info
47 |
48 | *.eps
49 |
50 | # file locks introduced since 7.x
51 | *.lck
--------------------------------------------------------------------------------
/Documentation/LoRa_Gateway_1-Channel_Schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Documentation/LoRa_Gateway_1-Channel_Schematic.pdf
--------------------------------------------------------------------------------
/Documentation/README.md:
--------------------------------------------------------------------------------
1 | SparkFun Documentation
2 | =======================
3 |
4 | This directory should include any necessary datasheets, example number crunching, etc.
--------------------------------------------------------------------------------
/Documentation/RFM95_96_97_98W.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Documentation/RFM95_96_97_98W.pdf
--------------------------------------------------------------------------------
/Documentation/esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Documentation/esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf
--------------------------------------------------------------------------------
/Firmware/README.md:
--------------------------------------------------------------------------------
1 | Software directory contents
2 | ===========================
3 |
4 | * **ESP-1CH-TTN-Device-ABP** -- Arduino example sketch implementing a single-channel LoRaWAN device with ABP activation.
5 | * Depends on the [Arduino-LMIC library](https://github.com/mcci-catena/arduino-lmic).
6 | * **arduino-esp32** -- board.txt and pin-variant files to add the SparkX ESP32 LoRa 1-CH Gateway to the ESP32 Arduino core
7 | * Depends on the [Arduino Core for ESP32 WiFi chip](https://github.com/espressif/arduino-esp32)
8 |
--------------------------------------------------------------------------------
/Firmware/arduino-esp32/boards.txt:
--------------------------------------------------------------------------------
1 | # This should be added to the bottom of your hardware/espressif/esp32/boards.txt file
2 | ##############################################################
3 |
4 | sparkx_esp32_lora.name=SparkX ESP32 LoRa Gateway
5 |
6 | sparkx_esp32_lora.upload.tool=esptool_py
7 | sparkx_esp32_lora.upload.maximum_size=1310720
8 | sparkx_esp32_lora.upload.maximum_data_size=294912
9 | sparkx_esp32_lora.upload.wait_for_upload_port=true
10 |
11 | sparkx_esp32_lora.serial.disableDTR=true
12 | sparkx_esp32_lora.serial.disableRTS=true
13 |
14 | sparkx_esp32_lora.build.mcu=esp32
15 | sparkx_esp32_lora.build.core=esp32
16 | sparkx_esp32_lora.build.variant=sparkx_esp32_lora
17 | sparkx_esp32_lora.build.board=ESP32_DEV
18 |
19 | sparkx_esp32_lora.build.f_cpu=240000000L
20 | sparkx_esp32_lora.build.flash_size=4MB
21 | sparkx_esp32_lora.build.flash_freq=40m
22 | sparkx_esp32_lora.build.flash_mode=dio
23 | sparkx_esp32_lora.build.boot=dio
24 | sparkx_esp32_lora.build.partitions=default
25 |
26 | sparkx_esp32_lora.menu.PartitionScheme.default=Default
27 | sparkx_esp32_lora.menu.PartitionScheme.default.build.partitions=default
28 | sparkx_esp32_lora.menu.PartitionScheme.minimal=Minimal (2MB FLASH)
29 | sparkx_esp32_lora.menu.PartitionScheme.minimal.build.partitions=minimal
30 | sparkx_esp32_lora.menu.PartitionScheme.no_ota=No OTA (Large APP)
31 | sparkx_esp32_lora.menu.PartitionScheme.no_ota.build.partitions=no_ota
32 | sparkx_esp32_lora.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
33 | sparkx_esp32_lora.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
34 | sparkx_esp32_lora.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
35 | sparkx_esp32_lora.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
36 |
37 | sparkx_esp32_lora.menu.FlashMode.qio=QIO
38 | sparkx_esp32_lora.menu.FlashMode.qio.build.flash_mode=dio
39 | sparkx_esp32_lora.menu.FlashMode.qio.build.boot=qio
40 | sparkx_esp32_lora.menu.FlashMode.dio=DIO
41 | sparkx_esp32_lora.menu.FlashMode.dio.build.flash_mode=dio
42 | sparkx_esp32_lora.menu.FlashMode.dio.build.boot=dio
43 | sparkx_esp32_lora.menu.FlashMode.qout=QOUT
44 | sparkx_esp32_lora.menu.FlashMode.qout.build.flash_mode=dout
45 | sparkx_esp32_lora.menu.FlashMode.qout.build.boot=qout
46 | sparkx_esp32_lora.menu.FlashMode.dout=DOUT
47 | sparkx_esp32_lora.menu.FlashMode.dout.build.flash_mode=dout
48 | sparkx_esp32_lora.menu.FlashMode.dout.build.boot=dout
49 |
50 | sparkx_esp32_lora.menu.FlashFreq.80=80MHz
51 | sparkx_esp32_lora.menu.FlashFreq.80.build.flash_freq=80m
52 | sparkx_esp32_lora.menu.FlashFreq.40=40MHz
53 | sparkx_esp32_lora.menu.FlashFreq.40.build.flash_freq=40m
54 |
55 | sparkx_esp32_lora.menu.FlashSize.4M=4MB (32Mb)
56 | sparkx_esp32_lora.menu.FlashSize.4M.build.flash_size=4MB
57 |
58 | sparkx_esp32_lora.menu.UploadSpeed.921600=921600
59 | sparkx_esp32_lora.menu.UploadSpeed.921600.upload.speed=921600
60 | sparkx_esp32_lora.menu.UploadSpeed.115200=115200
61 | sparkx_esp32_lora.menu.UploadSpeed.115200.upload.speed=115200
62 | sparkx_esp32_lora.menu.UploadSpeed.256000.windows=256000
63 | sparkx_esp32_lora.menu.UploadSpeed.256000.upload.speed=256000
64 | sparkx_esp32_lora.menu.UploadSpeed.230400.windows.upload.speed=256000
65 | sparkx_esp32_lora.menu.UploadSpeed.230400=230400
66 | sparkx_esp32_lora.menu.UploadSpeed.230400.upload.speed=230400
67 | sparkx_esp32_lora.menu.UploadSpeed.460800.linux=460800
68 | sparkx_esp32_lora.menu.UploadSpeed.460800.macosx=460800
69 | sparkx_esp32_lora.menu.UploadSpeed.460800.upload.speed=460800
70 | sparkx_esp32_lora.menu.UploadSpeed.512000.windows=512000
71 | sparkx_esp32_lora.menu.UploadSpeed.512000.upload.speed=512000
72 |
73 | sparkx_esp32_lora.menu.DebugLevel.none=None
74 | sparkx_esp32_lora.menu.DebugLevel.none.build.code_debug=0
75 | sparkx_esp32_lora.menu.DebugLevel.error=Error
76 | sparkx_esp32_lora.menu.DebugLevel.error.build.code_debug=1
77 | sparkx_esp32_lora.menu.DebugLevel.warn=Warn
78 | sparkx_esp32_lora.menu.DebugLevel.warn.build.code_debug=2
79 | sparkx_esp32_lora.menu.DebugLevel.info=Info
80 | sparkx_esp32_lora.menu.DebugLevel.info.build.code_debug=3
81 | sparkx_esp32_lora.menu.DebugLevel.debug=Debug
82 | sparkx_esp32_lora.menu.DebugLevel.debug.build.code_debug=4
83 | sparkx_esp32_lora.menu.DebugLevel.verbose=Verbose
84 | sparkx_esp32_lora.menu.DebugLevel.verbose.build.code_debug=5
85 |
--------------------------------------------------------------------------------
/Firmware/arduino-esp32/variants/sparkx_esp32_lora/pins_arduino.h:
--------------------------------------------------------------------------------
1 | #ifndef Pins_Arduino_h
2 | #define Pins_Arduino_h
3 |
4 | #include
5 |
6 | #define EXTERNAL_NUM_INTERRUPTS 16
7 | #define NUM_DIGITAL_PINS 40
8 | #define NUM_ANALOG_INPUTS 16
9 |
10 | #define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
11 | #define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
12 | #define digitalPinHasPWM(p) (p < 34)
13 |
14 | static const int LED_BUILTIN = 17;
15 |
16 | static const uint8_t TX = 1;
17 | static const uint8_t RX = 3;
18 |
19 | static const uint8_t SDA = 21;
20 | static const uint8_t SCL = 22;
21 |
22 | static const uint8_t SS = 16;
23 | static const uint8_t MOSI = 13;
24 | static const uint8_t MISO = 12;
25 | static const uint8_t SCK = 14;
26 |
27 | static const uint8_t A0 = 36;
28 | static const uint8_t A3 = 39;
29 | static const uint8_t A4 = 32;
30 | static const uint8_t A5 = 33;
31 | static const uint8_t A6 = 34;
32 | static const uint8_t A7 = 35;
33 | static const uint8_t A10 = 4;
34 | static const uint8_t A11 = 0;
35 | static const uint8_t A12 = 2;
36 | static const uint8_t A13 = 15;
37 | static const uint8_t A14 = 13;
38 | static const uint8_t A15 = 12;
39 | static const uint8_t A16 = 14;
40 | static const uint8_t A17 = 27;
41 | static const uint8_t A18 = 25;
42 | static const uint8_t A19 = 26;
43 |
44 | static const uint8_t T0 = 4;
45 | static const uint8_t T1 = 0;
46 | static const uint8_t T2 = 2;
47 | static const uint8_t T3 = 15;
48 | static const uint8_t T4 = 13;
49 | static const uint8_t T5 = 12;
50 | static const uint8_t T6 = 14;
51 | static const uint8_t T7 = 27;
52 | static const uint8_t T8 = 33;
53 | static const uint8_t T9 = 32;
54 |
55 | static const uint8_t DAC1 = 25;
56 | static const uint8_t DAC2 = 26;
57 |
58 | #endif /* Pins_Arduino_h */
59 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #############
33 | ## Eagle
34 | #############
35 |
36 | # Ignore the board and schematic backup files
37 | *.b#?
38 | *.s#?
39 | *.job
40 | *.pro
41 | *.lck
42 |
43 |
44 | #################
45 | ## Visual Studio
46 | #################
47 |
48 | ## Ignore Visual Studio temporary files, build results, and
49 | ## files generated by popular Visual Studio add-ons.
50 |
51 | # User-specific files
52 | *.suo
53 | *.user
54 | *.sln.docstates
55 |
56 | # Build results
57 | [Dd]ebug/
58 | [Rr]elease/
59 | *_i.c
60 | *_p.c
61 | *.ilk
62 | *.meta
63 | *.obj
64 | *.pch
65 | *.pdb
66 | *.pgc
67 | *.pgd
68 | *.rsp
69 | *.sbr
70 | *.tlb
71 | *.tli
72 | *.tlh
73 | *.tmp
74 | *.vspscc
75 | .builds
76 | *.dotCover
77 |
78 | ## TODO: If you have NuGet Package Restore enabled, uncomment this
79 | #packages/
80 |
81 | # Visual C++ cache files
82 | ipch/
83 | *.aps
84 | *.ncb
85 | *.opensdf
86 | *.sdf
87 |
88 | # Visual Studio profiler
89 | *.psess
90 | *.vsp
91 |
92 | # ReSharper is a .NET coding add-in
93 | _ReSharper*
94 |
95 | # Installshield output folder
96 | [Ee]xpress
97 |
98 | # DocProject is a documentation generator add-in
99 | DocProject/buildhelp/
100 | DocProject/Help/*.HxT
101 | DocProject/Help/*.HxC
102 | DocProject/Help/*.hhc
103 | DocProject/Help/*.hhk
104 | DocProject/Help/*.hhp
105 | DocProject/Help/Html2
106 | DocProject/Help/html
107 |
108 | # Click-Once directory
109 | publish
110 |
111 | # Others
112 | [Bb]in
113 | [Oo]bj
114 | sql
115 | TestResults
116 | *.Cache
117 | ClientBin
118 | stylecop.*
119 | ~$*
120 | *.dbmdl
121 | Generated_Code #added for RIA/Silverlight projects
122 |
123 | # Backup & report files from converting an old project file to a newer
124 | # Visual Studio version. Backup files are not needed, because we have git ;-)
125 | _UpgradeReport_Files/
126 | Backup*/
127 | UpgradeLog*.XML
128 |
129 |
130 | ############
131 | ## Windows
132 | ############
133 |
134 | # Windows image file caches
135 | Thumbs.db
136 |
137 | # Folder config file
138 | Desktop.ini
139 |
140 |
141 | #############
142 | ## Python
143 | #############
144 |
145 | *.py[co]
146 |
147 | # Packages
148 | *.egg
149 | *.egg-info
150 | dist
151 | build
152 | eggs
153 | parts
154 | bin
155 | var
156 | sdist
157 | develop-eggs
158 | .installed.cfg
159 |
160 | # Installer logs
161 | pip-log.txt
162 |
163 | # Unit test / coverage reports
164 | .coverage
165 | .tox
166 |
167 | #Translations
168 | *.mo
169 |
170 | #Mr Developer
171 | .mr.developer.cfg
172 |
173 | # Mac crap
174 | .DS_Store
175 |
176 |
177 | #################
178 | ## Excel or Libreoffice
179 | #################
180 |
181 | #backup files
182 | .~lock.*.xls#
183 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Board_Design_Checklist.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Board_Design_Checklist.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Board_Design_Checklist_ESP32 LoRa 1 Channel Gateway_v10.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Board_Design_Checklist_ESP32 LoRa 1 Channel Gateway_v10.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Board_Design_Checklist_ESP32 LoRa 1 Channel Gateway_v10_summary.txt:
--------------------------------------------------------------------------------
1 | 1) Have you verified that the BOM in Sparkle is accurate (also checking for PROD_ID, NAME, VALUE, PREFIX)? [NO]
2 | comment: No, I haven't created a sparkle page for this product yet. It will probably be a clone of the SparkX version.
3 |
4 | 2) Is the I2C address in the schematic? [n/a]
5 | comment: N/A - this is an I2C master
6 |
7 | 3) Is the I2C pin order correct (GND/VCC/SDA/CLK) and did you consider using a Qwiic connector? [YES]
8 | comment: Qwiic connector used
9 |
10 | 4) Is the I2C pull-up resistor isolation jumper present? [NO]
11 | comment: No, this is a master. All downstream devices will have isolation option. Discussed with Nate
12 |
13 | 5) Is the SPI pull-up resistor for Chip Select present? [NO]
14 | comment: No. There could be a CS PU on the RFM_CS net but this board is so jam-packed and that line is not broken out so I'm comfortable leaving it up to the ESP to push/pull that line
15 |
16 | 6) Are active low pins labeled clearly? [NO]
17 | comment: RST is not, but this board is very tight
18 |
19 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/Install_Modules.bat:
--------------------------------------------------------------------------------
1 | IF NOT EXIST C:\Python27 GOTO error
2 |
3 | md C:\Python27\xlrd-0.9.3
4 | xcopy .\xlrd-0.9.3 C:\Python27\xlrd-0.9.3 /s /e /y
5 |
6 | md C:\Python27\xlwt-0.7.5
7 | xcopy .\xlwt-0.7.5 C:\Python27\xlwt-0.7.5 /s /e /y
8 |
9 | md C:\Python27\xlutils-1.7.1
10 | xcopy .\xlutils-1.7.1 C:\Python27\xlutils-1.7.1 /s /e /y
11 |
12 | cd /D C:\Python27\xlrd-0.9.3
13 | C:\Python27\python.exe setup.py install
14 |
15 | cd /D C:\Python27\xlwt-0.7.5
16 | C:\Python27\python.exe setup.py install
17 |
18 | cd /D C:\Python27\xlutils-1.7.1
19 | C:\Python27\python.exe setup.py install
20 |
21 | @echo off
22 | echo.
23 | echo Install complete!
24 | pause
25 | exit /B
26 |
27 | :error
28 | cls
29 | @echo off
30 | echo Error: C:\Python27 folder does not exist, halting.
31 | pause
32 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 1.0
2 | Name: xlrd
3 | Version: 0.9.3
4 | Summary: Library for developers to extract data from Microsoft Excel (tm) spreadsheet files
5 | Home-page: http://www.python-excel.org/
6 | Author: John Machin
7 | Author-email: sjmachin@lexicon.net
8 | License: BSD
9 | Description: Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on any platform. Pure Python (2.6, 2.7, 3.2+). Strong support for Excel dates. Unicode-aware.
10 | Keywords: xls,excel,spreadsheet,workbook
11 | Platform: Any platform -- don't need Windows
12 | Classifier: Development Status :: 5 - Production/Stable
13 | Classifier: Intended Audience :: Developers
14 | Classifier: License :: OSI Approved :: BSD License
15 | Classifier: Programming Language :: Python
16 | Classifier: Programming Language :: Python :: 2
17 | Classifier: Programming Language :: Python :: 3
18 | Classifier: Operating System :: OS Independent
19 | Classifier: Topic :: Database
20 | Classifier: Topic :: Office/Business
21 | Classifier: Topic :: Software Development :: Libraries :: Python Modules
22 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/README.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | The xlrd Module -- README
6 |
7 |
8 |
9 | Python package "xlrd"
10 |
11 | Purpose: Provide a library for developers to use to extract data
12 | from Microsoft Excel (tm) spreadsheet files.
13 | It is not an end-user tool.
14 |
15 | Author: John Machin, Lingfo Pty Ltd (sjmachin@lexicon.net)
16 |
17 | Licence: BSD-style (see licences.py)
18 |
19 | Version of xlrd: 0.7.1 -- 2009-05-31
20 |
21 | Versions of Python supported: 2.6-2.7.
22 |
23 | External modules required:
24 |
25 | - The package itself is pure Python with no dependencies on modules or packages
26 | outside the standard Python distribution.
27 |
28 |
29 | Versions of Excel supported:
30 | 2004, 2003, XP, 2000, 97, 95, 5.0, 4.0, 3.0, 2.1, 2.0.
31 | Support for Excel 2007 .xlsx files scheduled for version 0.7.1.
32 |
33 | Outside the current scope: xlrd will safely and reliably ignore any of these
34 | if present in the file:
35 |
36 |
37 | - Charts, Macros, Pictures, any other embedded object. WARNING: currently
38 | this includes embedded worksheets.
39 |
40 | - VBA modules
41 |
42 | - Formulas (results of formula calculations are extracted, of course).
43 |
44 | - Comments
45 |
46 | - Hyperlinks
47 |
48 | - Autofilters, advanced filters, pivot tables, conditional formatting, data validation
49 |
50 |
51 | Unlikely to be done:
52 |
53 | - Handling password-protected (encrypted) files.
54 |
55 |
56 | Particular emphasis (refer docs for details):
57 |
58 | - Operability across OS, regions, platforms
59 |
60 | - Handling Excel's date problems, including the Windows / Macintosh
61 | four-year differential.
62 |
63 | - Providing access to named constants and named groups of cells (from version 0.6.0)
64 |
65 | - Providing access to "visual" information: font, "number format", background, border,
66 | alignment and protection for cells, height/width etc for rows/columns (from version 0.6.1)
67 |
68 |
69 | Quick start:
70 |
71 | import xlrd
72 | book = xlrd.open_workbook("myfile.xls")
73 | print "The number of worksheets is", book.nsheets
74 | print "Worksheet name(s):", book.sheet_names()
75 | sh = book.sheet_by_index(0)
76 | print sh.name, sh.nrows, sh.ncols
77 | print "Cell D30 is", sh.cell_value(rowx=29, colx=3)
78 | for rx in range(sh.nrows):
79 | print sh.row(rx)
80 | # Refer to docs for more details.
81 | # Feedback on API is welcomed.
82 |
83 |
84 | Another quick start: This will show the first, second and last rows of each
85 | sheet in each file:
86 |
87 |
88 | OS-prompt>python PYDIR/scripts/runxlrd.py 3rows *blah*.xls
89 |
90 | Installation:
91 |
92 | - On Windows: use the installer.
93 |
94 | - Any OS: Unzip the .zip file into a suitable directory,
95 | chdir to that directory, then do "python setup.py install".
96 |
97 | - If PYDIR is your Python installation directory:
98 | the main files are in PYDIR/Lib/site-packages/xlrd
99 | the docs are in the doc subdirectory,
100 | and there's a sample script: PYDIR/Scripts/runxlrd.py
101 |
102 | - If os.sep != "/": make the appropriate adjustments.
103 |
104 |
105 | Download URLs:
106 |
107 | - http://pypi.python.org/pypi/xlrd
108 |
109 | - http://www.lexicon.net/sjmachin/xlrd.htm
110 |
111 |
112 | Acknowledgements:
113 |
114 | - This package started life as a translation from C into Python
115 | of parts of a utility called "xlreader" developed by David Giffin.
116 | "This product includes software developed by David Giffin <david@giffin.org>."
117 |
118 | - OpenOffice.org has truly excellent documentation of the Microsoft Excel file formats
119 | and Compound Document file format, authored by Daniel Rentz. See http://sc.openoffice.org
120 |
121 | - U+5F20 U+654F: over a decade of inspiration, support, and interesting decoding opportunities.
122 |
123 | - Ksenia Marasanova: sample Macintosh and non-Latin1 files, alpha testing
124 |
125 | - Backporting to Python 2.1 was partially funded by Journyx - provider of
126 | timesheet and project accounting solutions (http://journyx.com/).
127 |
128 | - Provision of formatting information in version 0.6.1 was funded by Simplistix Ltd
129 | (http://www.simplistix.co.uk/)
130 |
131 | - << a growing list of names; see HISTORY.html >>: feedback, testing, test files, ...
132 |
133 |
134 |
135 |
136 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from os import path
4 | import sys
5 | python_version = sys.version_info[:2]
6 |
7 | if python_version < (2, 6):
8 | raise Exception("This version of xlrd requires Python 2.6 or above. "
9 | "For older versions of Python, you can use the 0.8 series.")
10 |
11 | av = sys.argv
12 | if len(av) > 1 and av[1].lower() == "--egg":
13 | del av[1]
14 | from setuptools import setup
15 | else:
16 | from distutils.core import setup
17 |
18 | from xlrd.info import __VERSION__
19 |
20 | setup(
21 | name = 'xlrd',
22 | version = __VERSION__,
23 | author = 'John Machin',
24 | author_email = 'sjmachin@lexicon.net',
25 | url = 'http://www.python-excel.org/',
26 | packages = ['xlrd'],
27 | scripts = [
28 | 'scripts/runxlrd.py',
29 | ],
30 | package_data={
31 | 'xlrd': [
32 | 'doc/*.htm*',
33 | # 'doc/*.txt',
34 | 'examples/*.*',
35 | ],
36 |
37 | },
38 | description = 'Library for developers to extract data from Microsoft Excel (tm) spreadsheet files',
39 | long_description = \
40 | "Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on any platform. " \
41 | "Pure Python (2.6, 2.7, 3.2+). Strong support for Excel dates. Unicode-aware.",
42 | platforms = ["Any platform -- don't need Windows"],
43 | license = 'BSD',
44 | keywords = ['xls', 'excel', 'spreadsheet', 'workbook'],
45 | classifiers = [
46 | 'Development Status :: 5 - Production/Stable',
47 | 'Intended Audience :: Developers',
48 | 'License :: OSI Approved :: BSD License',
49 | 'Programming Language :: Python',
50 | 'Programming Language :: Python :: 2',
51 | 'Programming Language :: Python :: 3',
52 | 'Operating System :: OS Independent',
53 | 'Topic :: Database',
54 | 'Topic :: Office/Business',
55 | 'Topic :: Software Development :: Libraries :: Python Modules',
56 | ],
57 | )
58 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/Formate.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/Formate.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/__init__.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/base.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | def from_this_dir(filename):
4 | return os.path.join(os.path.dirname(os.path.abspath(__file__)), filename)
5 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/formula_test_names.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/formula_test_names.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/formula_test_sjmachin.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/formula_test_sjmachin.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/issue20.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/issue20.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/merged_cells.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/merged_cells.xlsx
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/picture_in_cell.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/picture_in_cell.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/profiles.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/profiles.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/ragged.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/ragged.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/reveng1.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/reveng1.xlsx
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_biffh.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import sys
3 |
4 | if sys.version_info[0] >= 3:
5 | from io import StringIO
6 | else:
7 | # Python 2.6+ does have the io module, but io.StringIO is strict about
8 | # unicode, which won't work for our test.
9 | from StringIO import StringIO
10 |
11 | from xlrd import biffh
12 |
13 | class TestHexDump(unittest.TestCase):
14 | def test_hex_char_dump(self):
15 | sio = StringIO()
16 | biffh.hex_char_dump(b"abc\0e\01", 0, 6, fout=sio)
17 | s = sio.getvalue()
18 | assert "61 62 63 00 65 01" in s, s
19 | assert "abc~e?" in s, s
20 |
21 | if __name__=='__main__':
22 | unittest.main()
23 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_cell.py:
--------------------------------------------------------------------------------
1 | # Portions Copyright (C) 2010, Manfred Moitzi under a BSD licence
2 |
3 | import sys
4 | import os
5 | import unittest
6 |
7 | import xlrd
8 |
9 | from .base import from_this_dir
10 |
11 | class TestCell(unittest.TestCase):
12 |
13 | def setUp(self):
14 | self.book = xlrd.open_workbook(from_this_dir('profiles.xls'), formatting_info=True)
15 | self.sheet = self.book.sheet_by_name('PROFILEDEF')
16 |
17 | def test_string_cell(self):
18 | cell = self.sheet.cell(0, 0)
19 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_TEXT)
20 | self.assertEqual(cell.value, 'PROFIL')
21 | self.assertTrue(cell.xf_index > 0)
22 |
23 | def test_number_cell(self):
24 | cell = self.sheet.cell(1, 1)
25 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_NUMBER)
26 | self.assertEqual(cell.value, 100)
27 | self.assertTrue(cell.xf_index > 0)
28 |
29 | def test_calculated_cell(self):
30 | sheet2 = self.book.sheet_by_name('PROFILELEVELS')
31 | cell = sheet2.cell(1, 3)
32 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_NUMBER)
33 | self.assertAlmostEqual(cell.value, 265.131, places=3)
34 | self.assertTrue(cell.xf_index > 0)
35 |
36 | def test_merged_cells(self):
37 | book = xlrd.open_workbook(from_this_dir('xf_class.xls'), formatting_info=True)
38 | sheet3 = book.sheet_by_name('table2')
39 | row_lo, row_hi, col_lo, col_hi = sheet3.merged_cells[0]
40 | self.assertEqual(sheet3.cell(row_lo, col_lo).value, 'MERGED')
41 | self.assertEqual((row_lo, row_hi, col_lo, col_hi), (3, 7, 2, 5))
42 |
43 | def test_merged_cells_xlsx(self):
44 | book = xlrd.open_workbook(from_this_dir('merged_cells.xlsx'))
45 |
46 | sheet1 = book.sheet_by_name('Sheet1')
47 | expected = []
48 | got = sheet1.merged_cells
49 | self.assertEqual(expected, got)
50 |
51 | sheet2 = book.sheet_by_name('Sheet2')
52 | expected = [(0, 1, 0, 2)]
53 | got = sheet2.merged_cells
54 | self.assertEqual(expected, got)
55 |
56 | sheet3 = book.sheet_by_name('Sheet3')
57 | expected = [(0, 1, 0, 2), (0, 1, 2, 4), (1, 4, 0, 2), (1, 9, 2, 4)]
58 | got = sheet3.merged_cells
59 | self.assertEqual(expected, got)
60 |
61 | sheet4 = book.sheet_by_name('Sheet4')
62 | expected = [(0, 1, 0, 2), (2, 20, 0, 1), (1, 6, 2, 5)]
63 | got = sheet4.merged_cells
64 | self.assertEqual(expected, got)
65 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_comments_excel.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_comments_excel.xlsx
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_comments_gdocs.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_comments_gdocs.xlsx
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_formats.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Portions Copyright (C) 2010, Manfred Moitzi under a BSD licence
3 |
4 | from unittest import TestCase
5 | import sys
6 | import os
7 |
8 | import xlrd
9 |
10 | if sys.version_info[0] >= 3:
11 | def u(s): return s
12 | else:
13 | def u(s):
14 | return s.decode('utf-8')
15 |
16 | from .base import from_this_dir
17 |
18 | class TestCellContent(TestCase):
19 |
20 | def setUp(self):
21 | self.book = xlrd.open_workbook(from_this_dir('Formate.xls'), formatting_info=True)
22 | self.sheet = self.book.sheet_by_name(u('Blätt1'))
23 |
24 | def test_text_cells(self):
25 | for row, name in enumerate([u('Huber'), u('Äcker'), u('Öcker')]):
26 | cell = self.sheet.cell(row, 0)
27 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_TEXT)
28 | self.assertEqual(cell.value, name)
29 | self.assertTrue(cell.xf_index > 0)
30 |
31 | def test_date_cells(self):
32 | # see also 'Dates in Excel spreadsheets' in the documentation
33 | # convert: xldate_as_tuple(float, book.datemode) -> (year, month,
34 | # day, hour, minutes, seconds)
35 | for row, date in [(0, 2741.), (1, 38406.), (2, 32266.)]:
36 | cell = self.sheet.cell(row, 1)
37 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_DATE)
38 | self.assertEqual(cell.value, date)
39 | self.assertTrue(cell.xf_index > 0)
40 |
41 | def test_time_cells(self):
42 | # see also 'Dates in Excel spreadsheets' in the documentation
43 | # convert: xldate_as_tuple(float, book.datemode) -> (year, month,
44 | # day, hour, minutes, seconds)
45 | for row, time in [(3, .273611), (4, .538889), (5, .741123)]:
46 | cell = self.sheet.cell(row, 1)
47 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_DATE)
48 | self.assertAlmostEqual(cell.value, time, places=6)
49 | self.assertTrue(cell.xf_index > 0)
50 |
51 | def test_percent_cells(self):
52 | for row, time in [(6, .974), (7, .124)]:
53 | cell = self.sheet.cell(row, 1)
54 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_NUMBER)
55 | self.assertAlmostEqual(cell.value, time, places=3)
56 | self.assertTrue(cell.xf_index > 0)
57 |
58 | def test_currency_cells(self):
59 | for row, time in [(8, 1000.30), (9, 1.20)]:
60 | cell = self.sheet.cell(row, 1)
61 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_NUMBER)
62 | self.assertAlmostEqual(cell.value, time, places=2)
63 | self.assertTrue(cell.xf_index > 0)
64 |
65 | def test_get_from_merged_cell(self):
66 | sheet = self.book.sheet_by_name(u('ÖÄÜ'))
67 | cell = sheet.cell(2, 2)
68 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_TEXT)
69 | self.assertEqual(cell.value, 'MERGED CELLS')
70 | self.assertTrue(cell.xf_index > 0)
71 |
72 | def test_ignore_diagram(self):
73 | sheet = self.book.sheet_by_name(u('Blätt3'))
74 | cell = sheet.cell(0, 0)
75 | self.assertEqual(cell.ctype, xlrd.book.XL_CELL_NUMBER)
76 | self.assertEqual(cell.value, 100)
77 | self.assertTrue(cell.xf_index > 0)
78 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_formulas.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Portions Copyright (C) 2010, Manfred Moitzi under a BSD licence
3 |
4 | from unittest import TestCase
5 | import os
6 | import sys
7 |
8 | import xlrd
9 |
10 | from .base import from_this_dir
11 |
12 | try:
13 | ascii
14 | except NameError:
15 | # For Python 2
16 | def ascii(s):
17 | a = repr(s)
18 | if a.startswith(('u"', "u'")):
19 | a = a[1:]
20 | return a
21 |
22 | class TestFormulas(TestCase):
23 |
24 | def setUp(self):
25 | book = xlrd.open_workbook(from_this_dir('formula_test_sjmachin.xls'))
26 | self.sheet = book.sheet_by_index(0)
27 |
28 | def get_value(self, col, row):
29 | return ascii(self.sheet.col_values(col)[row])
30 |
31 | def test_cell_B2(self):
32 | self.assertEqual(
33 | self.get_value(1, 1),
34 | r"'\u041c\u041e\u0421\u041a\u0412\u0410 \u041c\u043e\u0441\u043a\u0432\u0430'"
35 | )
36 |
37 | def test_cell_B3(self):
38 | self.assertEqual(self.get_value(1, 2), '0.14285714285714285')
39 |
40 | def test_cell_B4(self):
41 | self.assertEqual(self.get_value(1, 3), "'ABCDEF'")
42 |
43 | def test_cell_B5(self):
44 | self.assertEqual(self.get_value(1, 4), "''")
45 |
46 | def test_cell_B6(self):
47 | self.assertEqual(self.get_value(1, 5), '1')
48 |
49 | def test_cell_B7(self):
50 | self.assertEqual(self.get_value(1, 6), '7')
51 |
52 | def test_cell_B8(self):
53 | self.assertEqual(
54 | self.get_value(1, 7),
55 | r"'\u041c\u041e\u0421\u041a\u0412\u0410 \u041c\u043e\u0441\u043a\u0432\u0430'"
56 | )
57 |
58 | class TestNameFormulas(TestCase):
59 |
60 | def setUp(self):
61 | book = xlrd.open_workbook(from_this_dir('formula_test_names.xls'))
62 | self.sheet = book.sheet_by_index(0)
63 |
64 | def get_value(self, col, row):
65 | return ascii(self.sheet.col_values(col)[row])
66 |
67 | def test_unaryop(self):
68 | self.assertEqual(self.get_value(1, 1), '-7.0')
69 |
70 | def test_attrsum(self):
71 | self.assertEqual(self.get_value(1, 2), '4.0')
72 |
73 | def test_func(self):
74 | self.assertEqual(self.get_value(1, 3), '6.0')
75 |
76 | def test_func_var_args(self):
77 | self.assertEqual(self.get_value(1, 4), '3.0')
78 |
79 | def test_if(self):
80 | self.assertEqual(self.get_value(1, 5), "'b'")
81 |
82 | def test_choose(self):
83 | self.assertEqual(self.get_value(1, 6), "'C'")
84 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_open_workbook.py:
--------------------------------------------------------------------------------
1 | from unittest import TestCase
2 |
3 | import os
4 |
5 | from xlrd import open_workbook
6 |
7 | from .base import from_this_dir
8 |
9 | class TestOpen(TestCase):
10 | # test different uses of open_workbook
11 |
12 | def test_names_demo(self):
13 | # For now, we just check this doesn't raise an error.
14 | open_workbook(
15 | from_this_dir(os.path.join('..','xlrd','examples','namesdemo.xls'))
16 | )
17 |
18 | def test_ragged_rows_tidied_with_formatting(self):
19 | # For now, we just check this doesn't raise an error.
20 | open_workbook(from_this_dir('issue20.xls'),
21 | formatting_info=True)
22 |
23 | def test_BYTES_X00(self):
24 | # For now, we just check this doesn't raise an error.
25 | open_workbook(from_this_dir('picture_in_cell.xls'),
26 | formatting_info=True)
27 |
28 | def test_xlsx_simple(self):
29 | # For now, we just check this doesn't raise an error.
30 | open_workbook(from_this_dir('text_bar.xlsx'))
31 | # we should make assertions here that data has been
32 | # correctly processed.
33 |
34 | def test_xlsx(self):
35 | # For now, we just check this doesn't raise an error.
36 | open_workbook(from_this_dir('reveng1.xlsx'))
37 | # we should make assertions here that data has been
38 | # correctly processed.
39 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_sheet.py:
--------------------------------------------------------------------------------
1 | # Portions Copyright (C) 2010, Manfred Moitzi under a BSD licence
2 |
3 | from unittest import TestCase
4 |
5 | import sys
6 | import os
7 | import unittest
8 |
9 | import xlrd
10 |
11 | from .base import from_this_dir
12 |
13 | SHEETINDEX = 0
14 | NROWS = 15
15 | NCOLS = 13
16 |
17 | ROW_ERR = NROWS + 10
18 | COL_ERR = NCOLS + 10
19 |
20 | class TestSheet(TestCase):
21 |
22 | sheetnames = ['PROFILEDEF', 'AXISDEF', 'TRAVERSALCHAINAGE',
23 | 'AXISDATUMLEVELS', 'PROFILELEVELS']
24 |
25 | def setUp(self):
26 | self.book = xlrd.open_workbook(from_this_dir('profiles.xls'), formatting_info=True)
27 |
28 | def check_sheet_function(self, function):
29 | self.assertTrue(function(0, 0))
30 | self.assertTrue(function(NROWS-1, NCOLS-1))
31 |
32 | def check_sheet_function_index_error(self, function):
33 | self.assertRaises(IndexError, function, ROW_ERR, 0)
34 | self.assertRaises(IndexError, function, 0, COL_ERR)
35 |
36 | def check_col_slice(self, col_function):
37 | _slice = col_function(0, 2, NROWS-2)
38 | self.assertEqual(len(_slice), NROWS-4)
39 |
40 | def check_row_slice(self, row_function):
41 | _slice = row_function(0, 2, NCOLS-2)
42 | self.assertEqual(len(_slice), NCOLS-4)
43 |
44 | def test_nrows(self):
45 | sheet = self.book.sheet_by_index(SHEETINDEX)
46 | self.assertEqual(sheet.nrows, NROWS)
47 |
48 | def test_ncols(self):
49 | sheet = self.book.sheet_by_index(SHEETINDEX)
50 | self.assertEqual(sheet.ncols, NCOLS)
51 |
52 | def test_cell(self):
53 | sheet = self.book.sheet_by_index(SHEETINDEX)
54 | self.assertNotEqual(xlrd.empty_cell, sheet.cell(0, 0))
55 | self.assertNotEqual(xlrd.empty_cell, sheet.cell(NROWS-1, NCOLS-1))
56 |
57 | def test_cell_error(self):
58 | sheet = self.book.sheet_by_index(SHEETINDEX)
59 | self.check_sheet_function_index_error(sheet.cell)
60 |
61 | def test_cell_type(self):
62 | sheet = self.book.sheet_by_index(SHEETINDEX)
63 | self.check_sheet_function(sheet.cell_type)
64 |
65 | def test_cell_type_error(self):
66 | sheet = self.book.sheet_by_index(SHEETINDEX)
67 | self.check_sheet_function_index_error(sheet.cell_type)
68 |
69 | def test_cell_value(self):
70 | sheet = self.book.sheet_by_index(SHEETINDEX)
71 | self.check_sheet_function(sheet.cell_value)
72 |
73 | def test_cell_value_error(self):
74 | sheet = self.book.sheet_by_index(SHEETINDEX)
75 | self.check_sheet_function_index_error(sheet.cell_value)
76 |
77 | def test_cell_xf_index(self):
78 | sheet = self.book.sheet_by_index(SHEETINDEX)
79 | self.check_sheet_function(sheet.cell_xf_index)
80 |
81 | def test_cell_xf_index_error(self):
82 | sheet = self.book.sheet_by_index(SHEETINDEX)
83 | self.check_sheet_function_index_error(sheet.cell_xf_index)
84 |
85 | def test_col(self):
86 | sheet = self.book.sheet_by_index(SHEETINDEX)
87 | col = sheet.col(0)
88 | self.assertEqual(len(col), NROWS)
89 |
90 | def test_row(self):
91 | sheet = self.book.sheet_by_index(SHEETINDEX)
92 | row = sheet.row(0)
93 | self.assertEqual(len(row), NCOLS)
94 |
95 | def test_col_slice(self):
96 | sheet = self.book.sheet_by_index(SHEETINDEX)
97 | self.check_col_slice(sheet.col_slice)
98 |
99 | def test_col_types(self):
100 | sheet = self.book.sheet_by_index(SHEETINDEX)
101 | self.check_col_slice(sheet.col_types)
102 |
103 | def test_col_values(self):
104 | sheet = self.book.sheet_by_index(SHEETINDEX)
105 | self.check_col_slice(sheet.col_values)
106 |
107 | def test_row_slice(self):
108 | sheet = self.book.sheet_by_index(SHEETINDEX)
109 | self.check_row_slice(sheet.row_slice)
110 |
111 | def test_row_types(self):
112 | sheet = self.book.sheet_by_index(SHEETINDEX)
113 | self.check_row_slice(sheet.col_types)
114 |
115 | def test_row_values(self):
116 | sheet = self.book.sheet_by_index(SHEETINDEX)
117 | self.check_col_slice(sheet.row_values)
118 |
119 | class TestSheetRagged(TestCase):
120 |
121 | def test_read_ragged(self):
122 | book = xlrd.open_workbook(from_this_dir('ragged.xls'), ragged_rows=True)
123 | sheet = book.sheet_by_index(0)
124 | self.assertEqual(sheet.row_len(0), 3)
125 | self.assertEqual(sheet.row_len(1), 2)
126 | self.assertEqual(sheet.row_len(2), 1)
127 | self.assertEqual(sheet.row_len(3), 4)
128 | self.assertEqual(sheet.row_len(4), 4)
129 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_workbook.py:
--------------------------------------------------------------------------------
1 | # Portions Copyright (C) 2010, Manfred Moitzi under a BSD licence
2 |
3 | from unittest import TestCase
4 | import os
5 | import sys
6 |
7 | from xlrd import open_workbook
8 | from xlrd.book import Book
9 | from xlrd.sheet import Sheet
10 |
11 | from .base import from_this_dir
12 |
13 | class TestWorkbook(TestCase):
14 |
15 | sheetnames = ['PROFILEDEF', 'AXISDEF', 'TRAVERSALCHAINAGE',
16 | 'AXISDATUMLEVELS', 'PROFILELEVELS']
17 |
18 | def setUp(self):
19 | self.book = open_workbook(from_this_dir('profiles.xls'))
20 |
21 | def test_open_workbook(self):
22 | self.assertTrue(isinstance(self.book, Book))
23 |
24 | def test_nsheets(self):
25 | self.assertEqual(self.book.nsheets, 5)
26 |
27 | def test_sheet_by_name(self):
28 | for name in self.sheetnames:
29 | sheet = self.book.sheet_by_name(name)
30 | self.assertTrue(isinstance(sheet, Sheet))
31 | self.assertEqual(name, sheet.name)
32 |
33 | def test_sheet_by_index(self):
34 | for index in range(5):
35 | sheet = self.book.sheet_by_index(index)
36 | self.assertTrue(isinstance(sheet, Sheet))
37 | self.assertEqual(sheet.name, self.sheetnames[index])
38 |
39 | def test_sheets(self):
40 | sheets = self.book.sheets()
41 | for index, sheet in enumerate(sheets):
42 | self.assertTrue(isinstance(sheet, Sheet))
43 | self.assertEqual(sheet.name, self.sheetnames[index])
44 |
45 | def test_sheet_names(self):
46 | self.assertEqual(self.sheetnames, self.book.sheet_names())
47 |
48 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_xldate.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # Author: mozman
3 | # Purpose: test xldate.py
4 | # Created: 04.12.2010
5 | # Copyright (C) 2010, Manfred Moitzi
6 | # License: BSD licence
7 |
8 | import sys
9 | import unittest
10 |
11 | from xlrd import xldate
12 |
13 | DATEMODE = 0 # 1900-based
14 |
15 | class TestXLDate(unittest.TestCase):
16 | def test_date_as_tuple(self):
17 | date = xldate.xldate_as_tuple(2741., DATEMODE)
18 | self.assertEqual(date, (1907, 7, 3, 0, 0, 0))
19 | date = xldate.xldate_as_tuple(38406., DATEMODE)
20 | self.assertEqual(date, (2005, 2, 23, 0, 0, 0))
21 | date = xldate.xldate_as_tuple(32266., DATEMODE)
22 | self.assertEqual(date, (1988, 5, 3, 0, 0, 0))
23 |
24 | def test_time_as_tuple(self):
25 | time = xldate.xldate_as_tuple(.273611, DATEMODE)
26 | self.assertEqual(time, (0, 0, 0, 6, 34, 0))
27 | time = xldate.xldate_as_tuple(.538889, DATEMODE)
28 | self.assertEqual(time, (0, 0, 0, 12, 56, 0))
29 | time = xldate.xldate_as_tuple(.741123, DATEMODE)
30 | self.assertEqual(time, (0, 0, 0, 17, 47, 13))
31 |
32 | def test_xldate_from_date_tuple(self):
33 | date = xldate.xldate_from_date_tuple( (1907, 7, 3), DATEMODE )
34 | self.assertAlmostEqual(date, 2741.)
35 | date = xldate.xldate_from_date_tuple( (2005, 2, 23), DATEMODE )
36 | self.assertAlmostEqual(date, 38406.)
37 | date = xldate.xldate_from_date_tuple( (1988, 5, 3), DATEMODE )
38 | self.assertAlmostEqual(date, 32266.)
39 |
40 | def test_xldate_from_time_tuple(self):
41 | time = xldate.xldate_from_time_tuple( (6, 34, 0) )
42 | self.assertAlmostEqual(time, .273611, places=6)
43 | time = xldate.xldate_from_time_tuple( (12, 56, 0) )
44 | self.assertAlmostEqual(time, .538889, places=6)
45 | time = xldate.xldate_from_time_tuple( (17, 47, 13) )
46 | self.assertAlmostEqual(time, .741123, places=6)
47 |
48 | def test_xldate_from_datetime_tuple(self):
49 | date = xldate.xldate_from_datetime_tuple( (1907, 7, 3, 6, 34, 0), DATEMODE)
50 | self.assertAlmostEqual(date, 2741.273611, places=6)
51 | date = xldate.xldate_from_datetime_tuple( (2005, 2, 23, 12, 56, 0), DATEMODE)
52 | self.assertAlmostEqual(date, 38406.538889, places=6)
53 | date = xldate.xldate_from_datetime_tuple( (1988, 5, 3, 17, 47, 13), DATEMODE)
54 | self.assertAlmostEqual(date, 32266.741123, places=6)
55 |
56 | if __name__=='__main__':
57 | unittest.main()
58 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/test_xlsx_comments.py:
--------------------------------------------------------------------------------
1 | from unittest import TestCase
2 |
3 | import os
4 |
5 | from xlrd import open_workbook
6 |
7 | from .base import from_this_dir
8 |
9 | class TestXlsxComments(TestCase):
10 |
11 | def test_excel_comments(self):
12 | book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
13 | sheet = book.sheet_by_index(0)
14 |
15 | note_map = sheet.cell_note_map
16 | self.assertEqual(len(note_map), 1)
17 | self.assertEqual(note_map[(0, 1)].text, 'hello')
18 |
19 | def test_excel_comments_multiline(self):
20 | book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
21 | sheet = book.sheet_by_index(1)
22 |
23 | note_map = sheet.cell_note_map
24 | self.assertEqual(note_map[(1, 2)].text, '1st line\n2nd line')
25 |
26 | def test_excel_comments_two_t_elements(self):
27 | book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
28 | sheet = book.sheet_by_index(2)
29 |
30 | note_map = sheet.cell_note_map
31 | self.assertEqual(note_map[(0, 0)].text, 'Author:\nTwo t elements')
32 |
33 | def test_excel_comments_no_t_elements(self):
34 | book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
35 | sheet = book.sheet_by_index(3)
36 |
37 | note_map = sheet.cell_note_map
38 | self.assertEqual(note_map[(0,0)].text, '')
39 |
40 | def test_gdocs_comments(self):
41 | book = open_workbook(from_this_dir('test_comments_gdocs.xlsx'))
42 | sheet = book.sheet_by_index(0)
43 |
44 | note_map = sheet.cell_note_map
45 | self.assertEqual(len(note_map), 1)
46 | self.assertEqual(note_map[(0, 1)].text, 'Just a test')
47 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/text_bar.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/text_bar.xlsx
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/xf_class.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/tests/xf_class.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/biffh.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/biffh.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/formatting.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/formatting.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/formula.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/formula.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/info.py:
--------------------------------------------------------------------------------
1 | __VERSION__ = "0.9.3"
2 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/licences.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/licences.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/sheet.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/sheet.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/timemachine.py:
--------------------------------------------------------------------------------
1 | ##
2 | # Copyright (c) 2006-2012 Stephen John Machin, Lingfo Pty Ltd
3 | # This module is part of the xlrd package, which is released under a BSD-style licence.
4 | ##
5 |
6 | # timemachine.py -- adaptation for single codebase.
7 | # Currently supported: 2.6 to 2.7, 3.2+
8 | # usage: from timemachine import *
9 |
10 | from __future__ import print_function
11 | import sys
12 |
13 | python_version = sys.version_info[:2] # e.g. version 2.6 -> (2, 6)
14 |
15 | if python_version >= (3, 0):
16 | # Python 3
17 | BYTES_LITERAL = lambda x: x.encode('latin1')
18 | UNICODE_LITERAL = lambda x: x
19 | BYTES_ORD = lambda byte: byte
20 | from io import BytesIO as BYTES_IO
21 | def fprintf(f, fmt, *vargs):
22 | fmt = fmt.replace("%r", "%a")
23 | if fmt.endswith('\n'):
24 | print(fmt[:-1] % vargs, file=f)
25 | else:
26 | print(fmt % vargs, end=' ', file=f)
27 | EXCEL_TEXT_TYPES = (str, bytes, bytearray) # xlwt: isinstance(obj, EXCEL_TEXT_TYPES)
28 | REPR = ascii
29 | xrange = range
30 | unicode = lambda b, enc: b.decode(enc)
31 | ensure_unicode = lambda s: s
32 | unichr = chr
33 | else:
34 | # Python 2
35 | BYTES_LITERAL = lambda x: x
36 | UNICODE_LITERAL = lambda x: x.decode('latin1')
37 | BYTES_ORD = ord
38 | from cStringIO import StringIO as BYTES_IO
39 | def fprintf(f, fmt, *vargs):
40 | if fmt.endswith('\n'):
41 | print(fmt[:-1] % vargs, file=f)
42 | else:
43 | print(fmt % vargs, end=' ', file=f)
44 | try:
45 | EXCEL_TEXT_TYPES = basestring # xlwt: isinstance(obj, EXCEL_TEXT_TYPES)
46 | except NameError:
47 | EXCEL_TEXT_TYPES = (str, unicode)
48 | REPR = repr
49 | xrange = xrange
50 | # following used only to overcome 2.x ElementTree gimmick which
51 | # returns text as `str` if it's ascii, otherwise `unicode`
52 | ensure_unicode = unicode # used only in xlsx.py
53 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/xldate.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlrd-0.9.3/xlrd/xldate.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/._bootstrap.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/._bootstrap.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/.gitignore:
--------------------------------------------------------------------------------
1 | /.installed.cfg
2 | /bin/
3 | /develop-eggs
4 | /dist
5 | /docs/_build
6 | /eggs
7 | /*.egg-info/
8 | /parts/
9 | *.pyc
10 | /.coverage
11 | /*.xml
12 | /.tox
13 | /htmlcov
14 | /build
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 1.0
2 | Name: xlutils
3 | Version: 1.7.1
4 | Summary: Utilities for working with Excel files that require both xlrd and xlwt
5 | Home-page: http://www.python-excel.org
6 | Author: Chris Withers
7 | Author-email: chris@simplistix.co.uk
8 | License: MIT
9 | Description: =======
10 | xlutils
11 | =======
12 |
13 | This package provides a collection of utilities for working with Excel
14 | files. Since these utilities may require either or both of the xlrd
15 | and xlwt packages, they are collected together here, separate from either
16 | package.
17 |
18 | Currently available are:
19 |
20 | **xlutils.copy**
21 | Tools for copying xlrd.Book objects to xlwt.Workbook objects.
22 |
23 | **xlutils.display**
24 | Utility functions for displaying information about xlrd-related
25 | objects in a user-friendly and safe fashion.
26 |
27 | **xlutils.filter**
28 | A mini framework for splitting and filtering Excel files into new
29 | Excel files.
30 |
31 | **xlutils.margins**
32 | Tools for finding how much of an Excel file contains useful data.
33 |
34 | **xlutils.save**
35 | Tools for serializing xlrd.Book objects back to Excel files.
36 |
37 | **xlutils.styles**
38 | Tools for working with formatting information expressed in styles.
39 |
40 | Keywords: excel xls xlrd xlwt
41 | Platform: UNKNOWN
42 | Classifier: Development Status :: 6 - Mature
43 | Classifier: Intended Audience :: Developers
44 | Classifier: License :: OSI Approved :: MIT License
45 | Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
46 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/README.txt:
--------------------------------------------------------------------------------
1 | =======
2 | xlutils
3 | =======
4 |
5 | For full documentation please see:
6 | http://www.simplistix.co.uk/software/python/xlutils
7 |
8 | If working offline, please consult the documentation source in the
9 | `docs` directory.
10 |
11 | Licensing
12 | =========
13 |
14 | Copyright (c) 2008-2012 Simplistix Ltd
15 | See docs/license.txt for details.
16 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/bootstrap.py:
--------------------------------------------------------------------------------
1 | ##############################################################################
2 | #
3 | # Copyright (c) 2006 Zope Foundation and Contributors.
4 | # All Rights Reserved.
5 | #
6 | # This software is subject to the provisions of the Zope Public License,
7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11 | # FOR A PARTICULAR PURPOSE.
12 | #
13 | ##############################################################################
14 | """Bootstrap a buildout-based project
15 |
16 | Simply run this script in a directory containing a buildout.cfg.
17 | The script accepts buildout command-line options, so you can
18 | use the -c option to specify an alternate configuration file.
19 | """
20 |
21 | import os, shutil, sys, tempfile
22 | from optparse import OptionParser
23 |
24 | tmpeggs = tempfile.mkdtemp()
25 |
26 | usage = '''\
27 | [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
28 |
29 | Bootstraps a buildout-based project.
30 |
31 | Simply run this script in a directory containing a buildout.cfg, using the
32 | Python that you want bin/buildout to use.
33 |
34 | Note that by using --setup-source and --download-base to point to
35 | local resources, you can keep this script from going over the network.
36 | '''
37 |
38 | parser = OptionParser(usage=usage)
39 | parser.add_option("-v", "--version", help="use a specific zc.buildout version")
40 |
41 | parser.add_option("-t", "--accept-buildout-test-releases",
42 | dest='accept_buildout_test_releases',
43 | action="store_true", default=False,
44 | help=("Normally, if you do not specify a --version, the "
45 | "bootstrap script and buildout gets the newest "
46 | "*final* versions of zc.buildout and its recipes and "
47 | "extensions for you. If you use this flag, "
48 | "bootstrap and buildout will get the newest releases "
49 | "even if they are alphas or betas."))
50 | parser.add_option("-c", "--config-file",
51 | help=("Specify the path to the buildout configuration "
52 | "file to be used."))
53 | parser.add_option("-f", "--find-links",
54 | help=("Specify a URL to search for buildout releases"))
55 |
56 |
57 | options, args = parser.parse_args()
58 |
59 | ######################################################################
60 | # load/install distribute
61 |
62 | to_reload = False
63 | try:
64 | import pkg_resources, setuptools
65 | if not hasattr(pkg_resources, '_distribute'):
66 | to_reload = True
67 | raise ImportError
68 | except ImportError:
69 | ez = {}
70 |
71 | try:
72 | from urllib.request import urlopen
73 | except ImportError:
74 | from urllib2 import urlopen
75 |
76 | exec(urlopen('http://python-distribute.org/distribute_setup.py').read(), ez)
77 | setup_args = dict(to_dir=tmpeggs, download_delay=0, no_fake=True)
78 | ez['use_setuptools'](**setup_args)
79 |
80 | if to_reload:
81 | reload(pkg_resources)
82 | import pkg_resources
83 | # This does not (always?) update the default working set. We will
84 | # do it.
85 | for path in sys.path:
86 | if path not in pkg_resources.working_set.entries:
87 | pkg_resources.working_set.add_entry(path)
88 |
89 | ######################################################################
90 | # Install buildout
91 |
92 | ws = pkg_resources.working_set
93 |
94 | cmd = [sys.executable, '-c',
95 | 'from setuptools.command.easy_install import main; main()',
96 | '-mZqNxd', tmpeggs]
97 |
98 | find_links = os.environ.get(
99 | 'bootstrap-testing-find-links',
100 | options.find_links or
101 | ('http://downloads.buildout.org/'
102 | if options.accept_buildout_test_releases else None)
103 | )
104 | if find_links:
105 | cmd.extend(['-f', find_links])
106 |
107 | distribute_path = ws.find(
108 | pkg_resources.Requirement.parse('distribute')).location
109 |
110 | requirement = 'zc.buildout'
111 | version = options.version
112 | if version is None and not options.accept_buildout_test_releases:
113 | # Figure out the most recent final version of zc.buildout.
114 | import setuptools.package_index
115 | _final_parts = '*final-', '*final'
116 | def _final_version(parsed_version):
117 | for part in parsed_version:
118 | if (part[:1] == '*') and (part not in _final_parts):
119 | return False
120 | return True
121 | index = setuptools.package_index.PackageIndex(
122 | search_path=[distribute_path])
123 | if find_links:
124 | index.add_find_links((find_links,))
125 | req = pkg_resources.Requirement.parse(requirement)
126 | if index.obtain(req) is not None:
127 | best = []
128 | bestv = None
129 | for dist in index[req.project_name]:
130 | distv = dist.parsed_version
131 | if _final_version(distv):
132 | if bestv is None or distv > bestv:
133 | best = [dist]
134 | bestv = distv
135 | elif distv == bestv:
136 | best.append(dist)
137 | if best:
138 | best.sort()
139 | version = best[-1].version
140 | if version:
141 | requirement = '=='.join((requirement, version))
142 | cmd.append(requirement)
143 |
144 | import subprocess
145 | if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=distribute_path)) != 0:
146 | raise Exception(
147 | "Failed to execute command:\n%s",
148 | repr(cmd)[1:-1])
149 |
150 | ######################################################################
151 | # Import and run buildout
152 |
153 | ws.add_entry(tmpeggs)
154 | ws.require(requirement)
155 | import zc.buildout.buildout
156 |
157 | if not [a for a in args if '=' not in a]:
158 | args.append('bootstrap')
159 |
160 | # if -c was provided, we push it back into args for buildout' main function
161 | if options.config_file is not None:
162 | args[0:0] = ['-c', options.config_file]
163 |
164 | zc.buildout.buildout.main(args)
165 | shutil.rmtree(tmpeggs)
166 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/buildout.cfg:
--------------------------------------------------------------------------------
1 | [buildout]
2 | develop = . ../xlrd ../xlwt
3 | parts = test py docs
4 |
5 | [py]
6 | recipe = zc.recipe.egg
7 | eggs = xlutils[test]
8 | interpreter = py
9 |
10 | [test]
11 | recipe = zc.recipe.testrunner
12 | eggs =
13 | xlutils [test]
14 |
15 | [docs]
16 | recipe = zc.recipe.egg
17 | eggs =
18 | xlutils[test]
19 | sphinx
20 | sphinx-pypi-upload
21 | zc.rst2
22 | pkginfo
23 | setuptools-git
24 | interpreter = docpy
25 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = ../bin/sphinx-build
7 | PAPER =
8 |
9 | # Internal variables.
10 | PAPEROPT_a4 = -D latex_paper_size=a4
11 | PAPEROPT_letter = -D latex_paper_size=letter
12 | ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
13 |
14 | .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
15 |
16 | help:
17 | @echo "Please use \`make ' where is one of"
18 | @echo " html to make standalone HTML files"
19 | @echo " dirhtml to make HTML files named index.html in directories"
20 | @echo " pickle to make pickle files"
21 | @echo " json to make JSON files"
22 | @echo " htmlhelp to make HTML files and a HTML help project"
23 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
24 | @echo " changes to make an overview of all changed/added/deprecated items"
25 | @echo " linkcheck to check all external links for integrity"
26 | @echo " doctest to run all doctests embedded in the documentation (if enabled)"
27 |
28 | clean:
29 | -rm -rf _build/*
30 |
31 | html:
32 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
33 | @echo
34 | @echo "Build finished. The HTML pages are in _build/html."
35 |
36 | dirhtml:
37 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
38 | @echo
39 | @echo "Build finished. The HTML pages are in _build/dirhtml."
40 |
41 | pickle:
42 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
43 | @echo
44 | @echo "Build finished; now you can process the pickle files."
45 |
46 | json:
47 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
48 | @echo
49 | @echo "Build finished; now you can process the JSON files."
50 |
51 | htmlhelp:
52 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
53 | @echo
54 | @echo "Build finished; now you can run HTML Help Workshop with the" \
55 | ".hhp project file in _build/htmlhelp."
56 |
57 | latex:
58 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
59 | @echo
60 | @echo "Build finished; the LaTeX files are in _build/latex."
61 | @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
62 | "run these through (pdf)latex."
63 |
64 | changes:
65 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
66 | @echo
67 | @echo "The overview file is in _build/changes."
68 |
69 | linkcheck:
70 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
71 | @echo
72 | @echo "Link check complete; look for any errors in the above output " \
73 | "or in _build/linkcheck/output.txt."
74 |
75 | doctest:
76 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
77 | @echo "Testing of doctests in the sources finished, look at the " \
78 | "results in _build/doctest/output.txt."
79 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/changes.txt:
--------------------------------------------------------------------------------
1 | Changes
2 | =======
3 |
4 | .. currentmodule:: xlutils
5 |
6 | 1.7.1 (25 April 2014)
7 | ---------------------
8 |
9 | - Add support for time cells in :class:`~xlutils.view.View`.
10 |
11 | - Add support for ``.xlsx`` files in :class:`~xlutils.view.View` at the
12 | expense of formatting information being available.
13 |
14 | 1.7.0 (29 October 2013)
15 | -----------------------
16 |
17 | - Added the :mod:`xlutils.view` module.
18 |
19 | 1.6.0 (5 April 2013)
20 | --------------------
21 |
22 | - Moved documentation to be Sphinx based.
23 |
24 | - Support for :mod:`xlrd` 0.9.1, which no longer has pickleable
25 | books.
26 |
27 | .. note:: You may encounter performance problems if you work with
28 | large spreadsheets and use :mod:`xlutils` 1.6.0 with
29 | :mod:`xlrd` versions earlier that 0.9.1.
30 |
31 | 1.5.2 (13 April 2012)
32 | ---------------------
33 |
34 | - When using :mod:`xlutils.copy`, the ``datemode`` is now copied across from the
35 | source solving date problems with certain files.
36 |
37 | - The :mod:`errorhandler` package is no longer a hard dependency.
38 |
39 | - As a minimum, :mod:`xlrd` 0.7.2 and :mod:`xlwt` 0.7.4 are now required.
40 |
41 | 1.5.1 (5 March 2012)
42 | --------------------
43 |
44 | - Fix packaging problem caused by the move to git
45 |
46 | 1.5.0 (5 March 2012)
47 | --------------------
48 |
49 | - Take advantage of "ragged rows" optimisation in xlrd 0.7.3
50 |
51 | - Add support for PANE records to :mod:`xlutils.copy`, which means that zoom
52 | factors are now copied.
53 |
54 | 1.4.1 (6 September 2009)
55 | ------------------------
56 |
57 | - Removal of references in the `finish` methods of several filters,
58 | easing memory usage in large filtering runs
59 |
60 | - Speed optimisations for :class:`~xlutils.filter.BaseFilter`, bringing those
61 | benefits to all subclasses.
62 |
63 | - Memory usage reduction when using :class:`~xlutils.filter.MemoryLogger`
64 |
65 | 1.4.0 (18 August 2009)
66 | ----------------------
67 |
68 | - Add sheet density information and onesheet option to
69 | :mod:`xlutils.margins`.
70 |
71 | - Reduced the memory footprint of :class:`~xlutils.filter.ColumnTrimmer` at the
72 | expense of speed.
73 |
74 | - Fixed incorrect warnings about boolean cells in
75 | :class:`~xlutils.filter.ErrorFilter`. :mod:`xlwt` has always supported boolean
76 | cells.
77 |
78 | - :class:`~xlutils.filter.BaseReader` now opens workbooks with ``on_demand = True``
79 |
80 | - Added support for :mod:`xlrd` Books opened with ``on_demand`` as ``True`` passed to
81 | :func:`~xlrd.open_workbook`.
82 |
83 | - Fixed bug when copying error cells.
84 |
85 | - Requires the latest versions of :mod:`xlrd` (0.7.1) and :mod:`xlwt` (0.7.2).
86 |
87 | 1.3.2 (18 June 2009)
88 | --------------------
89 |
90 | - Made installation work when `setuptools` isn't present.
91 |
92 | - Made `errorhandler` an optional dependency.
93 |
94 | 1.3.1 (22 May 2009)
95 | -------------------
96 |
97 | - In xlutils.styles, handle there case where two names were mapped to the
98 | same xfi, but the first one was empty.
99 |
100 | 1.3.0 (18 Mar 2009)
101 | -------------------
102 |
103 | - fix bug that cause BaseWriter to raise exceptions when handling
104 | source workbooks opened by xlrd 0.7.0 and above where
105 | formatting_info had been passed as False
106 |
107 | - add xlutils.copy
108 |
109 | 1.2.1 (19 Dec 2008)
110 | -------------------
111 |
112 | - add extremely limited formatting_info support to DummyBook and TestReader
113 |
114 | - move to testfixtures 1.5.3 for tests
115 |
116 | 1.2.0 (10 Dec 2008)
117 | -------------------
118 |
119 | - add and implement `start` method to components in xlutils.filter.
120 |
121 | - fixed bug when using set_rdsheet with ColumnTrimmer.
122 |
123 | - improved installation documentation.
124 |
125 | - renamed xlutils.styles.CellStyle to more appropriate
126 | xlutils.styles.NamedStyle.
127 |
128 | - improved documentation for xlutils.styles.
129 |
130 | - moved to using TestFixtures and Mock for tests.
131 |
132 | - moved to using ErrorHandler rather than duplicating code.
133 |
134 | 1.1.1 (20 Nov 2008)
135 | -------------------
136 |
137 | - prevented generation of excessively long sheet names that cause
138 | Excel to complain.
139 |
140 | - added test that will fail if the filesystem used doesn't support
141 | filenames with +'s in them.
142 |
143 | 1.1.0 (14 Nov 2008)
144 | -------------------
145 |
146 | - link to the documentation for xlutils.display
147 |
148 | - tighten up version requirements for xlrd and xlwt
149 |
150 | - use style compression in xlutils.filter.BaseWriter
151 |
152 | - prevent generation of bogus sheet names in xlutils.filter.BaseWriter
153 |
154 | - xlutils.filter.BaseFilter now keeps track of rdbook, simplifying the
155 | implementation of filters.
156 |
157 | - add another example for xlutils.filter
158 |
159 | - add xlutils.filter.XLRDReader
160 |
161 | - add xlutils.filter.StreamWriter
162 |
163 | - add xlutils.styles
164 |
165 | - add xlutils.save
166 |
167 | 1.0.0 (8 Nov 2008)
168 | ------------------
169 |
170 | - initial public release
171 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/conf.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import sys, os, pkginfo, datetime
3 |
4 | pkg_info = pkginfo.Develop(os.path.join(os.path.dirname(__file__),'..'))
5 |
6 | extensions = [
7 | 'sphinx.ext.autodoc',
8 | 'sphinx.ext.intersphinx'
9 | ]
10 |
11 | intersphinx_mapping = {
12 | 'http://docs.python.org': None,
13 | 'http://packages.python.org/testfixtures/': None,
14 | # XXX - errorhandler
15 | # XXX - xlrd
16 | # XXX - xlwt
17 | }
18 |
19 | # General
20 | source_suffix = '.txt'
21 | master_doc = 'index'
22 | project = pkg_info.name
23 | copyright = '2008-%s Simplistix Ltd' % datetime.datetime.now().year
24 | version = release = pkg_info.version
25 | exclude_trees = ['_build']
26 | unused_docs = ['description']
27 | pygments_style = 'sphinx'
28 |
29 | # Options for HTML output
30 | html_theme = 'default'
31 | htmlhelp_basename = project+'doc'
32 |
33 | # Options for LaTeX output
34 | latex_documents = [
35 | ('index',project+'.tex', project+u' Documentation',
36 | 'Simplistix Ltd', 'manual'),
37 | ]
38 |
39 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/copy.txt:
--------------------------------------------------------------------------------
1 | xlutils.copy
2 | ============
3 |
4 | The function in this module copies :class:`xlrd.Book` objects into
5 | :class:`xlwt.Workbook` objects so they can be manipulated.
6 | You may wish to do this, for example, if you have an existing excel
7 | file where you want to change come cells.
8 |
9 | You would start by opening the file with :mod:`xlrd`:
10 |
11 | >>> from os.path import join
12 | >>> from xlrd import open_workbook
13 | >>> rb = open_workbook(join(test_files,'testall.xls'), formatting_info=True, on_demand=True)
14 | >>> rb.sheet_by_index(0).cell(0,0).value
15 | u'R0C0'
16 | >>> rb.sheet_by_index(0).cell(0,1).value
17 | u'R0C1'
18 |
19 | You would then use :mod:`xlutils.copy` to copy the :class:`xlrd.Book`
20 | object into an :class:`xlwt.Workbook` object:
21 |
22 | >>> from xlutils.copy import copy
23 | >>> wb = copy(rb)
24 |
25 | .. paranoid check, no existing files
26 |
27 | >>> temp_dir = TempDirectory()
28 | >>> temp_dir.listdir()
29 | No files or directories found.
30 |
31 | Now that you have an :class:`xlwt.Workbook`, you can modify cells and
32 | then save the changed workbook back to a file:
33 |
34 | >>> wb.get_sheet(0).write(0,0,'changed!')
35 | >>> wb.save(join(temp_dir.path,'output.xls'))
36 | >>> temp_dir.listdir()
37 | output.xls
38 |
39 | This file can now be loaded using :mod:`xlrd` to see the changes:
40 |
41 | >>> rb = open_workbook(join(temp_dir.path,'output.xls'))
42 | >>> rb.sheet_by_index(0).cell(0,0).value
43 | u'changed!'
44 | >>> rb.sheet_by_index(0).cell(0,1).value
45 | u'R0C1'
46 |
47 | .. note:: You should always pass `on_demand=True` to :func:`~xlrd.open_workbook` as this
48 | uses much less memory!
49 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/description.txt:
--------------------------------------------------------------------------------
1 | =======
2 | xlutils
3 | =======
4 |
5 | This package provides a collection of utilities for working with Excel
6 | files. Since these utilities may require either or both of the xlrd
7 | and xlwt packages, they are collected together here, separate from either
8 | package.
9 |
10 | Currently available are:
11 |
12 | **xlutils.copy**
13 | Tools for copying xlrd.Book objects to xlwt.Workbook objects.
14 |
15 | **xlutils.display**
16 | Utility functions for displaying information about xlrd-related
17 | objects in a user-friendly and safe fashion.
18 |
19 | **xlutils.filter**
20 | A mini framework for splitting and filtering Excel files into new
21 | Excel files.
22 |
23 | **xlutils.margins**
24 | Tools for finding how much of an Excel file contains useful data.
25 |
26 | **xlutils.save**
27 | Tools for serializing xlrd.Book objects back to Excel files.
28 |
29 | **xlutils.styles**
30 | Tools for working with formatting information expressed in styles.
31 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/development.txt:
--------------------------------------------------------------------------------
1 | Development
2 | ===========
3 |
4 | .. highlight:: bash
5 |
6 | If you wish to contribute to this project, then you should fork the
7 | repository found here:
8 |
9 | https://github.com/python-excel/xlutils
10 |
11 | Development of this package also requires local clones of both
12 | :mod:`xlrd` and :mod:`xlwt`. The following example will set up local
13 | clones as required, but you should use your own forks so that you may
14 | push back to them::
15 |
16 | git clone git://github.com/python-excel/xlutils.git
17 | git clone git://github.com/python-excel/xlrd.git
18 | git clone git://github.com/python-excel/xlwt.git
19 | cd xlutils
20 |
21 | Once you have an appropriate set of local repositories, you can follow
22 | these instructions to perform various development tasks:
23 |
24 | Setting up the buildout
25 | -----------------------
26 |
27 | All development requires that you run the buildout::
28 |
29 | python bootstrap.py
30 | bin/buildout
31 |
32 | Running the tests
33 | -----------------
34 |
35 | Once you have a buildout, the tests can be run as follows::
36 |
37 | bin/test
38 |
39 | Building the documentation
40 | --------------------------
41 |
42 | The Sphinx documentation is built by doing the following from the
43 | directory containg setup.py::
44 |
45 | cd docs
46 | make html
47 |
48 | Making a release
49 | ----------------
50 |
51 | The first thing to do when making a release is to check that the ReST
52 | to be uploaded to PyPI is valid::
53 |
54 | bin/docpy setup.py --long-description | bin/rst2 html \
55 | --link-stylesheet \
56 | --stylesheet=http://www.python.org/styles/styles.css > build/desc.html
57 |
58 | Once you're certain everything is as it should be, the following will
59 | build the distribution, upload it to PyPI, register the metadata with
60 | PyPI and upload the Sphinx documentation to PyPI::
61 |
62 | bin/buildout -o
63 | cd docs
64 | make clean
65 | make html
66 | cd ..
67 | bin/docpy setup.py sdist upload register upload_sphinx --upload-dir=docs/_build/html
68 |
69 | The ``bin/buildout`` will make sure the correct package information is
70 | used.
71 |
72 | This should all be done on a unix box so that a `.tgz` source
73 | distribution is produced.
74 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/display.txt:
--------------------------------------------------------------------------------
1 | xlutils.display
2 | ===============
3 |
4 | This module contains the :func:`quoted_sheet_name` and
5 | :func:`cell_display` functions that allow easy and safe display of
6 | information returned by :class:`xlrd`.
7 |
8 | The :doc:`api` contains examples of their use.
9 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/index.txt:
--------------------------------------------------------------------------------
1 | xlutils documentation
2 | =====================
3 |
4 | This package provides a collection of utilities for working with Excel
5 | files. Since these utilities may require either or both of the :mod:`xlrd`
6 | and :mod:`xlwt` packages, they are collected together here, separate from either
7 | package. The utilities are grouped into several modules within the package, each
8 | of them is documented below:
9 |
10 | :doc:`xlutils.copy `
11 | Tools for copying :class:`xlrd.Book` objects to :class:`xlwt.Workbook` objects.
12 |
13 | :doc:`xlutils.display `
14 | Utility functions for displaying information about :mod:`xlrd`-related
15 | objects in a user-friendly and safe fashion.
16 |
17 | :doc:`xlutils.filter `
18 | A mini framework for splitting and filtering existing Excel files into new
19 | Excel files.
20 |
21 | :doc:`xlutils.margins `
22 | Tools for finding how much of an Excel file contains useful data.
23 |
24 | :doc:`xlutils.save `
25 | Tools for serializing :class:`xlrd.Book` objects back to Excel files.
26 |
27 | :doc:`xlutils.styles `
28 | Tools for working with formatting information expressed the styles
29 | found in Excel files.
30 |
31 | :doc:`xlutils.view `
32 | Easy to use views of the data contained in a workbook's sheets.
33 |
34 | .. toctree::
35 | :hidden:
36 |
37 | copy.txt
38 | display.txt
39 | filter.txt
40 | margins.txt
41 | save.txt
42 | styles.txt
43 | view.txt
44 |
45 | Working with xlutils
46 | --------------------
47 |
48 | The following sections describe how to install the package, contribute
49 | to its development and the usual boilerplate:
50 |
51 | .. toctree::
52 | :maxdepth: 1
53 |
54 | installation.txt
55 | development.txt
56 | api.txt
57 | changes.txt
58 | license.txt
59 |
60 | Indices and tables
61 | ==================
62 |
63 | * :ref:`genindex`
64 | * :ref:`modindex`
65 | * :ref:`search`
66 |
67 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/installation.txt:
--------------------------------------------------------------------------------
1 | Installation Instructions
2 | =========================
3 |
4 | If you want to experiment with xlutils, the easiest way to
5 | install it is::
6 |
7 | pip install xlutils
8 |
9 | Or, if you're using `zc.buildout`, just specify ``xlutils`` as a
10 | required egg.
11 |
12 | If you do not install using easy_install or zc.buildout, you will
13 | also need to make sure the following python packages are available
14 | on your PYTHONPATH:
15 |
16 | - **xlrd**
17 |
18 | You'll need version 0.7.2 or later. Latest versions can be found
19 | here:
20 |
21 | http://pypi.python.org/pypi/xlrd
22 |
23 | - **xlwt**
24 |
25 | You'll need version 0.7.3 or later. Latest versions can be found
26 | here:
27 |
28 | http://pypi.python.org/pypi/xlwt
29 |
30 | If you're installing with pip, easy_install or buildout, these
31 | dependencies will automatically be installed for you.
32 |
33 | Additionally, if you want to use an
34 | :class:`~xlutils.filter.ErrorFilter`, you should make sure the
35 | following package is installed:
36 |
37 | - **errorhandler**
38 |
39 | This can be found here:
40 |
41 | http://pypi.python.org/pypi/errorhandler
42 |
43 | Since this is a soft dependency, it will not be installed by
44 | automatically by pip, easy_install or buildout.
45 |
46 | .. topic:: Python version requirements
47 |
48 | This package is support on Python 2.5, 2.6 and 2.7 on Linux,
49 | Mac OS X and Windows.
50 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/license.txt:
--------------------------------------------------------------------------------
1 | =======
2 | License
3 | =======
4 |
5 | Copyright (c) 2008-2013 Simplistix Ltd
6 |
7 | Permission is hereby granted, free of charge, to any person
8 | obtaining a copy of this software and associated documentation
9 | files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge,
11 | publish, distribute, sublicense, and/or sell copies of the Software,
12 | and to permit persons to whom the Software is furnished to do so,
13 | subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be
16 | included in all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 | SOFTWARE.
26 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | REM Command file for Sphinx documentation
4 |
5 | set SPHINXBUILD=..\bin\sphinx-build
6 | set ALLSPHINXOPTS=-d _build/doctrees %SPHINXOPTS% .
7 | if NOT "%PAPER%" == "" (
8 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
9 | )
10 |
11 | if "%1" == "" goto help
12 |
13 | if "%1" == "help" (
14 | :help
15 | echo.Please use `make ^` where ^ is one of
16 | echo. html to make standalone HTML files
17 | echo. dirhtml to make HTML files named index.html in directories
18 | echo. pickle to make pickle files
19 | echo. json to make JSON files
20 | echo. htmlhelp to make HTML files and a HTML help project
21 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
22 | echo. changes to make an overview over all changed/added/deprecated items
23 | echo. linkcheck to check all external links for integrity
24 | echo. doctest to run all doctests embedded in the documentation if enabled
25 | goto end
26 | )
27 |
28 | if "%1" == "clean" (
29 | for /d %%i in (_build\*) do rmdir /q /s %%i
30 | del /q /s _build\*
31 | goto end
32 | )
33 |
34 | if "%1" == "html" (
35 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% _build/html
36 | echo.
37 | echo.Build finished. The HTML pages are in _build/html.
38 | goto end
39 | )
40 |
41 | if "%1" == "dirhtml" (
42 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% _build/dirhtml
43 | echo.
44 | echo.Build finished. The HTML pages are in _build/dirhtml.
45 | goto end
46 | )
47 |
48 | if "%1" == "pickle" (
49 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% _build/pickle
50 | echo.
51 | echo.Build finished; now you can process the pickle files.
52 | goto end
53 | )
54 |
55 | if "%1" == "json" (
56 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% _build/json
57 | echo.
58 | echo.Build finished; now you can process the JSON files.
59 | goto end
60 | )
61 |
62 | if "%1" == "htmlhelp" (
63 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% _build/htmlhelp
64 | echo.
65 | echo.Build finished; now you can run HTML Help Workshop with the ^
66 | .hhp project file in _build/htmlhelp.
67 | goto end
68 | )
69 |
70 | if "%1" == "latex" (
71 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% _build/latex
72 | echo.
73 | echo.Build finished; the LaTeX files are in _build/latex.
74 | goto end
75 | )
76 |
77 | if "%1" == "changes" (
78 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% _build/changes
79 | echo.
80 | echo.The overview file is in _build/changes.
81 | goto end
82 | )
83 |
84 | if "%1" == "linkcheck" (
85 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% _build/linkcheck
86 | echo.
87 | echo.Link check complete; look for any errors in the above output ^
88 | or in _build/linkcheck/output.txt.
89 | goto end
90 | )
91 |
92 | if "%1" == "doctest" (
93 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% _build/doctest
94 | echo.
95 | echo.Testing of doctests in the sources finished, look at the ^
96 | results in _build/doctest/output.txt.
97 | goto end
98 | )
99 |
100 | :end
101 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/margins.txt:
--------------------------------------------------------------------------------
1 | xlutils.margins
2 | ===============
3 |
4 | .. currentmodule:: xlutils.margins
5 |
6 | This combined module and script provide information on how much space
7 | is taken up in an Excel file by cells containing no meaningful data.
8 | If :mod:`xlutils` is installed using ``easy_install``, ``pip`` or
9 | ``zc.buildout``, a console script called ``margins`` will be created.
10 |
11 | The following example shows how it is used as a script::
12 |
13 | python -m xlutils.margins [options] *.xls
14 |
15 | To get a list of the available options, do the following::
16 |
17 | python -m xlutils.margins --help
18 |
19 | The module also provides the tools that do the work for the above
20 | script as the helpful :func:`ispunc`, :func:`cells_all_junk`,
21 | :func:`number_of_good_rows` and :func:`number_of_good_cols` functions.
22 |
23 | See the :doc:`api` for more information.
24 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/save.txt:
--------------------------------------------------------------------------------
1 | xlutils.save
2 | ============
3 |
4 | This allows serialisation of :class:`xlrd.Book` objects back into binary Excel files.
5 |
6 | Here's a simple example:
7 |
8 | >>> import os
9 | >>> from xlrd import open_workbook
10 | >>> from xlutils.save import save
11 | >>> wb = open_workbook(os.path.join(test_files,'testall.xls'))
12 | >>> os.listdir(temp_dir)
13 | []
14 | >>> save(wb,os.path.join(temp_dir,'saved.xls'))
15 | >>> os.listdir(temp_dir)
16 | ['saved.xls']
17 |
18 | You can also save the data to a stream that you provide:
19 |
20 | >>> from StringIO import StringIO
21 | >>> s = StringIO()
22 | >>> save(wb,s)
23 | >>> len(s.getvalue())
24 | 5632
25 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/styles.txt:
--------------------------------------------------------------------------------
1 | xlutils.styles
2 | ==============
3 |
4 | .. currentmodule:: xlutils.styles
5 |
6 | This module provides tools for working with formatting information
7 | provided by :mod:`xlrd` relating and expressed in the Excel file as styles.
8 |
9 | To use these tools, you need to open the workbook with :mod:`xlrd` and make
10 | sure formatting is enabled:
11 |
12 | >>> import os
13 | >>> from xlrd import open_workbook
14 | >>> book = open_workbook(os.path.join(test_files,'testall.xls'), formatting_info=1)
15 |
16 | Once you have a :class:`~xlrd.Book` object, you can extract the relevent style
17 | information from it as follows:
18 |
19 | >>> from xlutils.styles import Styles
20 | >>> s = Styles(book)
21 |
22 | You can now look up style information about any cell:
23 |
24 | >>> sheet = book.sheet_by_name('Sheet1')
25 | >>> s[sheet.cell(0,0)]
26 |
27 |
28 | .. note:: This is `not` a suitable object for copying styles to a new
29 | spreadsheet using :mod:`xlwt`. If that is your intention, you're
30 | recommended to look at :doc:`save` or :doc:`filter`.
31 |
32 | If you open up ``testall.xls`` in Microsoft's Excel Viewer or other
33 | suitable software, you'll see that the following information is
34 | correct for cell A1:
35 |
36 | >>> A1_style = s[sheet.cell(0,0)]
37 | >>> A1_style.name
38 | u'Style1'
39 |
40 | While that may be interesting, the actual style information is locked
41 | away in an ``XF`` record. Thankfully, a :class:`NamedStyle` provides
42 | easy access to this:
43 |
44 | >>> A1_xf = A1_style.xf
45 | >>> A1_xf
46 |
47 |
48 | Once we have the XF record, for this particular cell, most of the
49 | interesting information is in the font definition for the style:
50 |
51 | >>> A1_font = book.font_list[A1_xf.font_index]
52 |
53 | Using the book's colour map, you can get the RGB colour for this style,
54 | which is blue in this case:
55 |
56 | >>> book.colour_map[A1_font.colour_index]
57 | (0, 0, 128)
58 |
59 | You can also see that this style specifies text should be underlined
60 | with a single line:
61 |
62 | >>> A1_font.underline_type
63 | 1
64 |
65 | Finally, the style specifies that text is not displayed with a "strike
66 | through" line:
67 |
68 | >>> A1_font.struck_out
69 | 0
70 |
71 | For completeness, here's the same information but for cell B1:
72 |
73 | >>> B1_style = s[sheet.cell(0,1)]
74 | >>> B1_style.name
75 | u'Style2'
76 | >>> B1_font = book.font_list[B1_style.xf.font_index]
77 |
78 | In this case, though, the style's colour is green:
79 |
80 | >>> book.colour_map[B1_font.colour_index]
81 | (0, 128, 0)
82 |
83 | The style specifies that text should not be underlined:
84 |
85 | >>> B1_font.underline_type
86 | 0
87 |
88 | And finally, it specifies that text should be displayed with a "strike
89 | through" line:
90 |
91 | >>> B1_font.struck_out
92 | 1
93 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/docs/view.txt:
--------------------------------------------------------------------------------
1 | xlutils.view
2 | ============
3 |
4 | .. currentmodule:: xlutils.view
5 |
6 | Iterating over the cells in a :class:`~xlrd.sheet.Sheet` can be
7 | tricky, especially if you want to exclude headers and the like.
8 | This module is designed to make things easier.
9 |
10 | For example, to iterate over the cells in the first sheet of a
11 | workbook:
12 |
13 | >>> def print_data(rows):
14 | ... for row in rows:
15 | ... for value in row:
16 | ... print value,
17 | ... print
18 |
19 | >>> from os.path import join
20 | >>> from xlutils.view import View
21 | >>> view = View(join(test_files,'testall.xls'))
22 | >>> print_data(view[0])
23 | R0C0 R0C1
24 | R1C0 R1C1
25 | A merged cell
26 |
27 |
28 | More merged cells
29 |
30 | You can also get a sheet by name:
31 |
32 | >>> print_data(view['Sheet2'])
33 | R0C0 R0C1
34 | R1C0 R1C1
35 |
36 | One helpful feature is that dates are converted to
37 | :class:`~datetime.datetime` objects rather than being left as numbers:
38 |
39 | >>> for row in View(join(test_files,'datetime.xls'))[0]:
40 | ... for value in row:
41 | ... print repr(value)
42 | datetime.datetime(2012, 4, 13, 0, 0)
43 | datetime.time(12, 54, 37)
44 | datetime.datetime(2014, 2, 14, 4, 56, 23)
45 |
46 | Now, things get really interesting when you start slicing the view of
47 | a sheet:
48 |
49 | >>> print_data(view['Sheet1'][:2, :1])
50 | R0C0
51 | R1C0
52 |
53 | As you can see, these behave exactly as slices into lists would, with
54 | the first slice being on rows and the second slice being on columns.
55 |
56 | Since looking at a sheet and working with the row and column labels
57 | shown is much easier, :class:`Row` and :class:`Col` helpers are
58 | provided. When these are used for the ``stop`` part of a slice, they
59 | are inclusive. For example:
60 |
61 | >>> from xlutils.view import Row, Col
62 | >>> print_data(view['Sheet1'][Row(1):Row(2), Col('A'):Col('B')])
63 | R0C0 R0C1
64 | R1C0 R1C1
65 |
66 | Finally, to aid with automated tests, there is a :class:`CheckerView`
67 | subclass of :class:`View` that provides :class:`CheckSheet` views onto
68 | sheets in a workbook. These have a :meth:`~CheckSheet.compare` method
69 | that produces informative :class:`AssertionError` exceptions when the
70 | data in the view of the sheet is not as expected:
71 |
72 | >>> from xlutils.view import CheckerView
73 | >>> sheet_view = CheckerView(join(test_files,'testall.xls'))[0]
74 | >>> sheet_view[:, Col('A'):Col('A')].compare(
75 | ... ('R0C0', ),
76 | ... ('R0C1', ),
77 | ... )
78 | Traceback (most recent call last):
79 | ...
80 | AssertionError: Sequence not as expected:
81 |
82 | same:
83 | (('R0C0',),)
84 |
85 | first:
86 | (('R0C1',),)
87 |
88 | second:
89 | ((u'R1C0',), (u'A merged cell',), ('',), ('',), (u'More merged cells',))
90 |
91 | Use of the :meth:`~CheckSheet.compare` method requires
92 | `testfixtures`__ to be installed.
93 |
94 | __ http://www.simplistix.co.uk/software/python/testfixtures
95 |
96 | Looking at the implementation of :class:`CheckerView` will also show
97 | you how you can wire in :class:`SheetView` subclasses to provide any
98 | extra methods you may require.
99 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/jenkins:
--------------------------------------------------------------------------------
1 | $PYTHON_EXE bootstrap.py
2 | bin/buildout
3 | bin/docpy setup.py sdist
4 | bin/nosetests --with-xunit --with-cov --cov=xlutils --cov-report=xml --cov-report=html
5 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/jenkins.bat:
--------------------------------------------------------------------------------
1 | %PYTHON_EXE% bootstrap.py
2 | CHOICE /T 20 /C w /D w
3 | bin\buildout
4 | bin\docpy setup.py sdist
5 | bin\nosetests --with-xunit --with-cov --cov=xlutils --cov-report=xml --cov-report=html
6 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/setup.cfg:
--------------------------------------------------------------------------------
1 | [egg_info]
2 | tag_build =
3 | tag_date = 0
4 | tag_svn_revision = 0
5 |
6 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/setup.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008-2013 Simplistix Ltd
2 | # See license.txt for license details.
3 |
4 | import os
5 | from setuptools import setup
6 |
7 | name = 'xlutils'
8 | base_dir = os.path.dirname(__file__)
9 |
10 | package_dir = os.path.join(os.path.dirname(__file__),'xlutils')
11 |
12 | setup(
13 | name='xlutils',
14 | version=file(os.path.join(base_dir, name, 'version.txt')).read().strip(),
15 | author='Chris Withers',
16 | author_email='chris@simplistix.co.uk',
17 | license='MIT',
18 | description="Utilities for working with Excel files that require both xlrd and xlwt",
19 | long_description=open(os.path.join(base_dir, 'docs', 'description.txt')).read(),
20 | url='http://www.python-excel.org',
21 | keywords="excel xls xlrd xlwt",
22 | classifiers=[
23 | 'Development Status :: 6 - Mature',
24 | 'Intended Audience :: Developers',
25 | 'License :: OSI Approved :: MIT License',
26 | 'Topic :: Office/Business :: Financial :: Spreadsheet',
27 | ],
28 | packages=['xlutils','xlutils.tests'],
29 | zip_safe=False,
30 | include_package_data=True,
31 | install_requires=[
32 | 'xlrd >= 0.7.2',
33 | 'xlwt >= 0.7.4',
34 | ],
35 | entry_points = {
36 | 'console_scripts': [
37 | 'margins = xlutils.margins:main',
38 | ],
39 | },
40 | extras_require=dict(
41 | test=[
42 | 'manuel',
43 | 'mock',
44 | 'testfixtures >= 1.6.1',
45 | 'errorhandler',
46 | ],
47 | )
48 | )
49 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/copy.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009-2012 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | from xlutils.filter import process,XLRDReader,XLWTWriter
8 |
9 | def copy(wb):
10 | """
11 | Copy an :class:`xlrd.Book` into an :class:`xlwt.Workbook` preserving as much
12 | information from the source object as possible.
13 |
14 | See the :doc:`copy` documentation for an example.
15 | """
16 | w = XLWTWriter()
17 | process(
18 | XLRDReader(wb,'unknown.xls'),
19 | w
20 | )
21 | return w.output[0][1]
22 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/display.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | import xlrd
8 |
9 | def quoted_sheet_name(sheet_name, encoding='ascii'):
10 | if "'" in sheet_name:
11 | qsn = "'" + sheet_name.replace("'", "''") + "'"
12 | elif " " in sheet_name:
13 | qsn = "'" + sheet_name + "'"
14 | else:
15 | qsn = sheet_name
16 | return qsn.encode(encoding, 'replace')
17 |
18 | def cell_display(cell, datemode=0, encoding='ascii'):
19 | cty = cell.ctype
20 | if cty == xlrd.XL_CELL_EMPTY:
21 | return 'undefined'
22 | if cty == xlrd.XL_CELL_BLANK:
23 | return 'blank'
24 | if cty == xlrd.XL_CELL_NUMBER:
25 | return 'number (%.4f)' % cell.value
26 | if cty == xlrd.XL_CELL_DATE:
27 | try:
28 | return "date (%04d-%02d-%02d %02d:%02d:%02d)" \
29 | % xlrd.xldate_as_tuple(cell.value, datemode)
30 | except xlrd.xldate.XLDateError:
31 | return "date? (%.6f)" % cell.value
32 | if cty == xlrd.XL_CELL_TEXT:
33 | return "text (%s)" % cell.value.encode(encoding, 'replace')
34 | if cty == xlrd.XL_CELL_ERROR:
35 | if cell.value in xlrd.error_text_from_code:
36 | return "error (%s)" % xlrd.error_text_from_code[cell.value]
37 | return "unknown error code (%r)" % cell.value
38 | if cty == xlrd.XL_CELL_BOOLEAN:
39 | return "logical (%s)" % ['FALSE', 'TRUE'][cell.value]
40 | raise Exception("Unknown Cell.ctype: %r" % cty)
41 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2008-2009 Simplistix Ltd
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without restriction,
6 | including without limitation the rights to use, copy, modify, merge,
7 | publish, distribute, sublicense, and/or sell copies of the Software,
8 | and to permit persons to whom the Software is furnished to do so,
9 | subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/save.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008-2012 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | import os
8 | from xlutils.filter import process,XLRDReader,StreamWriter
9 |
10 | def save(wb, filename_or_stream):
11 | "Save the supplied :class:`xlrd.Book` to the supplied stream or filename."
12 | if isinstance(filename_or_stream,basestring):
13 | filename = os.path.split(filename_or_stream)[1]
14 | stream = open(filename_or_stream,'wb')
15 | close = True
16 | else:
17 | filename = 'unknown.xls'
18 | stream = filename_or_stream
19 | close = False
20 | process(
21 | XLRDReader(wb,filename),
22 | StreamWriter(stream)
23 | )
24 | if close:
25 | stream.close()
26 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/styles.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008-2012 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | class NamedStyle:
8 | """
9 | An object with ``name`` and ``xf`` attributes representing
10 | a particular style in a workbook.
11 | """
12 | def __init__(self,name,xf):
13 | self.name = name
14 | self.xf = xf
15 |
16 | class Styles:
17 | """
18 | A mapping-like object that will return a :class:`NamedStyle`
19 | instance for the cell passed to the :meth:`__getitem__`
20 | method.
21 | """
22 | def __init__(self, book):
23 | xfi_to_name = {}
24 | for name, info in book.style_name_map.items():
25 | built_in, xfi = info
26 | # allow multiple
27 | assert xfi not in xfi_to_name or not xfi_to_name[xfi]
28 | xfi_to_name[xfi] = name
29 | self.cell_styles = {}
30 | for xfi in xrange(len(book.xf_list)):
31 | xf = book.xf_list[xfi]
32 | if xf.is_style:
33 | continue
34 | stylexfi = xf.parent_style_index
35 | assert stylexfi != 4095 # i.e. 0xFFF
36 | self.cell_styles[xfi] = NamedStyle(
37 | xfi_to_name[stylexfi],
38 | book.xf_list[stylexfi]
39 | )
40 |
41 | def __getitem__(self,cell):
42 | return self.cell_styles[cell.xf_index]
43 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/date.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/date.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/datetime.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/datetime.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/fixtures.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | import sys
8 | import os.path
9 |
10 | from xlrd import XL_CELL_TEXT,Book
11 | from xlrd.biffh import FUN
12 | from xlrd.formatting import XF, Format, Font, XFAlignment, XFBorder, XFBackground, XFProtection
13 |
14 | from xlrd.sheet import Sheet
15 |
16 | test_files = os.path.dirname(__file__)
17 |
18 | test_xls_path = os.path.join(test_files,'test.xls')
19 |
20 | class DummyBook(Book):
21 |
22 | biff_version = 80
23 | logfile = sys.stdout
24 | verbosity = 0
25 | datemode = 0
26 | on_demand = False
27 |
28 | def __init__(self,
29 | formatting_info=0,
30 | ragged_rows=False,
31 | ):
32 | Book.__init__(self)
33 | self.ragged_rows = ragged_rows
34 | self.formatting_info=formatting_info
35 | self.initialise_format_info()
36 | if formatting_info:
37 | f = Font()
38 | self.font_list.append(f)
39 | self.format_map[0]= Format(0,FUN,u'General')
40 | xf = XF()
41 | xf.alignment = XFAlignment()
42 | xf.border = XFBorder()
43 | xf.background = XFBackground()
44 | xf.protection = XFProtection()
45 | self.xf_list.append(xf)
46 |
47 | def add(self,sheet):
48 | self._sheet_names.append(sheet.name)
49 | self._sheet_list.append(sheet)
50 | self.nsheets = len(self._sheet_list)
51 |
52 | def make_book(rows=[]):
53 | book = DummyBook()
54 | sheet = make_sheet(rows,book=book)
55 | return book
56 |
57 | def make_sheet(rows=(),book=None,name='test sheet',number=0):
58 | if book is None:
59 | book = DummyBook()
60 | book._sheet_visibility.append(0)
61 | sheet = Sheet(book,0,name,number)
62 |
63 | book.add(sheet)
64 | for rowx in range(len(rows)):
65 | row = rows[rowx]
66 | for colx in range(len(row)):
67 | value = row[colx]
68 | if isinstance(value,tuple):
69 | cell_type,value = value
70 | else:
71 | cell_type=XL_CELL_TEXT
72 | sheet.put_cell(rowx,colx,cell_type,value,0)
73 | sheet.tidy_dimensions()
74 | return sheet
75 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/ragged.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/ragged.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/sample.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/sample.xlsx
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test_copy.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | import os
8 | from mock import Mock
9 | from testfixtures import replace,compare,Comparison as C
10 | from unittest import TestSuite,TestCase,makeSuite
11 | from xlutils.copy import copy
12 | from xlutils.filter import XLRDReader
13 |
14 | class TestCopy(TestCase):
15 |
16 | @replace('xlutils.copy.XLWTWriter',Mock())
17 | @replace('xlutils.copy.process',Mock())
18 | def test_copy_xlrd(self,c,xlwtw):
19 | inwb = object()
20 |
21 | outwb = Mock()
22 | xlwtwi = Mock()
23 | xlwtwi.output=[('junk',outwb)]
24 | xlwtw.return_value=xlwtwi
25 |
26 | self.failUnless(copy(inwb) is outwb)
27 |
28 | self.assertEqual(len(c.call_args_list),1)
29 | args = c.call_args_list[0][0]
30 | self.assertEqual(len(args),2)
31 |
32 | r = args[0]
33 | self.failUnless(isinstance(r,XLRDReader))
34 | self.failUnless(r.wb is inwb)
35 | self.assertEqual(r.filename,'unknown.xls')
36 |
37 | w = args[1]
38 | self.failUnless(w is xlwtwi)
39 |
40 | def test_suite():
41 | return TestSuite((
42 | makeSuite(TestCopy),
43 | ))
44 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test_docs.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008-2012 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | from doctest import REPORT_NDIFF, ELLIPSIS
8 | from fixtures import test_files
9 | from glob import glob
10 | from manuel import doctest
11 | from manuel.testing import TestSuite
12 | from testfixtures import LogCapture,TempDirectory
13 | from os.path import dirname, join, pardir
14 |
15 | import os
16 |
17 | workspace = os.environ.get('WORKSPACE', join(dirname(__file__), pardir, pardir))
18 | tests = glob(join(workspace, 'docs', '*.txt'))
19 |
20 | options = REPORT_NDIFF|ELLIPSIS
21 |
22 | def setUp(test):
23 | test.globs['test_files']=test_files
24 | test.globs['temp_dir']=TempDirectory().path
25 | test.globs['TempDirectory']=TempDirectory
26 |
27 | def tearDown(test):
28 | TempDirectory.cleanup_all()
29 | LogCapture.uninstall_all()
30 |
31 | def test_suite():
32 | m = doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS)
33 | return TestSuite(m, *tests,
34 | setUp=setUp,
35 | tearDown=tearDown)
36 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test_save.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2008 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | import os
8 | from mock import Mock
9 | from shutil import rmtree
10 | from StringIO import StringIO
11 | from tempfile import mkdtemp,TemporaryFile
12 | from testfixtures import replace,tempdir
13 | from unittest import TestSuite,TestCase,makeSuite
14 | from xlutils.save import save
15 | from xlutils.filter import XLRDReader,StreamWriter
16 |
17 | class TestSave(TestCase):
18 |
19 | @tempdir()
20 | @replace('xlutils.save.process',Mock())
21 | def test_save_path(self,c,d):
22 | wb = object()
23 | path = os.path.join(d.path,'path.xls')
24 |
25 | save(wb,path)
26 |
27 | self.assertEqual(len(c.call_args_list),1)
28 | args = c.call_args_list[0][0]
29 | self.assertEqual(len(args),2)
30 | r = args[0]
31 | self.failUnless(isinstance(r,XLRDReader))
32 | self.failUnless(r.wb is wb)
33 | self.assertEqual(r.filename,'path.xls')
34 | w = args[1]
35 | self.failUnless(isinstance(w,StreamWriter))
36 | f = w.stream
37 | self.failUnless(isinstance(f,file))
38 | self.assertEqual(f.name,path)
39 | self.assertEqual(f.mode,'wb')
40 | self.assertEqual(f.closed,True)
41 |
42 | @replace('xlutils.save.process',Mock())
43 | def test_save_stringio(self,c):
44 | wb = object()
45 | s = StringIO()
46 |
47 | save(wb,s)
48 |
49 | self.assertEqual(len(c.call_args_list),1)
50 | args = c.call_args_list[0][0]
51 | self.assertEqual(len(args),2)
52 | r = args[0]
53 | self.failUnless(isinstance(r,XLRDReader))
54 | self.failUnless(r.wb is wb)
55 | self.assertEqual(r.filename,'unknown.xls')
56 | w = args[1]
57 | self.failUnless(isinstance(w,StreamWriter))
58 | self.failUnless(w.stream is s)
59 |
60 | @replace('xlutils.save.process',Mock())
61 | def test_save_tempfile(self,c):
62 | wb = object()
63 | ef = TemporaryFile()
64 |
65 | save(wb,ef)
66 |
67 | self.assertEqual(len(c.call_args_list),1)
68 | args = c.call_args_list[0][0]
69 | self.assertEqual(len(args),2)
70 | r = args[0]
71 | self.failUnless(isinstance(r,XLRDReader))
72 | self.failUnless(r.wb is wb)
73 | self.assertEqual(r.filename,'unknown.xls')
74 | w = args[1]
75 | self.failUnless(isinstance(w,StreamWriter))
76 | af = w.stream
77 | self.failUnless(af is ef)
78 | self.assertEqual(ef.closed,False)
79 |
80 | def test_suite():
81 | return TestSuite((
82 | makeSuite(TestSave),
83 | ))
84 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test_styles.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2009 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | from mock import Mock
8 | from testfixtures import should_raise
9 | from unittest import TestSuite,TestCase,makeSuite
10 | from xlutils.styles import Styles
11 |
12 | class TestStyles(TestCase):
13 |
14 | def setUp(self):
15 | self.wb = Mock()
16 | self.wb.style_name_map = {
17 | '':(0,0),
18 | 'Normal':(1,0),
19 | }
20 | xf0 = Mock()
21 | xf0.is_style = True
22 | xf0.parent_style_index=4095
23 | xf1 = Mock()
24 | xf1.is_style = False
25 | xf1.parent_style_index=0
26 | self.wb.xf_list = [xf0,xf1]
27 |
28 | def test_multiple_names_for_xfi_okay(self):
29 | # setup our mock workbooks
30 | self.wb.style_name_map = {
31 | '':(0,0),
32 | 'Normal':(1,0),
33 | }
34 |
35 | # process it into styles
36 | s = Styles(self.wb)
37 |
38 | # now lookup a "cell" with xfi 0
39 | cell = Mock()
40 | cell.xf_index = 1
41 | self.assertEqual(s[cell].name,'Normal')
42 |
43 | def test_multiple_names_for_xfi_bad_1(self):
44 | self.wb.style_name_map = {
45 | 'A':(0,0),
46 | 'B':(0,0),
47 | }
48 | styles = should_raise(Styles,AssertionError)
49 | styles(self.wb)
50 |
51 | def test_multiple_names_for_xfi_bad_2(self):
52 | self.wb.style_name_map = {
53 | 'A':(0,0),
54 | '':(0,0),
55 | }
56 | styles = should_raise(Styles,AssertionError)
57 | styles(self.wb)
58 |
59 | def test_suite():
60 | return TestSuite((
61 | makeSuite(TestStyles),
62 | ))
63 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/test_view.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2013 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 | from datetime import datetime, time
7 | from os import path
8 | from unittest import TestCase
9 |
10 | from testfixtures import compare, ShouldRaise
11 |
12 | from xlutils.view import View, Row, Col, CheckerView
13 | from xlutils.tests.fixtures import test_files
14 |
15 | class Check(object):
16 |
17 | def _check(self, view, *expected):
18 | actual = []
19 | for row in view:
20 | actual.append(tuple(row))
21 | compare(expected, tuple(actual))
22 |
23 | class ViewTests(Check, TestCase):
24 |
25 | def test_string_index(self):
26 | self._check(
27 | View(path.join(test_files,'testall.xls'))['Sheet1'],
28 | (u'R0C0', u'R0C1'),
29 | (u'R1C0', u'R1C1'),
30 | (u'A merged cell', ''),
31 | ('', ''),
32 | ('', ''),
33 | (u'More merged cells', '')
34 | )
35 |
36 | def test_int_index(self):
37 | self._check(
38 | View(path.join(test_files,'testall.xls'))[0],
39 | (u'R0C0', u'R0C1'),
40 | (u'R1C0', u'R1C1'),
41 | (u'A merged cell', ''),
42 | ('', ''),
43 | ('', ''),
44 | (u'More merged cells', '')
45 | )
46 |
47 | def test_dates_and_times(self):
48 | self._check(
49 | View(path.join(test_files,'datetime.xls'))[0],
50 | (datetime(2012, 4, 13, 0, 0), ),
51 | (time(12, 54, 37), ),
52 | (datetime(2014, 2, 14, 4, 56, 23), ),
53 | )
54 |
55 | def test_xlsx(self):
56 | self._check(
57 | View(path.join(test_files,'sample.xlsx')),
58 | (),
59 | )
60 |
61 | def test_subclass(self):
62 | class MySheetView:
63 | def __init__(self, book, sheet):
64 | self.book, self.sheet = book, sheet
65 | class MyView(View):
66 | class_ = MySheetView
67 | view = MyView(path.join(test_files,'testall.xls'))
68 | sheet_view = view[0]
69 | self.assertTrue(isinstance(sheet_view, MySheetView))
70 | self.assertTrue(sheet_view.book is view.book)
71 | self.assertTrue(sheet_view.sheet is view.book.sheet_by_index(0))
72 |
73 | def test_passed_in_class(self):
74 | class MySheetView:
75 | def __init__(self, book, sheet):
76 | self.book, self.sheet = book, sheet
77 | view = View(path.join(test_files,'testall.xls'), class_=MySheetView)
78 | sheet_view = view[0]
79 | self.assertTrue(isinstance(sheet_view, MySheetView))
80 | self.assertTrue(sheet_view.book is view.book)
81 | self.assertTrue(sheet_view.sheet is view.book.sheet_by_index(0))
82 |
83 | class SliceTests(Check, TestCase):
84 |
85 | def setUp(self):
86 | self.view = View(path.join(test_files,'testall.xls'))[0]
87 |
88 | def test_slice_int_ranges(self):
89 | self._check(
90 | self.view[1:2, 1:2],
91 | (u'R1C1',),
92 | )
93 | self._check(
94 | self.view[0:2, 0:1],
95 | (u'R0C0', ),
96 | (u'R1C0', ),
97 | )
98 |
99 | def test_slice_open_ranges(self):
100 | self._check(
101 | self.view[1:, 1:],
102 | (u'R1C1',),
103 | ('',),
104 | ('',),
105 | ('',),
106 | ('',)
107 | )
108 | self._check(
109 | self.view[:2, :2],
110 | (u'R0C0', u'R0C1'),
111 | (u'R1C0', u'R1C1'),
112 | )
113 | self._check(
114 | self.view[:, :],
115 | (u'R0C0', u'R0C1'),
116 | (u'R1C0', u'R1C1'),
117 | (u'A merged cell', ''),
118 | ('', ''),
119 | ('', ''),
120 | (u'More merged cells', '')
121 | )
122 |
123 | def test_slice_negative_ranges(self):
124 | self._check(
125 | self.view[-5:, -1:],
126 | (u'R1C1',),
127 | ('',),
128 | ('',),
129 | ('',),
130 | ('',)
131 | )
132 | self._check(
133 | self.view[:-4, :-1],
134 | (u'R0C0', ),
135 | (u'R1C0', ),
136 | )
137 |
138 | def test_slice_string_ranges(self):
139 | self._check(
140 | self.view[Row(1):Row(2), Col('A'):Col('B')],
141 | (u'R0C0', u'R0C1'),
142 | (u'R1C0', u'R1C1'),
143 | )
144 |
145 | class CheckerViewTests(TestCase):
146 |
147 | def test_matches(self):
148 | CheckerView(path.join(test_files,'testall.xls'))['Sheet1'].compare(
149 | (u'R0C0', u'R0C1'),
150 | (u'R1C0', u'R1C1'),
151 | (u'A merged cell', ''),
152 | ('', ''),
153 | ('', ''),
154 | (u'More merged cells', '')
155 | )
156 |
157 |
158 | def test_does_not_match(self):
159 | with ShouldRaise(AssertionError('''\
160 | Sequence not as expected:
161 |
162 | same:
163 | ((u'R0C0', u'R0C1'),
164 | (u'R1C0', u'R1C1'),
165 | (u'A merged cell', ''),
166 | ('', ''),
167 | ('', ''))
168 |
169 | first:
170 | ((u'More merged cells', 'XX'),)
171 |
172 | second:
173 | ((u'More merged cells', ''),)''')):
174 | CheckerView(path.join(test_files,'testall.xls'))['Sheet1'].compare(
175 | (u'R0C0', u'R0C1'),
176 | (u'R1C0', u'R1C1'),
177 | (u'A merged cell', ''),
178 | ('', ''),
179 | ('', ''),
180 | (u'More merged cells', 'XX')
181 | )
182 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/testall.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/testall.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/testnoformatting.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/tests/testnoformatting.xls
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/version.txt:
--------------------------------------------------------------------------------
1 | 1.7.1
2 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlutils-1.7.1/xlutils/view.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2013 Simplistix Ltd
2 | #
3 | # This Software is released under the MIT License:
4 | # http://www.opensource.org/licenses/mit-license.html
5 | # See license.txt for more details.
6 |
7 | from datetime import datetime, time
8 | from xlrd import open_workbook, XL_CELL_DATE, xldate_as_tuple
9 | from xlwt.Utils import col_by_name
10 |
11 | class Index(object):
12 | def __init__(self, name):
13 | self.name = name
14 |
15 | class Row(Index):
16 | """
17 | A one-based, end-inclusive row index for use in slices,
18 | eg:: ``[Row(1):Row(2), :]``
19 | """
20 | def __index__(self):
21 | return int(self.name) - 1
22 |
23 | class Col(Index):
24 | """
25 | An end-inclusive column label index for use in slices,
26 | eg: ``[:, Col('A'), Col('B')]``
27 | """
28 | def __index__(self):
29 | return col_by_name(self.name)
30 |
31 | class SheetView(object):
32 | """
33 | A view on a sheet in a workbook. Should be created by indexing a
34 | :class:`View`.
35 |
36 | These can be sliced to create smaller views.
37 |
38 | Views can be iterated over to return a set of iterables, one for each row
39 | in the view. Data is returned as in the cell values with the exception of
40 | dates and times which are converted into :class:`~datetime.datetime`
41 | instances.
42 | """
43 | def __init__(self, book, sheet, row_slice=None, col_slice=None):
44 | #: The workbook used by this view.
45 | self.book = book
46 | #: The sheet in the workbook used by this view.
47 | self.sheet = sheet
48 | for name, source in (('rows', row_slice), ('cols', col_slice)):
49 | start = 0
50 | stop = max_n = getattr(self.sheet, 'n'+name)
51 | if isinstance(source, slice):
52 | if source.start is not None:
53 | start_val = source.start
54 | if isinstance(start_val, Index):
55 | start_val = start_val.__index__()
56 | if start_val < 0:
57 | start = max(0, max_n + start_val)
58 | elif start_val > 0:
59 | start = min(max_n, start_val)
60 | if source.stop is not None:
61 | stop_val = source.stop
62 | if isinstance(stop_val, Index):
63 | stop_val = stop_val.__index__() + 1
64 | if stop_val < 0:
65 | stop = max(0, max_n + stop_val)
66 | elif stop_val > 0:
67 | stop = min(max_n, stop_val)
68 | setattr(self, name, xrange(start, stop))
69 |
70 | def __row(self, rowx):
71 | for colx in self.cols:
72 | value = self.sheet.cell_value(rowx, colx)
73 | if self.sheet.cell_type(rowx, colx) == XL_CELL_DATE:
74 | date_parts = xldate_as_tuple(value, self.book.datemode)
75 | # Times come out with a year of 0.
76 | if date_parts[0]:
77 | value = datetime(*date_parts)
78 | else:
79 | value = time(*date_parts[3:])
80 | yield value
81 |
82 | def __iter__(self):
83 | for rowx in self.rows:
84 | yield self.__row(rowx)
85 |
86 | def __getitem__(self, slices):
87 | assert isinstance(slices, tuple)
88 | assert len(slices)==2
89 | return self.__class__(self.book, self.sheet, *slices)
90 |
91 |
92 | class View(object):
93 | """
94 | A view wrapper around a :class:`~xlrd.Book` that allows for easy
95 | iteration over the data in a group of cells.
96 |
97 | :param path: The path of the .xls from which to create views.
98 | :param class_: An class to use instead of :class:`SheetView` for views of sheets.
99 | """
100 |
101 | #: This can be replaced in a sub-class to use something other than
102 | #: :class:`SheetView` for the views of sheets returned.
103 | class_ = SheetView
104 |
105 | def __init__(self, path, class_=None):
106 | self.class_ = class_ or self.class_
107 | self.book = open_workbook(path, formatting_info=0, on_demand=True)
108 |
109 | def __getitem__(self, item):
110 | """
111 | Returns of a view of a sheet in the workbook this view is created for.
112 |
113 | :param item: either zero-based integer index or a sheet name.
114 | """
115 | if isinstance(item, int):
116 | sheet = self.book.sheet_by_index(item)
117 | else:
118 | sheet = self.book.sheet_by_name(item)
119 | return self.class_(self.book, sheet)
120 |
121 | class CheckSheet(SheetView):
122 | """
123 | A special sheet view for use in automated tests.
124 | """
125 |
126 | def compare(self, *expected):
127 | """
128 | Call to check whether this view contains the expected data.
129 | If it does not, a descriptive :class:`AssertionError` will
130 | be raised. Requires
131 | `testfixtures `__.
132 |
133 | :param expected: tuples containing the data that should be
134 | present in this view.
135 | """
136 | actual = []
137 | for row in self:
138 | actual.append(tuple(row))
139 |
140 | # late import in case testfixtures isn't around!
141 | from testfixtures import compare as _compare
142 | _compare(expected, tuple(actual))
143 |
144 | class CheckerView(View):
145 | """
146 | A special subclass of :class:`View` for use in automated tests when you
147 | want to check the contents of a generated spreadsheet.
148 |
149 | Views of sheets are returned as :class:`CheckSheet` instances which have a
150 | handy :meth:`~CheckSheet.compare` method.
151 | """
152 | class_ = CheckSheet
153 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/HISTORY.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | xlwt HISTORY
6 |
7 |
8 | Version 0.7.2, released to the general public via PyPI -- 2009-06-01
9 |
10 |
Revision: 3844
11 |
Author: sjmachin
12 |
Date: 11:02:54 AM, Wednesday, 20 May 2009
13 |
Message:
14 |
Added function Utils.rowcol_pair_to_cellrange. (0, 0, 65535, 255) -> "A1:IV65536"
15 |
----
16 |
Modified : /xlwt/trunk/xlwt/Utils.py
17 |
18 |
Revision: 3843
19 |
Author: sjmachin
20 |
Date: 1:46:05 AM, Tuesday, 19 May 2009
21 |
Message:
22 |
Removed Worksheet property show_empty_as_zero,
23 |
and added attribute show_zero_values (default: 1 == True).
24 |
----
25 |
Modified : /xlwt/trunk/xlwt/Worksheet.py
26 |
27 |
Revision: 3841
28 |
Author: sjmachin
29 |
Date: 11:58:51 AM, Wednesday, 13 May 2009
30 |
Message:
31 |
Fixed formula code generation problem with formulas
32 |
including MAX/SUM/etc functions with arguments like A1+123.
33 |
Updated version to 0.7.2alpha.
34 |
----
35 |
Modified : /xlwt/trunk/README.html
36 |
Modified : /xlwt/trunk/setup.py
37 |
Modified : /xlwt/trunk/xlwt/ExcelFormulaParser.py
38 |
Modified : /xlwt/trunk/xlwt/ExcelMagic.py
39 |
Modified : /xlwt/trunk/xlwt/__init__.py
40 |
Modified : /xlwt/trunk/xlwt/excel-formula.g
41 |
42 |
Revision: 3816
43 |
Author: sjmachin
44 |
Date: 8:31:39 PM, Tuesday, 24 March 2009
45 |
Message:
46 |
Added .../doc/pattern_examples.xls and put a pointer to it
47 |
in the easyxf part of Style.py.
48 |
----
49 |
Modified : /xlwt/trunk/xlwt/Style.py
50 |
Added : /xlwt/trunk/xlwt/doc/pattern_examples.xls
51 |
52 |
Revision: 3815
53 |
Author: sjmachin
54 |
Date: 7:54:52 PM, Tuesday, 24 March 2009
55 |
Message:
56 |
Fixed Row.set_cell_formula() bug introduced in 0.7.1.
57 |
Fixed bug(?) with SCL/magnification handling causing(?) Excel
58 |
to raise a dialogue box if sheet is set to open in page preview mode
59 |
and user then switches to normal view.
60 |
Added color and colour as synonyms for font.colour_index in easyxf.
61 |
Removed unused attribute Row.__has_default_format.
62 |
----
63 |
Modified : /xlwt/trunk/xlwt/Row.py
64 |
Modified : /xlwt/trunk/xlwt/Style.py
65 |
Modified : /xlwt/trunk/xlwt/Worksheet.py
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | Version 0.7.1, released to the general public via PyPI -- 2009-03-04
74 |
75 | Version 0.7.0, released to the general public via PyPI
76 |
77 |
78 | - Fixed more bugs and added more various new bits of functionality
79 |
80 |
81 |
82 | Version 0.7.0a4, fork of pyExcelerator, released to python-excel.
83 |
84 |
85 | - Fixed various bugs in pyExcelerator and added various new bits of functionality
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 1.0
2 | Name: xlwt
3 | Version: 0.7.5
4 | Summary: Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform, with Python 2.3 to 2.7
5 | Home-page: http://www.python-excel.org/
6 | Author: John Machin
7 | Author-email: sjmachin@lexicon.net
8 | License: BSD
9 | Download-URL: http://pypi.python.org/pypi/xlwt
10 | Description: xlwt is a library for generating spreadsheet files that are compatible
11 | with Excel 97/2000/XP/2003, OpenOffice.org Calc, and Gnumeric. xlwt has
12 | full support for Unicode. Excel spreadsheets can be generated on any
13 | platform without needing Excel or a COM server. The only requirement is
14 | Python 2.3 to 2.7.
15 |
16 | Keywords: xls excel spreadsheet workbook worksheet pyExcelerator
17 | Platform: Platform Independent
18 | Classifier: Operating System :: OS Independent
19 | Classifier: Programming Language :: Python
20 | Classifier: License :: OSI Approved :: BSD License
21 | Classifier: Development Status :: 5 - Production/Stable
22 | Classifier: Intended Audience :: Developers
23 | Classifier: Topic :: Software Development :: Libraries :: Python Modules
24 | Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
25 | Classifier: Topic :: Database
26 | Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
27 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/README.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | xlwt README
6 |
7 |
8 | Python package "xlwt"
9 |
10 | Purpose: Provide a library for developers to use to generate
11 | spreadsheet files compatible with Microsoft Excel versions 95 to 2003.
12 |
13 | Maintainer: John Machin, Lingfo Pty Ltd (sjmachin@lexicon.net)
14 |
15 | Licence: BSD-style (see licences.py)
16 |
17 | Version of xlwt: 0.7.2
18 |
19 | Version of Python required: 2.3 to 2.6
20 |
21 | External modules required: None
22 |
23 |
24 | The package itself is pure Python with no dependencies on modules or packages
25 | outside the standard Python distribution.
26 |
27 | Quick start:
28 |
29 | import xlwt
30 | from datetime import datetime
31 |
32 | style0 = xlwt.easyxf('font: name Times New Roman, color-index red, bold on',
33 | num_format_str='#,##0.00')
34 | style1 = xlwt.easyxf(num_format_str='D-MMM-YY')
35 |
36 | wb = xlwt.Workbook()
37 | ws = wb.add_sheet('A Test Sheet')
38 |
39 | ws.write(0, 0, 1234.56, style0)
40 | ws.write(1, 0, datetime.now(), style1)
41 | ws.write(2, 0, 1)
42 | ws.write(2, 1, 1)
43 | ws.write(2, 2, xlwt.Formula("A3+B3"))
44 |
45 | wb.save('example.xls')
46 |
47 |
48 | Installation:
49 |
50 |
51 | - Any OS: Unzip the .zip file into a suitable directory,
52 | chdir to that directory, then do "python setup.py install".
53 |
54 | - If PYDIR is your Python installation directory:
55 | the main files are in PYDIR/Lib/site-packages/xlwt,
56 | docs are in the doc subdirectory.
57 |
58 | - If os.sep != "/": make the appropriate adjustments.
59 |
60 |
61 | Download URLs:
62 |
63 | - Packaged: http://pypi.python.org/pypi/xlwt
64 |
65 | - SVN: https://secure.simplistix.co.uk/svn/xlwt/trunk
66 |
67 |
68 | Documentation:
69 |
70 |
71 | Documentation can be found in the 'doc' directory of the xlwt package.
72 | If these aren't sufficient, please consult the code in the
73 | examples directory and the source code itself.
74 |
75 | Problems:
76 |
77 | Try the following in this order:
78 |
79 | - Read the source
80 | - Ask a question on http://groups.google.com/group/python-excel/
81 | - E-mail the xlwt maintainer (sjmachin at lexicon.net), including
82 | "[xlwt]" as part of the message subject.
83 |
84 | Acknowledgements:
85 |
86 | - xlwt is a fork of the pyExcelerator package, which was developed by
87 | Roman V. Kiseliov.
88 | "This product includes software developed by Roman V. Kiseliov <roman@kiseliov.ru>."
89 |
90 | - xlwt uses ANTLR v 2.7.7 to generate its formula compiler.
91 |
92 | - << a growing list of names; see HISTORY.html >>: feedback, testing, test files, ...
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/licences.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/licences.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from distutils.core import setup
4 | from xlwt import __VERSION__
5 |
6 | DESCRIPTION = (
7 | 'Library to create spreadsheet files compatible with '
8 | 'MS Excel 97/2000/XP/2003 XLS files, '
9 | 'on any platform, with Python 2.3 to 2.7'
10 | )
11 |
12 | LONG_DESCRIPTION = """\
13 | xlwt is a library for generating spreadsheet files that are compatible
14 | with Excel 97/2000/XP/2003, OpenOffice.org Calc, and Gnumeric. xlwt has
15 | full support for Unicode. Excel spreadsheets can be generated on any
16 | platform without needing Excel or a COM server. The only requirement is
17 | Python 2.3 to 2.7.
18 | """
19 |
20 | CLASSIFIERS = [
21 | 'Operating System :: OS Independent',
22 | 'Programming Language :: Python',
23 | 'License :: OSI Approved :: BSD License',
24 | 'Development Status :: 5 - Production/Stable',
25 | 'Intended Audience :: Developers',
26 | 'Topic :: Software Development :: Libraries :: Python Modules',
27 | 'Topic :: Office/Business :: Financial :: Spreadsheet',
28 | 'Topic :: Database',
29 | 'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries',
30 | ]
31 |
32 | KEYWORDS = (
33 | 'xls excel spreadsheet workbook worksheet pyExcelerator'
34 | )
35 |
36 | setup(
37 | name = 'xlwt',
38 | version = __VERSION__,
39 | maintainer = 'John Machin',
40 | maintainer_email = 'sjmachin@lexicon.net',
41 | url = 'http://www.python-excel.org/',
42 | download_url = 'http://pypi.python.org/pypi/xlwt',
43 | description = DESCRIPTION,
44 | long_description = LONG_DESCRIPTION,
45 | license = 'BSD',
46 | platforms = 'Platform Independent',
47 | packages = ['xlwt'],
48 | keywords = KEYWORDS,
49 | classifiers = CLASSIFIERS,
50 | package_data = {
51 | 'xlwt': [
52 | 'doc/*.*',
53 | 'examples/*.*',
54 | 'tests/*.*',
55 | ],
56 | },
57 | )
58 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/tests/RKbug.py:
--------------------------------------------------------------------------------
1 | from xlwt import *
2 | import sys
3 | from struct import pack, unpack
4 |
5 | def cellname(rowx, colx):
6 | # quick kludge, works up to 26 cols :-)
7 | return chr(ord('A') + colx) + str(rowx + 1)
8 |
9 | def RK_pack_check(num, anint, case=None):
10 | if not(-0x7fffffff - 1 <= anint <= 0x7fffffff):
11 | print "RK_pack_check: not a signed 32-bit int: %r (%r); case: %r" \
12 | % (anint, hex(anint), case)
13 | pstr = pack(">= 2 # div by 4 to drop the 2 flag bits
78 | if flags & 1:
79 | return i / 100.0
80 | return float(i)
81 | else:
82 | # It's the most significant 30 bits of an IEEE 754 64-bit FP number
83 | d, = unpack('"
29 | ge_pattern = r">="
30 | le_pattern = r"<="
31 |
32 | pattern_type_tuples = (
33 | (flt_const_pattern, ExcelFormulaParser.NUM_CONST),
34 | (int_const_pattern, ExcelFormulaParser.INT_CONST),
35 | (str_const_pattern, ExcelFormulaParser.STR_CONST),
36 | # (range2d_pattern , ExcelFormulaParser.RANGE2D),
37 | (ref2d_r1c1_pattern, ExcelFormulaParser.REF2D_R1C1),
38 | (ref2d_pattern , ExcelFormulaParser.REF2D),
39 | (true_pattern , ExcelFormulaParser.TRUE_CONST),
40 | (false_pattern , ExcelFormulaParser.FALSE_CONST),
41 | (if_pattern , ExcelFormulaParser.FUNC_IF),
42 | (choose_pattern , ExcelFormulaParser.FUNC_CHOOSE),
43 | (name_pattern , ExcelFormulaParser.NAME),
44 | (quotename_pattern, ExcelFormulaParser.QUOTENAME),
45 | (ne_pattern, ExcelFormulaParser.NE),
46 | (ge_pattern, ExcelFormulaParser.GE),
47 | (le_pattern, ExcelFormulaParser.LE),
48 | )
49 |
50 | _re = recompile(
51 | '(' + ')|('.join([i[0] for i in pattern_type_tuples]) + ')',
52 | VERBOSE+LOCALE+IGNORECASE)
53 |
54 | _toktype = [None] + [i[1] for i in pattern_type_tuples]
55 | # need dummy at start because re.MatchObject.lastindex counts from 1
56 |
57 | single_char_lookup = {
58 | '=': ExcelFormulaParser.EQ,
59 | '<': ExcelFormulaParser.LT,
60 | '>': ExcelFormulaParser.GT,
61 | '+': ExcelFormulaParser.ADD,
62 | '-': ExcelFormulaParser.SUB,
63 | '*': ExcelFormulaParser.MUL,
64 | '/': ExcelFormulaParser.DIV,
65 | ':': ExcelFormulaParser.COLON,
66 | ';': ExcelFormulaParser.SEMICOLON,
67 | ',': ExcelFormulaParser.COMMA,
68 | '(': ExcelFormulaParser.LP,
69 | ')': ExcelFormulaParser.RP,
70 | '&': ExcelFormulaParser.CONCAT,
71 | '%': ExcelFormulaParser.PERCENT,
72 | '^': ExcelFormulaParser.POWER,
73 | '!': ExcelFormulaParser.BANG,
74 | }
75 |
76 | class Lexer(TokenStream):
77 | def __init__(self, text):
78 | self._text = text[:]
79 | self._pos = 0
80 | self._line = 0
81 |
82 | def isEOF(self):
83 | return len(self._text) <= self._pos
84 |
85 | def curr_ch(self):
86 | return self._text[self._pos]
87 |
88 | def next_ch(self, n = 1):
89 | self._pos += n
90 |
91 | def is_whitespace(self):
92 | return self.curr_ch() in " \t\n\r\f\v"
93 |
94 | def match_pattern(self):
95 | m = _re.match(self._text, self._pos)
96 | if not m:
97 | return None
98 | self._pos = m.end(0)
99 | return Tok(type = _toktype[m.lastindex], text = m.group(0), col = m.start(0) + 1)
100 |
101 | def nextToken(self):
102 | # skip whitespace
103 | while not self.isEOF() and self.is_whitespace():
104 | self.next_ch()
105 | if self.isEOF():
106 | return Tok(type = EOF)
107 | # first, try to match token with 2 or more chars
108 | t = self.match_pattern()
109 | if t:
110 | return t
111 | # second, we want 1-char tokens
112 | te = self.curr_ch()
113 | try:
114 | ty = single_char_lookup[te]
115 | except KeyError:
116 | raise TokenStreamException(
117 | "Unexpected char %r in column %u." % (self.curr_ch(), self._pos))
118 | self.next_ch()
119 | return Tok(type=ty, text=te, col=self._pos)
120 |
121 | if __name__ == '__main__':
122 | try:
123 | for t in Lexer(""" 1.23 456 "abcd" R2C2 a1 iv65536 true false if choose a_name 'qname' <> >= <= """):
124 | print t
125 | except TokenStreamException, e:
126 | print "error:", e
127 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/UnicodeUtils.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/UnicodeUtils.py
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/Utils.py:
--------------------------------------------------------------------------------
1 | # see the xlwt.license module for details of licensing.
2 |
3 | # Utilities for work with reference to cells and with sheetnames
4 |
5 | import re
6 | from ExcelMagic import MAX_ROW, MAX_COL
7 |
8 | _re_cell_ex = re.compile(r"(\$?)([A-I]?[A-Z])(\$?)(\d+)", re.IGNORECASE)
9 | _re_row_range = re.compile(r"\$?(\d+):\$?(\d+)")
10 | _re_col_range = re.compile(r"\$?([A-I]?[A-Z]):\$?([A-I]?[A-Z])", re.IGNORECASE)
11 | _re_cell_range = re.compile(r"\$?([A-I]?[A-Z]\$?\d+):\$?([A-I]?[A-Z]\$?\d+)", re.IGNORECASE)
12 | _re_cell_ref = re.compile(r"\$?([A-I]?[A-Z]\$?\d+)", re.IGNORECASE)
13 |
14 |
15 | def col_by_name(colname):
16 | """'A' -> 0, 'Z' -> 25, 'AA' -> 26, etc
17 | """
18 | col = 0
19 | power = 1
20 | for i in xrange(len(colname)-1, -1, -1):
21 | ch = colname[i]
22 | col += (ord(ch) - ord('A') + 1) * power
23 | power *= 26
24 | return col - 1
25 |
26 |
27 | def cell_to_rowcol(cell):
28 | """Convert an Excel cell reference string in A1 notation
29 | to numeric row/col notation.
30 |
31 | Returns: row, col, row_abs, col_abs
32 |
33 | """
34 | m = _re_cell_ex.match(cell)
35 | if not m:
36 | raise Exception("Ill-formed single_cell reference: %s" % cell)
37 | col_abs, col, row_abs, row = m.groups()
38 | row_abs = bool(row_abs)
39 | col_abs = bool(col_abs)
40 | row = int(row) - 1
41 | col = col_by_name(col.upper())
42 | return row, col, row_abs, col_abs
43 |
44 |
45 | def cell_to_rowcol2(cell):
46 | """Convert an Excel cell reference string in A1 notation
47 | to numeric row/col notation.
48 |
49 | Returns: row, col
50 |
51 | """
52 | m = _re_cell_ex.match(cell)
53 | if not m:
54 | raise Exception("Error in cell format")
55 | col_abs, col, row_abs, row = m.groups()
56 | # Convert base26 column string to number
57 | # All your Base are belong to us.
58 | row = int(row) - 1
59 | col = col_by_name(col.upper())
60 | return row, col
61 |
62 |
63 | def rowcol_to_cell(row, col, row_abs=False, col_abs=False):
64 | """Convert numeric row/col notation to an Excel cell reference string in
65 | A1 notation.
66 |
67 | """
68 | assert 0 <= row < MAX_ROW # MAX_ROW counts from 1
69 | assert 0 <= col < MAX_COL # MAX_COL counts from 1
70 | d = col // 26
71 | m = col % 26
72 | chr1 = "" # Most significant character in AA1
73 | if row_abs:
74 | row_abs = '$'
75 | else:
76 | row_abs = ''
77 | if col_abs:
78 | col_abs = '$'
79 | else:
80 | col_abs = ''
81 | if d > 0:
82 | chr1 = chr(ord('A') + d - 1)
83 | chr2 = chr(ord('A') + m)
84 | # Zero index to 1-index
85 | return col_abs + chr1 + chr2 + row_abs + str(row + 1)
86 |
87 | def rowcol_pair_to_cellrange(row1, col1, row2, col2,
88 | row1_abs=False, col1_abs=False, row2_abs=False, col2_abs=False):
89 | """Convert two (row,column) pairs
90 | into a cell range string in A1:B2 notation.
91 |
92 | Returns: cell range string
93 | """
94 | assert row1 <= row2
95 | assert col1 <= col2
96 | return (
97 | rowcol_to_cell(row1, col1, row1_abs, col1_abs)
98 | + ":"
99 | + rowcol_to_cell(row2, col2, row2_abs, col2_abs)
100 | )
101 |
102 | def cellrange_to_rowcol_pair(cellrange):
103 | """Convert cell range string in A1 notation to numeric row/col
104 | pair.
105 |
106 | Returns: row1, col1, row2, col2
107 |
108 | """
109 | cellrange = cellrange.upper()
110 | # Convert a row range: '1:3'
111 | res = _re_row_range.match(cellrange)
112 | if res:
113 | row1 = int(res.group(1)) - 1
114 | col1 = 0
115 | row2 = int(res.group(2)) - 1
116 | col2 = -1
117 | return row1, col1, row2, col2
118 | # Convert a column range: 'A:A' or 'B:G'.
119 | # A range such as A:A is equivalent to A1:A16384, so add rows as required
120 | res = _re_col_range.match(cellrange)
121 | if res:
122 | col1 = col_by_name(res.group(1).upper())
123 | row1 = 0
124 | col2 = col_by_name(res.group(2).upper())
125 | row2 = -1
126 | return row1, col1, row2, col2
127 | # Convert a cell range: 'A1:B7'
128 | res = _re_cell_range.match(cellrange)
129 | if res:
130 | row1, col1 = cell_to_rowcol2(res.group(1))
131 | row2, col2 = cell_to_rowcol2(res.group(2))
132 | return row1, col1, row2, col2
133 | # Convert a cell reference: 'A1' or 'AD2000'
134 | res = _re_cell_ref.match(cellrange)
135 | if res:
136 | row1, col1 = cell_to_rowcol2(res.group(1))
137 | return row1, col1, row1, col1
138 | raise Exception("Unknown cell reference %s" % (cellrange))
139 |
140 |
141 | def cell_to_packed_rowcol(cell):
142 | """ pack row and column into the required 4 byte format """
143 | row, col, row_abs, col_abs = cell_to_rowcol(cell)
144 | if col >= MAX_COL:
145 | raise Exception("Column %s greater than IV in formula" % cell)
146 | if row >= MAX_ROW: # this for BIFF8. for BIFF7 available 2^14
147 | raise Exception("Row %s greater than %d in formula" % (cell, MAX_ROW))
148 | col |= int(not row_abs) << 15
149 | col |= int(not col_abs) << 14
150 | return row, col
151 |
152 | # === sheetname functions ===
153 |
154 | def valid_sheet_name(sheet_name):
155 | if sheet_name == u"" or sheet_name[0] == u"'" or len(sheet_name) > 31:
156 | return False
157 | for c in sheet_name:
158 | if c in u"[]:\\?/*\x00":
159 | return False
160 | return True
161 |
162 | def quote_sheet_name(unquoted_sheet_name):
163 | if not valid_sheet_name(unquoted_sheet_name):
164 | raise Exception(
165 | 'attempt to quote an invalid worksheet name %r' % unquoted_sheet_name)
166 | return u"'" + unquoted_sheet_name.replace(u"'", u"''") + u"'"
167 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/__init__.py:
--------------------------------------------------------------------------------
1 | __VERSION__ = '0.7.5'
2 |
3 | from Workbook import Workbook
4 | from Worksheet import Worksheet
5 | from Row import Row
6 | from Column import Column
7 | from Formatting import Font, Alignment, Borders, Pattern, Protection
8 | from Style import XFStyle, easyxf, easyfont, add_palette_colour
9 | from ExcelFormula import *
10 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/big-16Mb.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # tries stress SST, SAT and MSAT
3 |
4 | from time import *
5 | from xlwt.Workbook import *
6 | from xlwt.Style import *
7 |
8 | style = XFStyle()
9 |
10 | wb = Workbook()
11 | ws0 = wb.add_sheet('0')
12 |
13 | colcount = 200 + 1
14 | rowcount = 6000 + 1
15 |
16 | t0 = time()
17 | print "\nstart: %s" % ctime(t0)
18 |
19 | print "Filling..."
20 | for col in xrange(colcount):
21 | print "[%d]" % col,
22 | for row in xrange(rowcount):
23 | #ws0.write(row, col, "BIG(%d, %d)" % (row, col))
24 | ws0.write(row, col, "BIG")
25 |
26 | t1 = time() - t0
27 | print "\nsince starting elapsed %.2f s" % (t1)
28 |
29 | print "Storing..."
30 | wb.save('big-16Mb.xls')
31 |
32 | t2 = time() - t0
33 | print "since starting elapsed %.2f s" % (t2)
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/big-35Mb.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # tries stress SST, SAT and MSAT
3 |
4 | from time import *
5 | from xlwt import *
6 |
7 | style = XFStyle()
8 |
9 | wb = Workbook()
10 | ws0 = wb.add_sheet('0')
11 |
12 | colcount = 200 + 1
13 | rowcount = 6000 + 1
14 |
15 | t0 = time()
16 |
17 | for col in xrange(colcount):
18 | for row in xrange(rowcount):
19 | ws0.write(row, col, "BIG(%d, %d)" % (row, col))
20 |
21 | t1 = time() - t0
22 | print "\nsince starting elapsed %.2f s" % (t1)
23 |
24 | print "Storing..."
25 | wb.save('big-35Mb.xls')
26 |
27 | t2 = time() - t0
28 | print "since starting elapsed %.2f s" % (t2)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/blanks.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | font0 = Font()
8 | font0.name = 'Times New Roman'
9 | font0.struck_out = True
10 | font0.bold = True
11 |
12 | style0 = XFStyle()
13 | style0.font = font0
14 |
15 |
16 | wb = Workbook()
17 | ws0 = wb.add_sheet('0')
18 |
19 | ws0.write(1, 1, 'Test', style0)
20 |
21 | for i in range(0, 0x53):
22 | borders = Borders()
23 | borders.left = i
24 | borders.right = i
25 | borders.top = i
26 | borders.bottom = i
27 |
28 | style = XFStyle()
29 | style.borders = borders
30 |
31 | ws0.write(i, 2, '', style)
32 | ws0.write(i, 3, hex(i), style0)
33 |
34 | ws0.write_merge(5, 8, 6, 10, "")
35 |
36 | wb.save('blanks.xls')
37 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/col_width.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 | __rev_id__ = """$Id$"""
5 |
6 |
7 | from xlwt import *
8 |
9 | w = Workbook()
10 | ws = w.add_sheet('Hey, Dude')
11 |
12 | for i in range(6, 80):
13 | fnt = Font()
14 | fnt.height = i*20
15 | style = XFStyle()
16 | style.font = fnt
17 | ws.write(1, i, 'Test')
18 | ws.col(i).width = 0x0d00 + i
19 | w.save('col_width.xls')
20 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/country.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1252 -*-
3 | # Copyright (C) 2007 John Machin
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | w.country_code = 61
9 | ws = w.add_sheet('AU')
10 | w.save('country.xls')
11 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/dates.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 | from datetime import datetime
7 |
8 | w = Workbook()
9 | ws = w.add_sheet('Hey, Dude')
10 |
11 | fmts = [
12 | 'M/D/YY',
13 | 'D-MMM-YY',
14 | 'D-MMM',
15 | 'MMM-YY',
16 | 'h:mm AM/PM',
17 | 'h:mm:ss AM/PM',
18 | 'h:mm',
19 | 'h:mm:ss',
20 | 'M/D/YY h:mm',
21 | 'mm:ss',
22 | '[h]:mm:ss',
23 | 'mm:ss.0',
24 | ]
25 |
26 | i = 0
27 | for fmt in fmts:
28 | ws.write(i, 0, fmt)
29 |
30 | style = XFStyle()
31 | style.num_format_str = fmt
32 |
33 | ws.write(i, 4, datetime.now(), style)
34 |
35 | i += 1
36 |
37 | w.save('dates.xls')
38 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/format.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | font0 = Font()
8 | font0.name = 'Times New Roman'
9 | font0.struck_out = True
10 | font0.bold = True
11 |
12 | style0 = XFStyle()
13 | style0.font = font0
14 |
15 |
16 | wb = Workbook()
17 | ws0 = wb.add_sheet('0')
18 |
19 | ws0.write(1, 1, 'Test', style0)
20 |
21 | for i in range(0, 0x53):
22 | fnt = Font()
23 | fnt.name = 'Arial'
24 | fnt.colour_index = i
25 | fnt.outline = True
26 |
27 | borders = Borders()
28 | borders.left = i
29 |
30 | style = XFStyle()
31 | style.font = fnt
32 | style.borders = borders
33 |
34 | ws0.write(i, 2, 'colour', style)
35 | ws0.write(i, 3, hex(i), style0)
36 |
37 |
38 | wb.save('format.xls')
39 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/formula_names.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 | from xlwt.ExcelFormulaParser import FormulaParseException
7 |
8 | w = Workbook()
9 | ws = w.add_sheet('F')
10 |
11 | ## This example is a little silly since the formula building is
12 | ## so simplistic that it often fails because the generated text
13 | ## has the wrong number of parameters for the function being
14 | ## tested.
15 |
16 | i = 0
17 | succeed_count = 0
18 | fail_count = 0
19 | for n in sorted(ExcelMagic.std_func_by_name):
20 | ws.write(i, 0, n)
21 | text = n + "($A$1)"
22 | try:
23 | formula = Formula(text)
24 | except FormulaParseException,e:
25 | print "Could not parse %r: %s" % (text,e.args[0])
26 | fail_count += 1
27 | else:
28 | ws.write(i, 3, formula)
29 | succeed_count += 1
30 | i += 1
31 |
32 | w.save('formula_names.xls')
33 |
34 | print "succeeded with %i functions, failed with %i" % (succeed_count,fail_count)
35 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/formulas.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws = w.add_sheet('F')
9 |
10 | ws.write(0, 0, Formula("-(1+1)"))
11 | ws.write(1, 0, Formula("-(1+1)/(-2-2)"))
12 | ws.write(2, 0, Formula("-(134.8780789+1)"))
13 | ws.write(3, 0, Formula("-(134.8780789e-10+1)"))
14 | ws.write(4, 0, Formula("-1/(1+1)+9344"))
15 |
16 | ws.write(0, 1, Formula("-(1+1)"))
17 | ws.write(1, 1, Formula("-(1+1)/(-2-2)"))
18 | ws.write(2, 1, Formula("-(134.8780789+1)"))
19 | ws.write(3, 1, Formula("-(134.8780789e-10+1)"))
20 | ws.write(4, 1, Formula("-1/(1+1)+9344"))
21 |
22 | ws.write(0, 2, Formula("A1*B1"))
23 | ws.write(1, 2, Formula("A2*B2"))
24 | ws.write(2, 2, Formula("A3*B3"))
25 | ws.write(3, 2, Formula("A4*B4*sin(pi()/4)"))
26 | ws.write(4, 2, Formula("A5%*B5*pi()/1000"))
27 |
28 | ##############
29 | ## NOTE: parameters are separated by semicolon!!!
30 | ##############
31 |
32 |
33 | ws.write(5, 2, Formula("C1+C2+C3+C4+C5/(C1+C2+C3+C4/(C1+C2+C3+C4/(C1+C2+C3+C4)+C5)+C5)-20.3e-2"))
34 | ws.write(5, 3, Formula("C1^2"))
35 | ws.write(6, 2, Formula("SUM(C1;C2;;;;;C3;;;C4)"))
36 | ws.write(6, 3, Formula("SUM($A$1:$C$5)"))
37 |
38 | ws.write(7, 0, Formula('"lkjljllkllkl"'))
39 | ws.write(7, 1, Formula('"yuyiyiyiyi"'))
40 | ws.write(7, 2, Formula('A8 & B8 & A8'))
41 | ws.write(8, 2, Formula('now()'))
42 |
43 | ws.write(10, 2, Formula('TRUE'))
44 | ws.write(11, 2, Formula('FALSE'))
45 | ws.write(12, 3, Formula('IF(A1>A2;3;"hkjhjkhk")'))
46 |
47 | w.save('formulas.xls')
48 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/hyperlinks.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | f = Font()
8 | f.height = 20*72
9 | f.name = 'Verdana'
10 | f.bold = True
11 | f.underline = Font.UNDERLINE_DOUBLE
12 | f.colour_index = 4
13 |
14 | h_style = XFStyle()
15 | h_style.font = f
16 |
17 | w = Workbook()
18 | ws = w.add_sheet('F')
19 |
20 | ##############
21 | ## NOTE: parameters are separated by semicolon!!!
22 | ##############
23 |
24 | n = "HYPERLINK"
25 | ws.write_merge(1, 1, 1, 10, Formula(n + '("http://www.irs.gov/pub/irs-pdf/f1000.pdf";"f1000.pdf")'), h_style)
26 | ws.write_merge(2, 2, 2, 25, Formula(n + '("mailto:roman.kiseliov@gmail.com?subject=pyExcelerator-feedback&Body=Hello,%20Roman!";"pyExcelerator-feedback")'), h_style)
27 |
28 | w.save("hyperlinks.xls")
29 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/image.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws = w.add_sheet('Image')
9 | ws.insert_bitmap('python.bmp', 2, 2)
10 | ws.insert_bitmap('python.bmp', 10, 2)
11 |
12 | w.save('image.xls')
13 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/merged.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | fnt = Font()
8 | fnt.name = 'Arial'
9 | fnt.colour_index = 4
10 | fnt.bold = True
11 |
12 | borders = Borders()
13 | borders.left = 6
14 | borders.right = 6
15 | borders.top = 6
16 | borders.bottom = 6
17 |
18 | al = Alignment()
19 | al.horz = Alignment.HORZ_CENTER
20 | al.vert = Alignment.VERT_CENTER
21 |
22 | style = XFStyle()
23 | style.font = fnt
24 | style.borders = borders
25 | style.alignment = al
26 |
27 |
28 | wb = Workbook()
29 | ws0 = wb.add_sheet('sheet0')
30 | ws1 = wb.add_sheet('sheet1')
31 | ws2 = wb.add_sheet('sheet2')
32 |
33 | for i in range(0, 0x200, 2):
34 | ws0.write_merge(i, i+1, 1, 5, 'test %d' % i, style)
35 | ws1.write_merge(i, i, 1, 7, 'test %d' % i, style)
36 | ws2.write_merge(i, i+1, 1, 7 + (i%10), 'test %d' % i, style)
37 |
38 |
39 | wb.save('merged.xls')
40 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/merged0.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | wb = Workbook()
8 | ws0 = wb.add_sheet('sheet0')
9 |
10 |
11 | fnt = Font()
12 | fnt.name = 'Arial'
13 | fnt.colour_index = 4
14 | fnt.bold = True
15 |
16 | borders = Borders()
17 | borders.left = 6
18 | borders.right = 6
19 | borders.top = 6
20 | borders.bottom = 6
21 |
22 | style = XFStyle()
23 | style.font = fnt
24 | style.borders = borders
25 |
26 | ws0.write_merge(3, 3, 1, 5, 'test1', style)
27 | ws0.write_merge(4, 10, 1, 5, 'test2', style)
28 | ws0.col(1).width = 0x0d00
29 |
30 | wb.save('merged0.xls')
31 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/merged1.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | wb = Workbook()
8 | ws0 = wb.add_sheet('sheet0')
9 |
10 | fnt1 = Font()
11 | fnt1.name = 'Verdana'
12 | fnt1.bold = True
13 | fnt1.height = 18*0x14
14 |
15 | pat1 = Pattern()
16 | pat1.pattern = Pattern.SOLID_PATTERN
17 | pat1.pattern_fore_colour = 0x16
18 |
19 | brd1 = Borders()
20 | brd1.left = 0x06
21 | brd1.right = 0x06
22 | brd1.top = 0x06
23 | brd1.bottom = 0x06
24 |
25 | fnt2 = Font()
26 | fnt2.name = 'Verdana'
27 | fnt2.bold = True
28 | fnt2.height = 14*0x14
29 |
30 | brd2 = Borders()
31 | brd2.left = 0x01
32 | brd2.right = 0x01
33 | brd2.top = 0x01
34 | brd2.bottom = 0x01
35 |
36 | pat2 = Pattern()
37 | pat2.pattern = Pattern.SOLID_PATTERN
38 | pat2.pattern_fore_colour = 0x01F
39 |
40 | fnt3 = Font()
41 | fnt3.name = 'Verdana'
42 | fnt3.bold = True
43 | fnt3.italic = True
44 | fnt3.height = 12*0x14
45 |
46 | brd3 = Borders()
47 | brd3.left = 0x07
48 | brd3.right = 0x07
49 | brd3.top = 0x07
50 | brd3.bottom = 0x07
51 |
52 | fnt4 = Font()
53 |
54 | al1 = Alignment()
55 | al1.horz = Alignment.HORZ_CENTER
56 | al1.vert = Alignment.VERT_CENTER
57 |
58 | al2 = Alignment()
59 | al2.horz = Alignment.HORZ_RIGHT
60 | al2.vert = Alignment.VERT_CENTER
61 |
62 | al3 = Alignment()
63 | al3.horz = Alignment.HORZ_LEFT
64 | al3.vert = Alignment.VERT_CENTER
65 |
66 | style1 = XFStyle()
67 | style1.font = fnt1
68 | style1.alignment = al1
69 | style1.pattern = pat1
70 | style1.borders = brd1
71 |
72 | style2 = XFStyle()
73 | style2.font = fnt2
74 | style2.alignment = al1
75 | style2.pattern = pat2
76 | style2.borders = brd2
77 |
78 | style3 = XFStyle()
79 | style3.font = fnt3
80 | style3.alignment = al1
81 | style3.pattern = pat2
82 | style3.borders = brd3
83 |
84 | price_style = XFStyle()
85 | price_style.font = fnt4
86 | price_style.alignment = al2
87 | price_style.borders = brd3
88 | price_style.num_format_str = '_(#,##0.00_) "money"'
89 |
90 | ware_style = XFStyle()
91 | ware_style.font = fnt4
92 | ware_style.alignment = al3
93 | ware_style.borders = brd3
94 |
95 |
96 | ws0.merge(3, 3, 1, 5, style1)
97 | ws0.merge(4, 10, 1, 6, style2)
98 | ws0.merge(14, 16, 1, 7, style3)
99 | ws0.col(1).width = 0x0d00
100 |
101 |
102 | wb.save('merged1.xls')
103 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/mini.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws = w.add_sheet('xlwt was here')
9 | w.save('mini.xls')
10 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/num_formats.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws = w.add_sheet('Hey, Dude')
9 |
10 | fmts = [
11 | 'general',
12 | '0',
13 | '0.00',
14 | '#,##0',
15 | '#,##0.00',
16 | '"$"#,##0_);("$"#,##',
17 | '"$"#,##0_);[Red]("$"#,##',
18 | '"$"#,##0.00_);("$"#,##',
19 | '"$"#,##0.00_);[Red]("$"#,##',
20 | '0%',
21 | '0.00%',
22 | '0.00E+00',
23 | '# ?/?',
24 | '# ??/??',
25 | 'M/D/YY',
26 | 'D-MMM-YY',
27 | 'D-MMM',
28 | 'MMM-YY',
29 | 'h:mm AM/PM',
30 | 'h:mm:ss AM/PM',
31 | 'h:mm',
32 | 'h:mm:ss',
33 | 'M/D/YY h:mm',
34 | '_(#,##0_);(#,##0)',
35 | '_(#,##0_);[Red](#,##0)',
36 | '_(#,##0.00_);(#,##0.00)',
37 | '_(#,##0.00_);[Red](#,##0.00)',
38 | '_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',
39 | '_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',
40 | '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',
41 | '_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',
42 | 'mm:ss',
43 | '[h]:mm:ss',
44 | 'mm:ss.0',
45 | '##0.0E+0',
46 | '@'
47 | ]
48 |
49 | i = 0
50 | for fmt in fmts:
51 | ws.write(i, 0, fmt)
52 |
53 | style = XFStyle()
54 | style.num_format_str = fmt
55 |
56 | ws.write(i, 4, -1278.9078, style)
57 |
58 | i += 1
59 |
60 | w.save('num_formats.xls')
61 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/outline.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | fnt = Font()
8 | fnt.name = 'Arial'
9 | fnt.colour_index = 4
10 | fnt.bold = True
11 |
12 | borders = Borders()
13 | borders.left = 6
14 | borders.right = 6
15 | borders.top = 6
16 | borders.bottom = 6
17 |
18 | style = XFStyle()
19 | style.font = fnt
20 | style.borders = borders
21 |
22 | wb = Workbook()
23 |
24 | ws0 = wb.add_sheet('Rows Outline')
25 |
26 | ws0.write_merge(1, 1, 1, 5, 'test 1', style)
27 | ws0.write_merge(2, 2, 1, 4, 'test 1', style)
28 | ws0.write_merge(3, 3, 1, 3, 'test 2', style)
29 | ws0.write_merge(4, 4, 1, 4, 'test 1', style)
30 | ws0.write_merge(5, 5, 1, 4, 'test 3', style)
31 | ws0.write_merge(6, 6, 1, 5, 'test 1', style)
32 | ws0.write_merge(7, 7, 1, 5, 'test 4', style)
33 | ws0.write_merge(8, 8, 1, 4, 'test 1', style)
34 | ws0.write_merge(9, 9, 1, 3, 'test 5', style)
35 |
36 | ws0.row(1).level = 1
37 | ws0.row(2).level = 1
38 | ws0.row(3).level = 2
39 | ws0.row(4).level = 2
40 | ws0.row(5).level = 2
41 | ws0.row(6).level = 2
42 | ws0.row(7).level = 2
43 | ws0.row(8).level = 1
44 | ws0.row(9).level = 1
45 |
46 |
47 | ws1 = wb.add_sheet('Columns Outline')
48 |
49 | ws1.write_merge(1, 1, 1, 5, 'test 1', style)
50 | ws1.write_merge(2, 2, 1, 4, 'test 1', style)
51 | ws1.write_merge(3, 3, 1, 3, 'test 2', style)
52 | ws1.write_merge(4, 4, 1, 4, 'test 1', style)
53 | ws1.write_merge(5, 5, 1, 4, 'test 3', style)
54 | ws1.write_merge(6, 6, 1, 5, 'test 1', style)
55 | ws1.write_merge(7, 7, 1, 5, 'test 4', style)
56 | ws1.write_merge(8, 8, 1, 4, 'test 1', style)
57 | ws1.write_merge(9, 9, 1, 3, 'test 5', style)
58 |
59 | ws1.col(1).level = 1
60 | ws1.col(2).level = 1
61 | ws1.col(3).level = 2
62 | ws1.col(4).level = 2
63 | ws1.col(5).level = 2
64 | ws1.col(6).level = 2
65 | ws1.col(7).level = 2
66 | ws1.col(8).level = 1
67 | ws1.col(9).level = 1
68 |
69 |
70 | ws2 = wb.add_sheet('Rows and Columns Outline')
71 |
72 | ws2.write_merge(1, 1, 1, 5, 'test 1', style)
73 | ws2.write_merge(2, 2, 1, 4, 'test 1', style)
74 | ws2.write_merge(3, 3, 1, 3, 'test 2', style)
75 | ws2.write_merge(4, 4, 1, 4, 'test 1', style)
76 | ws2.write_merge(5, 5, 1, 4, 'test 3', style)
77 | ws2.write_merge(6, 6, 1, 5, 'test 1', style)
78 | ws2.write_merge(7, 7, 1, 5, 'test 4', style)
79 | ws2.write_merge(8, 8, 1, 4, 'test 1', style)
80 | ws2.write_merge(9, 9, 1, 3, 'test 5', style)
81 |
82 | ws2.row(1).level = 1
83 | ws2.row(2).level = 1
84 | ws2.row(3).level = 2
85 | ws2.row(4).level = 2
86 | ws2.row(5).level = 2
87 | ws2.row(6).level = 2
88 | ws2.row(7).level = 2
89 | ws2.row(8).level = 1
90 | ws2.row(9).level = 1
91 |
92 | ws2.write_merge(1, 1, 1, 5, 'test 1', style)
93 | ws2.write_merge(2, 2, 1, 4, 'test 1', style)
94 | ws2.write_merge(3, 3, 1, 3, 'test 2', style)
95 | ws2.write_merge(4, 4, 1, 4, 'test 1', style)
96 | ws2.write_merge(5, 5, 1, 4, 'test 3', style)
97 | ws2.write_merge(6, 6, 1, 5, 'test 1', style)
98 | ws2.write_merge(7, 7, 1, 5, 'test 4', style)
99 | ws2.write_merge(8, 8, 1, 4, 'test 1', style)
100 | ws2.write_merge(9, 9, 1, 3, 'test 5', style)
101 |
102 | ws2.col(1).level = 1
103 | ws2.col(2).level = 1
104 | ws2.col(3).level = 2
105 | ws2.col(4).level = 2
106 | ws2.col(5).level = 2
107 | ws2.col(6).level = 2
108 | ws2.col(7).level = 2
109 | ws2.col(8).level = 1
110 | ws2.col(9).level = 1
111 |
112 |
113 | wb.save('outline.xls')
114 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/panes.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws1 = w.add_sheet('sheet 1')
9 | ws2 = w.add_sheet('sheet 2')
10 | ws3 = w.add_sheet('sheet 3')
11 | ws4 = w.add_sheet('sheet 4')
12 | ws5 = w.add_sheet('sheet 5')
13 | ws6 = w.add_sheet('sheet 6')
14 |
15 | for i in range(0x100):
16 | ws1.write(i/0x10, i%0x10, i)
17 |
18 | for i in range(0x100):
19 | ws2.write(i/0x10, i%0x10, i)
20 |
21 | for i in range(0x100):
22 | ws3.write(i/0x10, i%0x10, i)
23 |
24 | for i in range(0x100):
25 | ws4.write(i/0x10, i%0x10, i)
26 |
27 | for i in range(0x100):
28 | ws5.write(i/0x10, i%0x10, i)
29 |
30 | for i in range(0x100):
31 | ws6.write(i/0x10, i%0x10, i)
32 |
33 | ws1.panes_frozen = True
34 | ws1.horz_split_pos = 2
35 |
36 | ws2.panes_frozen = True
37 | ws2.vert_split_pos = 2
38 |
39 | ws3.panes_frozen = True
40 | ws3.horz_split_pos = 1
41 | ws3.vert_split_pos = 1
42 |
43 | ws4.panes_frozen = False
44 | ws4.horz_split_pos = 12
45 | ws4.horz_split_first_visible = 2
46 |
47 | ws5.panes_frozen = False
48 | ws5.vert_split_pos = 40
49 | ws4.vert_split_first_visible = 2
50 |
51 | ws6.panes_frozen = False
52 | ws6.horz_split_pos = 12
53 | ws4.horz_split_first_visible = 2
54 | ws6.vert_split_pos = 40
55 | ws4.vert_split_first_visible = 2
56 |
57 | w.save('panes.xls')
58 |
59 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/parse-fmla.py:
--------------------------------------------------------------------------------
1 | from xlwt import ExcelFormulaParser, ExcelFormula
2 | import sys
3 |
4 | f = ExcelFormula.Formula(
5 | """ -((1.80 + 2.898 * 1)/(1.80 + 2.898))*
6 | AVERAGE((1.80 + 2.898 * 1)/(1.80 + 2.898);
7 | (1.80 + 2.898 * 1)/(1.80 + 2.898);
8 | (1.80 + 2.898 * 1)/(1.80 + 2.898)) +
9 | SIN(PI()/4)""")
10 |
11 | #for t in f.rpn():
12 | # print "%15s %15s" % (ExcelFormulaParser.PtgNames[t[0]], t[1])
13 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/protection.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2005 Kiseliov Roman
2 |
3 | from xlwt import *
4 |
5 | fnt = Font()
6 | fnt.name = 'Arial'
7 | fnt.colour_index = 4
8 | fnt.bold = True
9 |
10 | borders = Borders()
11 | borders.left = 6
12 | borders.right = 6
13 | borders.top = 6
14 | borders.bottom = 6
15 |
16 | style = XFStyle()
17 | style.font = fnt
18 | style.borders = borders
19 |
20 | wb = Workbook()
21 |
22 | ws0 = wb.add_sheet('Rows Outline')
23 |
24 | ws0.write_merge(1, 1, 1, 5, 'test 1', style)
25 | ws0.write_merge(2, 2, 1, 4, 'test 1', style)
26 | ws0.write_merge(3, 3, 1, 3, 'test 2', style)
27 | ws0.write_merge(4, 4, 1, 4, 'test 1', style)
28 | ws0.write_merge(5, 5, 1, 4, 'test 3', style)
29 | ws0.write_merge(6, 6, 1, 5, 'test 1', style)
30 | ws0.write_merge(7, 7, 1, 5, 'test 4', style)
31 | ws0.write_merge(8, 8, 1, 4, 'test 1', style)
32 | ws0.write_merge(9, 9, 1, 3, 'test 5', style)
33 |
34 | ws0.row(1).level = 1
35 | ws0.row(2).level = 1
36 | ws0.row(3).level = 2
37 | ws0.row(4).level = 2
38 | ws0.row(5).level = 2
39 | ws0.row(6).level = 2
40 | ws0.row(7).level = 2
41 | ws0.row(8).level = 1
42 | ws0.row(9).level = 1
43 |
44 |
45 | ws1 = wb.add_sheet('Columns Outline')
46 |
47 | ws1.write_merge(1, 1, 1, 5, 'test 1', style)
48 | ws1.write_merge(2, 2, 1, 4, 'test 1', style)
49 | ws1.write_merge(3, 3, 1, 3, 'test 2', style)
50 | ws1.write_merge(4, 4, 1, 4, 'test 1', style)
51 | ws1.write_merge(5, 5, 1, 4, 'test 3', style)
52 | ws1.write_merge(6, 6, 1, 5, 'test 1', style)
53 | ws1.write_merge(7, 7, 1, 5, 'test 4', style)
54 | ws1.write_merge(8, 8, 1, 4, 'test 1', style)
55 | ws1.write_merge(9, 9, 1, 3, 'test 5', style)
56 |
57 | ws1.col(1).level = 1
58 | ws1.col(2).level = 1
59 | ws1.col(3).level = 2
60 | ws1.col(4).level = 2
61 | ws1.col(5).level = 2
62 | ws1.col(6).level = 2
63 | ws1.col(7).level = 2
64 | ws1.col(8).level = 1
65 | ws1.col(9).level = 1
66 |
67 |
68 | ws2 = wb.add_sheet('Rows and Columns Outline')
69 |
70 | ws2.write_merge(1, 1, 1, 5, 'test 1', style)
71 | ws2.write_merge(2, 2, 1, 4, 'test 1', style)
72 | ws2.write_merge(3, 3, 1, 3, 'test 2', style)
73 | ws2.write_merge(4, 4, 1, 4, 'test 1', style)
74 | ws2.write_merge(5, 5, 1, 4, 'test 3', style)
75 | ws2.write_merge(6, 6, 1, 5, 'test 1', style)
76 | ws2.write_merge(7, 7, 1, 5, 'test 4', style)
77 | ws2.write_merge(8, 8, 1, 4, 'test 1', style)
78 | ws2.write_merge(9, 9, 1, 3, 'test 5', style)
79 |
80 | ws2.row(1).level = 1
81 | ws2.row(2).level = 1
82 | ws2.row(3).level = 2
83 | ws2.row(4).level = 2
84 | ws2.row(5).level = 2
85 | ws2.row(6).level = 2
86 | ws2.row(7).level = 2
87 | ws2.row(8).level = 1
88 | ws2.row(9).level = 1
89 |
90 | ws2.col(1).level = 1
91 | ws2.col(2).level = 1
92 | ws2.col(3).level = 2
93 | ws2.col(4).level = 2
94 | ws2.col(5).level = 2
95 | ws2.col(6).level = 2
96 | ws2.col(7).level = 2
97 | ws2.col(8).level = 1
98 | ws2.col(9).level = 1
99 |
100 |
101 | ws0.protect = True
102 | ws0.wnd_protect = True
103 | ws0.obj_protect = True
104 | ws0.scen_protect = True
105 | ws0.password = "123456"
106 |
107 | ws1.protect = True
108 | ws1.wnd_protect = True
109 | ws1.obj_protect = True
110 | ws1.scen_protect = True
111 | ws1.password = "abcdefghij"
112 |
113 | ws2.protect = True
114 | ws2.wnd_protect = True
115 | ws2.obj_protect = True
116 | ws2.scen_protect = True
117 | ws2.password = "ok"
118 |
119 | wb.protect = True
120 | wb.wnd_protect = True
121 | wb.obj_protect = True
122 | wb.save('protection.xls')
123 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/python.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/python.bmp
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/row_styles.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws = w.add_sheet('Hey, Dude')
9 |
10 | for i in range(6, 80):
11 | fnt = Font()
12 | fnt.height = i*20
13 | style = XFStyle()
14 | style.font = fnt
15 | ws.write(i, 1, 'Test')
16 | ws.row(i).set_style(style)
17 | w.save('row_styles.xls')
18 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/row_styles_empty.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 | __rev_id__ = """$Id$"""
5 |
6 |
7 | from pyExcelerator import *
8 |
9 | w = Workbook()
10 | ws = w.add_sheet('Hey, Dude')
11 |
12 | for i in range(6, 80):
13 | fnt = Font()
14 | fnt.height = i*20
15 | style = XFStyle()
16 | style.font = fnt
17 | ws.row(i).set_style(style)
18 | w.save('row_styles_empty.xls')
19 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/simple.py:
--------------------------------------------------------------------------------
1 | import xlwt
2 | from datetime import datetime
3 |
4 | font0 = xlwt.Font()
5 | font0.name = 'Times New Roman'
6 | font0.colour_index = 2
7 | font0.bold = True
8 |
9 | style0 = xlwt.XFStyle()
10 | style0.font = font0
11 |
12 | style1 = xlwt.XFStyle()
13 | style1.num_format_str = 'D-MMM-YY'
14 |
15 | wb = xlwt.Workbook()
16 | ws = wb.add_sheet('A Test Sheet')
17 |
18 | ws.write(0, 0, 'Test', style0)
19 | ws.write(1, 0, datetime.now(), style1)
20 | ws.write(2, 0, 1)
21 | ws.write(2, 1, 1)
22 | ws.write(2, 2, xlwt.Formula("A3+B3"))
23 |
24 | wb.save('example.xls')
25 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/sst.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | font0 = Formatting.Font()
8 | font0.name = 'Arial'
9 | font1 = Formatting.Font()
10 | font1.name = 'Arial Cyr'
11 | font2 = Formatting.Font()
12 | font2.name = 'Times New Roman'
13 | font3 = Formatting.Font()
14 | font3.name = 'Courier New Cyr'
15 |
16 | num_format0 = '0.00000'
17 | num_format1 = '0.000000'
18 | num_format2 = '0.0000000'
19 | num_format3 = '0.00000000'
20 |
21 | st0 = XFStyle()
22 | st1 = XFStyle()
23 | st2 = XFStyle()
24 | st3 = XFStyle()
25 | st4 = XFStyle()
26 |
27 | st0.font = font0
28 | st0.num_format = num_format0
29 |
30 | st1.font = font1
31 | st1.num_format = num_format1
32 |
33 | st2.font = font2
34 | st2.num_format = num_format2
35 |
36 | st3.font = font3
37 | st3.num_format = num_format3
38 |
39 | wb = Workbook()
40 |
41 | wb.add_style(st0)
42 | wb.add_style(st1)
43 | wb.add_style(st2)
44 | wb.add_style(st3)
45 |
46 | ws0 = wb.add_sheet('0')
47 | ws0.write(0, 0, 'Olya'*0x4000, st0)
48 |
49 | #for i in range(0, 0x10):
50 | # ws0.write(i, 2, ('%d'%i)*0x4000, st1)
51 |
52 | wb.save('sst.xls')
53 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/unicode0.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import xlwt
3 |
4 | # Strings passed to (for example) Worksheet.write can be unicode objects,
5 | # or str (8-bit) objects, which are then decoded into unicode.
6 | # The encoding to be used defaults to 'ascii'. This can be overridden
7 | # when the Workbook instance is created:
8 |
9 | book = xlwt.Workbook(encoding='cp1251')
10 | sheet = book.add_sheet('cp1251-demo')
11 | sheet.write(0, 0, '\xce\xeb\xff')
12 | book.save('unicode0.xls')
13 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/unicode1.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws1 = w.add_sheet(u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL LETTER GAMMA}')
9 |
10 | ws1.write(0, 0, u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL LETTER GAMMA}')
11 | ws1.write(1, 1, u'\N{GREEK SMALL LETTER DELTA}x = 1 + \N{GREEK SMALL LETTER DELTA}')
12 |
13 | ws1.write(2,0, u'A\u2262\u0391.') # RFC2152 example
14 | ws1.write(3,0, u'Hi Mom -\u263a-!') # RFC2152 example
15 | ws1.write(4,0, u'\u65E5\u672C\u8A9E') # RFC2152 example
16 | ws1.write(5,0, u'Item 3 is \u00a31.') # RFC2152 example
17 | ws1.write(8,0, u'\N{INTEGRAL}') # RFC2152 example
18 |
19 | w.add_sheet(u'A\u2262\u0391.') # RFC2152 example
20 | w.add_sheet(u'Hi Mom -\u263a-!') # RFC2152 example
21 | one_more_ws = w.add_sheet(u'\u65E5\u672C\u8A9E') # RFC2152 example
22 | w.add_sheet(u'Item 3 is \u00a31.') # RFC2152 example
23 |
24 | one_more_ws.write(0, 0, u'\u2665\u2665')
25 |
26 | w.add_sheet(u'\N{GREEK SMALL LETTER ETA WITH TONOS}')
27 | w.save('unicode1.xls')
28 |
29 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/unicode2.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: windows-1251 -*-
3 | # Copyright (C) 2005 Kiseliov Roman
4 |
5 | from xlwt import *
6 |
7 | w = Workbook()
8 | ws1 = w.add_sheet(u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL LETTER GAMMA}\u2665\u041e\u041b\u042f\u2665')
9 |
10 | fnt = Font()
11 | fnt.height = 26*20
12 | style = XFStyle()
13 | style.font = fnt
14 |
15 | for i in range(0x10000):
16 | ws1.write(i/0x10, i%0x10, unichr(i), style)
17 |
18 | w.save('unicode2.xls')
19 |
20 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/wsprops.py:
--------------------------------------------------------------------------------
1 | props = \
2 | [
3 | 'name',
4 | 'parent',
5 | 'rows',
6 | 'cols',
7 | 'merged_ranges',
8 | 'bmp_rec',
9 | 'show_formulas',
10 | 'show_grid',
11 | 'show_headers',
12 | 'panes_frozen',
13 | 'show_empty_as_zero',
14 | 'auto_colour_grid',
15 | 'cols_right_to_left',
16 | 'show_outline',
17 | 'remove_splits',
18 | 'selected',
19 | 'hidden',
20 | 'page_preview',
21 | 'first_visible_row',
22 | 'first_visible_col',
23 | 'grid_colour',
24 | 'preview_magn',
25 | 'normal_magn',
26 | 'row_gut_width',
27 | 'col_gut_height',
28 | 'show_auto_page_breaks',
29 | 'dialogue_sheet',
30 | 'auto_style_outline',
31 | 'outline_below',
32 | 'outline_right',
33 | 'fit_num_pages',
34 | 'show_row_outline',
35 | 'show_col_outline',
36 | 'alt_expr_eval',
37 | 'alt_formula_entries',
38 | 'row_default_height',
39 | 'col_default_width',
40 | 'calc_mode',
41 | 'calc_count',
42 | 'RC_ref_mode',
43 | 'iterations_on',
44 | 'delta',
45 | 'save_recalc',
46 | 'print_headers',
47 | 'print_grid',
48 | 'grid_set',
49 | 'vert_page_breaks',
50 | 'horz_page_breaks',
51 | 'header_str',
52 | 'footer_str',
53 | 'print_centered_vert',
54 | 'print_centered_horz',
55 | 'left_margin',
56 | 'right_margin',
57 | 'top_margin',
58 | 'bottom_margin',
59 | 'paper_size_code',
60 | 'print_scaling',
61 | 'start_page_number',
62 | 'fit_width_to_pages',
63 | 'fit_height_to_pages',
64 | 'print_in_rows',
65 | 'portrait',
66 | 'print_not_colour',
67 | 'print_draft',
68 | 'print_notes',
69 | 'print_notes_at_end',
70 | 'print_omit_errors',
71 | 'print_hres',
72 | 'print_vres',
73 | 'header_margin',
74 | 'footer_margin',
75 | 'copies_num',
76 | ]
77 |
78 | from xlwt import *
79 |
80 | wb = Workbook()
81 | ws = wb.add_sheet('sheet')
82 |
83 | print ws.name
84 | print ws.parent
85 | print ws.rows
86 | print ws.cols
87 | print ws.merged_ranges
88 | print ws.bmp_rec
89 | print ws.show_formulas
90 | print ws.show_grid
91 | print ws.show_headers
92 | print ws.panes_frozen
93 | print ws.show_empty_as_zero
94 | print ws.auto_colour_grid
95 | print ws.cols_right_to_left
96 | print ws.show_outline
97 | print ws.remove_splits
98 | print ws.selected
99 | # print ws.hidden
100 | print ws.page_preview
101 | print ws.first_visible_row
102 | print ws.first_visible_col
103 | print ws.grid_colour
104 | print ws.preview_magn
105 | print ws.normal_magn
106 | #print ws.row_gut_width
107 | #print ws.col_gut_height
108 | print ws.show_auto_page_breaks
109 | print ws.dialogue_sheet
110 | print ws.auto_style_outline
111 | print ws.outline_below
112 | print ws.outline_right
113 | print ws.fit_num_pages
114 | print ws.show_row_outline
115 | print ws.show_col_outline
116 | print ws.alt_expr_eval
117 | print ws.alt_formula_entries
118 | print ws.row_default_height
119 | print ws.col_default_width
120 | print ws.calc_mode
121 | print ws.calc_count
122 | print ws.RC_ref_mode
123 | print ws.iterations_on
124 | print ws.delta
125 | print ws.save_recalc
126 | print ws.print_headers
127 | print ws.print_grid
128 | #print ws.grid_set
129 | print ws.vert_page_breaks
130 | print ws.horz_page_breaks
131 | print ws.header_str
132 | print ws.footer_str
133 | print ws.print_centered_vert
134 | print ws.print_centered_horz
135 | print ws.left_margin
136 | print ws.right_margin
137 | print ws.top_margin
138 | print ws.bottom_margin
139 | print ws.paper_size_code
140 | print ws.print_scaling
141 | print ws.start_page_number
142 | print ws.fit_width_to_pages
143 | print ws.fit_height_to_pages
144 | print ws.print_in_rows
145 | print ws.portrait
146 | print ws.print_colour
147 | print ws.print_draft
148 | print ws.print_notes
149 | print ws.print_notes_at_end
150 | print ws.print_omit_errors
151 | print ws.print_hres
152 | print ws.print_vres
153 | print ws.header_margin
154 | print ws.footer_margin
155 | print ws.copies_num
156 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/Excel_Modules_Installation/xlwt-0.7.5/xlwt/examples/xlwt_easyxf_simple_demo.py:
--------------------------------------------------------------------------------
1 |
2 | # Write an XLS file with a single worksheet, containing
3 | # a heading row and some rows of data.
4 |
5 | import xlwt
6 | import datetime
7 | ezxf = xlwt.easyxf
8 |
9 | def write_xls(file_name, sheet_name, headings, data, heading_xf, data_xfs):
10 | book = xlwt.Workbook()
11 | sheet = book.add_sheet(sheet_name)
12 | rowx = 0
13 | for colx, value in enumerate(headings):
14 | sheet.write(rowx, colx, value, heading_xf)
15 | sheet.set_panes_frozen(True) # frozen headings instead of split panes
16 | sheet.set_horz_split_pos(rowx+1) # in general, freeze after last heading row
17 | sheet.set_remove_splits(True) # if user does unfreeze, don't leave a split there
18 | for row in data:
19 | rowx += 1
20 | for colx, value in enumerate(row):
21 | sheet.write(rowx, colx, value, data_xfs[colx])
22 | book.save(file_name)
23 |
24 | if __name__ == '__main__':
25 | import sys
26 | mkd = datetime.date
27 | hdngs = ['Date', 'Stock Code', 'Quantity', 'Unit Price', 'Value', 'Message']
28 | kinds = 'date text int price money text'.split()
29 | data = [
30 | [mkd(2007, 7, 1), 'ABC', 1000, 1.234567, 1234.57, ''],
31 | [mkd(2007, 12, 31), 'XYZ', -100, 4.654321, -465.43, 'Goods returned'],
32 | ] + [
33 | [mkd(2008, 6, 30), 'PQRCD', 100, 2.345678, 234.57, ''],
34 | ] * 100
35 |
36 | heading_xf = ezxf('font: bold on; align: wrap on, vert centre, horiz center')
37 | kind_to_xf_map = {
38 | 'date': ezxf(num_format_str='yyyy-mm-dd'),
39 | 'int': ezxf(num_format_str='#,##0'),
40 | 'money': ezxf('font: italic on; pattern: pattern solid, fore-colour grey25',
41 | num_format_str='$#,##0.00'),
42 | 'price': ezxf(num_format_str='#0.000000'),
43 | 'text': ezxf(),
44 | }
45 | data_xfs = [kind_to_xf_map[k] for k in kinds]
46 | write_xls('xlwt_easyxf_simple_demo.xls', 'Demo', hdngs, data, heading_xf, data_xfs)
47 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/README.md:
--------------------------------------------------------------------------------
1 | Design Review Checklist Python Module
2 | =====================================
3 |
4 | Original Author: Pete Lewis
5 |
6 | Creation Date: 4/9/2015
7 |
8 | Updated: 5/10/16
9 |
10 | Description:
11 | -------------
12 | This is a little GUI (using Tkinter) intended to make reviewing a board design a bit easier and faster.
13 | I have included the necessary modules and a batch file to make installation easier.
14 | A bunch of helpful images are located [here](https://github.com/sparkfun/Engineering_Design_Rules_Checklist/tree/master/Board_Design_Checklist/doc_images)
15 |
16 | Python GUI Installation:
17 | ---------------------
18 | ### Windows:
19 |
20 | 1. Install [Python 2.7.x](https://www.python.org/downloads/windows/) on your machine. At the top of this page is a link to the latest release. From there download [Windows x86 MSI installer](https://www.python.org/ftp/python/2.7.11/python-2.7.11.msi).
21 |
22 | 1a. Note, It must be installed in the directory "c:\Python27\" for the batch file installation to work.
23 |
24 | 1b. import _tkinter will fail with: "ImportError: DLL load failed: %1 is not a valid Win32 application." if you try to use the 64-bit version of Python.
25 | 2. The installer will give you the option to setup your environment variables. May as well select this. At the time of this writing, it doesn't work right, but it's still helpful.
26 |
27 | 2a. Right click on the start menu and select the 'Control Panel'.
28 |
29 | 2b. Searching for env will show you 'Edit the system environment variables', choose this.
30 |
31 | 2c. Click 'Environment Variables...' at the bottom.
32 |
33 | 2d. Double click on 'Path'.
34 |
35 | 2e. You should see 'C:\Python27\' & 'C:\Python27\Scripts'. Append a trailing '\' to Scripts to fix it.
36 |
37 | 2. Clone the [repo](https://github.com/sparkfun/Engineering_Design_Rules_Checklist).
38 | 3. Run the batch file named "Install_Modules.bat" from within the repo (Excel_Modules_Installation).
39 | 4. You will see a command prompt open up and a bunch of readout.
40 | 5. When it's done, you should have the three necessary modules installed.
41 |
42 | ### OS X:
43 |
44 | 1. Install Homebrew
45 | ```ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"```
46 | 2. Install Python
47 | ```brew install python```
48 | 3. Install pip
49 | ```sudo easy_install pip```
50 | 4. Install Excel Modules
51 | ```
52 | sudo pip install xlrd
53 |
54 | sudo pip install xlwt
55 |
56 | sudo pip install xlutils
57 | ```
58 | 5. Clone the [repo](https://github.com/sparkfun/Engineering_Design_Rules_Checklist).
59 |
60 | ### Debian/Ubuntu:
61 |
62 | 1. Install Python
63 | ```
64 | sudo apt-get install python
65 | ```
66 | 2. Install Excel Modules
67 | ```
68 | sudo apt-get install python-xlrd
69 |
70 | sudo apt-get install python-xlwt
71 |
72 | sudo apt-get install python-pip
73 |
74 | sudo pip install xlutils
75 | ```
76 |
77 | ### Generic Install Directions:
78 |
79 | 1. Install [Python 2.7.x](https://www.python.org/ftp/python/2.7.9/python-2.7.9.msi) on your machine.
80 | 2. Download and install the following modules.
81 | * [XLRD](https://pypi.python.org/pypi/xlrd)
82 | * [XLWT](https://pypi.python.org/pypi/xlwt)
83 | * [XLUTILS](https://pypi.python.org/pypi/xlutils)
84 |
85 | You can do this with pip, for instance, run the command `pip install xlrd` to install XLRD
86 |
87 | Running the Checklist:
88 | ----------------------
89 | Run Checklist.py file from a directory that contains the original file `Board_Design_Checklist.xls`, or from a directory that contains an already started product specific `.xls` file.
90 |
91 | The python file has two modes of operation:
92 | 1. If no `.xls` file exist, the program exits.
93 | 2. If an `.xls` file exists and is named `Board_Design_Checklist.xls`, the program will generate a new `.xls` file with the product name appended, such as `Board_Design_Checklist_fancynewproduct_.xls`. The original spreadsheet is left intact.
94 | 3. If there is already a spreadsheet with product name appended, the program will open it for continuation or review.
95 |
96 | You can double-click Checklist.py, or run from the command line as `>Checklist.py`
97 |
98 | For example, if `folder` contains `Board_Design_Checklist.xls`:
99 | ```
100 | c:\>cd folder
101 |
102 | c:\folder>dir
103 | Directory of c:\folder
104 |
105 | 06/14/2017 09:31 AM 25,600 Board_Design_Checklist.xls
106 | 06/14/2017 09:31 AM 18,827 Checklist.py
107 |
108 | c:\folder>Checklist.py
109 | Current User is marshall.taylor
110 | Current Review File is Board_Design_Checklist.xls
111 |
112 | c:\folder>dir
113 | Directory of c:\temp
114 |
115 | 06/14/2017 09:31 AM 25,600 Board_Design_Checklist.xls
116 | 06/15/2017 04:06 PM 22,016 Board_Design_Checklist_fancynewproduct_.xls
117 | 06/14/2017 09:31 AM 18,827 Checklist.py
118 |
119 | c:\folder>
120 | ```
121 |
122 |
123 |
124 | The first screen is a combination of checks. Check all of the boxes that apply to your design. This will help the GUI avoid asking you unnecessary checks. The name entered here will be appended to the spreadsheet.
125 |
126 | The next screens will prompt you all of the questions in the Excel doc (one at a time), and you can click "YES", "NO", "n/a", "back" or "skip". It will then write to the appropriate cell in the XLS file and put your response (and username).
127 |
128 | You can write a comment in the comment box before you click a button, and it will add this comment to your response in the appropriate cell in the Excel doc.
129 |
130 | Once you get to the end, click the "Create Summary" button (at the bottom right of the GUI), if you'd like it to create a summary in the form of a text file including all of your responses with comments.
131 |
132 | **You must put a comment with any answer if you'd like to it end up in the summary.**
133 |
134 |
135 |
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/01-link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/01-link.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/02-who.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/02-who.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/03-default_location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/03-default_location.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/04-path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/04-path.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/05-control_panel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/05-control_panel.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/06-env_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/06-env_settings.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/07-env_variables.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/07-env_variables.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/08-path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/08-path.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/09-bad_path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/09-bad_path.png
--------------------------------------------------------------------------------
/Hardware/Board_Design_Checklist/doc_images/10-fixed-path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Board_Design_Checklist/doc_images/10-fixed-path.png
--------------------------------------------------------------------------------
/Hardware/ESP32_LoRa_1_Channel_Gateway.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/ESP32_LoRa_1_Channel_Gateway.zip
--------------------------------------------------------------------------------
/Hardware/Production/14119-ESP32_LoRa_1_Channel_Gateway-Panel.GBP:
--------------------------------------------------------------------------------
1 | G75*
2 | %MOIN*%
3 | %OFA0B0*%
4 | %FSLAX25Y25*%
5 | %IPPOS*%
6 | %LPD*%
7 | %AMOC8*
8 | 5,1,8,0,0,1.08239X$1,22.5*
9 | %
10 | %ADD10R,0.03937X0.11811*%
11 | D10*
12 | X0129191Y0048972D03*
13 | X0137065Y0048972D03*
14 | X0144939Y0048972D03*
15 | X0152813Y0048972D03*
16 | X0160687Y0048972D03*
17 | X0168561Y0048972D03*
18 | X0176435Y0048972D03*
19 | X0184309Y0048972D03*
20 | X0184309Y0108028D03*
21 | X0176435Y0108028D03*
22 | X0168561Y0108028D03*
23 | X0160687Y0108028D03*
24 | X0152813Y0108028D03*
25 | X0144939Y0108028D03*
26 | X0137065Y0108028D03*
27 | X0129191Y0108028D03*
28 | X0129191Y0150972D03*
29 | X0137065Y0150972D03*
30 | X0144939Y0150972D03*
31 | X0152813Y0150972D03*
32 | X0160687Y0150972D03*
33 | X0168561Y0150972D03*
34 | X0176435Y0150972D03*
35 | X0184309Y0150972D03*
36 | X0184309Y0210028D03*
37 | X0176435Y0210028D03*
38 | X0168561Y0210028D03*
39 | X0160687Y0210028D03*
40 | X0152813Y0210028D03*
41 | X0144939Y0210028D03*
42 | X0137065Y0210028D03*
43 | X0129191Y0210028D03*
44 | X0129191Y0252972D03*
45 | X0137065Y0252972D03*
46 | X0144939Y0252972D03*
47 | X0152813Y0252972D03*
48 | X0160687Y0252972D03*
49 | X0168561Y0252972D03*
50 | X0176435Y0252972D03*
51 | X0184309Y0252972D03*
52 | X0184309Y0312028D03*
53 | X0176435Y0312028D03*
54 | X0168561Y0312028D03*
55 | X0160687Y0312028D03*
56 | X0152813Y0312028D03*
57 | X0144939Y0312028D03*
58 | X0137065Y0312028D03*
59 | X0129191Y0312028D03*
60 | X0129191Y0354972D03*
61 | X0137065Y0354972D03*
62 | X0144939Y0354972D03*
63 | X0152813Y0354972D03*
64 | X0160687Y0354972D03*
65 | X0168561Y0354972D03*
66 | X0176435Y0354972D03*
67 | X0184309Y0354972D03*
68 | X0184309Y0414028D03*
69 | X0176435Y0414028D03*
70 | X0168561Y0414028D03*
71 | X0160687Y0414028D03*
72 | X0152813Y0414028D03*
73 | X0144939Y0414028D03*
74 | X0137065Y0414028D03*
75 | X0129191Y0414028D03*
76 | X0319191Y0414028D03*
77 | X0327065Y0414028D03*
78 | X0334939Y0414028D03*
79 | X0342813Y0414028D03*
80 | X0350687Y0414028D03*
81 | X0358561Y0414028D03*
82 | X0366435Y0414028D03*
83 | X0374309Y0414028D03*
84 | X0374309Y0354972D03*
85 | X0366435Y0354972D03*
86 | X0358561Y0354972D03*
87 | X0350687Y0354972D03*
88 | X0342813Y0354972D03*
89 | X0334939Y0354972D03*
90 | X0327065Y0354972D03*
91 | X0319191Y0354972D03*
92 | X0319191Y0312028D03*
93 | X0327065Y0312028D03*
94 | X0334939Y0312028D03*
95 | X0342813Y0312028D03*
96 | X0350687Y0312028D03*
97 | X0358561Y0312028D03*
98 | X0366435Y0312028D03*
99 | X0374309Y0312028D03*
100 | X0374309Y0252972D03*
101 | X0366435Y0252972D03*
102 | X0358561Y0252972D03*
103 | X0350687Y0252972D03*
104 | X0342813Y0252972D03*
105 | X0334939Y0252972D03*
106 | X0327065Y0252972D03*
107 | X0319191Y0252972D03*
108 | X0319191Y0210028D03*
109 | X0327065Y0210028D03*
110 | X0334939Y0210028D03*
111 | X0342813Y0210028D03*
112 | X0350687Y0210028D03*
113 | X0358561Y0210028D03*
114 | X0366435Y0210028D03*
115 | X0374309Y0210028D03*
116 | X0374309Y0150972D03*
117 | X0366435Y0150972D03*
118 | X0358561Y0150972D03*
119 | X0350687Y0150972D03*
120 | X0342813Y0150972D03*
121 | X0334939Y0150972D03*
122 | X0327065Y0150972D03*
123 | X0319191Y0150972D03*
124 | X0319191Y0108028D03*
125 | X0327065Y0108028D03*
126 | X0334939Y0108028D03*
127 | X0342813Y0108028D03*
128 | X0350687Y0108028D03*
129 | X0358561Y0108028D03*
130 | X0366435Y0108028D03*
131 | X0374309Y0108028D03*
132 | X0374309Y0048972D03*
133 | X0366435Y0048972D03*
134 | X0358561Y0048972D03*
135 | X0350687Y0048972D03*
136 | X0342813Y0048972D03*
137 | X0334939Y0048972D03*
138 | X0327065Y0048972D03*
139 | X0319191Y0048972D03*
140 | X0509191Y0048972D03*
141 | X0517065Y0048972D03*
142 | X0524939Y0048972D03*
143 | X0532813Y0048972D03*
144 | X0540687Y0048972D03*
145 | X0548561Y0048972D03*
146 | X0556435Y0048972D03*
147 | X0564309Y0048972D03*
148 | X0564309Y0108028D03*
149 | X0556435Y0108028D03*
150 | X0548561Y0108028D03*
151 | X0540687Y0108028D03*
152 | X0532813Y0108028D03*
153 | X0524939Y0108028D03*
154 | X0517065Y0108028D03*
155 | X0509191Y0108028D03*
156 | X0509191Y0150972D03*
157 | X0517065Y0150972D03*
158 | X0524939Y0150972D03*
159 | X0532813Y0150972D03*
160 | X0540687Y0150972D03*
161 | X0548561Y0150972D03*
162 | X0556435Y0150972D03*
163 | X0564309Y0150972D03*
164 | X0564309Y0210028D03*
165 | X0556435Y0210028D03*
166 | X0548561Y0210028D03*
167 | X0540687Y0210028D03*
168 | X0532813Y0210028D03*
169 | X0524939Y0210028D03*
170 | X0517065Y0210028D03*
171 | X0509191Y0210028D03*
172 | X0509191Y0252972D03*
173 | X0517065Y0252972D03*
174 | X0524939Y0252972D03*
175 | X0532813Y0252972D03*
176 | X0540687Y0252972D03*
177 | X0548561Y0252972D03*
178 | X0556435Y0252972D03*
179 | X0564309Y0252972D03*
180 | X0564309Y0312028D03*
181 | X0556435Y0312028D03*
182 | X0548561Y0312028D03*
183 | X0540687Y0312028D03*
184 | X0532813Y0312028D03*
185 | X0524939Y0312028D03*
186 | X0517065Y0312028D03*
187 | X0509191Y0312028D03*
188 | X0509191Y0354972D03*
189 | X0517065Y0354972D03*
190 | X0524939Y0354972D03*
191 | X0532813Y0354972D03*
192 | X0540687Y0354972D03*
193 | X0548561Y0354972D03*
194 | X0556435Y0354972D03*
195 | X0564309Y0354972D03*
196 | X0564309Y0414028D03*
197 | X0556435Y0414028D03*
198 | X0548561Y0414028D03*
199 | X0540687Y0414028D03*
200 | X0532813Y0414028D03*
201 | X0524939Y0414028D03*
202 | X0517065Y0414028D03*
203 | X0509191Y0414028D03*
204 | M02*
205 |
--------------------------------------------------------------------------------
/Hardware/Production/14119-ESP32_LoRa_1_Channel_Gateway-Panel.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/ESP32_LoRa_1Ch_Gateway/7877033edce123da7e5aaa5d715a9e906f44a343/Hardware/Production/14119-ESP32_LoRa_1_Channel_Gateway-Panel.zip
--------------------------------------------------------------------------------
/Hardware/Production/ordering_instructions.txt:
--------------------------------------------------------------------------------
1 | panel size, 161x117mm
2 | PCB thickness, 1.6mm
3 | number of layers, 2
4 | soldermask color, Red
5 | silkscreen color, White
6 | oz copper, 1oz
7 | finish, HASL lead free
8 | stencils, none
9 | pcs per panel, 12
10 |
--------------------------------------------------------------------------------
/Hardware/README.md:
--------------------------------------------------------------------------------
1 | SparkFun Design Files
2 | =====================================
3 |
4 | The .sch and .brd files hare are Eagle CAD schematic and PCB design files from SparkFun Electronics.
5 | A freeware version of Eagle can be found [here](http://www.cadsoftusa.com/download-eagle/freeware/).
6 |
7 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | SparkFun License Information
2 | ============================
3 |
4 | SparkFun uses two different licenses for our files — one for hardware and one for code.
5 |
6 | Hardware
7 | ---------
8 |
9 | **SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).**
10 |
11 | Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode).
12 |
13 | You are free to:
14 |
15 | Share — copy and redistribute the material in any medium or format
16 | Adapt — remix, transform, and build upon the material
17 | for any purpose, even commercially.
18 | The licensor cannot revoke these freedoms as long as you follow the license terms.
19 | Under the following terms:
20 |
21 | Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
22 | ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
23 | No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
24 | Notices:
25 |
26 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
27 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
28 |
29 |
30 | Code
31 | --------
32 |
33 | **SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).**
34 |
35 | The MIT License (MIT)
36 |
37 | Copyright (c) 2016 SparkFun Electronics
38 |
39 | Permission is hereby granted, free of charge, to any person obtaining a copy
40 | of this software and associated documentation files (the "Software"), to deal
41 | in the Software without restriction, including without limitation the rights
42 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43 | copies of the Software, and to permit persons to whom the Software is
44 | furnished to do so, subject to the following conditions:
45 |
46 | The above copyright notice and this permission notice shall be included in all
47 | copies or substantial portions of the Software.
48 |
49 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
51 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55 | SOFTWARE.
56 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | SparkFun LoRa Gateway 1-Channel
2 | ========================================
3 |
4 | 
5 |
6 | [*SparkFun LoRa Gateway 1-Channel (15006)*](https://www.sparkfun.com/products/15006)
7 |
8 | A programmable microcontroller featuring both WiFi and Bluetooth radios -- with an RFM95W LoRa transceiver to create a single-channel LoRa gateway. It's a perfect, low-cost tool for monitoring a dozen-or-so LoRa devices, and relaying their messages up to the cloud.
9 |
10 | Repository Contents
11 | -------------------
12 |
13 | * **/Documentation** - Data sheets, additional product information
14 | * **/Firmware** - Example code
15 | * **/Hardware** - Eagle design files (.brd, .sch)
16 |
17 | Documentation
18 | --------------
19 | * **[Library](https://github.com/sparkfun/ESP32_LoRa_1Ch_Gateway)** - Arduino library for the SparkFun LoRa Gateway 1-Channel.
20 | * **[Hookup Guide](https://learn.sparkfun.com/tutorials/sparkfun-lora-gateway-1-channel-hookup-guide)** - Basic hookup guide for the SparkFun LoRa Gateway 1-Channel.
21 | * **[SparkFun Fritzing repo](https://github.com/sparkfun/Fritzing_Parts)** - Fritzing diagrams for SparkFun products.
22 |
23 | Product Versions
24 | ----------------
25 | * [15006](https://www.sparkfun.com/products/15006) - SparkFun LoRa Gateway 1-Channel
26 |
27 | Version History
28 | ---------------
29 | * [v10](https://github.com/sparkfun/ESP32_LoRa_1Ch_Gateway/releases/tag/v10) - Initial redboard release
30 |
31 |
32 |
33 | License Information
34 | -------------------
35 |
36 | This product is _**open source**_!
37 |
38 | Please review the LICENSE.md file for license information.
39 |
40 | If you have any questions or concerns on licensing, please contact techsupport@sparkfun.com.
41 |
42 | Distributed as-is; no warranty is given.
43 |
44 | - Your friends at SparkFun.
45 |
46 | __
47 |
--------------------------------------------------------------------------------