Re: Explanation about for

2012-01-10 Thread Thomas Rachel
Am 10.01.2012 10:02 schrieb Νικόλαος Κούρας: --- | HOST| HITS| AGENT | DATE | --- | foo | 7 | IE6 | 1/1/11 | --- | bar | 42 | Fi

Re: Explanation about for

2012-01-10 Thread Thomas Rachel
Am 10.01.2012 12:37 schrieb Νικόλαος Κούρας: So that means that for host, hits, agent, date in dataset: is: for host, hits, agent, date in (foo,7,IE6,1/1/11) and then: for host, hits, agent, date in (bar,42,Firefox,2/2/10) and then: for host, hits, agent, date in (baz,4,Chrome,3/3/09)

Re: pipe into preallocated buffer?

2012-01-11 Thread Thomas Rachel
Am 12.01.2012 06:23 schrieb Kushal Kumaran: On Wed, Jan 4, 2012 at 8:05 PM, Mihai Badoiu wrote: is there a way to pipe directly into a preallocated buffer? (subprocessing.pipe.stdout) Does io.StringIO fit your needs? http://docs.python.org/py3k/library/io.html#io.StringIO Probably not.

Re: Implicit conversion to boolean in if and while statements

2013-02-08 Thread Thomas Rachel
Am 08.02.2013 07:29 schrieb Rick Johnson: Consider this: if connect("my:db") as db: No need to make a call and then test for the validity of the call when you can do both simultaneously AND intuitively. Would be great, but can be emulated with def ifiter(x): if x: yield

Re: Implicit conversion to boolean in if and while statements

2013-02-10 Thread Thomas Rachel
Am 10.02.2013 12:37 schrieb Steven D'Aprano: So, in Python 4000, my vote is for set literals { } to create frozensets, and if you want a mutable set, you have to use the set() type directly. 4000 sounds about long future. In the meanwhile, a new syntax element could be introduced fpr frozens

Re: inheritance and how to use it

2013-02-15 Thread Thomas Rachel
Am 15.02.2013 17:59 schrieb Bob Brusa: Hi, I use a module downloaded from the net. Now I want to build my own class, based on the class SerialInstrument offered in this module - and in my class I would like to initialize a few things, using e. g. the method clear() offered by SerialInstrument. He

Re: improving performance of writing into a pipe

2013-02-18 Thread Thomas Rachel
Am 18.02.2013 17:31 schrieb mikp...@gmail.com: However I get an exception while trying to open the queue: fout = open('/tmp/mypipe', 'w') I don't see an exception in your answer. Where did you put it for us? I have tried it in a command line and the call doesn't return until in another ter

Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays"

2013-02-24 Thread Thomas Rachel
Am 24.02.2013 20:27 schrieb 7segment: When in doubt, check some other way, such as with a browser. Thank you Ian. Browser is not a good idea, because I need this tool to work automatically. I don't have time to check and compare the response times manually and put them into the database. Of

Re: This mail never gets delivered. Any ideas why?

2013-03-10 Thread Thomas Rachel
Am 09.03.2013 22:20 schrieb Νίκος Γκρ33κ: SENDMAIL = '/usr/sbin/sendmail' FROM = mail TO = ['supp...@superhost.gr'] SUBJECT = "Επικοινωνία πιθανού πελάτη!" TEXT = comment mess

Re: This mail never gets delivered. Any ideas why?

2013-03-10 Thread Thomas Rachel
Am 11.03.2013 06:25 schrieb Thomas Rachel: 1. Your subject is not properly encoded. All characters outside the ASCII area must be encoded in an appropriate way if you send an email. It MIGHT be the case that sendmail handles this for you, but probably not every version. Mine not, at least

Re: This mail never gets delivered. Any ideas why?

2013-03-10 Thread Thomas Rachel
Am 11.03.2013 06:47 schrieb Thomas Rachel: # either message.add_header('Subject', email.quoprimime.header_encode(SUBJECT)) # or message.add_header('Subject', email.base64mime.header_encode(SUBJECT)) Sorry! These were completely wrong. # either message

Re: This mail never gets delivered. Any ideas why?

2013-03-11 Thread Thomas Rachel
Am 11.03.2013 10:15 schrieb nagia.rets...@gmail.com: Thank you Thomas but that simple line as i have it now its capable of sending mail successfully Obviously not, otherwise you wouldn't ask, would you? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: This mail never gets delivered. Any ideas why?

2013-03-11 Thread Thomas Rachel
Am 10.03.2013 19:39 schrieb Νίκος Γκρ33κ: Hey man this worked via Python! [...] if( os.system( 'echo "%s" | mail -s "%s" supp...@superhost.gr' % (MESSAGE, FROM) ) ): [...] Thank you! I beleive this is the simplest way of sending an email! Until you get a MESSAGE which

Re: del not working for (exhausted) dict iterable value (Python 3.3)

2013-03-12 Thread Thomas Rachel
Am 12.03.2013 06:52 schrieb alex23: You're effectively doing this: event = dict(Items=[1,2,3]) for e in event['Items']: ... del event['Items'] ... Traceback (most recent call last): File "", line 2, in KeyError: 'Items' You want to move your del statement up an indentation level so i

Re: is "_io.py" missing from 2.7.4 ?

2013-04-08 Thread Thomas Rachel
Am 08.04.2013 15:42 schrieb dbv: Ah, okay. Then on Windows, _io.pyd should be in the /DLLs folder but it isn't there ? It seems to be a built-in module: >>> import _io >>> _io alike to >>> import __builtin__ >>> __builtin__ as opposed to >>> import win32ui >>> win32ui 'C:\Python27\lib\

<    1   2   3