Presentation
Presentation
Presentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Dynamic Documents with<br />
ReportLab and Zope<br />
<strong>Presentation</strong> for the German Zope User<br />
Group's (DZUG) Meeting in Berlin, Germany<br />
28-29 March 2003<br />
Dinu C. Gherman<br />
ReportLab Consultant and Co-developer<br />
dinu @ mac or reportlab dot com<br />
Dynamic Documents with ReportLab and Zope, page 1 – © Dinu C. Gherman
Agenda<br />
But:<br />
• Background<br />
• ReportLab Alphabet Soup<br />
• Applications<br />
• Examples<br />
• Usage with Zope<br />
• Questions (anytime)<br />
• No source code<br />
• Not a tutorial-like intro<br />
Dynamic Documents with ReportLab and Zope, page 2 – © Dinu C. Gherman
Background<br />
Your end-users need documents, which are:<br />
• Readable (layout, fonts)<br />
• Feature-rich (graphics, interaction)<br />
• Personalised (maybe unique)<br />
• Available on-demand (online)<br />
• Printable (more often than not)<br />
• Portable and compact (easy exchange)<br />
• Up-to-date!<br />
They can even have them, too!<br />
• Stay here to learn how!<br />
Dynamic Documents with ReportLab and Zope, page 3 – © Dinu C. Gherman
The ReportLab ToolKit (RLTK)<br />
Purpose<br />
• Generate entire documents, and/or<br />
• document components<br />
Characteristics<br />
• Open Source<br />
• FreeBSD License<br />
• Python code base, mostly<br />
• Platform-independant<br />
• Even with Jython! (restricted)<br />
Dynamic Documents with ReportLab and Zope, page 4 – © Dinu C. Gherman
ReportLab Additions<br />
Accelerators<br />
• rlaccel (included in RLTK)<br />
External (optional) packages<br />
• renderPM (incl. libart)<br />
• pyRXP (incl. RXP)<br />
Third-party extensions<br />
• svglib (for importing SVG)<br />
• Barcodes<br />
Dynamic Documents with ReportLab and Zope, page 5 – © Dinu C. Gherman
pyRXP<br />
RXP<br />
• By Richard Tobin, University of Edinburgh<br />
• Extremely fast validating XML parser<br />
pyRXP<br />
• ReportLab's Python wrapper for RXP<br />
• Returns nested tuple/list tree<br />
Licensing<br />
• Both under GPL<br />
• Commercial licenses upon request (ask me)!<br />
Dynamic Documents with ReportLab and Zope, page 6 – © Dinu C. Gherman
Commercial Products<br />
PageCatcher<br />
• Reusing existing PDF documents<br />
• Benefit: split graphics/application work<br />
RML2PDF<br />
• RML: Report Markup Language<br />
• Fast conversion from XML to PDF<br />
Diagra<br />
• Licensable technology for web/print graphics<br />
• Color seperation (EPS)<br />
Dynamic Documents with ReportLab and Zope, page 7 – © Dinu C. Gherman
Generating Documents<br />
Either, do it all manually<br />
• Pdfgen: Canvas with operations<br />
Or define the layout...<br />
• Platypus: Templates, Documents, Pages, Frames<br />
And use components to tell a story<br />
• Text, Fonts, Tables, Images, Drawings, ...<br />
Dynamic Documents with ReportLab and Zope, page 8 – © Dinu C. Gherman
Including Graphics<br />
Graphic components<br />
• Primitive shapes: Rect, Circle, String, Image, ...<br />
• Composed widgets: Signs and Symbols, Flags<br />
• Sample libraries: Business Charts<br />
Output renderers<br />
• PDF<br />
• Bitmap formats<br />
• EPS (color seperating, on demand)<br />
• SVG (experimental)<br />
Dynamic Documents with ReportLab and Zope, page 9 – © Dinu C. Gherman
Known Application Domains<br />
Services<br />
• Reporting<br />
• Invoicing<br />
• Charting<br />
• Visualising<br />
Areas<br />
• Finance (Fidelity, AIG)<br />
• Administration (NASA, School Evaluations)<br />
• Publishing (brochures, newsletters, books)<br />
• Science<br />
Dynamic Documents with ReportLab and Zope, page 10 – © Dinu C. Gherman
Sample Documents<br />
• Fidelity Financial Documents<br />
• Telecom Invoices<br />
• Evaluations<br />
• Visualisation<br />
• <strong>Presentation</strong>s<br />
• iCards<br />
• Brochures, Books<br />
• (Business Cards)<br />
Dynamic Documents with ReportLab and Zope, page 11 – © Dinu C. Gherman
Sample: TheWorkx.Net<br />
theworkx.net<br />
SME Opportunity Profile for The Engine Room Ltd © theworkx.net Limited 2002. All rights reserved.<br />
theworkx.net<br />
SME Opportunity Profile for The Engine Room Ltd © theworkx.net Limited 2002. All rights reserved.<br />
LOCATION NAME/BUSINESS<br />
RELATED LINKS<br />
BUSINESS TECHNOLOGY/COMMUNICATIONS TOTALS (MODELLED)<br />
The Engine Room Ltd<br />
Royal Colanades, 16 Great George Street, Clifton<br />
Bristol BS1 5RH United Kingdom<br />
Telephone: +44 (0)117 929 4141<br />
Facsimile: +44 (0)117 929 4121<br />
Site ID EN234741231<br />
Estimated Number of Desktop PCs: 8 Presence of LAN:<br />
Yes<br />
Estimated Number of PC Servers: 1 Estimated Number of Telephone Lines: 4<br />
Estimated Number of Laptop/Notebook PCs: 2 Estimated Number of Mobile Handsets: 5<br />
BUSINESS VEHICLE/OFFICE EQUIPMENT TOTALS (MODELLED)<br />
KEY CONTACTS/DECISION MAKERS<br />
EMAIL ADDRESSES<br />
Estimated Number of Company Cars: 5<br />
Estimated Number of Company Vans: 0<br />
Estimated Number of Photocopiers: 1<br />
Estimated Number of Printers: 3<br />
Name<br />
Title<br />
Mr Richard Irvine<br />
Secretary<br />
Mr Gary Milton<br />
Creative Director<br />
Mrs Andrea Bolden<br />
Financial Director<br />
Mr Andrew Gavin<br />
Technical Director<br />
Mr Steve Lewis<br />
Operations Director<br />
BUSINESS BASICS<br />
Industry/SIC Classification: 7042 - Marketing Services/ Design Agency<br />
Status:<br />
Independent<br />
Enterprise Type:<br />
Private Limited Company<br />
Year Established: 1990<br />
Region:<br />
R747 - Bristol<br />
Multiple Sites in Country: Yes<br />
FINANCIAL GROWTH HISTORY<br />
1995 1996 1997 1998 1999<br />
Sales (£000s) 457 623 795 846 922<br />
Profit (£000s) (12) 22 57 72 87<br />
Email Address<br />
richard_irvine@engine-room.co.uk<br />
gary_milton@engine-room.co.uk<br />
andrea_bolden@engine-room.co.uk<br />
andrew_gavin@engine-room.co.uk<br />
steve_lewis@engine-room.co.uk<br />
Fiscal Year End:<br />
December<br />
International Trade:<br />
Exporter<br />
Company Registration No: 2345871<br />
VAT Registration No: 731 5804 47<br />
D-U-N-S ® Number: 1674592<br />
SALES<br />
PROFIT<br />
1000<br />
922<br />
846<br />
795<br />
100<br />
87<br />
623<br />
72<br />
57<br />
457<br />
22<br />
(12)<br />
0<br />
0<br />
BUSINESS ANNUAL EXPENDITURE TOTALS (MODELLED)<br />
Estimated Communications Spend: £15000 Estimated Office Equipment Spend: £8000<br />
Estimated Vehicle/Maintenance Spend: £60000<br />
Estimated Technology Spend: £22000<br />
BUSINESS OPPORTUNITY CLASSIFICATION (MODELLED)<br />
Life Stage:<br />
Established Small Innovation Profile:<br />
Likely Early Adopter<br />
Growth Profile:<br />
Productive Financial Products Profile:<br />
Savings Products<br />
Performance Profile:<br />
High Decision Making Autonomy:<br />
Autonomous<br />
CUSTOM CLASSIFICATION (MODELLED)<br />
Classification A: Classification B: Classification C: Classification D:<br />
High Moderate Very Likely High<br />
INTERNET USAGE (COLLECTED)<br />
EMPLOYEE GROWTH HISTORY<br />
Website:<br />
www.engine-room.co.uk<br />
Number of Active Internet Users: 5<br />
1995 1996 1997 1998 1999<br />
Employees in Country 4 7 10 12 15<br />
EMPLOYEES<br />
15<br />
12<br />
10<br />
7<br />
eCommerce:<br />
Use of Internet for Procurement:<br />
Primary ISP:<br />
No<br />
Yes<br />
City Netgates<br />
Number of Internet Email Users: 8<br />
Use of ASP:<br />
Yes<br />
0<br />
4<br />
PLANNED EMPLOYMENT CHANGE (COLLECTED)<br />
SECTOR COMPARISON (4 DIGIT SIC)<br />
Change: Increase Amount: 25<br />
THE ENGINE ROOM LTD<br />
SECTOR AVERAGES<br />
RELATIVE SCORE<br />
Sales Growth 8.9%<br />
Sales per Employee 61.47<br />
Employee Growth 25%<br />
Profit Growth 20.8%<br />
Profit on Sales 9.4%<br />
3%<br />
51.5<br />
5%<br />
(8%)<br />
12%<br />
-5 -4 -3 -2 -1 0 1 2 3 4 5<br />
Printed on Tuesday April 9 2002, Page 1 of 6<br />
Printed on Tuesday April 9 2002, Page 2 of 6<br />
Dynamic Documents with ReportLab and Zope, page 12 – © Dinu C. Gherman
Sample: Fidelity Forms<br />
Self-select ISA Account Opening Confirmation Form 12345678<br />
1 Personal Details<br />
Title<br />
First Name(s)<br />
Mr.<br />
Fred<br />
Surname<br />
Customer Reference Number<br />
Bloggs<br />
12345678<br />
Self-select ISA Account Opening Confirmation Form:<br />
ISA TRANSFER FROM FIDELITY CONTINUED 12345678<br />
6 Signature and Letter of Authorisation - You Must Sign and Date This Form Below<br />
I hereby authorise you to transfer my plan(s) as cash to Charles Stanley & Company Limited, 25 Luke Street, London, EC2A 4AR.<br />
I also authorise you to provide Charles Stanley & Co. Limited with any relevant information they may require.<br />
Signature<br />
Date<br />
Permanent Residential Address<br />
25 Badger Court<br />
Pinemartin Crescent<br />
Cricklewood<br />
London<br />
UK<br />
NW10 12H<br />
Nationality<br />
United Kingdom<br />
National Insurance Number<br />
2 4 2 4 A<br />
United Kingdom<br />
Email Address<br />
fred@bloggs.org<br />
Date of Birth (applicants must be 18 years or over)<br />
2 1 0 3 1 9 6 6<br />
Mr. Fred Bloggs<br />
Customer Reference Number: 12345678<br />
25 Badger Court<br />
Pinemartin Crescent<br />
Cricklewood<br />
London<br />
...<br />
NW10 12H<br />
UK<br />
2 Dividend Income Details<br />
Bank/Building Society Name<br />
Royal Bank of Scotland<br />
Bank/Building Society Account Number<br />
12345678<br />
Name of Account Holder<br />
Mr. Frederick Rumplestiltskin Bloggs<br />
Bank/Building Society Sort Code<br />
2 9 0 8 0 8<br />
Bank/Building Society Collection A/C No.<br />
100673485<br />
Distribution Option<br />
Half-yearly<br />
3 Signature and Declaration - You Must Sign and Date This Form Below<br />
I understand that all transactions in my Self Select ISA are carried out by Charles Stanley & Co Limited on an execution-only basis, that I will receive no advice, and that I am<br />
solely responsible for the selection, suitability, and eligibility under the ISA Regulations of investments and transactions.<br />
I authorise Charles Stanley & Co Limited:<br />
To hold my cash subscriptions, ISA investments, interest dividends and any other rights or proceeds in respect of those investments and any other cash. To make on my behalf<br />
any claims from tax in respect of ISA investments; and on my written request to transfer or pay to me, as the case may be, ISA investments, interest, dividends, rights or other<br />
proceeds in respect of such investments or any cash.<br />
I further declare that:<br />
I am eighteen years of age or over, I am resident and ordinarily resident in the United Kingdom or though not resident in the United Kingdom perform duties which by virtue of<br />
section 132(4)(a) of the Income & Corporation Taxes Act 1988 and any amendments thereto (Crown employees serving overseas), are treated as being performed in the United<br />
Kingdom or I am married to a person who performs such duties. I am subscribing with my own cash or with qualifying shares acquired by myself through an approved<br />
profit-sharing scheme or savings-related share option scheme: I have read and understood the Charles Stanley & Co Limited Terms and Conditions and agree that my account<br />
will be conducted in accordance with this. The information provided by me in this application form is true and correct to the best of my knowledge and belief. I will promptly notify<br />
Charles Stanley & Co Limited of any changes in my circumstances which affect any of the information below.<br />
Signature<br />
Date<br />
The share dealing service, self-select PEPs and ISAs are provided by Fidelity Investments Limited in association with Xest, a division of Charles Stanley & Company Limited. Charles Stanley & Co. Ltd, PEP &<br />
ISA Manager, Member of the London Stock Exchange and the London International Financial Futures & Options Exchange, is regulated by the Financial Services Authority. Approved by Charles Stanley &<br />
Company Limited. Issued in the UK by Fidelity Investments Ltd, Fidelity Investment Services Limited and Fidelity Investments International, regulated by the Financial Services Authority.<br />
This page used an evaluation or expired copy of RML2PDF http://www.reportlab.com<br />
The share dealing service, self-select PEPs and ISAs are provided by Fidelity Investments Limited in association with Xest, a division of Charles Stanley & Company Limited. Charles Stanley & Co. Ltd, PEP &<br />
ISA Manager, Member of the London Stock Exchange and the London International Financial Futures & Options Exchange, is regulated by the Financial Services Authority. Approved by Charles Stanley &<br />
Company Limited. Issued in the UK by Fidelity Investments Ltd, Fidelity Investment Services Limited and Fidelity Investments International, regulated by the Financial Services Authority.<br />
This page used an evaluation or expired copy of RML2PDF http://www.reportlab.com<br />
Dynamic Documents with ReportLab and Zope, page 13 – © Dinu C. Gherman
Sample: Fidelity Fund Descriptions<br />
Framlington UK Smaller Companies Fund<br />
Key Details<br />
Fund Name: UK Smaller Companies Fund<br />
Fund Provider: Framlington<br />
Launch Date: 09 April 2001<br />
Fund Management<br />
Fund Manager: Roger Whiteoak<br />
Fund Objective<br />
To provide capital growth by investing principally in quoted UK<br />
smaller companies.<br />
Investment Approach<br />
For over 30 years we have followed the same investment style.<br />
Investing in quality growth companies at a reasonable price. In<br />
seeking growth, we look to find companies expected to<br />
produce above average growth in profits and cash returns on<br />
capital. We look at the companies' quality of management,<br />
financial position, the industry in which it operates and its<br />
competitive position.<br />
Investment Opportunity<br />
have a wide remit allowing the fund to take opportunities<br />
across the market. Such investment possibilities are not only<br />
found in the so-called 'old economy' sectors of retailing,<br />
building & construction and property, but also the 'new<br />
economy' areas of aerospace, electronics, outsourcing,<br />
information technology, media, healthcare and biotechnology.<br />
Fund Provider<br />
The Framlington Group was established over 30 years ago, and<br />
today manages investments valued at over £5.4 billion for<br />
investment trusts, pension funds, charities, institutions, unit<br />
trusts and PEP and ISA investors. It has the backing of two<br />
significant shareholders: HSBC Holdings (51%) and Munder<br />
Capital Management (49%) - a US investment house managing<br />
assets in excess of £35 billion.<br />
Charges<br />
Annual Management Charge: 1.5% ISA Initial Charge 1.25%<br />
Non-ISA Initial Charge 1.25%<br />
The fund aims to exploit the potential growth from some of the<br />
best smaller companies in the UK. The investment manager will<br />
Market Cap Breakdown<br />
Sector Breakdown<br />
Blue Chip, with long word - 25%<br />
Small Cap - 22%<br />
Unlisted - 17%<br />
technology - 10.4%<br />
health care - 8%<br />
manufacturing - 6%<br />
financials - 5%<br />
Other - 6.6%<br />
Technology Media and Communications - 27%<br />
Sector Two - 20%<br />
Sector three - 15%<br />
Sector four - 10%<br />
Sector five - 8%<br />
Sector six - 6%<br />
Sector seven - 5%<br />
Sector eight - 4%<br />
Other - 5%<br />
Information provided by Framlington as at 06/04/01.<br />
Dynamic Documents with ReportLab and Zope, page 14 – © Dinu C. Gherman
Sample: Fidelity Retirement Plans<br />
RETIREMENT AT 65<br />
RETIREMENT AT 65<br />
Report compiled by John Basil of County Financial for Robin Becker<br />
Your investment plan<br />
Thank you for using Fidelity's Portfolio Planner. This report summarises your Retirement at 65 plan and gives details of funds you are<br />
thinking of investing in. It also compares the portfolio you have developed with the growth portfolio suggested by the Portfolio<br />
Planner. The aim of the Portfolio Planner is to help you make informed investment decisions - we hope you have found it useful. At<br />
the bottom of the page you will find information about the next steps you can take. Please discuss these options with your Adviser to<br />
determine the the best course of action to take.<br />
Your projection<br />
Your contributions<br />
Your target: £100,000 Initial investment: £45,000<br />
Projected value by June 2006: £82,734 Regular contributions: £600<br />
Shortfall or surplus: - £17,266 Frequency: Quarterly<br />
Until: June 2004<br />
Please remember that your projection takes account of inflation, so the figure is given in today's terms. The projections shown are also<br />
not guarantees; they are simply illustrations.<br />
AGGRESSIVE GROWTH<br />
GROWTH<br />
BALANCED<br />
CONSERVATIVE<br />
SHORT TERM<br />
£150,000<br />
£100,000<br />
£50,000<br />
Your portfolio strategy<br />
Our projection assumes that you concentrate on increasing the value of your investment over<br />
the long term with a growth investment strategy. This would involve choosing funds with the<br />
potential for strong returns, though you might have to tolerate short-term fluctuations in their<br />
value.<br />
Now By June 2006<br />
Target £100,000<br />
Growth<br />
Regular payments<br />
Initial investment<br />
Your investment growth<br />
Our projection for your Retirement at 65 investment, is shown in<br />
the chart on the left. It is for illustrative purposes only and is based<br />
on the growth you might achieve with our growth strategy. We<br />
have assumed this will be 7.2% a year, the average level of growth<br />
achieved by the various forms of investment in this type portfolio<br />
over the past 100 years. There is no guarantee that this level of<br />
perfromance will be repeated in coming years, and if markets fall<br />
you may not get back the amound you invest.<br />
We have chosen such a long period, covering both world wars and<br />
the depression of the 1930's, so that the figures are not distorted<br />
by the high returns that stockmarket investments have achieved in<br />
recent decades. Typical central bank forecasts of inflation for the<br />
years ahead are 3.5%. We have therefore taken this from the 7.2%<br />
growth rate and based our calculations on a real rate of return of<br />
3.7% a year.<br />
Our suggestion<br />
Investment % £<br />
Cash<br />
UK Gilts<br />
UK Equity Income<br />
North America<br />
Global Growth<br />
Japan<br />
Far East excluding Japan<br />
4 2,550<br />
4 2,550<br />
16 9,350<br />
15 9,350<br />
31 18,700<br />
15 9,350<br />
15 9,350<br />
Total 100 61,200<br />
Your next steps...<br />
Choose your funds<br />
If you decide you would like to use the Retirement Plan<br />
portfolio as a basis for your Retirement at 65 investment, you<br />
are now in a position to choose your funds. To make this as<br />
straightforward as possible we have linked the Portfolio<br />
Planner to our fund selection tool. This will automatically<br />
search through the hundreds of funds in our investment<br />
superstore FundsNetwork to find the ones from each category<br />
in our suggested portfolio. You can then draw up a short list of<br />
funds, read fact sheets on the ones you are considering and<br />
create your own portfolio fund by fund.<br />
You will then be able to print out a fuller version of this report,<br />
which incorporates your chosen funds and shows how the<br />
portfolio you have created compares with the suggested<br />
growth portfolio.<br />
When you have made your choice you can invest either online<br />
or by post via your Adviser.<br />
Suggested growth portfolio<br />
This pie chart shows a portfolio that you might want to consider as<br />
a suggestion for your Retirement at 65 investment. The Portfolio<br />
Planner cannot give an opinion on which funds and types of<br />
investment are right for your particular circumstances, but this<br />
model may help you make your decision.<br />
The primary aim of this portfolio is to achieve significant long-term<br />
growth without investing in those sectors that are usually<br />
considered to present the highest levels of risk. Only a small part<br />
of the portfolio is kept in relatively low-risk bonds. The rest is<br />
invested in equity funds. The majority of these focus on the UK,<br />
but about a third of the overall portfolio is invested internationally<br />
in order to benefit from growth potential in other parts of the<br />
world. With this type of portfolio you need to be prepared for<br />
short-term fluctuations in the value of your holdings.<br />
Fine-tune your investment plan<br />
You can update the details of your Retirement at 65 investment<br />
plan as often as you want. Simply speak to your Adviser who will<br />
be able to review your portfolio strategy for you.<br />
Need extra help<br />
Your Adviser will be able to assist you throughout the<br />
decision-making process and recommend the portfolio strategy<br />
best suited to your investment needs. Please also bear in mind<br />
that the suggested portfolios may change, so you may like to<br />
review your strategy regularly with your Adviser.<br />
We cannot give you advice on your investments, but if you call us<br />
on 0800 995511 we can give you any general information you<br />
may need about FundsNetwork's products and services. Please<br />
feel free to call us any day of the week, between 8am and 6pm.<br />
Issued by Fidelity Investments International, regulated by the FSA, © Fidelity Investments International 1996-2002<br />
Dynamic Documents with ReportLab and Zope, page 15 – © Dinu C. Gherman
Sample: School Evaluations<br />
GENERAL SCHOOL INFORMATION (cont.)<br />
Portables in School System<br />
Number of Portables Used as Classrooms as<br />
of March 1999<br />
Number of Portables Used as Classrooms as<br />
of September 2000<br />
Projected Number of Portables Used as Classrooms as<br />
of September 2001<br />
Classroom Information<br />
Each school is staffed with full- and part-time faculty and staff. This school currently<br />
employs the following professionals.<br />
All Schools<br />
Classification This School in System<br />
Teachers<br />
Counselors<br />
Librarians<br />
Administrators<br />
Nurses<br />
Other Certified Personnel<br />
Support Staff<br />
This chart shows the percentage of teachers holding each type degree at this school.<br />
Highest College Degree 1996-1997 1997-1998 1998-1999 1999-2000 2000-2001<br />
6-Year through Doctorate<br />
M a s t e r’s<br />
B a c h e l o r’s<br />
A l a b a m a ’s Career/Technical programs are<br />
forming partnerships with business and<br />
industry to align curriculum with their<br />
s t a n d a r d s . T h e g o a l i s t o c e r t i f y a l l<br />
programs to industry standards by 2003.<br />
The number indicates the percentage of<br />
Programs Achieving<br />
Business/Industry<br />
Certification<br />
2000-2001<br />
Rate Grade<br />
high school programs that have been certified. The letter grade measures whether or<br />
not these programs are on track to meet that goal.<br />
Safety & Discipline<br />
The following chart shows the types of discipline problems that have occurred at this<br />
school and what actions were taken in 2000-2001.<br />
Number of<br />
Action Taken<br />
Type of Incidents Sent to<br />
Incident Reported Suspension Expulsion Alternative School<br />
Assault<br />
Bomb Threat<br />
Drug Related<br />
Weapon Related<br />
5<br />
0<br />
4<br />
3<br />
1.0<br />
3<br />
59<br />
37<br />
31<br />
4.4% 2.5% 3.8% 2.8% 1.4%<br />
59.4%<br />
36.2%<br />
2<br />
0<br />
2<br />
1<br />
56.3% 60.8% 62.0% 55.6%<br />
41.3%<br />
72.0<br />
2.0<br />
2.0<br />
3.0<br />
0.0<br />
35.0<br />
35.4%<br />
0<br />
2<br />
2<br />
35.2%<br />
71%<br />
1551.2<br />
0<br />
0<br />
0<br />
0<br />
54.5<br />
42.0<br />
82.0<br />
11.0<br />
53.0<br />
1067.0<br />
43.1%<br />
A<br />
Spending per Student<br />
The chart below shows the spending per student for this school system. The letter<br />
grade compares the system’s per student spending to the state, southeast, and nation.<br />
Year Amount State Southeast Nation<br />
1996-1997<br />
1999-2000<br />
Taxpayers’ Report<br />
Sources of School System Revenues<br />
100%<br />
80%<br />
60%<br />
40%<br />
20%<br />
0%<br />
51.8%<br />
6.2%<br />
State Federal Local Other<br />
School System’s Use of Funds<br />
100%<br />
80%<br />
60%<br />
40%<br />
20%<br />
0%<br />
73.3%<br />
Instruction<br />
3.0% 3.5% 4.7%<br />
Admin<br />
Transportation<br />
8.4%<br />
Food<br />
Services<br />
Operations/<br />
Maintenance<br />
Mills Equivalent<br />
This is the total amount of revenue collected locally<br />
for public school purposes, divided by the value of<br />
one regular system mill of ad valorem tax. The state<br />
average is 29.78 mills equivalent. This chart<br />
compares this school system to others in the state.<br />
C<br />
40.8%<br />
Capital<br />
Outlay<br />
Debt<br />
Service<br />
This System<br />
Baldwin County High School<br />
One Tiger Dr<br />
Bay Minette, AL 36507-3300<br />
(251) 937-2341<br />
(Courtesy of Larry Bates)<br />
1.2%<br />
Total 2000 Fiscal Year Revenue = $151,051,574.52<br />
1.4% 3.7% 2.0%<br />
Total 2000 Fiscal Year Spending = $141,453,152.41<br />
$4,440.12<br />
$5,714.82 C<br />
C<br />
F<br />
27.90<br />
Other<br />
D<br />
D+<br />
Grade<br />
D+<br />
State Board of Education<br />
School Report Card for 2000-2001<br />
Baldwin County<br />
High School<br />
State Board of Education Members<br />
Gov. Don Siegelman, Board President<br />
Dr. Ethel Hall, Vice President, District 4<br />
Bradley Byrne, District 1<br />
G.J. “Dutch” Higginbotham, District 2<br />
Stephanie Bell, District 3<br />
Ella Bell, District 5<br />
David F. Byers, Jr., District 6<br />
Sandra Ray, District 7<br />
Dr. Mary Jane Caylor, District 8<br />
Ed Richardson, Superintendent of Education<br />
Academic Performance Summary*<br />
School’s Academic Status<br />
School System’s Academic Status<br />
Overall School Performance<br />
Overall Performance of<br />
Baldwin County<br />
Overall Performance of State of Alabama<br />
Principal-Mr Robert W Salter<br />
Superintendent-Dr Albert D Thomas<br />
School Board Members<br />
Mr Anthony P Kaiser<br />
Mr Dennis V Stastka<br />
Mr Robert A Wills<br />
Mr Don McGriff<br />
Report cards are prepared by the Alabama Department of Education.<br />
For more information, visit the SDE Web site at www.alsde.edu<br />
*Based on Stanford Achievement Test, 9th Edition Results<br />
CLEAR<br />
CLEAR<br />
C<br />
B<br />
B-<br />
Ms Julia Summerlin<br />
Ms Ruth S Underwood<br />
Mrs Denise Schmidt<br />
0020005<br />
Dynamic Documents with ReportLab and Zope, page 16 – © Dinu C. Gherman
Sample: Weather Forecasts<br />
Probabilidad<br />
(%)<br />
Precipitación<br />
100<br />
80<br />
60<br />
40<br />
20<br />
0<br />
Predicción para Sevilla (Aeropuerto), del jueves 30 de marzo al sábado 8 de abril<br />
Titular: Almacenes "Lealtad". Prohibida la distribución a terceros.<br />
jueves 30 mar viernes 31 mar sábado 1 abr domingo 2 abr lunes 3 abr martes 4 abr miércoles 5 abr jueves 6 abr viernes 7 abr sábado 8 abr<br />
85<br />
14<br />
1<br />
94<br />
5 1<br />
53<br />
33<br />
14<br />
4<br />
21<br />
75<br />
15<br />
38<br />
47 44 42<br />
14<br />
77<br />
19<br />
4<br />
84<br />
13<br />
3<br />
87<br />
10<br />
3<br />
87<br />
10<br />
3<br />
M E T E O L Ó G I C A<br />
meteorología avanzada<br />
10 l/m²<br />
Nubosidad<br />
Temp. máx<br />
Temp. mín<br />
Vientos<br />
100<br />
80<br />
60<br />
40<br />
20<br />
0<br />
Tª esperada<br />
100<br />
21° 21° 22° 19° 19° 19° 19° 19° 19° 20°<br />
80<br />
60<br />
40<br />
20<br />
0<br />
100<br />
80<br />
60<br />
40<br />
20<br />
0<br />
9<br />
3<br />
22<br />
80<br />
53<br />
20<br />
1<br />
17°<br />
19°<br />
21°<br />
23°<br />
25°<br />
Temperatura<br />
observada<br />
2<br />
3 19<br />
10°C<br />
1<br />
7<br />
47 1<br />
10 7<br />
2<br />
11 13<br />
1<br />
4<br />
29<br />
82<br />
47<br />
17<br />
2<br />
17°<br />
19°<br />
21°<br />
23°<br />
25°<br />
1<br />
13<br />
46<br />
34<br />
5°<br />
7°<br />
9°<br />
5<br />
11°<br />
13°<br />
5<br />
14<br />
1<br />
5<br />
17<br />
65<br />
31<br />
32<br />
12<br />
21<br />
1<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
25°<br />
27°<br />
1<br />
9<br />
30<br />
35<br />
18<br />
3°<br />
5°<br />
7°<br />
9°<br />
11°<br />
13°<br />
15°<br />
5<br />
1<br />
1<br />
2<br />
7<br />
26<br />
18<br />
38<br />
21<br />
81<br />
13°<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
25°<br />
3<br />
22<br />
45<br />
7°<br />
9°<br />
25<br />
4<br />
11°<br />
13°<br />
15°<br />
4<br />
1<br />
2<br />
8<br />
24<br />
33<br />
36<br />
24<br />
7<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
1<br />
6<br />
26<br />
44<br />
5°<br />
7°<br />
9°<br />
20<br />
2<br />
11°<br />
13°<br />
15°<br />
65<br />
8<br />
7<br />
11<br />
23<br />
55<br />
31<br />
24<br />
10<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
20<br />
30<br />
26<br />
5°<br />
7°<br />
9°<br />
12<br />
3<br />
11°<br />
13°<br />
15°<br />
38<br />
27<br />
9<br />
19<br />
55<br />
31<br />
27<br />
13<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
12<br />
24<br />
30<br />
23<br />
5°<br />
7°<br />
9°<br />
10<br />
11°<br />
13°<br />
18<br />
37<br />
11<br />
20<br />
49<br />
32<br />
26<br />
10<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
16<br />
27<br />
27<br />
19<br />
5°<br />
7°<br />
9°<br />
10<br />
11°<br />
13°<br />
14<br />
41<br />
9<br />
19<br />
46<br />
33<br />
26<br />
12<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
10° 9° 11° 11° 9° 9° 9° 8° 8°<br />
3<br />
8 1<br />
3 51 10<br />
18<br />
2 4<br />
7<br />
1 1<br />
1 13<br />
21<br />
12 5<br />
2 9<br />
3<br />
24 1<br />
2<br />
6<br />
2<br />
12 8<br />
13 31 2<br />
20<br />
1<br />
1<br />
3 1 6 5 6<br />
1<br />
1<br />
33 4<br />
17 12 1<br />
12<br />
1<br />
5<br />
4<br />
1<br />
1<br />
24 30<br />
5<br />
13 1<br />
8 5<br />
2<br />
3<br />
9<br />
9<br />
4<br />
3<br />
15 21 17 1<br />
11<br />
3 3<br />
1<br />
2<br />
3 6 2<br />
7 8<br />
5 17 26 3 1<br />
13<br />
4 3<br />
17<br />
29<br />
33<br />
20<br />
11°<br />
5°<br />
7°<br />
9°<br />
13<br />
1 4 2<br />
5 10<br />
4 14<br />
32<br />
13 1<br />
4 4<br />
1<br />
5<br />
5<br />
45 42<br />
12<br />
26<br />
29<br />
19<br />
8<br />
15°<br />
17°<br />
19°<br />
21°<br />
23°<br />
25°<br />
14<br />
2 14<br />
28<br />
34<br />
30<br />
23<br />
11°<br />
13 1<br />
3 4<br />
1<br />
5°<br />
7°<br />
9°<br />
13<br />
1 4 2<br />
5 11<br />
7 2<br />
O<br />
Despejado<br />
Semicubierto<br />
cubierto<br />
4 < t < 6°C<br />
6 < t < 8°C<br />
8 < t < 10°C<br />
10 < t < 12°C<br />
12 < t < 14°C<br />
14 < t < 16°C<br />
16 < t < 18°C<br />
18 < t < 20°C<br />
20 < t < 22°C<br />
22 < t < 24°C<br />
24 < t < 26°C<br />
N<br />
S<br />
Fuerte<br />
Moder.<br />
E<br />
Calma<br />
Observaciones Miércoles 29 (Sevilla_Aero):<br />
Horas de sol: 8<br />
Precipitación: 0.0 l/m²<br />
Temperatura máxima: 20.0°C<br />
Temperatura mínima: 6.8°C<br />
T. mínima Jueves 30:10.3°C<br />
Jueves 30:<br />
Parcialmente cubierto. Temperaturas máxima y mínima de 21° y<br />
10°C. Viento flojo del suroeste.<br />
Viernes 31:<br />
Parcialmente cubierto. Temperaturas máxima y mínima de 21° y<br />
10°C. Viento flojo del oeste.<br />
Prob. alta<br />
Prob. media<br />
Prob. baja<br />
©2000 Meteológica SA Tf +34 91 378 8278 Fax +34 91 378 8279 eMail correo@meteologica.es www.meteologica.es<br />
(Courtesy of Marcos Sánchez Provencio)<br />
Dynamic Documents with ReportLab and Zope, page 17 – © Dinu C. Gherman
Sample: Telecom Invoices<br />
Telco Invoice Overview: May-Jun 2002<br />
Click on non-empty days to jump to details page!<br />
Mon Tue Wed Thu Fri Sat Sun<br />
10 11 12<br />
13 14 15 16 17 18 19<br />
20 21 22 23 24 25 26<br />
27 28 29 30 31 1 2<br />
3 4 5 6 7 8 9<br />
Call Details<br />
Move the mouse over the vertical bars (don't click) to see details popup!<br />
Fri<br />
10<br />
Sun<br />
12<br />
Date Start Duration Number Amount<br />
10.05.2002 16:55:36 00:19:49 0011620211 0.74<br />
10.05.2002 20:45:37 00:11:01 00480027802 0.44<br />
Date Start Duration Number Amount<br />
12.05.2002 10:27:28 00:00:38 0337863817 0.03<br />
12.05.2002 11:25:01 00:04:54 00480027802 0.18<br />
10 11 12 13 14<br />
Analysis<br />
Amounts Distribution (EUR)<br />
Duration Distribution (hours)<br />
16.21<br />
5<br />
4:24:27<br />
Frequency Distribution (#calls)<br />
40<br />
37<br />
Tue<br />
14<br />
Date Start Duration Number Amount<br />
14.05.2002 16:10:08 00:00:24 00458398788 0.21<br />
14.05.2002 16:11:21 00:00:07 00458398788 0.21<br />
14.05.2002 16:12:00 00:12:09 00458398788 2.80<br />
14.05.2002 18:23:01 00:27:16 0337863817 0.72<br />
15<br />
9.97<br />
10<br />
5<br />
2.49<br />
1.70<br />
0.00<br />
0<br />
Serv. GSM Local Nat'l Int'l<br />
Amounts Top 10 (EUR)<br />
00458398788<br />
3.02<br />
00458398788<br />
2.80<br />
4<br />
3:12:35<br />
3<br />
1:54:15<br />
2<br />
1<br />
0:13:21<br />
0:00:00<br />
0<br />
Serv. GSM Local Nat'l Int'l<br />
Duration Top 10 (hours)<br />
0011620211<br />
0:51:12<br />
03590932<br />
0:39:11<br />
30<br />
30<br />
20<br />
20<br />
10<br />
8<br />
0<br />
0<br />
Serv. GSM Local Nat'l Int'l<br />
Frequency Top 10 (#calls)<br />
0011620211<br />
18<br />
00480027802<br />
10<br />
Wed<br />
15<br />
Date Start Duration Number Amount<br />
15.05.2002 17:31:30 00:07:15 00480027802 0.30<br />
00458398788<br />
2.59<br />
2641419<br />
0:34:01<br />
0576619384<br />
8<br />
07551708738<br />
2.43<br />
03590932<br />
0:28:57<br />
00458398788<br />
8<br />
0011620211<br />
1.93<br />
3910570<br />
0:28:49<br />
3584517<br />
6<br />
2641419<br />
0.92<br />
0337863817<br />
0:27:16<br />
0127851520<br />
5<br />
0497646180<br />
0.87<br />
067767488<br />
0:25:10<br />
03590932<br />
4<br />
07551708738<br />
0.79<br />
07551708738<br />
0:22:49<br />
40932<br />
3<br />
03590932<br />
0.77<br />
0497646180<br />
0:22:00<br />
3910570<br />
3<br />
0011620211<br />
0.74<br />
0011620211<br />
0:19:49<br />
077649711<br />
3<br />
0 1 2 3 4<br />
0:00 0:15 0:30 0:45 1:00<br />
0 5 10 15 20<br />
Dynamic Documents with ReportLab and Zope, page 18 – © Dinu C. Gherman
Sample: iCards<br />
6 Mar.<br />
2003<br />
Greetings from<br />
Dinu Gherman<br />
Julia!<br />
Are you available for a<br />
dance with me tonight<br />
I'm dying if I can't meet<br />
you again!<br />
Muchos abrazos!<br />
Dinu<br />
Dynamic Documents with ReportLab and Zope, page 19 – © Dinu C. Gherman
Sample: <strong>Presentation</strong>s<br />
Dynamic Documents with<br />
ReportLab and Zope<br />
<strong>Presentation</strong> for the German Zope User<br />
Group's (DZUG) Meeting in Berlin, Germany<br />
28-29 March 2003<br />
Dinu C. Gherman<br />
ReportLab Consultant and Co-developer<br />
dinu @ mac or reportlab dot com<br />
Dynamic Documents with ReportLab and Zope, page 1 – © Dinu C. Gherman<br />
Dynamic Documents with ReportLab and Zope, page 20 – © Dinu C. Gherman
Sample: <strong>Presentation</strong>s cont'ed<br />
Informations sur ce document<br />
Ce document a été écrit au format XML pour le logiciel PythonPoint,<br />
qui permet de le convertir automatiquement au format PDF.<br />
Le document XML lui-même fait seulement 9 kilo-octets !<br />
Les images font en tout 28 kilo-octets !<br />
Le document PDF final comporte 10 pages et fait moins de 60 kilo<br />
kilo-octets !<br />
La routine Zope qui génère le document final fait moins de 30 lignes !<br />
Auteur :<br />
Jérôme Alet - Faculté de Médecine de Nice - 5 Mars 2002<br />
Licence :<br />
GNU Free Documentation License<br />
(Courtesy of Jérôme Alet)<br />
Dynamic Documents with ReportLab and Zope, page 21 – © Dinu C. Gherman
Sample: EuroPython Brochure<br />
8<br />
Friday, June 28 (morning)<br />
Room A Room B Room C<br />
08:30-09:00: Coffee<br />
09:00-09:10: "PrimeUser, a business case of the use 09:45-10:30: "New.zope.org<br />
of Zope for e-commerce", Raphaël Glassberg.<br />
09:15-09:25: "Enhancing and integrating Python Review", Paul Everitt.<br />
into an advanced IDE", Andre-Michel Descombes.<br />
09:30-09:40: "Slides - a presentation generator for<br />
Python", Itamar Shtull-Trauring.<br />
09:45-09:55: "Using Python to Escape the 4GL<br />
Trap", John Pinner.<br />
10:00-10:10: "Python-Logic: logic and constraint<br />
programming for Python", Alexandre Fayolle<br />
Nicolas Chauvat.<br />
10:15-10:25: "Python and wide field imaging in<br />
astronomy", Roeland Rengelink.<br />
09:00-09:10: "Python in a Tie",<br />
Marc-Andre Lemburg.<br />
09:30-09:40: "A support network for<br />
Python businesses in Europe",<br />
Andy Robinson.<br />
10:00-10:10: "Bottom-Up vs.<br />
Top-Down Strategies", Tim<br />
Couper.<br />
EURO P<br />
Conference 2002<br />
THON<br />
10:30-11:00: Coffee<br />
11:00-11:10: "BCLIMS : Improved Communications<br />
among the Structural Genomics Community", Babu<br />
Manjasetty.<br />
11:15-11:25: "Zoa - Working with Boa Constructor<br />
and Zope", Robert Boulanger.<br />
11:30-11:40: "Gideon: An Application Framework<br />
For Zope", Kapil Thangavelu.<br />
11:45-11:55: "AB Strakt's N-tier Framework for<br />
Real-time Computer-assisted Collaborative<br />
Applications", Alex Martelli.<br />
12:00-12:10: "CopyZClass, a Zope product to copy<br />
and adapt an existing ZClass", Michael Eichner.<br />
12:15-12:25: "Generating a database and its<br />
management interface based on a XML semantic<br />
description", Godefroid Chapelle.<br />
EURO P<br />
12:30-13:30: Lunch<br />
THON<br />
Conference 2002<br />
ASdu International N.V.<br />
11:00-11:10: "Using Open-Source<br />
Software for Profit ", Tim Couper.<br />
11:30-11:40: "Building<br />
Business-Relationships for<br />
Marketing Products and Services",<br />
Tim Couper.<br />
NB The times given here are not binding -- the entries are merely to give a rough outline of which topics are planned. It is<br />
the nature of a BoF/LT day to have short-notice changes.<br />
ASdu International is the distributor of important computer<br />
book publishers.<br />
ASdu International n.v. offers you a solution in your quest<br />
for the most suitable book.<br />
CHARLEROI - BELGIUM<br />
June 26.-28. 2002<br />
One of the publishers we distribute is O’Reilly.<br />
The O’Reilly books, known for the animals on their covers, occupy a<br />
treasured place on the shelves of the developers building the next<br />
generation of software. From the Internet to XML, opensource, .NET, Java and Web<br />
Services, O’Reilly puts technology on the map.<br />
More information Contact us !<br />
ASdu International n.v.<br />
Battelsesteenweg 455 d<br />
2800 Mechelen<br />
tel.: 015 285 440<br />
fax: 015-285 449<br />
email: info@asdu.be<br />
www.asdu.be<br />
Charleroi - Belgium European Python and Zope Conference 2002<br />
Dynamic Documents with ReportLab and Zope, page 22 – © Dinu C. Gherman
Sample: "Python Reference" Book<br />
Python Referenz<br />
Python Referenz<br />
3 Typen und Objekte<br />
Alle Daten eines Python-Programmes basieren auf dem Konzept eines Objektes. Objekte umfassen<br />
grundlegende Datentypen wie Zahlen, Zeichenketten, Listen und Dictionaries. Es ist auch möglich,<br />
benutzerdefinierte Datentypen in Form von Klassen oder Erweiterungstypen zu erstellen. Dieses Kapitel<br />
beschreibt das Objektmodell von Python und gibt eine Übersicht der eingebauten Datentypen. Kapitel 4,<br />
»Operatoren und Ausdrücke«, beschreibt weitere Operatoren und Ausdrücke.<br />
3.1 Terminologie<br />
Jedes Datum im Speicher ist ein Objekt. Jedes Objekt hat eine Identität, einen Typ und einen Wert.<br />
Wenn man z.B. a = 42 schreibt, wird ein Ganzzahl-Objekt mit dem Wert 42 erzeugt. Man kann die<br />
Identität eines Objektes als Zeiger auf einen Platz im Hauptspeicher betrachten. a ist der Name dieses<br />
Platzes.<br />
Der Typ eines Objektes (der seinerseits eine spezielle Art von Objekt ist) beschreibt die interne<br />
Repräsentation des Objektes wie auch die Methoden und Operationen, die es unterstützt. Wird ein<br />
Objekt eines bestimmten Typs erzeugt, so wird dieses Objekt manchmal als eine Instanz dieses Typs<br />
bezeichnet (obwohl eine Instanz eines Typs nicht mit einer Instanz einer benutzerdefinierten Klasse<br />
verwechselt werden sollte). Nachdem ein Objekt erzeugt wurde, können dessen Identität und Typ nicht<br />
mehr verändert werden. Falls dessen Wert jedoch verändert werden kann, so sagt man, das Objekt ist<br />
veränderlich. Falls der Wert nicht verändert werden kann, so spricht man entsprechend von einem<br />
unveränderlichen Objekt. Ein Objekt, das Verweise auf andere Objekte enthält, bezeichnet man als<br />
Container oder Sammlung.<br />
Zusätzlich zum Wert, den sie repräsentieren, definieren viele Objekte eine Anzahl von Datenattributen<br />
und Methoden. Ein Attribut ist eine mit dem Objekt assoziierte Eigenschaft oder ein Wert. Eine<br />
Methode ist eine Funktion, die eine gewisse Operation auf einem Objekt ausführt, sobald sie angestoßen<br />
wird. Attribute und Methoden werden mit dem Punkt-Operator (.) angesprochen, wie im folgenden<br />
Beispiel gezeigt wird:<br />
a = 3 + 4j<br />
r = a.real<br />
# Erzeuge eine komplexe Zahl.<br />
# Hole den Realteil (ein Attribut).<br />
b = [1, 2, 3] # Erzeuge eine Liste.<br />
b.append(7) # Füge ein neues Element an b<br />
# mit der Methode 'append' an.<br />
3.2 Identität und Typ von Objekten<br />
Die eingebaute Funktion id() gibt die Identität eines Objektes als ganzzahligen Wert zurück. Dieser<br />
entspricht normalerweise dem Platz des Objektes im Hauptspeicher, was aber abhängig von der<br />
Implementierung ist. Der Operator is vergleicht die Identität zweier Objekte. Die eingebaute Funktion<br />
type() gibt den Typ eines Objektes zurück, z.B:<br />
# Vergleiche zwei Objekte.<br />
def compare(a, b):<br />
print 'Die Identität von a ist ', id(a)<br />
print 'Die identität von b ist ', id(b)<br />
if a is b:<br />
print 'a und b sind dasselbe Objekt.'<br />
if a == b:<br />
print 'a und b haben den gleichen Wert.'<br />
if type(a) == type(b):<br />
print 'a und b haben den gleichen Typ.'<br />
Der Typ eines Objektes ist seinerseits ein Objekt. Das Standardmodul types beinhaltet die<br />
Typ-Objekte für alle eingebauten Typen und kann für eine Typ-Prüfung verwendet werden, z.B. so:<br />
import types<br />
if isinstance(s, types.ListType):<br />
print 'Ist eine Liste.'<br />
Benutzerdefinierte Funktionen sind aufrufbare Objekte, die auf Modulebene mit der Anweisung def<br />
oder der Operation lambda erzeugt werden (Funktionen, die innerhalb von Klassen definiert werden,<br />
nennt man Methoden. Sie werden in Kürze beschrieben). In Python sind Funktionen Bürger erster<br />
Klasse, die genauso behandelt werden wie alle anderen Python-Objekte. Daraus folgt, dass man sie an<br />
Variablen zuweisen oder sie in Listen, Tupel oder Dictionaries unterbringen kann, wie im folgenden<br />
Beispiel gezeigt wird:<br />
def foo(x, y):<br />
print '%s + %s ist %s' % (x, y, x+y)<br />
# Weise an eine neue Variable zu.<br />
bar = foo<br />
bar(3, 4)<br />
# Ruft 'foo' auf, oben definiert.<br />
# Setze foo in einen Container.<br />
d = {}<br />
d['callback'] = foo<br />
d['callback'](3, 4) # Ruft 'foo' auf.<br />
Eine benutzerdefinierte Funktion verfügt über folgende Attribute:<br />
Attribut(e)<br />
f.__doc__ oder<br />
f.func_doc<br />
f.__name__ oder<br />
f.func_name<br />
f.func_code<br />
f.func_defaults<br />
f.func_globals<br />
Beschreibung<br />
Dokumentations-String<br />
Funktionsname<br />
Byte-übersetzter Code<br />
Tupel mit voreingestellten Argumenten<br />
Dictionary, das den globalen Namensraum<br />
definiert<br />
Methoden sind Funktionen, die nur auf Objektinstanzen operieren. Üblicherweise werden Methoden<br />
innerhalb einer Klassendefinition definiert:<br />
# Eine Schlange von Objekten, nach Prioritäten sortiert.<br />
class PriorityQueue:<br />
def __init__(self):<br />
self.items = [ ]<br />
# Liste von (priority, item)<br />
def insert(self, priority, item):<br />
for i in range(len(self.items)):<br />
if self.items[i][0] > priority:<br />
self.items.insert(i, (priority, item))<br />
break<br />
else:<br />
self.items.append((priority, item))<br />
def remove(self):<br />
try:<br />
return self.items.pop(0)[1]<br />
except IndexError:<br />
raise RuntimeError, 'Schlange ist leer'<br />
Ein ungebundenes Methodenobjekt ist eine Methode, die noch nicht mit einem speziellen Instanzobjekt<br />
assoziiert wurde. Die Methoden in einer Klassendefinition sind solange ungebunden, bis sie einem<br />
speziellen Objekt hinzugefügt werden, z.B.:<br />
m = PriorityQueue.insert # Ungebundene Methode.<br />
Um eine ungebundene Methode aufzurufen, übergibt man eine Objektinstanz als erstes Argument:<br />
pq = PriorityQueue()<br />
m = PriorityQueue.insert<br />
m(pq, 5, "Python")<br />
# Ruft pq.insert(5, "Python") auf.<br />
Ein gebundenes Methodenobjekt ist eine Methode, die bereits mit einem speziellen Instanzobjekt<br />
assoziiert wurde, z.B.:<br />
27<br />
33<br />
Dynamic Documents with ReportLab and Zope, page 23 – © Dinu C. Gherman
Integration with Zope<br />
Adding functionality to Zope<br />
• Scripts<br />
• External Methods<br />
• Products<br />
Caution!<br />
• Thread-safety not guaranteed<br />
• Don't change module-level objects at runtime, like:<br />
reportlab.lib.colors.*<br />
reportlab.rl_config.*<br />
Dynamic Documents with ReportLab and Zope, page 24 – © Dinu C. Gherman
Sample product: RenderableCharts<br />
• Version 0.5, by Dirk Datzert<br />
• Provides chart templates and objects<br />
• Manages setting and storing attributes<br />
• Combines with DTML-Methods, ZSQL-Methods,<br />
TinyTables or Scripts for the real chart data<br />
• Output in different formats<br />
• Context: SAP reporting/controlling<br />
Dynamic Documents with ReportLab and Zope, page 25 – © Dinu C. Gherman
Demo<br />
Sample ext. method: RLfromZope<br />
• By Jérôme Alet<br />
• reportlab/demos/rlzope/rlzope.py, ~100 lines<br />
• Returns sample dynamic PDF<br />
• Contains one logo from Zope DB<br />
To make it more exciting:<br />
• Replace ~20 lines of code<br />
• Let it fetch some images from the web<br />
• Build a catalog of products (next page)<br />
Dynamic Documents with ReportLab and Zope, page 26 – © Dinu C. Gherman
Sample ext. method: RLfromZope cont'ed<br />
A sample catalog generated with an external Zope method and ReportLab<br />
A sample catalog generated with an external Zope method and ReportLab<br />
Dynamic Documents with ReportLab and Zope, page 27 – © Dinu C. Gherman
Summary<br />
Remember, you can:<br />
• make/serve "real" documents from Zope,<br />
• give users what they want,<br />
• do it all in Python,<br />
• get help, too (contact me)!<br />
The message to take home:<br />
• ReportLab/Zope is a perfect match!<br />
Dynamic Documents with ReportLab and Zope, page 28 – © Dinu C. Gherman
Links<br />
• reportlab.com<br />
• reportlab.com/contrib/pyref1de.html<br />
• keyfeatures.fidelity.co.uk<br />
• fidelity.co.uk/direct/select<br />
• alsde.edu/html/ed_dir_menu.asp<br />
• zope.org/Members/Dirk.Datzert/RenderableCharts<br />
• python.net/~gherman/#rlzope<br />
• python.net/~gherman/#svglib<br />
• zope.org<br />
• dzug.org<br />
Dynamic Documents with ReportLab and Zope, page 29 – © Dinu C. Gherman