Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Easy "here documents" ??

Reply
Thread Tools

Easy "here documents" ??

 
 
Steve Holden
Guest
Posts: n/a
 
      12-21-2004
Doug Holton wrote:

> Bengt Richter wrote:
>
>>> variable1 = 1
>>> variable2 = 2
>>>
>>> s = """
>>> v = ${variable1}
>>> v2's value is: ${variable2}
>>> """
>>>
>>> However, Python 3.0 is likely years away. If you want to know how to
>>> run code like this today, consult Fredrik Lundh.

>>
>>
>>
>> Or replace ${...} with equally simple %(...)s in the above and be
>> happy

>
>
> I'm afraid you are incorrect. Simply replacing the $ with % in my
> example will not work in Python.
> If you would like to use % instead of $, I recommend requesting that
> feature for Python 3.0: http://www.python.org/cgi-bin/moinmoin/Python3.0


Or use boo - it's probably in there already

must-stop-baiting-the-holton-ly y'rs - steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      12-21-2004
Steve Holden wrote:

>> If you would like to use % instead of $, I recommend requesting that feature for Python 3.0:
>> http://www.python.org/cgi-bin/moinmoin/Python3.0

>
> Or use boo - it's probably in there already


weren't you supposed to ask me about it?

</F>



 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      12-21-2004
Fredrik Lundh wrote:

> Steve Holden wrote:
>
>
>>>If you would like to use % instead of $, I recommend requesting that feature for Python 3.0:
>>>http://www.python.org/cgi-bin/moinmoin/Python3.0

>>
>>Or use boo - it's probably in there already

>
>
> weren't you supposed to ask me about it?
>
> </F>


Aah, right, sorry about that. I understand you are the world's expert on
writing advanced solutions in which you have a financial interest
without using features only available in Python 3.0.

Would you care to comment on why you wouldn't say "boo" to a goose, and
whether the easierInBoo() decorator will be implemented in Imaging 1.2?

must-stop-going-for-the-low-hanging-fruit-ly y'rs - steve

PS: If Doug Holton will just laugh at himself, even once, I promise to
stop this nonsense immediately. There's always other nonsense to replace it.
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
 
Reply With Quote
 
Jim Hill
Guest
Posts: n/a
 
      12-22-2004
Fredrik Lundh wrote:
>Jim Hill wrote:
>
>> I'm trying to write a script that writes a script for a rather specialized
>> task. I know that seems weird, but the original version was written in
>> Korn shell and most of my team are familiar with the way it does things
>> even though they don't read Korn.

>
>so why didn't you tell us?


I was afraid there'd be mockery involved and not originating on my end.


Jim, delicately sensitive to mockery despite burly masculinity
--
"I regard NASCAR the same way I regard gay porn: I know it exists and I
know some guys like it; I just don't want to see it." -- Z. B. Goode
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it reasonably easy easy to something like this with python? Bruno Desthuilliers Python 5 08-29-2007 07:40 AM
Stripping audio from qa DVD. Easy or not so easy? GJ Computer Support 1 05-23-2007 02:03 AM
Shared folders - easy question JLunis Wireless Networking 7 03-11-2005 11:33 PM
easy to look at and easy to maintain web page menuing system. Hazzard ASP .Net 2 04-06-2004 03:51 AM



Advertisments