xlwings-utils 0.0.0.post0__tar.gz → 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xlwings-utils might be problematic. Click here for more details.
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/PKG-INFO +2 -2
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/README.md +1 -1
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/pyproject.toml +1 -1
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils/xlwings_utils.py +55 -1
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils.egg-info/PKG-INFO +2 -2
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/setup.cfg +0 -0
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils/__init__.py +0 -0
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils.egg-info/SOURCES.txt +0 -0
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils.egg-info/dependency_links.txt +0 -0
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils.egg-info/requires.txt +0 -0
- {xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xlwings_utils
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: xlwings_utils
|
|
5
5
|
Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/salabim/xlwings_utils
|
|
@@ -15,7 +15,7 @@ Requires-Dist: dropbox
|
|
|
15
15
|
|
|
16
16
|
## Introduction
|
|
17
17
|
|
|
18
|
-
This module provides some useful
|
|
18
|
+
This module provides some useful functions to be used in xlwings lite.
|
|
19
19
|
The xlwings lite system does not provide access to the local file system. With this
|
|
20
20
|
module, files can be copied between dropbox and the pyodide file systen. And
|
|
21
21
|
therefore, it is possible to indirectly use the local file system.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
This module provides some useful
|
|
5
|
+
This module provides some useful functions to be used in xlwings lite.
|
|
6
6
|
The xlwings lite system does not provide access to the local file system. With this
|
|
7
7
|
module, files can be copied between dropbox and the pyodide file systen. And
|
|
8
8
|
therefore, it is possible to indirectly use the local file system.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# /_/\_\|_| \_/\_/ |_||_| |_| \__, ||___/ _____ \__,_| \__||_||_||___/
|
|
6
6
|
# |___/ |_____|
|
|
7
7
|
|
|
8
|
-
__version__ = "0.0.
|
|
8
|
+
__version__ = "0.0.2"
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
import dropbox
|
|
@@ -125,7 +125,61 @@ def read_pyodide(path):
|
|
|
125
125
|
path = Path(path)
|
|
126
126
|
with open(path, "rb") as f:
|
|
127
127
|
contents = f.read()
|
|
128
|
+
return contents
|
|
129
|
+
|
|
130
|
+
class block:
|
|
131
|
+
def __init__(self, number_of_rows,number_of_columns):
|
|
132
|
+
self.dict={}
|
|
133
|
+
self.number_of_columns=number_of_columns
|
|
134
|
+
self.number_of_rows=number_of_rows
|
|
135
|
+
|
|
136
|
+
@classmethod
|
|
137
|
+
def from_list_of_lists(cls, list_of_lists, column_like=False):
|
|
138
|
+
if not isinstance(list_of_lists[0],list):
|
|
139
|
+
if column_like:
|
|
140
|
+
list_of_lists=[[value] for value in list_of_lists]
|
|
141
|
+
else:
|
|
142
|
+
list_of_lists=[list_of_lists]
|
|
143
|
+
|
|
144
|
+
self=cls(0,0)
|
|
145
|
+
|
|
146
|
+
self.number_of_rows=len(list_of_lists)
|
|
147
|
+
self.number_of_columns=0
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
for row,row_contents in enumerate(list_of_lists,1):
|
|
151
|
+
for column,value in enumerate(row_contents,1):
|
|
152
|
+
if value is not None:
|
|
153
|
+
self.dict[row,column]=value
|
|
154
|
+
self.number_of_columns=max(self.number_of_columns, column)
|
|
155
|
+
return self
|
|
156
|
+
|
|
157
|
+
def __setitem__(self, row_column, value):
|
|
158
|
+
row,column=row_column
|
|
159
|
+
if row<1 or row>self.number_of_rows:
|
|
160
|
+
raise IndexError
|
|
161
|
+
if column<1 or column>self.number_of_columns:
|
|
162
|
+
raise IndexError
|
|
163
|
+
if value is None:
|
|
164
|
+
del self.dict[row,column]
|
|
165
|
+
else:
|
|
166
|
+
self.dict[row,column]=value
|
|
167
|
+
|
|
168
|
+
def __getitem__(self, row_column):
|
|
169
|
+
row,column=row_column
|
|
170
|
+
if row<1 or row>self.number_of_rows:
|
|
171
|
+
raise IndexError
|
|
172
|
+
if column<1 or column>self.number_of_columns:
|
|
173
|
+
raise IndexError
|
|
174
|
+
return self.dict.get((row,column))
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def as_list_of_lists(self):
|
|
178
|
+
return [[self.dict.get((row,column)) for column in range(1,self.number_of_columns+1)] for row in range(1,self.number_of_rows+1)]
|
|
179
|
+
|
|
128
180
|
|
|
181
|
+
def __repr__(self):
|
|
182
|
+
return f"block.from_list_of_lists({self.as_list_of_lists})"
|
|
129
183
|
|
|
130
184
|
def clear_captured_stdout():
|
|
131
185
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xlwings_utils
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: xlwings_utils
|
|
5
5
|
Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/salabim/xlwings_utils
|
|
@@ -15,7 +15,7 @@ Requires-Dist: dropbox
|
|
|
15
15
|
|
|
16
16
|
## Introduction
|
|
17
17
|
|
|
18
|
-
This module provides some useful
|
|
18
|
+
This module provides some useful functions to be used in xlwings lite.
|
|
19
19
|
The xlwings lite system does not provide access to the local file system. With this
|
|
20
20
|
module, files can be copied between dropbox and the pyodide file systen. And
|
|
21
21
|
therefore, it is possible to indirectly use the local file system.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xlwings_utils-0.0.0.post0 → xlwings_utils-0.0.2}/xlwings_utils.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|