Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread Kent Johnson
On Wed, Aug 12, 2009 at 5:19 PM, Kent Johnson wrote: > You might also look at S5: > http://meyerweb.com/eric/tools/s5/ > > S5 presentations are viewable in a browser, so if you want to make > something for distribution, it may be better than Bruce (which IIUC > requires Python to view). Or you cou

Re: [Tutor] best approach to db-api imports and cursor calls

2009-08-12 Thread Serdar Tumgoren
> My understanding is that it is relatively expensive to connect() and > cheap to create cursors. Cursors are also associated with > transactions. So a common practice seems to be to create a connection > that is shared in some way, and to create a cursor for each > transaction / operation. > > Ken

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Nick Raptis
Dave Angel wrote: As I said, you'd probably get in trouble if any of the lines had '&' or '<' characters in them. The following function from the standard library can be used to escape the line directly, or of course you could use the function Nick supplied. xml.sax.saxutils.escape(/data/[,

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread Kent Johnson
On Wed, Aug 12, 2009 at 4:07 PM, David Kim wrote: > I > am attracted to the declarative nature of reStructuredText, but I also > recognize that A LOT of people use Powerpoint and are comfortable with it. > Going with something else might freak people out. You might also look at S5: http://meyerweb

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread David Kim
Unfortunately I live on the East Coast, otherwise I'd definitely attend! I am attracted to the declarative nature of reStructuredText, but I also recognize that A LOT of people use Powerpoint and are comfortable with it. Going with something else might freak people out. It also occurs to me that E

[Tutor] best approach to db-api imports and cursor calls

2009-08-12 Thread Serdar Tumgoren
Hi everyone, Was wondering if you could advise on best practices when it comes to reusing a database cursor. I'm working on a program that must hit a database several times. Basically, I pull some data, process it, and then use a portion of that data as parameters for the next call. And then I rin

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread wesley chun
On Wed, Aug 12, 2009 at 1:07 PM, David Kim wrote: > Unfortunately I live on the East Coast, otherwise I'd definitely attend! I > am attracted to the declarative nature of reStructuredText, but I also > recognize that A LOT of people use Powerpoint and are comfortable with it. > Going with something

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread wesley chun
> I'm wondering what people consider the most efficient and brain-damage free > way to automate the creation of presentation slides with Python. Scripting > Powerpoint via COM? this is how i'm doing it. i'm working on a Python script that takes plain text with minimal markup that then uses COM t

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread David Kim
Thanks for the suggestion Kent, I was not familiar with reStructuredText. Looks very interesting and more practical than than scripting Powerpoint or recreating Apple's Keynote XML format. This nugget also led me to rst2pdf, for those who care. Cheers, DK On We

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Dave Angel
prasad rao wrote: xml.sax.saxutils.escape(/data/[, /entities/]) Escape '&', '<', and '>' in a string of data. > You can escape other strings of data by passing a dictionary as the >optional /entities/ parameter. The keys and values must all be >strings; each key will be repla

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread prasad rao
> >xml.sax.saxutils.escape(/data/[, /entities/]) > > > Escape '&', '<', and '>' in a string of data. > > > You can escape other strings of data by passing a dictionary as the > >optional /entities/ parameter. The keys and values must all be > >strings; each key will be replaced with its corre

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread Kent Johnson
On Wed, Aug 12, 2009 at 12:51 AM, David Kim wrote: > Hi everyone, > > I'm wondering what people consider the most efficient and brain-damage free > way to automate the creation of presentation slides with Python. Scripting > Powerpoint via COM? Generating a Keynote XML file? Something else that's >

Re: [Tutor] Automating creation of presentation slides?

2009-08-12 Thread Wayne
On Tue, Aug 11, 2009 at 11:51 PM, David Kim wrote: > Hi everyone, > > I'm wondering what people consider the most efficient and brain-damage free > way to automate the creation of presentation slides with Python. Scripting > Powerpoint via COM? Generating a Keynote XML file? Something else that's

Re: [Tutor] easy way to populate a dict with functions

2009-08-12 Thread Kent Johnson
On Tue, Aug 11, 2009 at 9:27 PM, bob gailer wrote: > Kent Johnson wrote: >> >> On Tue, Aug 11, 2009 at 10:22 AM, bob gailer wrote: >> >> >>> >>> Decorator functions: >>> >>> def collect(func): >>> 'a "decorator" that adds each function to the cmds list' >>> cmds.append((func.__name__, func)) >>> >>

[Tutor] Automating creation of presentation slides?

2009-08-12 Thread David Kim
Hi everyone, I'm wondering what people consider the most efficient and brain-damage free way to automate the creation of presentation slides with Python. Scripting Powerpoint via COM? Generating a Keynote XML file? Something else that's easier (hopefully)? I'm imagining a case where one does cert

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Dave Angel
prasad rao wrote: But I think you want the tag, which means the text is pre-formatted. And you could >put that around the whole sorce file, instead of doing for each line. See http://www.w3schools.com/tags/tag_pre.asp Thank you Dave. I put in tag and it worked. But

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Nick Raptis
Your main concern when displaying plain text in HTML is actually only 5 characters: &, <, >, ", ' which you should escape(replace) with their coresponding HTML entities. Here's a few lines of code to give you an idea how to do it: #put thi

Re: [Tutor] creating an exe

2009-08-12 Thread Alan Gauld
wrote i have now finished my program the way i want it. is there a way to compile my program so that people without python can see what i have made? Yes, you package your program with a version of python. You can either do that with a standard installer which installs python and your progr

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Alan Gauld
"prasad rao" wrote I put in tag and it worked. But at one particular line in a module the font changed colour.After that all the lines are in blue colour and under lined. How are you viewing the file? As Kent poinred out pure text files have no fonts or colours. So the blue colour must be

Re: [Tutor] creating an exe

2009-08-12 Thread Timo
proportio...@msn.com schreef: hi, thanks to all that helped with my list question yesterday. i have now finished my program the way i want it. is there a way to compile my program so that people without python can see what i have made? Works great with py2exe. Timo -