Re: Interest not met.

2008-07-03 Thread Adam Lanier

david odey wrote:
I write to inform you that the reason I subscribed to this web page 
is not been met.


I want to be sent sample codes in programming languages especially  
python and an email tutorial on C#. I will be happy if these demands 
are met.


 Thanks in anticipation.



ALWAYS THERE FOR YOU


Well, good luck getting your demands met.
--
http://mail.python.org/mailman/listinfo/python-list


Re: lotus nsf to mbox

2007-12-18 Thread Adam Lanier
On Tue, 2007-12-18 at 19:25 +, Fabian Braennstroem wrote:
 Hi to all,
 
 thanks, I'll try your suggestions...
 
 Regards!
 Fabian
 
 Brian Munroe schrieb am 12/15/2007 07:10 PM:
  Well, If you wish to go that route, I believe you will have to reverse
  engineer the Notes Database binary structure because I've never seen
  it published anywhere.  My suggestion, if you can use a Windows
  machine, just use the Lotus Notes COM Objects via the Python Win32
  bindings, as mentioned above.
  
  If you really need to do it from Linux and are lucky enough to be
  running the IIOP task on your Domino server, then you could possibly
  use CORBA.

You could always enable the IMAP interface on the Domino machine and use
imaplib to retrieve the mail via IMAP.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to best send email to a low volume list?

2007-10-24 Thread Adam Lanier
On Wed, 2007-10-24 at 16:54 +, chris wrote:
 I need to maintain a list of subscribers to an email list for a
 newsletter that will be sent via a web form probably once a month.
 I anticipate low numbers--tens to maybe one hundred subscribers at the
 most.  Just curious what the best way to code this is.  Should I just
 loop through the addresses and send one-off emails to each, or is it
 better to somehow send to every recipient in one shot?  One thing I
 would like to avoid in the latter scenario is each recipient being
 able to see the entire list of recipients.  Also don't want to trigger
 any kind of spam thing on my web host by sending out too many emails.
 
 Anyway, any tips appreciated.
 
 Thanks,
 Chris
 

Before you reinvent the wheel, you should look into using a mailing list
manager, Mailman for example:

http://www.gnu.org/software/mailman/index.html

Regardless, confirmed double-opt-in should be a requirement as should a
mechanism for subscribers to unsubscribe themselves.

Using a 'list address' as the from address and using bcc addressing will
prevent your recipients from being able to see all the other recipient
addresses.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: RegEx question

2007-10-04 Thread Adam Lanier
On Thu, 2007-10-04 at 10:58 -0500, Robert Dailey wrote:
 It should also match:
 
 @param[out] state Some description of this variable
 
 
 On 10/4/07, Robert Dailey [EMAIL PROTECTED] wrote:
 Hi,
 
 The following regex (Not including the end quotes):
 
 @param\[in|out\] \w+ 
 
 Should match any of the following:
 
 @param[in] variable 
 @param[out] state 
 @param[in] foo 
 @param[out] bar 
 
 
 Correct? (Note the trailing whitespace in the regex as well as
 in the examples)
 
 -- 
 http://mail.python.org/mailman/listinfo/python-list

try @param\[(in|out)\] \w+ 

-- 
http://mail.python.org/mailman/listinfo/python-list


Class design question

2007-10-03 Thread Adam Lanier
Relatively new to python development and I have a general question
regarding good class design.

Say I have a couple of classes:

Class Foo:
params = [ ]
__init__( self, param ):
...

Class Bar:
data = None
__init__( self, data ):
...

The class is going to be a wrapper around a list of Bars() (among other
things).  I want the ability to pass to the constructor of Foo either:
a string'baz'
a Bar objectBar( 'baz' )
a list of strings and/or bars ( 'baz', Bar( 'something else' ))


Am I going to have to use isinstance() to test the parameter to __init__
to see what type of data I'm passing in, i.e.,

Class Foo:
params = [ ]
__init__( self, param ):
if isinstance( param, list ):
for p in param:
addParam( p )
elif isinstance( param, str):
addParam( param )

addParam( self, param ):
if isinstance( param, Bar ):
self.params.add( param )
elif isinstance( param, str ):
self.params.add( Bar( param ))
else:
raise TypeError( wrong type of input )

Am I missing something here or is there a more Pythonic way to
accomplish this?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Class design question

2007-10-03 Thread Adam Lanier
On Wed, 2007-10-03 at 18:47 +, George Sakkis wrote:
 
  I would use variable argument list for this; it's also consistent
with
  your example Foo( 'baz', Bar( 'something else' )), otherwise you
need
  to call it as Foo([ 'baz', Bar( 'something else' ) ])

Good point, this is what was tripping me up...

 
  # always inherit from object unless you have a good reason not to
  class Foo(object):
 
  # XXX this is a class instance, shared by all Foo instances;
  # XXX probably not what you intended
  params = [ ]
 
  def __init__(self, *args):
  # uncomment the following line for instance-specific params
  # self.params = []
  for arg in args:
  if not isinstance(arg, Bar):
 # let the Bar constructor to do typechecking or
whatnot

This is also tangentially what I was asking, Should type-checking be
done in the caller or the callee (so to speak).  I guess good OOP
practice would be to push it down the call stack.

  arg = Bar(arg)
  self.params.add(arg)
 
 
 Or even better (Python 2.5):
 
 class Foo(object):
 def __init__(self, *args):
 self.params = [arg if isinstance(arg, Bar) else Bar(arg) for
 arg in args]
 

Interesting, I'm not familiar with this idiom...


-- 
http://mail.python.org/mailman/listinfo/python-list