exception from a thread

2007-06-28 Thread _spitFIRE
assume a scenario, where there is a class that for doing some work,
spawns lot of threads.

class X:
def __init__(self):
# Spawns some threads to
# do some work

now, assuming that at least one of the threads encounters a problem
while doing work and throws an exception. Would I be able to handle
that error in the caller class? When I try to do this, I see that the
errors thrown by the threads never cascade to this caller :(

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


SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
Is it possible to run a SMTP server that sends mail to recipients
using standard libraries, without using twisted framework, and also
without using any relay server?

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


Re: SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> If you just want to send mail, you should be able to use the standard
> smtplib module (http://docs.python.org/lib/module-smtplib.html). If
> your recipients are on the Internet, you would need to handle MX
> resolution yourself.
>

How complicated is to handle the MX resolution by myself? I'm sorry
that I don't have a clue regarding that. Any pointers would be greatly
appreciated.

> I know you said you want to avoid a relay server, but it's probably
> the best bet unless you control the SMTP infrastructure or are simply
> sending messages locally.

The problem is that with the scenario I'm faced with, I don't have any
reliable SMTP server that I can use. Hence, I though I will spawn my
own light-weight SMTP server that can send mails to the people I want,
on the Internet. But, from what you are saying it seems, it might not
be that light weight after all!

> Otherwise, you'll probably need to also
> implement queuing and retry logic (depending on your requirements).

Isn't there a library module that can help me implement all this?

> There are also some warning lights that may go off and flag your mail
> as spam if you're using a method like that...
>
> -Jeff

Would you please fill me in with some pointers as to why my mail might
get flagged as spam? Would it be considered spam even if I've a valid
from address, and a proper message/subject? Does the spam filter also
rely on the sending server's DNS etc because of which you say it might
get flagged as spam?

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


Re: SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
On Jul 5, 2:21 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> You need to do a DNS MX lookup.  There's nothing in the Python stdlib
> which provides this functionality.  There are several libraries available
> which do this, though (Twisted among them ;).  You can probably find them
> with a little googling.  Beyond that, the rules for processing MX records
> are simple and it's not much work to pick the right host once you can do
> the MX lookups.
>
> Jean-Paul

Thanks for the pointer. However, as I said currently, I can't use
anything other than the standard libraries.

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


Re: SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
On Jul 5, 2:37 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> You could try pyDNS (http://pydns.sourceforge.net).  You should simply
> be able to call the 'DNS.mxlookup' function.  The other option would
> be twisted.names...
>

Thanks for the pointers.

> What about simply running an SMTP server on the machine running your
> application? Is that a possible approach?
>

  I guess that would be my last resort :)

> Not that I know of.  The protocol is standard, the queuing and retry
> logic, not so much.  Someone else may know more than I, though.
>

  I understand what you are saying. I guess, I would fall back to my
last option!

> http://mtamark.space.net/draft-stumpf-dns-mtamark-04.htmlhttp://en.wikipedia.org/wiki/Sender_Policy_Framework
>
> > --
> >http://mail.python.org/mailman/listinfo/python-list

  Thanks, once again.

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


retrieving ATOM/FSS feeds

2007-08-12 Thread _spitFIRE
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

  I'm using feedparser library to parser ATOM/RSS feeds. However, I don't
get the entire post! but only summaries! How do I retrieve the entire feed?
I believe that the parser library should have support for doing that or the
specification should detail how it can be done? Or should I simply get the
feed link and do HTML scraping?


- --
_ _ _]{5pitph!r3}[_ _ _
__
“I'm smart enough to know that I'm dumb.”
  - Richard P Feynman
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGv77mA0th8WKBUJMRAk80AJ9VCIBXIZVhuPtT7bfY4dRrM15H+gCeOVJG
77Zbl8jmWPsp4QjP85Lbwbc=
=Ho+8
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: which IDE is highly recommended in Windows OS

2007-08-12 Thread _spitFIRE
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ge Chunyuan wrote:
> hi Group:
> 
> I am a new comer for Python, I wonder which IDE is recommended in
> Windows OS.
> Can anyone give some suggestion.
> 
> 
> Thanks indeed
> Ge Chunyuan
> 

- - Stani's Python Editor
(http://www.softpedia.com/get/Programming/Coding-languages-Compilers/Stanis-Python-Editor.shtml)
- - Black Adder (http://www.thekompany.com/products/blackadder/)
- - Zeus (http://www.zeusedit.com/python.html)
- - PyScripter (http://mmm-experts.com/Products.aspx?ProductId=4)
- - ActivePython (http://www.activestate.com/)
- - IDLE (http://www.python.org/idle/doc/idle2.html)

and depending on how you define IDEs, you can also decide whether or not to
include, the following
- - emacs
- - vim
- - scite
...

- --
_ _ _]{5pitph!r3}[_ _ _
__
“I'm smart enough to know that I'm dumb.”
  - Richard P Feynman
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGv8DSA0th8WKBUJMRAqGcAJ9hhMp3tyS7XmBZT2+fol/A69j4jwCfXNya
xQTmmDlDF5BAfiWkrSW3TuQ=
=902n
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: retrieving ATOM/FSS feeds

2007-08-13 Thread _spitFIRE
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lawrence Oluyede wrote:
> If the content producer doesn't provide the full article via RSS/ATOM
> there's no way you can get it from there. Search for full content feeds
> if any, otherwise get the article URL and feed it to BeautifulSoup to
> scrape the content.
> 

For the same feed (where the content producer doesn't provide the full
article!) I was able to see the complete post in other RSS aggregators (like
Blam). I wanted to know how they were able to collect the feed!

I knew for sure that you can't do screen scraping separately for each and
every blog and that there has be a standard way or atleast that blogs
maintain a standard template for rendering posts. I mean if each of the site
only offered partial content and the rest had to be scraped from the page,
and the page maintained a non-standard structure which is more likely, then
it would become impossible IMHO for any aggregator to aggregate feeds!

I shall for now try with BeautifulSoup, though I'm still doubtful about it.

- --
_ _ _]{5pitph!r3}[_ _ _
__
“I'm smart enough to know that I'm dumb.”
  - Richard P Feynman
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGwC1SA0th8WKBUJMRAs4eAJ0bLJVzEZls1JtE6e8MUrqdapXGPwCfVO02
yYzezvhJFY1SDHUGxrJdR5M=
=rfLo
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list