[Python-announce] [RELEASE] pyspread 2.2.2

2023-09-03 Thread Martin Manns


pyspread 2.2.2
==

This is a bugfix release.

Bug fixes:
 * pip install fixed by replacing deprecated setup.py option `requires` 
with `install_requires`

 * Shebang removed from desktop file



About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Signature for tarball: 
https://gitlab.com/pyspread/downloads/-/raw/master/releases/pyspread-2.2.2.tar.gz.asc?inline=false

Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1)
 * PyQt5 (≥ 5.10, requires PyQt5.Svg)
 * setuptools (>=40.0)
 * markdown2 (>= 2.3)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)
 * python-dateutil (>= 2.7.0)
 * py-moneyed (>=2.0)
 * rpy2 (>=3.4)
 * plotnine (>=0.8)
 * libvoikko (>=4.3)
 * nuspell (>=5.1)
 * hspell (>= 1.4)
 * ggplot2 (>=3.4)


For building the apidocs with Sphinx see apidocs/requirements.txt


Enjoy

Martin
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[Python-announce] [RELEASE] pyspread 2.2.1

2023-05-01 Thread Martin Manns

pyspread 2.2


This is a bugfix release
Note that missing libvoikko, nuspell and hspell may lead to warning 
messages if pyenchant is installed. However,  pyspread is still 
functional as this affects only spellchecking.


Bug fixes:
 * Chart dialog now correctly starts if rpy2 is not installed and if 
optional R modules are missing.

 * Deleting large selections is now significantly faster.
 * Pasting into large selections is now significantly faster.
 * QPen cache now is limited in size.



About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Signature for tarball:
https://gitlab.com/pyspread/downloads/-/raw/master/releases/pyspread-2.2.tar.gz.sig
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1)
 * PyQt5 (≥ 5.10, requires PyQt5.Svg)
 * setuptools (>=40.0)
 * markdown2 (>= 2.3)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)
 * python-dateutil (>= 2.7.0)
 * py-moneyed (>=2.0)
 * rpy2 (>=3.4)
 * plotnine (>=0.8)
 * libvoikko (>=4.3)
 * nuspell (>=5.1)
 * hspell (>= 1.4)
 * ggplot2 (>=3.4)


For building the apidocs with Sphinx see apidocs/requirements.txt


Enjoy

Martin
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[Python-announce] [RELEASE] pyspread 2.2

2023-04-23 Thread Martin Manns


pyspread 2.2


This release adds R charts via rpy2. Plotnine is also supported.
Examples are available in the chart dialog.
Note that the R packages graphics, lattice and ggplot2 are used for the 
examples.


Bug fixes:
 * Thick lines are now antialiased


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Signature for tarball:
https://gitlab.com/pyspread/downloads/-/raw/master/releases/pyspread-2.2.tar.gz.sig
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1)
 * PyQt5 (≥ 5.10, requires PyQt5.Svg)
 * setuptools (>=40.0)
 * markdown2 (>= 2.3)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)
 * python-dateutil (>= 2.7.0)
 * py-moneyed (>=2.0)
 * rpy2 (>=3.4)
 * plotnine (>=0.8)

For building the apidocs with Sphinx see apidocs/requirements.txt


Enjoy

Martin

___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[Python-announce] [RELEASE] pyspread 2.0.1

2021-11-27 Thread Martin Manns


pyspread 2.0.1
==

This is a bugfix release for pyspread 2.0.


Bug fixes:
 * Font tests removed because of frequent issues with Debian's font 
aliasing system

 * Outdated information regarding SVG export removed from documentation


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Signature for tarball:

https://gitlab.com/pyspread/downloads/-/raw/master/releases/pyspread-2.0.tar.gz.sig
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1)
 * PyQt5 (≥ 5.10, requires PyQt5.Svg)
 * setuptools (>=40.0)
 * markdown2 (>= 2.3)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)
 * python-dateutil (>= 2.7.0)

For building the apidocs with Sphinx see apidocs/requirements.txt


Enjoy

Martin

___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[Python-announce] [RELEASE] pyspread 2.0

2021-11-22 Thread Martin Manns


pyspread 2.0


This is the first stable release of pyspread that runs under Python 3 
(>=3.6).


Apart from version changes and release file updates, it is feature
identical with version 1.99.8.


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Signature for tarball:

https://gitlab.com/pyspread/downloads/-/raw/master/releases/pyspread-2.0.tar.gz.sig
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1)
 * PyQt5 (≥ 5.10, requires PyQt5.Svg)
 * setuptools (>=40.0)
 * markdown2 (>= 2.3)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)
 * python-dateutil (>= 2.7.0)

For building the apidocs with Sphinx see apidocs/requirements.txt


Enjoy

Martin

___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


pyspread 1.99.3 released

2020-08-30 Thread Martin Manns
pyspread 1.99.3
===

This is the third Beta release for pyspread 2.0.

This version concentrates on usability improvements.


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Signature for tarball:
   
https://gitlab.com/pyspread/downloads/-/raw/master/releases/pyspread-1.99.3.tar.gz.sig?inline=false
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1) 
 * PyQt5 (≥ 5.10, requires PyQt5.Svg)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)

For building the apidocs with Sphinx see apidocs/requirements.txt


Known issues


 * While the main issue on the Mac has been solved, there is a report on
   Mac Catalina, which reports that the menu may freeze unless another
   application has been switched to.


Enjoy

Martin
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


pyspread 1.99.2 released

2020-05-08 Thread Martin Manns
pyspread 1.99.2
===

Pyspread 1.99.2 has been released.


This is the second Beta release for pyspread 2.0.

This version can be started both as a script and a module.

About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python.

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory:
 * Python (≥ 3.6)
 * numpy (>=1.1)
 * PyQt5 (≥ 5.10, must include PyQt5.Svg)

Recommended:
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)

For building the apidocs with Sphinx see apidocs/requirements.txt


Known issues


 * While the main issue on the Mac has been solved, there is a report on
   Mac Catalina, which reports that the menu may freeze unless another
   application has been switched to.


Enjoy

Martin
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


pyspread 1.99.1 released

2020-03-13 Thread Martin Manns

=
 pyspread 1.99.1
=

Pyspread 1.99.1 has been released.

This is the first Beta release for pyspread 2.0.

While the latest stable version pyspread 1.1.3 requires Python 2, the
new Beta release 1.99.1 makes pyspread available for Python 3.6+.

The GUI is now using PyQt5. Web page and code are now hosted on gitlab.


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://pyspread.gitlab.io/
Download page: https://pypi.org/project/pyspread/
Source code:   https://gitlab.com/pyspread/pyspread


Dependencies


Mandatory: 
 * Python (≥ 3.6)
 * PyQt5 (≥ 5.10, must include PyQt5.Svg)

Recommended: 
 * matplotlib (>=1.1.1)
 * pyenchant (>=1.1)
 * pip (>=18)

For building the apidocs with Sphinx see apidocs/requirements.txt


Known issues


 * Toolbars are not shown on some Mac installations
 * The chart dialog is modal so that one cannot scroll the grid while
   editing


Enjoy

Martin
--
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/

Support the Python Software Foundation:
http://www.python.org/psf/donations/


pyspread 1.1.1 released

2017-11-09 Thread Martin Manns

 pyspread 1.1.1


Pyspread 1.1.1 has been released.


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread


Release 1.1.1 is a bugfix release. 

Major changes to 1.1:
=

 * Pyspread color scheme now adapts better to most dark themes
 * Shift-scroll now scrolls the grid sideways
 * Undo and redo functionality made robust (now based on David
   Townshend's functional undo framework) 
 * Table choice panel is now shown and hidden with F3
 * Macro dialog changed to AUI panel (shown and hidden with F4)
 * The entry line is now correctly updated
 * Undo and redo buttons are now disabled if undo / redo is unavailable
 * Current grid label highlights changed for better visibility on high
   resolution displays
 * The grid is now prevented from scrolling on focusing a cell editor
 * Merged cells are now correctly drawn if the top left cell is
   invisible
 * Copy and paste format now ignores merged cell information
 * If a merged area is shifted outside the grid via insert rows etc.
   this is now correctly handled
 * Chart dialog switched to AUI panel for better resizeability of sub
   panels
 * GPG key choice now only allows choosing private keys without
   passwords


Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.1.1

2017-11-05 Thread Martin Manns

 pyspread 1.1.1


Pyspread 1.1.1 has been released.


About pyspread
==

Pyspread is a non-traditional spreadsheet that is based on and written
in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread


Release 1.1.1 is a bugfix release. 

Major changes to 1.1:
=

 * Pyspread color scheme now adapts better to most dark themes
 * Shift-scroll now scrolls the grid sideways
 * Undo and redo functionality made robust (now based on David
   Townshend's functional undo framework) 
 * Table choice panel is now shown and hidden with F3
 * Macro dialog changed to AUI panel (shown and hidden with F4)
 * The entry line is now correctly updated
 * Undo and redo buttons are now disabled if undo / redo is unavailable
 * Current grid label highlights changed for better visibility on high
   resolution displays
 * The grid is now prevented from scrolling on focusing a cell editor
 * Merged cells are now correctly drawn if the top left cell is
   invisible
 * Copy and paste format now ignores merged cell information
 * If a merged area is shifted outside the grid via insert rows etc.
   this is now correctly handled
 * Chart dialog switched to AUI panel for better resizeability of sub
   panels
 * GPG key choice now only allows choosing private keys without passwords


Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.1

2017-01-08 Thread Martin Manns
==
 pyspread 1.1
==

Pyspread 1.1 has been released.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread


Release 1.1 focuses on usability


Besides feedback from visualization of statistics analyzes, feedback
from using pyspread as a presentation tool has been taken into account.
Pre-releases of 1.1 have been successfully used for presentations with
up to 50 pages that include multiple videos.

New features


 * Video support (requires libvlc).
 * Spell checking (requires pyenchant).
 * Copy and paste of cell formats (only) via ++C and
   ++V . Copying formats has been decoupled from content in
   order to avoid unwanted side effects that can be experienced in
   current Office suites. 
 *  fits the grid to the screen size if the grid is not too large.
 * OpenDocument Spreadsheet (ods) file open support (requires pyodf,
   only cell values, yet). 
 * Alpha blending option added to multiple chart types.

Usability improvements
==

 * New panel for table choice for better usability with poor mouse
   wheels.
 * The default UI language has been changed from system default to
   English.
 * The current row and column now is highlighted in the grid labels.
 * In fullscreen mode, arrow keys and space navigate through the tables.
 * The cell cursor is now hidden in fullscreen mode.
 * Changing preferences now refreshes the grid.
 * The cell editor is now closed and all changes are discarded when the
   table is switched.
 * The UI language can now be chosen from preferences dialog.
 * The default open and save filetypes can now be set in preferences
   dialog, which simplifies using pysu files via git.

Major bug fixes
===

 * Unmerging cells no longer leads to strange side effects.
 * Cell attribute access is now faster if many tables are present.
 * The cell editor is now closed and all changes are discarded when the
   table is switched.
 * Xls file import made independent from screen resolution.
 * The current directory is now changed to the directory, so that
   relative file access is possible.
 * Concurrent saving operations fixed.

Known issues


 * Button cells and video cells may require two clicks instead of one.
 * Fonts in presentations may differ between platforms, which can cause
   undesirable differences line breaks.
 * ODS import is still very limited and does not cover cell formatting.



Enjoy

Martin


pgpNDCEKoOSJG.pgp
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.0.3

2016-05-10 Thread Martin Manns

 pyspread 1.0.3


Pyspread 1.0.3 is released.

This is a bugfix release. 

Major changes to 1.0.2:

 * Unmerging of cells fixed
 * Merge areas that are shifted beyond a sheet boundary via insert
   rows / columns are now deleted 
 * Font default style fixed for fonts that are originally bold
 * When a table is switched, the cell editor now is closed and all
   changes in an open cell editor are forgotten


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread

Enjoy

Martin


-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.0.2

2016-01-19 Thread Martin Manns

 pyspread 1.0.2


Pyspread 1.0.2 is released.

This is a bugfix release. 

Major changes to 1.0.1:

 * Save function bug fixed
 * pys files that are marked up to v1.0 are now accepted for loading


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread

Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.0.1

2016-01-11 Thread Martin Manns

 pyspread 1.0.1


Pyspread 1.0.1 is released.

This is a bugfix release. 

Major changes to 1.0:

 * Jedi 0.9 API change fixed.
 * French translation added.
 * Translations updated.
 * GPG now only accepts the chosen key as valid.
 * When an unsaveable xlsx file is opened, a Save As dialog opens.
 * The default file type can now be adjusted in the .pyspreadrc file.
 * Undoing a merge operation now correctly restores data from the
   merged cells.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread

Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.0

2015-11-03 Thread Martin Manns
==
 pyspread 1.0
==

Pyspread 1.0 is released.

After 7 years of development, the initially envisioned features are
finally implemented.

Besides source code changes, a Windows 32 bit installer is available
(URL see below, 120MB download, requires Windows XP or later).

Major changes to 0.4.3:

 * Full screen mode bug on Windows fixed
 * File handling for reading xls files improved
 * xlsx files can now be opened (cell content only)

About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread
Windows installer:
http://download.gna.org/pyspread/pyspread-1.0-win32-setup.exe

Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 1.0

2015-10-30 Thread Martin Manns


==
 pyspread 1.0
==

Pyspread 1.0 is released.

After 7 years of development, the initially envisioned features are
finally implemented.

Besides source code changes, a Windows 32 bit installer is available
(URL see below, 120MB download, requires Windows XP or later).

Major changes to 0.4.3:

 * Full screen mode bug on Windows fixed
 * File handling for reading xls files improved
 * xlsx files can now be opened (cell content only)

About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website:   https://manns.github.io/pyspread/
Download page: https://pypi.python.org/pypi/pyspread
Source code:   https://github.com/manns/pyspread
Windows installer: http://download.gna.org/pyspread/pyspread-1.0-win32-setup.exe

Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.4.3

2015-06-01 Thread Martin Manns
==
pyspread 0.4.3
==

Pyspread 0.4.3 is released.

Please note that pyspread 0.4.2 is not available on pypi because of a
deployment issue.

Major changes to 0.4.1:

 * Full screen mode added
 * Some changes to improve results on Debian CI tests
 * Updates to first steps document
 * Linux distribution logos removed from first steps document


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: https://manns.github.io/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread
Source code: https://github.com/manns/pyspread

Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.4

2014-12-15 Thread Martin Manns

pyspread 0.4


Pyspread 0.4 is released.

In this release, rendering has switched to Cairo, which enhances
quality and performance.
Grid content can now be exported into high quality PDF and SVG files.
Cells can now display SVG images and text with markups.
The nn function now removes None from lists, tuples, etc.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.4

2014-12-15 Thread Martin Manns

pyspread 0.4


Pyspread 0.4 is released.

In this release, rendering has switched to Cairo, which enhances
quality and performance.
Grid content can now be exported into high quality PDF and SVG files.
Cells can now display SVG images and text with markups.
The nn function now removes None from lists, tuples, etc.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.3.3

2014-09-06 Thread Martin Manns
==
pyspread 0.3.3
==


Pyspread 0.3.3 is released.

This is a wxPython 3.x related bugfix release that fixes a segfault
when initially creating and choosing GPG keys.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.3.3

2014-09-06 Thread Martin Manns
==
pyspread 0.3.3
==


Pyspread 0.3.3 is released.

This is a wxPython 3.x related bugfix release that fixes a segfault
when initially creating and choosing GPG keys.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.3.1

2014-07-12 Thread Martin Manns
==
pyspread 0.3.1
==


Pyspread 0.3.1 is released.

This is a bugfix release that removes an annoying warning on the
console.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.3.1



 + Bugfix
 + Updated German localization
 + Updated Ukrainian localization


Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.3.1

2014-07-12 Thread Martin Manns
==
pyspread 0.3.1
==


Pyspread 0.3.1 is released.

This is a bugfix release that removes an annoying warning on the
console.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.3.1



 + Bugfix
 + Updated German localization
 + Updated Ukrainian localization


Enjoy

Martin
-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.3.0

2014-07-09 Thread Martin Manns
==
pyspread 0.3.0
==


Pyspread 0.3.0 is released.

This update is the first release that runs with wxPython 3.x.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.3.0



 + wxPython 3.x support
 + Entryline code completion (use Tab)
 + EntryLine tooltip now displays docstrings for methods and builtins
   (use Tab)
 + nn function added to remove None from result array
 + Uncompressed pysu save file format
 + Writing xls files (still experimental)
 + Cell locking
 + Cell sorting
 + Frozen cells can now be updated periodically (=100 ms/update)
 + Reference to a selection can now be copied the the clipboard with
 + Ctrl + R Home now moves the active cell to the first column of
 + the actual row Shift + Space now selects the current row
 + Ctrl + Space now selects the current column
 + Fingerprint in gpg key choice dialog
 + Tooltips for toolbar icons



Known issues


 + Selection mode is disabled in Windows.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.
 + On some (not all) Windows system lockup prevention does not work



Martin



-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.3.0

2014-07-09 Thread Martin Manns
==
pyspread 0.3.0
==


Pyspread 0.3.0 is released.

This update is the first release that runs with wxPython 3.x.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.3.0



 + wxPython 3.x support
 + Entryline code completion (use Tab)
 + EntryLine tooltip now displays docstrings for methods and builtins
   (use Tab)
 + nn function added to remove None from result array
 + Uncompressed pysu save file format
 + Writing xls files (still experimental)
 + Cell locking
 + Cell sorting
 + Frozen cells can now be updated periodically (=100 ms/update)
 + Reference to a selection can now be copied the the clipboard with
 + Ctrl + R Home now moves the active cell to the first column of
 + the actual row Shift + Space now selects the current row
 + Ctrl + Space now selects the current column
 + Fingerprint in gpg key choice dialog
 + Tooltips for toolbar icons



Known issues


 + Selection mode is disabled in Windows.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.
 + On some (not all) Windows system lockup prevention does not work



Martin



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Reading OpenOffice spreadsheet in Python?

2014-05-20 Thread Martin Manns
On Tue, 20 May 2014 11:38:06 -0500
Skip Montanaro s...@pobox.com wrote:

 I am so fed up with LibreOffice's inability to properly support really
 basic Excel capabilities, I'm about ready to throw my computer out the

Could you please give some examples, what basic Excel capabilities you
are missing?

 I'm open to other options as well. I see a number of Google
 spreadsheet modules, and there is pyspread. The former has the
 permission issue (besides, where I work everything goes into Git), and
 I'm not sure how full-featured or stable the latter is (but, will
 investigate).

Maybe gnumeric may be an option, too.

Pyspread should run fine on the Mac. However, Macs are not officially
supported because there are no testers for OSX, yet.

Please note that pyspread does not translate Excel xls files into
Python but only imports cell contents and formatting via xlrd. If you
use Excel cell functions or VBA then you would have to migrate your
code to Python.


Martin
-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.2.7

2014-02-07 Thread Martin Manns
==
pyspread 0.2.7
==


Pyspread 0.2.7 is released.

This is a bugfix release that fixes the chart dialog for Windows.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.2.7


 + Chart dialog works again on Windows


Known issues


 + Selection mode is disabled in Windows.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.
 + Pyspread with wxPython 3.x instead of 2.8.x may be slow and buggy
 + On some (not all) Windows system lockup prevention does not work



Martin


-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.6

2014-02-03 Thread Martin Manns
==
pyspread 0.2.6
==


Pyspread 0.2.6 is released.

This update brings Excel xls file reading and prevents many
pyspread lock ups that were caused by misbehaving user code.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.2.6


 + Reading support for Excel xls files (requires dependency xlrd)
 + Code execution timeout, i. e. buggy code such as infinite loops does
   not lock up pyspread any more.
   Note: The timeout does not work for C operations such as
 a ** big number
 + Macro dialog now provides an error message field
 + Multiple rows/columns can now be resized together when selected
 + Show frozen option added that changes background of frozen cells
 + The cell editor now is resized when the text grows too large
 + Cells are now always clipped
 + Example macro for in cell LaTeX equations added
 + Contour plots and Sankey charts added to chart dialog
 + Pie chart can now be rotated in the chart dialog
 + Chart fonts and ticks can now be changed in chart dialog
 + Some bug fixes

Known issues


 + Selection mode is disabled in Windows.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.
 + Pyspread with wxPython 3.x instead of 2.8.x may be slow and buggy
 + On some (not all) Windows system lockup prevention does not work


Enjoy

Martin


-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.6

2014-02-03 Thread Martin Manns
==
pyspread 0.2.6
==


Pyspread 0.2.6 is released.

This update brings Excel xls file reading and prevents many
pyspread lock ups that were caused by misbehaving user code.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/
Download page:   https://pypi.python.org/pypi/pyspread


What is new in 0.2.6


 + Reading support for Excel xls files (requires dependency xlrd)
 + Code execution timeout, i. e. buggy code such as infinite loops does
   not lock up pyspread any more.
   Note: The timeout does not work for C operations such as
 a ** big number
 + Macro dialog now provides an error message field
 + Multiple rows/columns can now be resized together when selected
 + Show frozen option added that changes background of frozen cells
 + The cell editor now is resized when the text grows too large
 + Cells are now always clipped
 + Example macro for in cell LaTeX equations added
 + Contour plots and Sankey charts added to chart dialog
 + Pie chart can now be rotated in the chart dialog
 + Chart fonts and ticks can now be changed in chart dialog
 + Some bug fixes

Known issues


 + Selection mode is disabled in Windows.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.
 + Pyspread with wxPython 3.x instead of 2.8.x may be slow and buggy
 + On some (not all) Windows system lockup prevention does not work


Enjoy

Martin


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Slicing with negative strides

2013-11-03 Thread Martin Manns
On 29 Oct 2013 05:22:00 GMT
Steven D'Aprano st...@pearwood.info wrote:

 Does anyone here use slices (or range/xrange) with negative strides
 other than -1?

I have used negative strides for comparing discrete sequences e. g. for
turbulence analysis, and I hope that my code will still run in Python 4.

Martin
-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.2.5

2013-09-23 Thread Martin Manns
==
pyspread 0.2.5
==


Pyspread 0.2.5 is released.

This is mainly a bug fix release with some improvements in chart
creation and CSV import.

About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.5


 + Brazilian Portuguese localization added
 + Pyspread now displays dates with matplotlib 1.3.0
 + CSV import now allows different file encodings
 + All unit tests now succeed in Windows
 + Chart grid lines are now separately selectable for each axis
 + Chart annotation texts are now treated as code instead of strings
 + Tooltip text for pie chart colors is extended
 + Chart padding fixed
 + Default font size for renderer is now set explicitly if 0 (OS X fix)
 + String representation method of S removed


Known issues


 + Selection mode is disabled in Windows.
 + Paste As... does not work if dates are present in the data structure.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.

Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.5

2013-09-23 Thread Martin Manns
==
pyspread 0.2.5
==


Pyspread 0.2.5 is released.

This is mainly a bug fix release with some improvements in chart
creation and CSV import.

About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.5


 + Brazilian Portuguese localization added
 + Pyspread now displays dates with matplotlib 1.3.0
 + CSV import now allows different file encodings
 + All unit tests now succeed in Windows
 + Chart grid lines are now separately selectable for each axis
 + Chart annotation texts are now treated as code instead of strings
 + Tooltip text for pie chart colors is extended
 + Chart padding fixed
 + Default font size for renderer is now set explicitly if 0 (OS X fix)
 + String representation method of S removed


Known issues


 + Selection mode is disabled in Windows.
 + Paste As... does not work if dates are present in the data structure.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.

Enjoy

Martin

-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.2.4

2013-07-24 Thread Martin Manns
==
pyspread 0.2.4
==


Pyspread 0.2.4 is released.

Besides Linux, the new version also runs on Windows (Windows 7 64bit
and Windows XP 32bit tested).


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.4


 + Windows compatibility
 + More charts and chart options (box plots, histograms, pie charts)
 + Export of matplotlib charts to svg, png, pdf, eps and ps
 + Import from UTF-8 encoded csv files (no other encoding, yet)
 + More than 64k characters supported in one cell
 + Insertion and deletion of rows and columns now affect only the
   current table
 + High quality in-cell bitmaps images (with transparency) supported
 + Iterable data can be pasted into multiple cells via Paste As...
 + Pyspread can now be started from other Python applications
 + Partly localized in Nowegian Nynorsk and Bokmaal

Known issues


 + Selection mode is disabled in Windows.
 + Find  Replace All is slow in grids with much data unless pyspread
   is minimized.
 + Paste As... does not work if dates are present in the data structure.
 + Sometimes, pressing redo when there is nothing left to redo has
   undesired effects such as redoing an operation again.
 + When updating from a non-release version (from git), the file 
   ~/.pyspreadrc (in Windows pyspread's registry entry) may have to be
   deleted.

Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.2.3

2013-01-14 Thread Martin Manns
==
pyspread 0.2.3
==


Pyspread 0.2.3 is released.

The new version improves GPG integration.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.
Pyspread is designed for Linux and other GTK platforms.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.3


 * GUI front-end for matplotlib charts
 * Image display in cells
 * Localization in German, Dutch, Danish and Ukrainian (partly finished)
 * Dependency to PyMe, rpy and gmpy removed for easier packaging
 * New dependencies matplotlib, python-gnupg
 * New example files
 * Various bug fixes


Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.3

2013-01-14 Thread Martin Manns
==
pyspread 0.2.3
==


Pyspread 0.2.3 is released.

The new version improves GPG integration.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.
Pyspread is designed for Linux and other GTK platforms.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.3


 * GUI front-end for matplotlib charts
 * Image display in cells
 * Localization in German, Dutch, Danish and Ukrainian (partly finished)
 * Dependency to PyMe, rpy and gmpy removed for easier packaging
 * New dependencies matplotlib, python-gnupg
 * New example files
 * Various bug fixes


Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.2.2

2012-04-13 Thread Martin Manns
==
pyspread 0.2.2
==


Pyspread 0.2.2 is released.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.
Pyspread is designed for Linux and other GTK platforms.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.2


 * pot file for internationalization available
 * Macros can again access the globals S, X, Y and Z
 * Grid table switching bug fixed
 * Additional menubar icons added


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.1

2012-03-13 Thread Martin Manns
==
pyspread 0.2.1
==


Pyspread 0.2.1 is released.

The new version improves GPG integration.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.
Pyspread is designed for Linux and other GTK platforms.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.1


 * Format menu added
 * Printing bug (first line not printed) fixed
 * GPG key choice dialog added
 * Secret key generation dialog added
 * Password saving in .pyspreadrc is now optional
 * Preferences dialog entries are now validated
 * Toolbar positions are now saved on exit
 * Absolute addressing with mouse changed to Shift + Ctrl
 * Relative addressing with mouse changed to Alt + Ctrl


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.1

2012-03-13 Thread Martin Manns
==
pyspread 0.2.1
==


Pyspread 0.2.1 is released.

The new version improves GPG integration.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in the programming language Python. 

The goal of pyspread is to be the most pythonic spreadsheet application.
Pyspread is designed for Linux and other GTK platforms.

Pyspread is free software. It is released under the GPL v3.

Project website: http://manns.github.com/pyspread/


What is new in 0.2.1


 * Format menu added
 * Printing bug (first line not printed) fixed
 * GPG key choice dialog added
 * Secret key generation dialog added
 * Password saving in .pyspreadrc is now optional
 * Preferences dialog entries are now validated
 * Toolbar positions are now saved on exit
 * Absolute addressing with mouse changed to Shift + Ctrl
 * Relative addressing with mouse changed to Alt + Ctrl


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: open office in another language?

2012-01-11 Thread Martin Manns
On Tue, 10 Jan 2012 18:43:09 -0300
Sean Wolfe ether@gmail.com wrote:
 
 Has there been any talk of doing another similar office suite, or
 maybe just writer + spreadsheet, in a better language eg python? I
 expect it's a huge undertaking but ... thought I'd ask around at
 least.

If you are looking for Python based spreadsheets, 
you may be interested in ResolverOne (commercial product)

http://www.resolversystems.com/products/resolver-one/

or in pyspread (GPL, my own effort)

http://manns.github.com/pyspread/

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] pyspread 0.2.0

2011-12-24 Thread Martin Manns

==
pyspread 0.2.0
==


Pyspread 0.2.0 has been released.

The new version is an almost complete rewrite for better stability and
maintainability.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in Python. Pyspread expects Python expressions in its grid
cells, which makes a spreadsheet specific language obsolete.

Pyspread is free software. It is released under the GPL v3.

The project website has changed to http://manns.github.com/pyspread/


What's new in 0.2.0
===

 + Windows support discontinued

 + New pys save file format

 + A lot of bug fixes and small changes to the user interface


Enjoy

Martin


-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] pyspread 0.2.0

2011-12-24 Thread Martin Manns

==
pyspread 0.2.0
==


Pyspread 0.2.0 has been released.

The new version is an almost complete rewrite for better stability and
maintainability.


About pyspread
==

Pyspread is a non-traditional spreadsheet application that is based on
and written in Python. Pyspread expects Python expressions in its grid
cells, which makes a spreadsheet specific language obsolete.

Pyspread is free software. It is released under the GPL v3.

The project website has changed to http://manns.github.com/pyspread/


What's new in 0.2.0
===

 + Windows support discontinued

 + New pys save file format

 + A lot of bug fixes and small changes to the user interface


Enjoy

Martin


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Something is rotten in Denmark...

2011-05-31 Thread Martin Manns
On Tue, 31 May 2011 01:48:05 -0500
harrismh777 harrismh...@charter.net wrote:

  fs=[]
  fs = [(lambda n: i + n) for i in range(10)]
  [fs[i](1) for i in range(10)]
 [10, 10, 10, 10, 10, 10, 10, 10, 10, 10] === not good
 
  ( that was a big surprise! . . . )
  ( let's try it another way . . . )

After being confused I figured out it is a 3.x example:



$ python
Python 2.6.6 (r266:84292, Apr 20 2011, 11:58:30) 
[GCC 4.5.2] on linux2
Type help, copyright, credits or license for more information.
 fs=[]
 fs = [(lambda n: i + n) for i in range(10)]
 [fs[i](1) for i in range(10)]  
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]



$ python3.1 
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) 
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 fs=[]
 fs = [(lambda n: i + n) for i in range(10)]
 [fs[i](1) for i in range(10)]  
[10, 10, 10, 10, 10, 10, 10, 10, 10, 10]



Is this fixed automatically by 2to3?

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Something is rotten in Denmark...

2011-05-31 Thread Martin Manns
On Tue, 31 May 2011 15:47:33 -0600
Ian Kelly ian.g.ke...@gmail.com wrote:

 The i variable is part of the global scope, and as you iterate over
 range(10) again it coincidentally takes on the same values as in the
 original list comprehension.  You don't see this in Python 3 because
 the scope of i is limited to the list comprehension, not global.

I read about the scope change. 
However, list comprehension scope being global still feels right for
me because I am still using Python 2.

I feel that I should start worrying more about future migration issues.

Cheers 

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Collision of rotated rectangles without pygame

2010-12-07 Thread Martin Manns
On Tue, 07 Dec 2010 00:53:27 -0800
John Nagle na...@animats.com wrote:

 On 12/5/2010 2:49 PM, Martin Manns wrote:
 Probably because you seem to be trying to compute the intersection
 point for coincident lines, which is not well-defined.

I found the problem: 
pygame returns one pixel more for the right border than wx.

 Incidentally, a dictionary lookup in Python is far more expensive
 than computing trig functions.  If you need to speed this up
 for large numbers of rectangles, there are algorithms that are
 several orders of magnitude faster.  Realistically, though,
 this is the kind of problem that runs slow in CPython.

This was taken from the vizier code. I fixed it.

 This is why you don't write your own collision library.
 (I once did, for 3D, but that was in 1996, when it was
 cutting-edge technology.)

Is there a pure Python collision library other than vizier?

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Collision of rotated rectangles without pygame

2010-12-05 Thread Martin Manns
Hello,

I am looking for a Python library for 2D collision checks of rotated
rectangles. Currently, I have found vizier 0.5b that is based on pygame.

Since I do not want to add a pygame dependency to my app, I replaced the
pygame.rect.Rect by a wxPython wx.Rect (see code below).

However, collision checks do not work correctly, i. e. identical rects
are not found to be colliding:

$ python
Python 2.6.6 (r266:84292, Nov 28 2010, 18:42:58) 
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 import xrect
 r=xrect.RotoRect(10,10,30,20,angle=34)
 s=xrect.RotoRect(10,10,30,20,angle=34)
 r.rotocollide(s)
False
 


Is my replacement of the rectangle object wrong or is vizier not
working correctly with pygame as well?

Do you know of any other pure Python library for rotated rectangle
collision checks?

Cheers

Martin




from __future__ import division
import math
import wx
##


cos_table = dict([(deg, math.cos(math.radians(deg))) for deg in xrange(360)])
sin_table = dict([(deg, math.sin(math.radians(deg))) for deg in xrange(360)])


class RotoRect(wx.Rect):

def __init__(self, *a, **kw):
self.deg = kw.pop('angle')
wx.Rect.__init__(self, *a, **kw)

# pygame rect compatibility for wx.Rect

def get_center(self):
return self.centerx, self.centery

def set_center(self, center):
self.centerx, self.centery = center

def get_centerx(self):
return self.x + self.width / 2

def set_centerx(self, centerx):
self.SetX(centerx - self.width / 2)

def get_centery(self):
return self.y + self.height / 2

def set_centery(self, centery):
self.SetY(centery - self.height / 2)

def get_topleft(self):
return self.GetTopLeft()

def set_topleft(self, p):
self.SetTopLeft(p)

def get_topright(self):
return self.GetTopRight()

def set_topright(self, p):
self.SetTopRight(p)


center = property(get_center, set_center)
centerx = property(get_centerx, set_centerx)
centery = property(get_centery, set_centery)
topleft = property(get_topleft, set_topleft)
topright = property(get_topright, set_topright)

# Now for the vizier code

def rotate(self, point, origin = 0):
Returns coords of point p rotated self.theta radians with 

the rectangle around its center



if not origin: origin = self.center
p_x = point[0]
p_y = point[1]
o_x = origin[0]
o_y = origin[1]
costheta = cos_table[self.deg]
sintheta = sin_table[self.deg]
return ((o_x + costheta * (p_x - o_x)) - (sintheta * (p_y - o_y)),
   (o_y + sintheta * (p_x - o_x)) + (costheta * (p_y - o_y)))

def rotoxt(self, a, b):
Returns the y extremity xt of rect between self.rect

a_x = a[0]
a_y = a[1]
b_x = b[0]
b_y = b[1]

#calculate difference between self.left and b_x
dxl = self.left - b_x 

#calculate difference between self.right and b_x
dxr = self.right - b_x

#if b_x isn't between self.left and self.right
if (dxl * dxr)  0:   
#if dxl  1, b_x is on the right
if (dxl  0):   
#xt = (m * dxr) + b_y
xt = b_y - (-a_y)) / (b_x - (-a_x))) * dxr) + b_y)
else: 
#else b_x is on the left
#xt = (m * dxl) + b_y
xt = b_y - a_y) / (b_x - a_x)) * dxl) + b_y)
return xt
else: 
#else b_x is between self.left and self.right, and xt = b_y
return b_y

def rotocollide(self, rect):
Check for collision between self.rect and rect

#initialize collision to False
col = False   

#transforming the plane to set rect's center to the origin
transplane = rect.center  

#set rect's center to the origin
rect.center = (0, 0)  

#transform self.rect's center by the transplane amount
self.center = (self.centerx - transplane[0],
   self.centery - transplane[1]) 

#transforming the plane to set self.rect's theta to 0
transdeg = self.deg

Re: Collision of rotated rectangles without pygame

2010-12-05 Thread Martin Manns
On Sun, 5 Dec 2010 23:49:36 +0100
Martin Manns mma...@gmx.net wrote:

 Is my replacement of the rectangle object wrong or is vizier not
 working correctly with pygame as well?

Answering my first question:

Vizier works O.K. with pygame. 
I am unsure what I did wrong in the rect replacement though.

Cheers

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] Pyspread 0.1.2 released

2010-10-30 Thread Martin Manns

Pyspread 0.1.2 released
===

I am pleased to announce the new release 0.1.2 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


Changes to 0.1.1


New features:

* Added function to make a cell visible
* Third cell justification center added
* Ctrl-F now points to find toolbar instead of find dialog
* Frozen state is now saved
* Entering text in a cell now deletes old text
* Added function F5 (in menu View) for refreshing selected cells
* Save option pys file with/without gpg signature added

Bug fixes:

* Grid flicker reduced
* Printing works again
* Changing the table now empties the entry line and does not mess
  up  data any more (BUG 3030172)
* 1D printing bug fixed (BUG 2790444)
* Loading a file from command line no longer deletes cell 0,0,0
  (BUG 3030880)
* Undoing paste operations now works (BUG 3019334)
* Bitmap toggle buttons now work in Windows as well
* Marks undo and redo operation do not accumulate any more
* Undoing text font and textattribute changes works now
* CSV import dialog apply button removed
* Cell limit (2**26) for 32 bit systems removed
* Prints of off-screen areas now correctly center on page
* Help now works when not in the home directory
* Double underscores in Tutorial corrected
* Pyspread gpg key name changed to pyspread_user-id
* Deleting rows and columns can be undone again
* When reversing search, all values are now found
* Saved pys files now have .pys suffix added automatically
* Fixed font size reset bug when setting font attributes
* Loading a file from command line now checks signature correctly
* Fixed moving cells bug for edits in non top-left grid position in
  wx.GTK


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] Pyspread 0.1.2 released

2010-10-30 Thread Martin Manns

Pyspread 0.1.2 released
===

I am pleased to announce the new release 0.1.2 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


Changes to 0.1.1


New features:

* Added function to make a cell visible
* Third cell justification center added
* Ctrl-F now points to find toolbar instead of find dialog
* Frozen state is now saved
* Entering text in a cell now deletes old text
* Added function F5 (in menu View) for refreshing selected cells
* Save option pys file with/without gpg signature added

Bug fixes:

* Grid flicker reduced
* Printing works again
* Changing the table now empties the entry line and does not mess
  up  data any more (BUG 3030172)
* 1D printing bug fixed (BUG 2790444)
* Loading a file from command line no longer deletes cell 0,0,0
  (BUG 3030880)
* Undoing paste operations now works (BUG 3019334)
* Bitmap toggle buttons now work in Windows as well
* Marks undo and redo operation do not accumulate any more
* Undoing text font and textattribute changes works now
* CSV import dialog apply button removed
* Cell limit (2**26) for 32 bit systems removed
* Prints of off-screen areas now correctly center on page
* Help now works when not in the home directory
* Double underscores in Tutorial corrected
* Pyspread gpg key name changed to pyspread_user-id
* Deleting rows and columns can be undone again
* When reversing search, all values are now found
* Saved pys files now have .pys suffix added automatically
* Fixed font size reset bug when setting font attributes
* Loading a file from command line now checks signature correctly
* Fixed moving cells bug for edits in non top-left grid position in
  wx.GTK


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread Martin Manns
On Thu, 01 Jul 2010 14:48:47 -0400
pyt...@bdurham.com wrote:

 Curious if any of you are using GPG or PGP encryption and/or
 signatures in your Python apps?
...
 4. generating signatures for files that you are exchanging/posting for
 download?

I use pyme to create and check save file signatures.

 5. what public keyring services are you using?

None
 
 Any comments on using the subprocess module to wrap the gpg or openssl
 command line utilities? This seems to be a common technique for
 encryption and signing solutions and appears to the technique used by
 python-gnupg (for example).

pyme works great with Linux.
However, I have never installed it on a Windows system.

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: xrange issue 7721

2010-05-30 Thread Martin Manns
On Sun, 30 May 2010 00:49:11 +0100
Mark Lawrence breamore...@yahoo.co.uk wrote:
 
  From http://docs.python.org/dev/library/itertools.html
 Unlike regular slicing, islice()  does not support negative values
 for start, stop, or step.
 
 Rule 1 of programming never assume anything, particularly wrt
 testing. I assume that you are ok with this. :) Dreadful I know :)

Right, never post before reading the fine manual :)

  I found the msg97928 code pretty obvious when seeing the snippet.
  If you disagree you may consider re-opening the issue.
 I trust that you get my point regarding the failure to raise a 
 ValueError :)  Or am I wearing my extremely stupid hat today?

Since you seem to find this issue important, are you going to re-open
the issue?

Cheers

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: xrange issue 7721

2010-05-29 Thread Martin Manns
On Sat, 29 May 2010 19:46:28 +0100
Mark Lawrence breamore...@yahoo.co.uk wrote:

 I've had an OverflowError using xrange with Python 2.6.5 on Windows. 
 Googling got me to the subject line.
 
 msg97928 gives a code snippet to overcome the limitations of xrange, 
 allowing for negative steps, however it doesn't raise a ValueError
 for a zero step. msg99624 gives a docs change that has been
 implemented for V2.6, but this doesn't refer to the msg97928 code
 snippet, rather it refers to a one liner that only works for positive
 steps.  The docs for V2.7 haven't been changed at all.

Mark:

Thank you for posting.

2.7 is not affected by issue 7721 because itertools.islice behavior is
changed. Therefore, the original snippet should work in 2.7 (I have not
tested this).

I found the msg97928 code pretty obvious when seeing the snippet. 
If you disagree you may consider re-opening the issue.

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] Pyspread 0.1.1 released

2010-05-08 Thread Martin Manns
Pyspread 0.1.1 released
===

I am pleased to announce the new release 0.1.1 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


Changes to 0.1
--

 * Grid is faster.
 * Copying only partly filled cells works now.
 * Cells that get attributes but no string no longer display None.

Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] Pyspread 0.1.1 released

2010-05-08 Thread Martin Manns
Pyspread 0.1.1 released
===

I am pleased to announce the new release 0.1.1 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


Changes to 0.1
--

 * Grid is faster.
 * Copying only partly filled cells works now.
 * Cells that get attributes but no string no longer display None.

Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] Pyspread 0.1 released

2010-03-20 Thread Martin Manns

Pyspread 0.1 released
=

After a long and eventful Alpha period, pyspread has finally reached
Beta stage. I thank all contributors and testers who have helped
getting pyspread to this point.

About: 
--

Pyspread is a cross-platform Python spreadsheet application. It is
based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices. 

Stability and compatibility
---

Pyspread runs pretty stable in CPython. Please note that old save files
are not compatible. Load them in the old version and copy the code to a
new version of pyspread via the clipboard. Being in Beta means
increased code stability. Save files are now going to be downwards
compatible. However, major beta releases (e. g. 0.1 to 0.2) may still
break compatibility. Such a change may occur only after being announced
in the previous major beta release.

New features


* New macro editor dialog.
* Macros can now contain any Python code.
* Macros load and save files are now plain text files.
* Macros are now saved within the pys-file.
* Macros files are now signed and included in the trusted file
  concept.

Bug fixes
-

* Cells can now be correctly accessed with negative index (BUG
  2965144)


Homepage


http://pyspread.sourceforge.net



Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] Pyspread 0.0.14b released

2010-03-13 Thread Martin Manns
Pyspread 0.0.14b released
=

I am pleased to announce the new release 0.0.14b of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


New features


 * Cell border can be changed independently.
 * Cell access allows negative indices when not slicing.


Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] Pyspread 0.0.14b released

2010-03-13 Thread Martin Manns
Pyspread 0.0.14b released
=

I am pleased to announce the new release 0.0.14b of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


New features


 * Cell border can be changed independently.
 * Cell access allows negative indices when not slicing.


Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


[issue7721] Code in xrange documentation does not work

2010-02-20 Thread Martin Manns

Martin Manns mma...@gmx.net added the comment:

So could we replace

If a larger range is needed, an alternate version can be crafted using the 
itertools module: islice(count(start, step), (stop-start+step-1)//step).

by

If a larger range is needed, an alternate version can be crafted using the 
itertools module: takewhile(lambda x: xstop, (start+i*step for i in count())).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7721
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ANN] Pyspread 0.0.14 released

2010-01-25 Thread Martin Manns
Pyspread 0.0.14 released


I am pleased to announce the new release 0.0.14 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


New features


* Sparse grid introduced. It supports up to 80 000 000 rows.
* Safe mode for inspecting foreign files
* GPG signatures for own files (requires PyMe)
* Help framework
* New About dialog
* Insertion of cell access code via Ctrl + Insert
* Simplified Macro editor dialog
* Improved cycle detection algorithm for grid

Bug fixes
-

* Globals now update immediately
* Color works now when loading pys files
* wxPython v 2.8 is now preferred
* Error handling bug removed
* Help files are now found after changing the path
* Font rendering in Windows fixed

Known issues


* Grid updates cause ficker on Windows (BUG 2938160)


Enjoy

Martin

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Long integers and ways around xrange

2010-01-16 Thread Martin Manns
Hi

As stated in the manual, xrange raises an OverflowError for 
long integer parameters. Looking for a xrange like generator 
for long integers, I found this in the manual 
(http://docs.python.org/library/functions.html):

 CPython implementation detail: xrange() is intended to be simple and
 fast. Implementations may impose restrictions to achieve this. The C
 implementation of Python restricts all arguments to native C longs
 (“short” Python integers), and also requires that the number of
 elements fit in a native C long. If a larger range is needed, an
 alternate version can be crafted using the itertools module:
 islice(count(start, step), (stop-start+step-1)//step).

However, count only accepts one parameter, so that this solution does
not work. Furthermore, islice only accepts positive values for step.

I came up with a solution that I have pasted below. 

Is there a standard long integer replacement for xrange? 
Do you have ideas for improving the code?

Best Regards

Martin


File irange.py:


#! /usr/bin/env python
# -*- coding: utf-8 -*-

from itertools import count, imap, islice

def scount(n=0, step=1):
Count that supports a step attribute

return imap(lambda x: x * step + n, count())

def irange(start, stop=None, step=1):
Range for long integers

Usage: irange([start], stop, [step])

Parameters
--
start: Integer, defaults to 0
stop: Integer
step: Integer, defaults to 1

Note on long integers
-

Each of the three parameters can be long integers.
If stop  start: start(stop-start+step-1) // step) must be a short integer.
If stop  start: start(stop-start+step+1) // step) must be a short integer.



if start is None:
raise TypeError, range() integer argument expected, got NoneType

if stop is None:
stop = start
start = 0

if step is None:
step = 1

if step  0:
if stop  start:
return (_ for _ in [])
return islice(scount(start, step), (stop-start+step-1) // step)

elif step  0:
if stop  start:
return (_ for _ in [])
return islice(scount(start, step), (stop-start+step+1) // step)

else:
raise ValueError, irange() step argument must not be zero






File test_irange.py


#! /usr/bin/env python
# -*- coding: utf-8 -*-

from irange import scount, irange 

# Unit test for irange.py (py.test)

class TestIrange(object):
'Unit test for MainGridBase'
__module__ = __name__

def setup_method(self, method):
pass

def test_irange(self):
test_values = [ \
 [2],
 [1],
 [-23],
 (0, 1), 
 (0, 2),
 (0, 1),
 (1, 2),
 (100, 1000),
 (4, 0),
 (4, -1),
 (2**65-512, 2**65),
 (-1, 1),
 (-100, 0),
 (0, 1, 1),
 (0, 2, 1),
 (0, 10, 1),
 (0, 100, 1),
 (0, -1, 1),
 (0, 2, 2),
 (0, 10, 3),
 (0, 100, 4),
 (0, 1000, 60),
 (0, 2**65, 2**60),
 (1, 0, -1),
 (10, 0, -1),
 (12312, 0, -1),
 (2**65, 0, -2**61),
 (1, 0, -2),
 (10, 0, -3),
 (12312, 0, -4),
 (2**65, 0, -2**60),
 (2**67, 0, -2**67+1000),
 (-10, 2, 1),
 (-2, 10, 1),
 (3, 100, 1),
 (1000-1000, 1000, 1),
 (2**65, 2**66, 2**63),
 (-120, 2**65, 2**63),
 (1, -2334234, -1),
 (1, 10, 100),
 (10, 1, 100),
 (1, 10, -100),
 (1, 2, 2**65),
 (1, -2, 2**65),
]

for val in test_values:
assert list(irange(*val)) == range(*val)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Long integers and ways around xrange

2010-01-16 Thread Martin Manns
On 16 Jan 2010 20:25:44 GMT
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:

 On Sat, 16 Jan 2010 20:04:09 +0100, Martin Manns wrote:
  islice(count(start, step), (stop-start+step-1)//step).
  
  However, count only accepts one parameter, so that this solution
  does not work. Furthermore, islice only accepts positive values for
  step.
 
 This should be reported as a documentation bug.

I added a bug report [issue7721].

Thanks for the code review.

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

New submission from Martin Manns mma...@gmx.net:

In the Python 2.6.4 documentation 2. Built-in Functions at
http://docs.python.org/library/functions.html,
the section about the xrange function (paragraph CPython implementation 
detail) contains the following code:

islice(count(start, step), (stop-start+step-1)//step)

However, count only accepts one parameter, so that this solution does
not work. Furthermore, islice only accepts positive values for step.

Therefore, the code does not work.

I tested this with Python 2.5.4 and Python 2.6.4 on Debian Linux (AMD64).

--
assignee: georg.brandl
components: Documentation
messages: 97912
nosy: georg.brandl, mm
severity: normal
status: open
title: Code in xrange documentation does not work
versions: Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7721
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

Martin Manns mma...@gmx.net added the comment:

The new snippet does not work for me:

 list(irange(-12, 20, 4))
[-12, -8, -4, 0, 4]

I have attached code that seems to work.
It is more than a snipped though.

--
Added file: http://bugs.python.org/file15922/irange.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7721
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

Martin Manns mma...@gmx.net added the comment:

The new snippet works better.

 list(irange(-12, 20, 4))
[-12, -8, -4, 0, 4, 8, 12, 16]

However, it does not like large or negative slices:

 list(irange(-2**65,2**65,2**61))
Traceback (most recent call last):
  File stdin, line 1, in module
  File stdin, line 1, in lambda
OverflowError: long int too large to convert to int

 list(irange(32,2,-3))
Traceback (most recent call last):
  File stdin, line 1, in module
  File stdin, line 1, in lambda
ValueError: Indices for islice() must be non-negative integers or None.

Perhaps the documentation can mention that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7721
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7721] Code in xrange documentation does not work

2010-01-16 Thread Martin Manns

Martin Manns mma...@gmx.net added the comment:

Great solution!

Thank you

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7721
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ANN] Pyspread 0.0.13 released

2009-12-27 Thread Martin Manns
Pyspread 0.0.13 released


I am pleased to announce the new release 0.0.13 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


New features in 0.0.13
--

* Print framework now supports colors and drawn elements
* Splash screen removed
* Some drawing speed improvements


Bug fixes
-

+ Small white rectangle in upper left corner removed (BUG 2918360)
+ setup.py does not copy directories fixed (BUG 2913911)
+ Folder renaming to fix installation errors (BUG 2909017)


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[ANN] Pyspread 0.0.13 released

2009-12-27 Thread Martin Manns
Pyspread 0.0.13 released


I am pleased to announce the new release 0.0.13 of pyspread.

 
About: 
--

Pyspread is a cross-platform Python spreadsheet application. 
It is based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux and *nix platforms with GTK support as well as
on Windows (XP and Vista tested). On Mac OS X, some icons are too small
but the application basically works.


Homepage


http://pyspread.sourceforge.net


New features in 0.0.13
--

* Print framework now supports colors and drawn elements
* Splash screen removed
* Some drawing speed improvements


Bug fixes
-

+ Small white rectangle in upper left corner removed (BUG 2918360)
+ setup.py does not copy directories fixed (BUG 2913911)
+ Folder renaming to fix installation errors (BUG 2909017)


Enjoy

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


pyspread 0.0.12a released

2009-11-22 Thread Martin Manns
Pyspread is getting close to the first Beta. This new release should
work with Windows as well as with Linux.


About
-

Pyspread is a cross-platform Python spreadsheet application. It is
based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux, Windows and *nix platforms with GTK+ support. 
I have reports that it works with MacOS X as well.


Homepage


http://pyspread.sf.net


New features in 0.0.12a
---

* pys file support more secure
* ODF file support removed
* Left and right alignment to cell attributes added
* Custom grid  cell drawing on refresh added
* Save functionality for row and column size added
* Problem with update of cells that contain strings, lists solved
* Frozen cells toolbar update fixed
* Windows missing cell background bug removed



Martin
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


pyspread 0.0.12a released

2009-11-22 Thread Martin Manns
Pyspread is getting close to the first Beta. This new release should
work with Windows as well as with Linux.


About
-

Pyspread is a cross-platform Python spreadsheet application. It is
based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux, Windows and *nix platforms with GTK+ support. 
I have reports that it works with MacOS X as well.


Homepage


http://pyspread.sf.net


New features in 0.0.12a
---

* pys file support more secure
* ODF file support removed
* Left and right alignment to cell attributes added
* Custom grid  cell drawing on refresh added
* Save functionality for row and column size added
* Problem with update of cells that contain strings, lists solved
* Frozen cells toolbar update fixed
* Windows missing cell background bug removed



Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: Pyspread 0.0.12

2009-08-02 Thread Martin Manns


Pyspread 0.0.12 released


I am pleased to announce the new release 0.0.12 of pyspread.

 
About: 
--
 
Pyspread is a cross-platform Python spreadsheet application. It is
based on and written in the programming language Python.

Instead of spreadsheet formulas, Python expressions are entered into
the spreadsheet cells. Each expression returns a Python object that can
be accessed from other cells. These objects can represent anything
including lists or matrices.

Pyspread runs on Linux, Windows and *nix platforms with GTK support. I
have reports that it works with MacOS X as well.

Homepage:
-

http://pyspread.sf.net


New features in 0.0.12:
---

* ODF file support
* Detachable tool bars
* Cells now support attributes such as fonts, borders, colors
* Cells can now be painted on from inside a macro function
* Major speed-up and memory reduction
* Dependency to networkx removed
* Frozen cells that are not updated introduced
* Style toolbar added
* Find toolbar added
* Regular expression search added
* Zoom functionality added
* Default text color changed to system default (for black themes)
* Ok and Cancel buttons swapped in New sheet dialog


Bugfixes:
-

* Strange arange reference behaviour fixed (BUG 2760121)
* stt = sum(S[16:18,Y,0]) raises TypeError fixed (BUG 2579698)
* On Windows, some dialogs have to be closed twice. (fixed)
* Recursion detection dows not work on nested structures, i.e. when
  S[2,2,2] is referred to from inside a container object, pyspread will
  not realize a cycle. Therefore, a Maximum recursion depth error is
  reported (fixed)


Known issues:
-

* ODF documents with many columns and rows can freeze pyspread on
  loading (use the old pys format instead)
* Horizontal cell alignment missing
* Some fonts throw an error message when scrolling (but work
  nonetheless)
* Fonts are not included in ODF files
* Cell attributes are not copied or deleted with cell content


Martin

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Which sparse matrix package?

2008-12-18 Thread Martin Manns
Hi:

I am writing a spreadsheet application in Python

http://pyspread.sf.net

which currently uses numpy.array for:

+ storing object references 
  (each array element corresponds to one grid cell)
+ slicing (read and write)
+ mapping from/to smaller numpy.array
+ searching and replacing
+ growing and shrinking
+ transpose operation.

While fast and stable, this is really memory inefficient for large grids
(i.e. larger than 1E7 rows and columns), so that I am looking into dicts
and sparse matrices.

The dict that I tried out is of the type:

{(1,2,3): 2323, (1,2,545): 2324234, ... }

It is too slow for my application when it grows. One slicing operation
with list comprehensions takes about 1/2 s on my computer for 1E6
elements.

Therefore, I looked into sparse matrices and found scipy.sparse and
pysparse. I tried out both lil_matrix objects. (I wrote a wrapper that
turns them into Python object arrays.)

scipy.sparse.lil_matrix allowed __getitem__ slicing only for one of the
dimensions and used much memory when increasing the number of
columns above 1E7.

pysparse.spmatrix.ll_mat was faster, uses less space and allows slicing
for both dimensions. However, its methods are not documented well and
I am not able to compile it in Debian testing due to some g77
dependencies. Even though the deb package works well, I am concerned
about having a dependency to a problematic package.


Now my questions:

Is there a better suited / maintained module for such sparse matrices
(or multi-dim arrays)? 

Should I use another type of matrix in scipy.sparse? If yes which?

Does a different data-structure suit my above-stated needs better?

Best Regards

Martin

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Linear Programming on Ubuntu

2008-09-17 Thread Martin Manns
On Tue, 16 Sep 2008 19:25:58 -0700 (PDT)
Fett [EMAIL PROTECTED] wrote:

 # SciPy -- http://www.scipy.org - supposedly has this, but as I said,
 I can't find any mention of it anywhere but on the site you linked.

I found OpenOpt on the site:
http://scipy.org/scipy/scikits/wiki/MILP

I downloaded the svn version and installed it on my Debian box.
There were some error messages while installing. However, the example
seems to work anyways. I am using the solver glpk from the
package python-glpk.

I hope that this works on your Ubuntu system as well.
--
http://mail.python.org/mailman/listinfo/python-list


ANN: pyspread 0.0.9

2008-08-25 Thread Martin Manns
pyspread 0.0.9 has been released.

About:
pyspread is a spreadsheet that accepts a pure python expression in
each cell.

New features:
+ Find  Replace
+ Undo  Redo
+ New context menu in grid
+ Improved speed especially for large grids
+ Relative addressing revamped
+ CSV import improved
+ Icons changed to Tango iconset
+ Docstrings improved
+ Bug fixes in print framework

Highlights:
+ Numpy high performance arrays for spreadsheet calculation
+ Full access to python batteries from each cell
+ No non-python syntax add-ons
+ 3D grid
+ Cell access via slicing of numpy array S
+ X, Y, and Z yield current cell location for relative reference

Notes:
Please use distutils for installation.
Make sure that the old files are deleted:
$ su
$ rm -Rf [MyPythonPath]/site-packages/pyspread*
$ python setup.py install
$ exit
$ pyspread.py

Requires: Python =2.4, Numpy =1.1.0, and wxPython =2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Enjoy 
 
Martin 
--
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: pyspread 0.0.8

2008-08-03 Thread Martin Manns
On Sun, 03 Aug 2008 14:25:11 -0400
Colin J. Williams [EMAIL PROTECTED] wrote:
 I've copied your tutorial in my 
 site-packages\pyspread directory

I wrote the tutorial in this thread as a step by step guide that
can be followed manually. You do not need to put it anywhere on your
hard drive. Start pyspread and type in the lines starting with  
manually.

 When I try it (a) I can't open your test 
 data and (b)I enter 1 in [0,0], 'abc' in 
 [0,1], 'def' in [0,2] and 'ghi' in [1.2].

I assume that you tried to open the test.pys file. This file is not
needed for the tutorial. Type in as you did into the empty grid and it
should work.
(Please tell me if it does not display 1 in [0,0], abc in [0,1], def in
[0,2] and ghi in [1,2].)

 The first gives an unable to find rpy 
 message and the second doesn't display.

The test.pys file is an example how to use the 3rd party package rpy
for convenient plotting. Probably on your system, rpy is not installed.
When you install rpy, do not forget to install the statistics package R
that it depends on as well.

However, you do not have to use rpy for plotting. If you prefer other
plotting packages (e.g. gnuplot), feel free to import them as displayed
with the decimal built-in package. You can import (almost) everything
that you can import in any Python program (though matplotlib made some
trouble the last time I tried). 

(Hint: pyspread does *not* protect your system in any special way. So if
you write a system command to delete all files and have sufficient
rights to do this, the files will be deleted.)

Please let me know, which OS you are using (Unix/Linux, MacOS, Windows
or something else).

Best Regards

Martin
--
http://mail.python.org/mailman/listinfo/python-list


pyspread 0.0.7

2008-06-01 Thread Martin Manns
pyspread 0.0.7 has been released.

--

New features:
+ CSV import dialog with preview grid

Bug fixes:
+ setup.py now installs correctly into a sub-folder (tested for Linux
and WinXP).

--

About: 
pyspread is a spreadsheet that accepts a pure python expression in
each cell.

--

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Best Regards

Martin
--
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


pyspread 0.0.7

2008-06-01 Thread Martin Manns
pyspread 0.0.7 has been released.

--

New features:
+ CSV import dialog with preview grid

Bug fixes:
+ setup.py now installs correctly into a sub-folder (tested for Linux
and WinXP).

--

About: 
pyspread is a spreadsheet that accepts a pure python expression in
each cell.

--

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Best Regards

Martin
--
http://mail.python.org/mailman/listinfo/python-list


Getting a set of lambda functions

2008-05-25 Thread Martin Manns
Hi,

I try to get a set of lambda functions that allows me executing each
function code exactly once. Therefore, I would like to modify the set
function to compare the func_code properties (or the lambda
functions to use this property for comparison). 

(The reason is that the real function list is quite large ( 1E5), there
are only few functions with non-equal code and the order of execution
is not important.)

How can I achieve this?

 func_strings=['x', 'x+1', 'x+2', 'x']
 funclist = [eval('lambda x:' + func) for func in func_strings]
 len(funclist)
4
 len(set(funclist))
4
 funclist[0].func_code == funclist[3].func_code
True
 funclist[0] == funclist[3]  
False


Thanks in advance

Martin
--
http://mail.python.org/mailman/listinfo/python-list


Re: Getting a set of lambda functions

2008-05-25 Thread Martin Manns
On Sun, 25 May 2008 12:14:25 + (UTC)
Ivan Illarionov [EMAIL PROTECTED] wrote:

 On Sun, 25 May 2008 13:43:15 +0200, Martin Manns wrote:
 
 Maybe make a set of code objects?
 
 func_code_set = set([f.func_code for f in funclist])
 
 funclist = []
 for fc in func_code_set:
 f = lambda x: x
 f.func_code = fc
 funclist.append(f)

Works for me.

Thanks

Martin
--
http://mail.python.org/mailman/listinfo/python-list


Re: Getting a set of lambda functions

2008-05-25 Thread Martin Manns
On Sun, 25 May 2008 14:39:28 -0700 (PDT)
[EMAIL PROTECTED] wrote:

 This may have some bugs left, but it looks a bit better:
[...]
 self._hash = hash(self._func.func_code) ^ \
  hash(tuple(signature[0]) + tuple(signature[1:3]))
 def __eq__(self, other):
 return self._func.func_code == other._func.func_code and \
getargspec(self._func) == getargspec(other._func)
 def __hash__(self):
 return self._hash
 def __call__(self, *args, **kwargs):
 return self._func(*args, **kwargs)
 
 I haven't put a full hashing of getargspec(self._func) too into the
 __init__() because it may contain too much nested unhashable
 structures, but the __eq__() is able to tell them apart anyway, with
 some collisions.

Looking at a function:

 a=lambda x:x
 dir(a)
['__call__', '__class__', '__delattr__', '__dict__', '__doc__',
'__get__', '__getattribute__', '__hash__', '__init__', '__module__',
'__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__str__', 'func_closure', 'func_code', 'func_defaults',
'func_dict', 'func_doc', 'func_globals', 'func_name']

Should func_globals and func_name also be taken into account for
__eq__()?

Best Regards

Martin
--
http://mail.python.org/mailman/listinfo/python-list


distutils directory problem

2008-05-18 Thread Martin Manns
Hi,

I have the following problem with the distutils package:
(I have now spent hours reading and searching the manuals and tutorials,
and I am still stuck.)

I have a working directory
~/pyspread
in which my libraries are situated and two icons directories
~/pyspread/icons and ~/pyspread/icons/actions

Now I would like to create a setup.py file inside my ~/pyspread
directory that installs my .py modules in .../site-packages/pyspread
and the icons in appropriate sub-folders and adds pyspread.pth to
.../site-packages so that .../site-packages/pyspread is in the
PYTHONPATH.

However, my setup.py puts everything  (including .pyc files) into
site-packages *and* into the sub-folders. What am I doing wrong?

I am looking for a platform-independent solution. Currently, I am using
python 2.5 on Linux.

Here my setup.py

#!/usr/bin/env python

from distutils.core import setup
setup(name='pyspread',
  version='0.0.7',
  description='A spreadsheet that accepts a pure python expression in each 
cell.',
  license='GPL v3 :: GNU General Public License',
  classifiers=[ 'Development Status :: 3 - Alpha',
'Intended Audience :: End Users/Desktop',
  ],
  author='Martin Manns',
  author_email='[EMAIL PROTECTED]',
  url='http://sourceforge.net/projects/pyspread/',
  packages=['pyspread'],
  package_dir={'pyspread': '.'},
  scripts=['pyspread.py'],
  py_modules=['pyspread.mainapp', 'pyspread.pysgrid', 
'pyspread.mygrid','pyspread.icontheme'],
  package_data={'pyspread': ['icons/*.png', 'icons/actions/*.png' ,\
 'test.pys', 'test.csv', 'test2.csv', \
 'README', 'COPYING']},
)


Thanks in advance

Martin


--
http://mail.python.org/mailman/listinfo/python-list


ANN: pyspread 0.0.5

2008-05-13 Thread Martin Manns
pyspread 0.0.5 has been released.

--

New features are:
+ X, Y, Z for relative cell relations are now pre-processed (easier to
use)
+ Cells can be given a name with name=expresion. These names are
located in the global namespace
+ Arrays and matrices within one cell can now easily be spread out to a
cell range in the grid with the spread function. (spread(x,y,z,value)
where x,y,z represents the top-left-front target cell and value is
replaced by the origin cell reference)
+ Rows and columns can be inserted and deleted
+ Copy, Paste and Delete behaviour improved
+ Copy and Paste now work in cell editor when no selection is present
+ Basic tab-delimited text import added

--

About: 
pyspread is a spreadsheet that accepts a pure python expression in
each cell.

--

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Best Regards

Martin


--
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


ANN: pyspread 0.0.6

2008-05-13 Thread Martin Manns
On Tue, 13 May 2008 00:23:12 +0200
Martin Manns [EMAIL PROTECTED] wrote:

pyspread 0.0.5 has been released.
It is a bugfix release for Mac and Windows.

 --
 
 About: 
 pyspread is a spreadsheet that accepts a pure python expression in
 each cell.
 
 --
 
 Highlights:
 + No non-python syntax add-ons
 + Access to python modules from cells
 + 3D grid
 + Numpy object array for representation of string entry into grid cell
 + Numpy object array for representation of eval function array
 + Cell access via slicing of numpy function array
 + X, Y, and Z yield current cell location for relative reference
 
 Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
 License: GPL
 
 Project page: http://pyspread.sourceforge.net
 
Best Regards

Martin



--
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


ANN: pyspread 0.0.5

2008-05-13 Thread Martin Manns
pyspread 0.0.5 has been released.

--

New features are:
+ X, Y, Z for relative cell relations are now pre-processed (easier to
use)
+ Cells can be given a name with name=expresion. These names are
located in the global namespace
+ Arrays and matrices within one cell can now easily be spread out to a
cell range in the grid with the spread function. (spread(x,y,z,value)
where x,y,z represents the top-left-front target cell and value is
replaced by the origin cell reference)
+ Rows and columns can be inserted and deleted
+ Copy, Paste and Delete behaviour improved
+ Copy and Paste now work in cell editor when no selection is present
+ Basic tab-delimited text import added

--

About: 
pyspread is a spreadsheet that accepts a pure python expression in
each cell.

--

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Best Regards

Martin


--
http://mail.python.org/mailman/listinfo/python-list


ANN: pyspread 0.0.6

2008-05-13 Thread Martin Manns
On Tue, 13 May 2008 00:23:12 +0200
Martin Manns [EMAIL PROTECTED] wrote:

pyspread 0.0.5 has been released.
It is a bugfix release for Mac and Windows.

 --
 
 About: 
 pyspread is a spreadsheet that accepts a pure python expression in
 each cell.
 
 --
 
 Highlights:
 + No non-python syntax add-ons
 + Access to python modules from cells
 + 3D grid
 + Numpy object array for representation of string entry into grid cell
 + Numpy object array for representation of eval function array
 + Cell access via slicing of numpy function array
 + X, Y, and Z yield current cell location for relative reference
 
 Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
 License: GPL
 
 Project page: http://pyspread.sourceforge.net
 
Best Regards

Martin



--
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: pyspread 0.0.4

2008-04-28 Thread Martin Manns
On Sun, 27 Apr 2008 05:21:56 +0200
Martin Manns [EMAIL PROTECTED] wrote:

 The newest version pyspread 0.0.4 now runs on 
 + GTK
 + Windows
 + Mac (not tested myself but got positive reports)
 
 New features in 0.0.4:
 + Column, line and table insertion and deletion
 + Themeable toolbar

I forgot to post the short description and the link:

pyspread is a spreadsheet that accepts a pure python expression in
each cell.

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Best Regards

Martin

--
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


Re: ANN: pyspread 0.0.4

2008-04-28 Thread Martin Manns
On Sun, 27 Apr 2008 05:21:56 +0200
Martin Manns [EMAIL PROTECTED] wrote:

 The newest version pyspread 0.0.4 now runs on 
 + GTK
 + Windows
 + Mac (not tested myself but got positive reports)
 
 New features in 0.0.4:
 + Column, line and table insertion and deletion
 + Themeable toolbar

I forgot to post the short description and the link:

pyspread is a spreadsheet that accepts a pure python expression in
each cell.

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python =2.4, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Project page: http://pyspread.sourceforge.net

Best Regards

Martin

--
http://mail.python.org/mailman/listinfo/python-list


ANN: pyspread 0.0.4

2008-04-27 Thread Martin Manns
Hi,

The newest version pyspread 0.0.4 now runs on 
+ GTK
+ Windows
+ Mac (not tested myself but got positive reports)

New features in 0.0.4:
+ Column, line and table insertion and deletion
+ Themeable toolbar

Feedback is very welcome!

Best Regards

Martin
--
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


ANN: pyspread 0.0.4

2008-04-27 Thread Martin Manns
Hi,

The newest version pyspread 0.0.4 now runs on 
+ GTK
+ Windows
+ Mac (not tested myself but got positive reports)

New features in 0.0.4:
+ Column, line and table insertion and deletion
+ Themeable toolbar

Feedback is very welcome!

Best Regards

Martin
--
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: pyspread 0.0.1

2008-04-19 Thread Martin Manns
On Fri, 18 Apr 2008 04:46:38 +0200
Martin Manns [EMAIL PROTECTED] wrote:

 pyspread 0.0.1 is now available at:
 http://pyspread.sourceforge.net

Hi,

I updated to version 0.0.2 that fixes the tarballs and zip files.
Any information about the package working on different platforms is
appreciated.

I got it working on Gentoo and on Debian (python 2.4).


Best Regards

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: pyspread 0.0.1

2008-04-18 Thread Martin Manns
pyspread 0.0.1 is now available at:
http://pyspread.sourceforge.net

pyspread is a spreadsheet that accepts a pure python expression in
each cell.

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python 2.5, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Best Regards
Martin Manns
--
mmanns at gmx.net
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


ANN: pyspread 0.0.1

2008-04-18 Thread Martin Manns
pyspread 0.0.1 is now available at:
http://pyspread.sourceforge.net

pyspread is a spreadsheet that accepts a pure python expression in
each cell.

Highlights:
+ No non-python syntax add-ons
+ Access to python modules from cells
+ 3D grid
+ Numpy object array for representation of string entry into grid cell
+ Numpy object array for representation of eval function array
+ Cell access via slicing of numpy function array
+ X, Y, and Z yield current cell location for relative reference

Requires: Python 2.5, Numpy 1.0.4, and wxPython 2.8.7.1.
License: GPL

Best Regards
Martin Manns
--
mmanns at gmx.net
-- 
http://mail.python.org/mailman/listinfo/python-list


How can I make a function equal to 0?

2008-03-21 Thread Martin Manns
Hi,

Is there a way to create a function that is equal to 0?
I try to redefine __cmp__ but I am pretty stuck.

Something like:

 def f(): return 
...
 # Some magic
 f == 0
True

Thanks in advance

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How can I make a function equal to 0?

2008-03-21 Thread Martin Manns
On 21 Mar 2008 12:52:12 -0700
Paul Rubin http://[EMAIL PROTECTED] wrote:

 def f(): return 0

Let us try it:

Python 2.5.1 (r251:54863, Jan 26 2008, 01:34:00) 
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
Type help, copyright, credits or license for more information.
 def f(): return 0
... 
 f==0
False
 f()==0
True
 


I do not want the function to return 0 but to equal 0.

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How can I make a function equal to 0?

2008-03-21 Thread Martin Manns
On Fri, 21 Mar 2008 13:12:56 -0700 (PDT)
Arnaud Delobelle [EMAIL PROTECTED] wrote:

 On Mar 21, 7:48 pm, Martin Manns [EMAIL PROTECTED] wrote:
 Why do you want to do that?

First thank you for your help, the callable object works.

Basically I have a lot of functions inside a numpy array,
of which most return  and actually are derived as follows:

from numpy import *

grid_size = 100

class F(object):  
def __cmp__(self, other): return 0
def __call__(self, dummy): return 
f = F()
myarray = array([f] * grid_size, dtype=O)

# I re-define an element in the array

myarray[34424] = lambda x: 23

# Now, I would like to loop over all re-defined elements:

for i in itertools.izip(*nonzero(myarray)):
print myarray[i]()

If I fill the array with 0 instead of the functions that 
return  this works really fast.

However, I would like to be able call the content of each
cell in the array as a function.

As I said, the callable object approach works but is
about as slow as iterating through the whole array.
Perhaps I should add a __call__ function to the built-in
0? But I doubt that this helps.

Martin

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How can I make a function equal to 0?

2008-03-21 Thread Martin Manns
On Fri, 21 Mar 2008 14:51:49 -0700 (PDT)
Gabriel Genellina [EMAIL PROTECTED] wrote:

  If I fill the array with 0 instead of the functions that
  return  this works really fast.
 
  However, I would like to be able call the content of each
  cell in the array as a function.
 
 If you drop this condition then you could fill the array with zeroes
 as before, replace only the interesting ones with actual functions,
 and write:
 
 for item in myarray[nonzero(myarray)]:
 print item() if callable(item) else item

Works for me.

Thank you

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


pyfov Package Index link broken

2008-01-25 Thread Martin Manns
Hi,

I am looking for the code of pyfov, which is on the Package Index.
However, the link is broken and the author does not seem to respond to
e-mails.

Any chance to get hands on the code?

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A GUI framework for running simulations

2008-01-23 Thread Martin Manns
On Wed, 23 Jan 2008 06:10:07 -0800 (PST)
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hello! I am currently working on writing a simulation engine for
 special relativity physics. I'm writing it in Python, of course. I'm
 doing fine with the engine, but I want a GUI framework in which I
 could use it conveniently, and test different setups on it. I'm not so
 strong with GUI programming. I looked at Tkinter, I looked at
 WxPython, I looked at PythonCard. It all looks pretty daunting.

If you want to keep things simple, pygame could be an alternative for
visualizing simulations and setting parameters even though it does not
provide all these fancy widgets around.

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Slicing wrapped numpy arrays

2008-01-13 Thread Martin Manns
Hi,

I have created a class that wraps a numpy array of custom objects. I
would like to be able to slice respective objects (without copying the
array if possible).

I have browsed the doc and found some hints at __getitem__. However, I
still do not grasp how to do it.  How do I implement __getitem__
correctly?


from numpy import *

class Cell(object):
pass

class Map(object):
def __init__(self, dimensions):
self.generate_map(dimensions)

def generate_map(self, dimensions):
map_range = xrange(reduce(lambda x,y: x*y, dimensions))
self.map = array([Cell() for i in map_range])
self.map = self.map.reshape(dimensions)

mymap = Map((100, 100, 100))
mymap[10:20,15:20,:] # This line should work afterwards


Thanks in advance

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Slicing wrapped numpy arrays

2008-01-13 Thread Martin Manns
On Sun, 13 Jan 2008 16:03:16 -0600
Robert Kern [EMAIL PROTECTED] wrote:

 Martin Manns wrote:
  Hi,
  
  I have created a class that wraps a numpy array of custom objects. I
  would like to be able to slice respective objects (without copying
  the array if possible).
  
  I have browsed the doc and found some hints at __getitem__.
  However, I still do not grasp how to do it.  How do I implement
  __getitem__ correctly?
 
  mymap[10:20,15:20,:] # This line should work afterwards
 
 The first thing you should do is simply implement a very basic,
 nonfunctional version just to see what objects come in:
 
 In [1]: class Sliceable(object):
 ...: def __getitem__(self, arg):
 ...: print arg
 ...:

I did that and got here:

 (slice(None, None, 2), slice(10, None, 10))

However, I still do not see how I get a Map object that employs a
slice of the array without creating a new Map object.

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Method calls and stack consumption

2007-04-15 Thread Martin Manns
On Sun, 15 Apr 2007 07:27:25 +0200
Peter Otten [EMAIL PROTECTED] wrote:

 Martin Manns wrote:
 
  Calling methods of other object instances seems quite expensive on
  the stack (see example below). Is there a better way of traversing
  through methods of instances that are connected in a cyclic graph?
  (The real program's graph contains multiple successors in lists.)

 a = a.a
 while True:
 a = a()
 
 That's how you can do it if your real program is similar enough to the
 example...

Thanks for pointing out the oversimplified nature of the original
example.I hope that the following one clarifies the problem.

(I do not know, what has to be stored on the stack, but it should not be
that much, because all recursion calls originate from inside the return
statement.)


from random import randint,seed
import sys
seed()
sys.setrecursionlimit(100)

class Node(object):
def __init__(self):
self.state = abs(randint(1,1000))
def GetDepState(self):
return self.state + max(s.GetDepState() for s in S[self])

class ConditionalBreakNode(Node):
def GetDepState(self):
if randint(1,5)  1:
return Node.GetDepState(self)
else:
return self.state

S = {}
nodes = [Node()]

def AppendNode(curr_node, depth=1):
global nodes
r = randint(1,30)
if r = depth:
for i in xrange(randint(1,3)):
newnode = Node()
nodes += [newnode]
try: S[curr_node] += [newnode]
except: S[curr_node] = [newnode]
AppendNode(newnode, depth+1)
else:
newnode = ConditionalBreakNode()
nodes += [newnode]
try: S[curr_node] += [newnode]
except: S[curr_node] = [newnode]
S[newnode] = [nodes[0]]

AppendNode(nodes[0])
print len(nodes)
print nodes[0].GetDepState()

-- 
http://mail.python.org/mailman/listinfo/python-list


Method calls and stack consumption

2007-04-14 Thread Martin Manns
Hi,

Calling methods of other object instances seems quite expensive on the
stack (see example below). Is there a better way of traversing through
methods of instances that are connected in a cyclic graph? (The real
program's graph contains multiple successors in lists.)

class A(object):
def __init__(self):
self.i = 0
def a(self):
if self.i % 1000 == 0:
print self.i
self.i += 1 
return S[self].a()

a = A()
b = A()
S = {a:b, b:a}

import sys
sys.setrecursionlimit(100)
print a.a()


0
0
1000
1000
[...]
69000
69000
Segmentation fault
~ $ ulimit -s
65536
~ $

Thus, each call seems to be about 480 bytes on the stack.

Is there a good way to reduce stack consumption per call?
Could and should I resort to stackless?
If yes, how can the graph structure be realized?
Would I need a tasklet for each instance?

I am currently hesitant to depend on something from svn.
How stable and robust is stackless?

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   >