Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidied up MANIFEST and setup.py; set svn:eol-style native on 3 files.

git-svn-id: https://secure.simplistix.co.uk/svn/xlwt/trunk@3475 ac150577-6901-3246-a117-cd8547e6756f
  • Loading branch information...
commit 91b320d1e11ef347b2b0765197fffebfd1ac614b 1 parent b96af89
sjmachin authored
112 MANIFEST
View
@@ -1,55 +1,57 @@
-HISTORY.html
-README.html
-licences.py
-setup.py
-xlwt/BIFFRecords.py
-xlwt/Bitmap.py
-xlwt/Cell.py
-xlwt/Column.py
-xlwt/CompoundDoc.py
-xlwt/ExcelFormula.py
-xlwt/ExcelFormulaLexer.py
-xlwt/ExcelFormulaParser.py
-xlwt/ExcelMagic.py
-xlwt/Formatting.py
-xlwt/Row.py
-xlwt/Style.py
-xlwt/UnicodeUtils.py
-xlwt/Utils.py
-xlwt/Workbook.py
-xlwt/Worksheet.py
-xlwt/__init__.py
-xlwt/antlr.py
-xlwt/excel-formula.g
-xlwt/doc/xlwt.html
-xlwt/examples/big-16Mb.py
-xlwt/examples/big-35Mb.py
-xlwt/examples/blanks.py
-xlwt/examples/col_width.py
-xlwt/examples/country.py
-xlwt/examples/dates.py
-xlwt/examples/format.py
-xlwt/examples/formula_names.py
-xlwt/examples/formulas.py
-xlwt/examples/hyperlinks.py
-xlwt/examples/image.py
-xlwt/examples/merged.py
-xlwt/examples/merged0.py
-xlwt/examples/merged1.py
-xlwt/examples/mini.py
-xlwt/examples/num_formats.py
-xlwt/examples/numbers.py
-xlwt/examples/outline.py
-xlwt/examples/panes.py
-xlwt/examples/parse-fmla.py
-xlwt/examples/protection.py
-xlwt/examples/python.bmp
-xlwt/examples/row_styles.py
-xlwt/examples/row_styles_empty.py
-xlwt/examples/simple.py
-xlwt/examples/sst.py
-xlwt/examples/unicode0.py
-xlwt/examples/unicode1.py
-xlwt/examples/unicode2.py
-xlwt/examples/wsprops.py
-xlwt/examples/xlwt_easyxf_simple_demo.py
+HISTORY.html
+README.html
+licences.py
+setup.py
+tests/RKbug.py
+tests/RKbug1.xls
+xlwt/BIFFRecords.py
+xlwt/Bitmap.py
+xlwt/Cell.py
+xlwt/Column.py
+xlwt/CompoundDoc.py
+xlwt/ExcelFormula.py
+xlwt/ExcelFormulaLexer.py
+xlwt/ExcelFormulaParser.py
+xlwt/ExcelMagic.py
+xlwt/Formatting.py
+xlwt/Row.py
+xlwt/Style.py
+xlwt/UnicodeUtils.py
+xlwt/Utils.py
+xlwt/Workbook.py
+xlwt/Worksheet.py
+xlwt/__init__.py
+xlwt/antlr.py
+xlwt/excel-formula.g
+xlwt/doc/xlwt.html
+xlwt/examples/big-16Mb.py
+xlwt/examples/big-35Mb.py
+xlwt/examples/blanks.py
+xlwt/examples/col_width.py
+xlwt/examples/country.py
+xlwt/examples/dates.py
+xlwt/examples/format.py
+xlwt/examples/formula_names.py
+xlwt/examples/formulas.py
+xlwt/examples/hyperlinks.py
+xlwt/examples/image.py
+xlwt/examples/merged.py
+xlwt/examples/merged0.py
+xlwt/examples/merged1.py
+xlwt/examples/mini.py
+xlwt/examples/num_formats.py
+xlwt/examples/numbers.py
+xlwt/examples/outline.py
+xlwt/examples/panes.py
+xlwt/examples/parse-fmla.py
+xlwt/examples/protection.py
+xlwt/examples/python.bmp
+xlwt/examples/row_styles.py
+xlwt/examples/row_styles_empty.py
+xlwt/examples/simple.py
+xlwt/examples/sst.py
+xlwt/examples/unicode0.py
+xlwt/examples/unicode1.py
+xlwt/examples/unicode2.py
+xlwt/examples/wsprops.py
+xlwt/examples/xlwt_easyxf_simple_demo.py
5 setup.py
View
@@ -37,7 +37,7 @@
SVN_URL = 'https://secure.simplistix.co.uk/svn/xlwt/trunk'
-DOWNLOAD_URL = 'http://....................'
+DOWNLOAD_URL = 'http://pypi.python.org/pypi/xlwt'
setup(
name = 'xlwt',
@@ -45,7 +45,7 @@
maintainer = 'John Machin',
maintainer_email = 'sjmachin@lexicon.net',
url = SVN_URL,
- # download_url = DOWNLOAD_URL,
+ download_url = DOWNLOAD_URL,
description = DESCRIPTION,
long_description = LONG_DESCRIPTION,
license = 'BSD',
@@ -57,6 +57,7 @@
'xlwt': [
'doc/*.*',
'examples/*.*',
+ 'tests/*.*',
],
},
)
20 xlwt/examples/country.py
View
@@ -1,10 +1,10 @@
-#!/usr/bin/env python
-# -*- coding: windows-1252 -*-
-# Copyright (C) 2007 John Machin
-
-from xlwt import *
-
-w = Workbook()
-w.country_code = 61
-ws = w.add_sheet('AU')
-w.save('country.xls')
+#!/usr/bin/env python
+# -*- coding: windows-1252 -*-
+# Copyright (C) 2007 John Machin
+
+from xlwt import *
+
+w = Workbook()
+w.country_code = 61
+ws = w.add_sheet('AU')
+w.save('country.xls')
92 xlwt/examples/xlwt_easyxf_simple_demo.py
View
@@ -1,46 +1,46 @@
-
-# Write an XLS file with a single worksheet, containing
-# a heading row and some rows of data.
-
-import xlwt
-import datetime
-ezxf = xlwt.easyxf
-
-def write_xls(file_name, sheet_name, headings, data, heading_xf, data_xfs):
- book = xlwt.Workbook()
- sheet = book.add_sheet(sheet_name)
- rowx = 0
- for colx, value in enumerate(headings):
- sheet.write(rowx, colx, value, heading_xf)
- sheet.set_panes_frozen(True) # frozen headings instead of split panes
- sheet.set_horz_split_pos(rowx+1) # in general, freeze after last heading row
- sheet.set_remove_splits(True) # if user does unfreeze, don't leave a split there
- for row in data:
- rowx += 1
- for colx, value in enumerate(row):
- sheet.write(rowx, colx, value, data_xfs[colx])
- book.save(file_name)
-
-if __name__ == '__main__':
- import sys
- mkd = datetime.date
- hdngs = ['Date', 'Stock Code', 'Quantity', 'Unit Price', 'Value', 'Message']
- kinds = 'date text int price money text'.split()
- data = [
- [mkd(2007, 7, 1), 'ABC', 1000, 1.234567, 1234.57, ''],
- [mkd(2007, 12, 31), 'XYZ', -100, 4.654321, -465.43, 'Goods returned'],
- ] + [
- [mkd(2008, 6, 30), 'PQRCD', 100, 2.345678, 234.57, ''],
- ] * 100
-
- heading_xf = ezxf('font: bold on; align: wrap on, vert centre, horiz center')
- kind_to_xf_map = {
- 'date': ezxf(num_format_str='yyyy-mm-dd'),
- 'int': ezxf(num_format_str='#,##0'),
- 'money': ezxf('font: italic on; pattern: pattern solid, fore-colour grey25',
- num_format_str='$#,##0.00'),
- 'price': ezxf(num_format_str='#0.000000'),
- 'text': ezxf(),
- }
- data_xfs = [kind_to_xf_map[k] for k in kinds]
- write_xls('xlwt_easyxf_simple_demo.xls', 'Demo', hdngs, data, heading_xf, data_xfs)
+
+# Write an XLS file with a single worksheet, containing
+# a heading row and some rows of data.
+
+import xlwt
+import datetime
+ezxf = xlwt.easyxf
+
+def write_xls(file_name, sheet_name, headings, data, heading_xf, data_xfs):
+ book = xlwt.Workbook()
+ sheet = book.add_sheet(sheet_name)
+ rowx = 0
+ for colx, value in enumerate(headings):
+ sheet.write(rowx, colx, value, heading_xf)
+ sheet.set_panes_frozen(True) # frozen headings instead of split panes
+ sheet.set_horz_split_pos(rowx+1) # in general, freeze after last heading row
+ sheet.set_remove_splits(True) # if user does unfreeze, don't leave a split there
+ for row in data:
+ rowx += 1
+ for colx, value in enumerate(row):
+ sheet.write(rowx, colx, value, data_xfs[colx])
+ book.save(file_name)
+
+if __name__ == '__main__':
+ import sys
+ mkd = datetime.date
+ hdngs = ['Date', 'Stock Code', 'Quantity', 'Unit Price', 'Value', 'Message']
+ kinds = 'date text int price money text'.split()
+ data = [
+ [mkd(2007, 7, 1), 'ABC', 1000, 1.234567, 1234.57, ''],
+ [mkd(2007, 12, 31), 'XYZ', -100, 4.654321, -465.43, 'Goods returned'],
+ ] + [
+ [mkd(2008, 6, 30), 'PQRCD', 100, 2.345678, 234.57, ''],
+ ] * 100
+
+ heading_xf = ezxf('font: bold on; align: wrap on, vert centre, horiz center')
+ kind_to_xf_map = {
+ 'date': ezxf(num_format_str='yyyy-mm-dd'),
+ 'int': ezxf(num_format_str='#,##0'),
+ 'money': ezxf('font: italic on; pattern: pattern solid, fore-colour grey25',
+ num_format_str='$#,##0.00'),
+ 'price': ezxf(num_format_str='#0.000000'),
+ 'text': ezxf(),
+ }
+ data_xfs = [kind_to_xf_map[k] for k in kinds]
+ write_xls('xlwt_easyxf_simple_demo.xls', 'Demo', hdngs, data, heading_xf, data_xfs)
Please sign in to comment.
Something went wrong with that request. Please try again.