[issue43184] Missing docs for LoggerAdapter manager and name property

2021-02-10 Thread Yoav Palti
New submission from Yoav Palti : I found the following issue which added manager and name properties to logging.LoggerAdapter on version 3.6: https://bugs.python.org/issue31457 However the current docs don't have them documented: https://docs.python.org/3.6/library/logging.html

[issue22567] doctest handle ignored execption

2014-10-06 Thread Yoav Caspi
New submission from Yoav Caspi: When implementing a class with a __del__ function that raise an exception the exception ignored. is it possible to add this printed message to be tested by doc test? something like when running this script the script will pass: Usage Example: cls

[issue1159051] Handle corrupted gzip files with unexpected EOF

2011-09-08 Thread Yoav Weiss
Yoav Weiss yee...@gmail.com added the comment: What is the reason that the currently submitted patch is not good enough and current stage is needs patch? The current patch seem to solve this issue, which is a very common one when dealing with gzip files coming from the Internet. In any case

[issue12439] BaseHTTPServer's send_reponse adds extra \r\n when using HTTPMessage in input

2011-07-04 Thread Yoav Weiss
Yoav Weiss yoav.weiss...@gmail.com added the comment: Thanks for correcting me. I guess I assumed that the message variable is an HTTPMessage. Is send_response documented somewhere? I failed to find a reference. On Sun, Jul 3, 2011 at 9:45 PM, Petri Lehtinen rep...@bugs.python.orgwrote

[issue12439] BaseHTTPServer's send_reponse adds extra \r\n when using HTTPMessage in input

2011-06-29 Thread Yoav Weiss
New submission from Yoav Weiss yoav.weiss...@gmail.com: I'm using BaseHTTPServer's send_response (from within a class that inherits BaseHTTPRequestHandler) with the following: self.send_response(response.code, response.headers) self.end_headers() self.wfile.write(content

Re: Python Go

2009-11-15 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 4:00 AM, Terry Reedy tjre...@udel.edu wrote: Yoav Goldberg wrote: On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy tjre...@udel.edu mailto: tjre...@udel.edu wrote: Paul Rubin wrote: Mark Chu-Carroll has a new post about Go: http://scienceblogs.com

Re: Python Go

2009-11-14 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy tjre...@udel.edu wrote: Paul Rubin wrote: Mark Chu-Carroll has a new post about Go: http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php In a couple of minutes, I wrote his toy prime filter example in Python, mostly

classmethod inheritance

2007-12-12 Thread Yoav Goldberg
for this -- the first method I proposed is a neat hack, and the second is a workaround, but I wouldn't want the first method to be the official way of doing things, and I suspect there are some use cases that can not be implemented as nicely with the second method. Yoav -- http://mail.python.org/mailman/listinfo

for line in file('filename'):

2007-07-24 Thread Yoav Goldberg
I use the idiom for line in file('filename'): do_something(line) quite a lot. Does it close the opened file at the end of the loop, or do I have to explicitly save the file object and close it afterward? Yoav -- http://mail.python.org/mailman/listinfo/python-list

importing a module from a specific directory

2007-07-21 Thread Yoav Goldberg
awkward. Is there a neat clean way of achieving the code organization? How do you organize your code in such settings? Thanks, Yoav -- http://mail.python.org/mailman/listinfo/python-list

defaultdicts pickling

2007-07-14 Thread Yoav Goldberg
can not pickle it. I could ofcourse used a real function and not a lambda, but this would make things (a) somewhat slower and (b) a bit ugly. Is there another way of achieving the same behaviour, that allow for pickling? Thanks, Yoav -- http://mail.python.org/mailman/listinfo/python-list

Re: close failed: [Errno 0] No error goes to stdout

2005-08-30 Thread Yoav
Steve Holden wrote: Yoav wrote: I run a Java command line program. The point is, that it's not the program that output this error message for sure. And I don't expect popen3() to catch and report errors. I just want to keep my screen output clean, and I expect popen3() to run the program

Re: close failed: [Errno 0] No error goes to stdout

2005-08-29 Thread Yoav
to the screen, after all as I understood it is supposed to capture STDERR and STDOUT, but maybe I didn' t understand it right (it's quite probable). Anyway anyway I can do such a thing? Thanks. Peter Hansen wrote: Yoav wrote: I use the following code to the console output: def get_console(cmd

close failed: [Errno 0] No error goes to stdout

2005-08-28 Thread Yoav
I use the following code to the console output: def get_console(cmd): try: p_in, p_out, p_err = os.popen3(cmd) except: pass out_str = '' for obj in p_out: out_str = out_str + obj for obj in p_err:

RE Despair - help required

2005-08-25 Thread Yoav
I am trying the following: re.search(r'\\[^\\]+(?=(?$))', c:\ret_files) and I get a return of NoneType, and I have no idea why. I know that I missing something here, but I really can't figure out why (I bet it's something obvious). I also tried this RE on KODOS and it works fine there, so I

Re: Getting rid of close failed: [Errno 0] No Error on Win32

2005-08-25 Thread Yoav
Ok , I tried: try: os.popen3(...) except: as someone suggested here. And on FreeBSD I don't get the error message, and it works great. However, on Win32 I do get the annoying message. Any idea why? And How I can make it go away? thanks. Yoav wrote: I am using os.popen3 to call

Re: RE Despair - help required

2005-08-25 Thread Yoav
Thanks guys. Issue solved. I am also going to give Microsoft a call about it. Any other issues you want me to raise while I am talking to them? Cheers. Robert Kern wrote: Yoav wrote: I am trying the following: re.search(r'\\[^\\]+(?=(?$))', c:\ret_files) and I get a return of NoneType

Re: RE Despair - help required

2005-08-25 Thread Yoav
Don't think it will do much good. I need to get them from a file and extract the last folder in the path. For example: if I get c:\dos\util I want to extract the string \util Fredrik Lundh wrote: Yoav wrote: I am trying the following: re.search(r'\\[^\\]+(?=(?$))', c:\ret_files) and I

Re: RE Despair - help required

2005-08-25 Thread Yoav
Thank you all guys. It seems like the simpler the solution, the more I am happy about it. Sorry, for the simple question, I am quite new to this lang. Cheers. Robert Kern wrote: Yoav wrote: Don't think it will do much good. I need to get them from a file and extract the last folder

Variables in REs

2005-08-24 Thread Yoav
Anyway to set variables in REs. Meaning: I have the RE re.compile(r'/[^/]*') for example and I want to use it on both Win32 machines and Unix machnes. Meaning tha tI need to be able to control the '/' before compiling. I want to create and if and decide what the system is and then put the right

Re: Variables in REs

2005-08-24 Thread Yoav
Such a sweet and simple way. Thanks. tooper wrote: Use os.sep to get / or \ or whatever character used to build pathes on the os you're working on -- http://mail.python.org/mailman/listinfo/python-list

Getting rid of close failed: [Errno 0] No Error on Win32

2005-08-24 Thread Yoav
I am using os.popen3 to call a console process and get its output and stderr. However on Win32 (and not OS X) I also get the Errno message. It's printed to the screen, which I wish to keep clean. How can disable this notification? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Running multiple console processes and watching their output

2005-08-22 Thread Yoav
I need to run multiple console apps in the background and to watch their output. I have no idea if this is possible, and I don't even know where to start looking. The processes are watchers, meaning that they watch folders and mail boxes and do operations on items in them . Essentially these

Re: Uploading images to imageshack.us with Python

2005-08-22 Thread Yoav
I would love a script to upload images to Imageshack.us. Any chance you can post the latest version or email it to me? Thanks. Ricardo Sanchez wrote: I forgot to add that I'm behind a proxy, but I think that is irrelevant. If you are not behind a proxy replace this line: print

RE vs. SRE

2005-08-21 Thread Yoav
What is the difference between the two? Which on is better to use and why? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

RE Question

2005-08-18 Thread Yoav
I don't understand why the two REs produce a different result. I read the RE guide but still I can't seem to figure it out. t 'echo user=name password=pass path=/ret files\r\n' re.findall(r'(?=\s)[^=]+=((?:.*)|(?:\S*))(?=\s)', t) ['name', 'pass', '/ret files']

Re: RE Question

2005-08-18 Thread Yoav
Thanks, it seems like the first answer covers the second as well. Thank you. Jorge Godoy wrote: Yoav wrote: I don't understand why the two REs produce a different result. I read the RE guide but still I can't seem to figure it out. t 'echo user=name password=pass path=/ret files\r\n

Re: RE Question

2005-08-18 Thread Yoav
What is the difference between the RE module and the SRE one? Original Message From: Jorge Godoy [EMAIL PROTECTED] To: Subject: Re:RE Question Date: 18/8/2005 17:44 Yoav wrote: I don't understand why the two REs produce a different result. I read the RE guide but still I