Posted
6 days
ago
by
Zea Partners News
Once again, Plone will be exhibiting at the IMS 2009 Expo. IMS, together with the Online Information 2009 conference, takes place the 2nd - 4th December at Earls Court Olympia, London.
Posted
6 days
ago
by
Lennart Regebro: Plone consulting
---
Posted
7 days
ago
by
Zea Partners News
After three months of intensive nominations and voting, Packt Publishing is pleased to announce that Plone has won the Best Other Open Source CMS Category in the 2009 Open Source CMS Award.
Posted
7 days
ago
by
Reinout van Rees' weblog
In doctests, I often need a temporary directory for the duration of the test.
In the test setup/teardown code, I create it and clean it up afterwards. So
the test setup/teardown methods looks something like:
import tempfile
import
... [More]
shutil
def setup(test):
test.tempdir = tempfile.mkdtemp()
# other stuff
test.globs.update({'tempdir': test.tempdir})
def teardown(test):
shutil.rmtree(test.tempdir)
variable that got injected into
the test globs (=globals):
The test setup created a temp directory for us:
>>> print tempdir
/tmp/kdf34klsdj3200880f/
This directory is placed inside the default
temporary directory on our os, which is:
>>> import tempfile
>>> tempfile.gettempdir()
'/tmp'
Well, not quite. The name of the tempdir is different all the time. And
. And on osx it is something like
and sometimes
, the doctest standard placeholder for
"something". But that can hide something:
The ... matches a lot:
>>> delete_files_but_not_too_much()
deleted ...
deleted ...
So we think we just deleted two files, but the ... also matches
complete sets of lines, so the following test could also pass:
>>> delete_files_but_not_too_much()
deleted ...
deleted ...
deleted ...
deleted ...
Oops.
from zope.testing import renormalizing
checker = renormalizing.RENormalizing([
# tempfile.gettempdir() is the OS's base tempdir
(re.compile(re.escape(tempfile.gettempdir())),
'TMPDIR')])
# Don't forget to pass the checker to the testrunner.
This grabs the default base temporary directory where tempfile creates its
items. So creates a temporary directory inside the
folder. Your doctests can be more explicit this
way:
>>> delete_files_but_not_too_much()
deleted TMPDIR/...
deleted TMPDIR/...
You can do one better by also normalizing the actual created temporary
directory. The trick here is to call
...
def setup(test):
test.tempdir = tempfile.mkdtemp(prefix='mytest')
...
. We cannot
directly use the created tempdir's name in a normalizer regex as the tempdir
is normally created in the setup method and the normalizer method is outside
it. The prefix helps us however in doing it anyway:
checker = renormalizing.RENormalizing([
# Normalize tempdirs. For this to work reliably, we need
# to use a prefix in all tempfile.mkdtemp() calls. We
# look for the base tempdir, followed by the prefix,
# followed by several non-slash characters.
(re.compile(
'%s/mytest[^/] ' % re.escape(tempfile.gettempdir())),
'MYTEST'),
# We probably also still need TMPDIR. Place it after
# the more specific checks otherwise it matches first...
(re.compile(re.escape(tempfile.gettempdir())),
'TMPDIR')])
Tadah, the doctest can now be really specific with no chance of erroneous
hiding of lines:
MYTEST is the tempdir the setup prepared for us
>>> delete_files_but_not_too_much()
deleted MYTEST/file1.txt
deleted MYTEST/file4.txt
base
tempdir. Mostly when you call the python executable from within your
doctest. So I had to add an extra normalizer to also detect that variant... [Less]
Posted
8 days
ago
by
Reinout van Rees' weblog
A couple of years ago I got a script from Guido Wesdorp for cleaning up EOL
styles in svn. I've long kept a private (modified) copy of that file and only
later found out that it was from the pypy project:
: The script goes through a
... [More]
directory structure and fixes
non-native EOL endings in non-binary files. So the windows line endings are
gone if you work on linux (and probably vice versa, though I didn't try).
When you use svn and you work with programmers both on windows and unix, you
can get EOL differences. Windows uses .
There's a simple fix to prevent any problems: use subversion's native EOL
style support, see for instance
on how to do it and why it is a good idea.
If you don't have it set (mostly programmers working on linux) and you add a
file, it doesn't get the svn setting automatically. Once
a windows programmer makes a checkout and saves it with his windows
lineendings and you re-open it on unix, you get unneeded extras at the end of
your line.
: The script goes through an svn directory structure and sets
an svn [Less]
Posted
12 days
ago
by
RedTurtle Technology
A small customization to Vaporisation's template, an excellent product for viewing tagcloud.
Posted
14 days
ago
by
Planet RDF
Specific (HTTP != World Wide Web)
It isn't about Markup (so don't expect to grok it via "markup
first" approach)
- the use
of HTTP and REST to deliver a powerful platform agnostic mechanism
for Data Reference, Access, and
... [More]
Integration.
, especially if you're well
versed in DBMS technology use (User, Power User, Architect,
Analyst, DBA, or Programmer) think:
) without
operating system, data model, or wire-protocol specificity or
lock-in potential
) without
programming language specificity
.NET without .NET
runtime specificity and .NET bound language specificity
OLE-DB without Windows operating system & programming
language specificity
XMLA without XML format specificity - with Tabular and
Multidimensional results formats expressible in a variety of data
representation formats.
All of the above scoped to the Record rather than Container
level, with Generic HTTP scheme URIs associated with each Record,
Field, and Field value (optionally)
Remember the need for Data Access & Integration technology
is the by product of the following realities:
Human curated data is ultimately dirty, because:
our thick thumbs, inattention, distractions, and general
discomfort with typing, make typos prevalent
database engines exist for a variety of data models - Graph,
Relational, Hierarchical;
within databases you have different record container/partition
names e.g. Table Names;
within a database record container you have records that are
really aspects of the same thing (different keys exist in a
plethora of operational / line of business systems that expose
aspects of the same e.g.,
customer data that spans Accounts, CRM, ERP application
databases);
different field names (one database has "EMP" while another has
"Employee") for the same record
Units of measurement is driven by locale, the UK office wants
to see sales in Pounds Sterling while the French office prefers
Euros etc.
halos which
can be quite granular re. sensitivity e.g. staff travel between
locations that alter locales and their roles; basically, profiles
matters a lot.
ODBC and WODBC (Web
Open Database Connectivity) Comparison
Creating, Deploying,
and Exploiting Linked Data Presentation [Less]
Posted
14 days
ago
by
Planet RDF
Specific (HTTP != World Wide Web)
It isn't about Markup (so don't expect to grok it via "markup
first" approach)
- the use
of HTTP and REST to deliver a powerful platform agnostic mechanism
for Data Reference, Access, and
... [More]
Integration.
, especially if you're well
versed in DBMS technology use (User, Power User, Architect,
Analyst, DBA, or Programmer) think:
) without
operating system, data model, or wire-protocol specificity or
lock-in potential
) without
programming language specificity
.NET without .NET
runtime specificity and .NET bound language specificity
OLE-DB without Windows operating system & programming
language specificity
XMLA without XML format specificity - with Tabular and
Multidimensional results formats expressible in a variety of data
representation formats.
All of the above scoped to the Record rather than Container
level, with Generic HTTP scheme URIs associated with each Record,
Field, and Field value (optionally)
Remember the need for Data Access & Integration technology
is the by product of the following realities:
Human curated data is ultimately dirty, because:
our thick thumbs, inattention, distractions, and general
discomfort with typing, make typos prevalent
database engines exist for a variety of data models - Graph,
Relational, Hierarchical;
within databases you have different record container/partition
names e.g. Table Names;
within a database record container you have records that are
really aspects of the same thing (different keys exist in a
plethora of operational / line of business systems that expose
aspects of the same e.g.,
customer data that spans Accounts, CRM, ERP application
databases);
different field names (one database has "EMP" while another has
"Employee") for the same record
Units of measurement is driven by locale, the UK office wants
to see sales in Pounds Sterling while the French office prefers
French Francs
halos which
can be quite granular re. sensitivity e.g. staff travel between
locations that alter locales and their roles; basically, profiles
matters a lot.
ODBC and WODBC (Web
Open Database Connectivity) Comparison
Creating, Deploying,
and Exploiting Linked Data Presentation [Less]
Posted
14 days
ago
by
Planet RDF
Specific (HTTP != World Wide Web)
It isn't about Markup (so don't expect to grok it via "markup
first" approach)
- the use
of HTTP and REST to deliver a powerful platform agnostic mechanism
for Data Reference, Access, and
... [More]
Integration.
, especially if you're well
versed in DBMS technology use (User, Power User, Architect,
Analyst, DBA, or Programmer) think:
) without
operating system, data model, or wire-protocol specificity or
lock-in potential
) without
programming language specificity
.NET without .NET
runtime specificity and .NET bound language specificity
OLE-DB without Windows operating system & programming
language specificity
XMLA without XML format specificity - with Tabular and
Multidimensional results formats expressible in a variety of data
representation formats.
All of the above scoped to the Record rather than Container
level, with Generic HTTP scheme URIs associated with each Record,
Field, and Field value (optionally)
Remember the need for Data Access & Integration technology
is the by product of the following realities:
Human curated data is ultimately dirty, because:
our thick thumbs, inattention, distractions, and general
discomfort with typing, make typos prevalent
database engines exist for a variety of data models - Graph,
Relational, Hierarchical;
within databases you have different record container/partition
names e.g. Table Names;
within a database record container you have records that are
really aspects of the same thing (different keys exist in a
plethora of operational / line of business systems that expose
aspects of the same e.g.,
customer data that spans Accounts, CRM, ERP application
databases);
different field names (one database has "EMP" while another has
"Employee") for the same record
Units of measurement is driven by locale, the UK office wants
to see sales in Pounds Sterling while the French office prefers
French Francs
halos which
can be quite granular re. sensitivity e.g. staff travel between
locations that alter locales and their roles; basically, profiles
matters a lot. [Less]
Posted
15 days
ago
by
d2m
Things happen when you change systems - a few days ago i moved to a new notebook with Ubuntu 9.10 and found myself with a system Python 2.6. I was curious about how to make Grok run on it without patching a number of eggs as i did
You can
... [More]
also use it with grokproject like
We ask all people to test their existing projects with the alpha release and are happy to collect feedback for a second alpha or beta even. [Less]