Prucha, Brett A wrote:
>>Actually, I'd just forbid piping to any kind of sendmail program on 
>>    
>>
>Windows. You don't need it, since you can use Python's mail class and 
>use SMTP (even if you do use some kind of sendmail clone, you can SMTP 
>to localhost).
>  
>
>That fine with me.  I was just adding it to be compatible with Unix.
>
>  
>
>>Looking at the patch below, the number of "if ...win32" tests gives me 
>>    
>>
>the shudders.
>-1, all those conditionals can be avoided if you use an OS-specific 
>helper class.
>  
>
>Can you give a small example of what you are looking for?
>  
>
class Generic:
  def foo(self):
    pass
class Unix(Generic):
  def foo(self):
    #do something unixy
class Windows(Generic):
  def foo(self):
    #do something windowsish
if os.platfom == 'windows':
  helper = Windows()
elif os.platform == 'posix':
  helper = Unix()
else
  helper = Generic()
helper.foo()
#and 50 more instances
But if you simply punt on piping to sendmail, you won't need any of that 
at all.
>>Wha's that comma doing in the regular expression pattern? Why would you 
>>    
>>
>quote parameters that contain a comma?
>  
>
>Hmm, you are right.  It doesn't belong in there.  I think I was thinking that I had to separate the characters by commas.
>  
>
Welcome to the world of regular expressions. :-)
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 23 03:49:39 2004