Re: [Python-Dev] Deprecation policy
On Tue, Nov 29, 2011 at 02:46:06PM +0200, Petri Lehtinen wrote: Michael Foord wrote: We tend to see 3.2 - 3.3 as a major version increment, but that's just Python's terminology. Even though (in the documentation) Python's version number components are called major, minor, micro, releaselevel and serial, in this order? So when the minor version component is increased it's a major version increment? :) When the major version component is increased it's a World Shattering Change, isn't it?! ;-) Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] reading multiline output
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Dec 22, 2011 at 04:40:32PM +0530, Mac Smith wrote: I have started HandBrakeCLI using subprocess.popen but the output is multiline and not terminated with \n so i am not able to read it using readline() while the HandBrakeCLI is running. kindly suggest some alternative. i have attached the output in a file. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] descriptor as instance attribute
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Tue, Jan 10, 2012 at 01:32:13AM +1100, Jon Wells wrote: I can't find an answer to this grovelling through get user info. on descriptors. Read carefully http://users.rcn.com/python/download/Descriptor.htm Assuming desc() is a data descriptor class why are the following not the same??? class poop(object): var = desc() and class poop(object): def __init__(self): self.var = desc() In the second form the descriptor protocol for access to 'var' is ignored. From http://users.rcn.com/python/download/Descriptor.htm: ...transforms b.x into type(b).__dict__['x'].__get__(b, type(b)).. Please note the first type(b). Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python C API: Problem sending tuple to a method of a python Class
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Mon, Jan 09, 2012 at 03:46:04PM +0100, paspa...@noos.fr wrote: BODYHello,brbrI am trying to send a tuple to a method of a python class Also please don't send html-only mail. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python C API: Problem sending tuple to a method of a python Class
On Wed, Jan 11, 2012 at 03:52:07PM +0100, Antoine Pitrou wrote: On Wed, 11 Jan 2012 02:09:02 +0100 Martin v. L?wis mar...@v.loewis.de wrote: b) suggests that people are not too tired in actually typing in this message every now and then. I suspect one of them doesn't actually *type* the message ;) Certainly, no. :0r mail/misc/python-dev And even this command is in vim history, I don't type it, just press :0UpUpUp ;-) Sometimes I add something useful to the OP but this time I didn't - I just haven't got any helpful information. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] #include Python.h
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Sun, Jan 29, 2012 at 03:34:38PM +, Andrea Crotti wrote: I have a newbie question about CPython. Looking at the C code I noted that for example in tupleobject.c there is only one include #include Python.h Python.h actually includes everything as far as I can I see so: - it's very hard with a not-enough smart editor to find out where the not-locally defined symbols are actually defined (well sure that is not a problem for most of the people) - if all the files include python.h, doesn't it generate very big object files? Or is it not a problem since they are stripped out after? Thanks, Andrea Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] steps to solve bugs
On Thu, Mar 08, 2012 at 06:39:42PM +0530, Ejaj Hassan wrote: I am a novice python programmer and am learning to be able to solve some issues. Well following the steps given in the PSF website, I have installed vc++ 2008 and even finished till building the cpython code and I have got the console for python 3.0x Having done this, I am not able to quite follow the further steps to solve the bugs . Currently I am wondering in the issues tracker though not still working on it. Are you debugging the Python core, the standard Python library or your own code written in Python? Except for the core you don't need to recompile the Python interpreter - just download ready one. If you are debugging your own code - this mailing list is a wrong place to look for help. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Playing with a new theme for the docs
On Wed, Mar 21, 2012 at 09:33:13AM +, Jonathan Hartley wrote: On 21/03/2012 08:25, Dirkjan Ochtman wrote: On Wed, Mar 21, 2012 at 07:00, Georg Brandlg.bra...@gmx.net wrote: OK, that seems to be the main point people make... let me see if I can come up with a better compromise. Would it be possible to limit the width of the page? On my 1920px monitor, the lines get awfully long, making them harder to read. I realise this is bikeshedding by now, but FWIW, please don't. If people want shorter lines, they can narrow their browser, without forcing that preference on the rest of us. Seconded. My display is 1920x1200 but I use very large fonts and I'm satisfied with line lengths. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Playing with a new theme for the docs
On Tue, Mar 20, 2012 at 11:38:53PM +0100, Georg Brandl wrote: recently I've grown a bit tired of seeing our default Sphinx theme, especially as so many other projects use it. I decided to play around with something clean this time, and this is the result: http://www.python.org/~gbrandl/build/html/ Looks very nice! A few notes, if you don't mind. 1. I'd prefer a little bit bigger fonts. 2. IWBN IMHO to extend the grayish background of the navigation bar at the left to the bottom of the page. White space below short boxes looks strange for me. 3. A lot of small adjacent code snippets with a different background make my eyes hurt. See for example the note number 5 at http://www.python.org/~gbrandl/build/html/library/stdtypes.html#sequence-types-str-bytes-bytearray-list-tuple-range I'd like inline code snippets to have the same background. Bold font and/or a different foreground color would be better, in my opinion. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Playing with a new theme for the docs
On Wed, Mar 21, 2012 at 02:40:04PM -0400, Ned Batchelder wrote: You can use Ctrl-+ to increase the size of the text, and modern browsers remember that for the next time you visit the site. Browsers usually remember the setting for the entire site, not only documentation. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Playing with a new theme for the docs, iteration 2
On Sun, Mar 25, 2012 at 08:34:44AM +0200, Georg Brandl wrote: http://www.python.org/~gbrandl/build/html2/ Perfect! I like it! Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Wed, Apr 04, 2012 at 05:47:16PM +0200, Lennart Regebro wrote: On Tue, Apr 3, 2012 at 18:07, Ethan Furman et...@stoneleaf.us wrote: What's unclear about returning None if no clocks match? Nothing, but having to check error values on return functions are not what you typically do in Python. Usually, Python functions that fail raise an error. Absolutely. Errors should never pass silently. Please don't force Python users to write pseudo-C code in Python. +1. Pythonic equivalent of get_clock(THIS) or get_clok(THAT) is for flag in (THIS, THAT): try: clock = get_clock(flag) except: pass else: break else: raise ValueError('Cannot get clock, tried THIS and THAT') Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Wed, Apr 04, 2012 at 11:03:02AM -0700, Ethan Furman wrote: Oleg Broytman wrote: . Pythonic equivalent of get_clock(THIS) or get_clok(THAT) is for flag in (THIS, THAT): try: clock = get_clock(flag) except: pass else: break else: raise ValueError('Cannot get clock, tried THIS and THAT') Wow -- you'd rather write nine lines of code instead of three? clock = get_clock(THIS) or get_clock(THAT) if clock is None: raise ValueError('Cannot get clock, tried THIS and THAT') Yes - to force people to write the last two lines. Without forcing most programmers will skip them. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Wed, Apr 04, 2012 at 12:52:00PM -0700, Ethan Furman wrote: Oleg Broytman wrote: On Wed, Apr 04, 2012 at 11:03:02AM -0700, Ethan Furman wrote: Oleg Broytman wrote: . Pythonic equivalent of get_clock(THIS) or get_clok(THAT) is for flag in (THIS, THAT): try: clock = get_clock(flag) except: pass else: break else: raise ValueError('Cannot get clock, tried THIS and THAT') Wow -- you'd rather write nine lines of code instead of three? clock = get_clock(THIS) or get_clock(THAT) if clock is None: raise ValueError('Cannot get clock, tried THIS and THAT') Yes - to force people to write the last two lines. Without forcing most programmers will skip them. Forced? I do not use Python to be forced to use one style of programming over another. Then it's strange you are using Python with its strict syntax (case-sensitivity, forced indents), ubiquitous exceptions, limited syntax of lambdas and absence of code blocks (read - forced functions), etc. And it's not like returning None will allow some clock calls to work but not others -- as soon as they try to use it, it will raise an exception. There is a philosophical distinction between EAFP and LBYL. I am mostly proponent of LBYL. Well, I am partially retreat. Errors should never pass silently. Unless explicitly silenced. get_clock(FLAG, on_error=None) could return None. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Thu, Apr 05, 2012 at 10:06:38PM +0900, Stephen J. Turnbull wrote: On Thu, Apr 5, 2012 at 8:05 AM, Oleg Broytman p...@phdru.name wrote: Well, I am partially retreat. Errors should never pass silently. Unless explicitly silenced. get_clock(FLAG, on_error=None) could return None. I still don't see what's erroneous about returning None when asked for an object that is documented to possibly not exist, ever, in some implementations. Isn't that precisely why None exists? Why doesn't open() return None for a non-existing file? or socket.gethostbyname() for a non-existing name? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Thu, Apr 05, 2012 at 11:45:06PM +0900, Stephen J. Turnbull wrote: On Thu, Apr 5, 2012 at 10:34 PM, Oleg Broytman p...@phdru.name wrote: Why doesn't open() return None for a non-existing file? or socket.gethostbyname() for a non-existing name? That's not an answer to my question, because those calls have very important use cases where the user knows the object exists (and in fact in some cases open() will create it for him), so that failure to exist is indeed a (user) error (such as a misspelling). I find it hard to imagine use cases where file = open(thisfile) or open(thatfile) makes sense. Not even for the case where thisfile == 'script.pyc' and thatfile == 'script.py'. Counterexamples - any configuration file: a program looks for its config at $HOME and not finding it there looks in /etc. So config = open('~/.someprogram.config') or open('/etc/someprogram/config') would make sense. The absence of any of these files is not an error at all - the program just starts with default configuration. So if the resulting config in the code above would be None - it's still would be ok. But Python doesn't allow that. Some configuration files are constructed by combining a number of user-defined and system-defined files. E.g., the mailcap database. It should be something like combined_database = [db for db in ( open('/etc/mailcap'), open('/usr/etc/mailcap'), open('/usr/local/etc/mailcap'), open('~/.mailcap'), ) if db] But no way - open() raises IOError, not return None. And I think it is the right way. Those who want to write the code similar to the examples above - explicitly suppress exceptions by writing wrappers. The point of the proposed get_clock(), OTOH, is to ask if an object with certain characteristics exists, and the fact that it returns the clock rather than True if found is a matter of practical convenience. Precisely because clock = get_clock(best) or get_clock(better) or get_clock(acceptable) does make sense. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Thu, Apr 05, 2012 at 07:22:17PM +0400, Oleg Broytman wrote: On Thu, Apr 05, 2012 at 11:45:06PM +0900, Stephen J. Turnbull wrote: find it hard to imagine use cases where file = open(thisfile) or open(thatfile) makes sense. Not even for the case where thisfile == 'script.pyc' and thatfile == 'script.py'. Counterexamples - any configuration file: a program looks for its config at $HOME and not finding it there looks in /etc. So config = open('~/.someprogram.config') or open('/etc/someprogram/config') would make sense. A counterexample with gethostbyname - a list of proxies. It's not an error if some or even all proxies in the list are down - one just connect to the first that's up. So a chain like proxy_addr = gethostbyname(FIRST) or gethostbyname(SECOND) would make sense. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Thu, Apr 05, 2012 at 11:38:13AM -0400, R. David Murray wrote: Do you really think we need to add a third clock function (the query function) that just returns True or False? Maybe we do, if actually creating the clock could raise an error even if exists, as is the case for 'open'. May be we do. Depends on the usage patterns. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
On Thu, Apr 05, 2012 at 11:56:00AM -0700, Ethan Furman wrote: It's only an error if it's documented that way and, more importantly, thought of that way. The re module is a good example: if it can't find what you're looking for it returns None -- it does *not* raise a NotFound exception. But open() raises IOError. ''.find('a') returns -1 but ''.index('a') raises ValueError. So we can argue in circles both ways, there are too many arguments pro and contra. Python is just too inconsistent to be consistently argued over. ;-) Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] an alternative to embedding policy in PEP 418
On Fri, Apr 06, 2012 at 11:57:20AM +0900, Stephen J. Turnbull step...@xemacs.org wrote: What I want to know is why you're willing to assert that absence of a clock of a particular configuration is an Exception, when that absence clearly documented to be a common case? An error or not an error depends on how people will use the API. I usually don't like error codes -- people tend to ignore them or check lazily. If some library would do (get_clock(THIS) or get_clock(THAT)).clock() I want to get a clearly defined and documented clock-related error, not some vague AttributeError: 'NoneType' object has no attribute 'clock'. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [RFC] PEP 418: Add monotonic time, performance counter and process time functions
On Mon, Apr 16, 2012 at 12:38:41PM +0200, Victor Stinner victor.stin...@gmail.com wrote: Bikeshedding is maybe a common issue with the discussion around time function? :-) Perhaps because everyone of us lives in a different Time-Space Continuum? ;-) Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] cpython: Fix #14600. Correct reference handling and naming of ImportError convenience
On Wed, Apr 18, 2012 at 09:19:03PM +1000, Nick Coghlan ncogh...@gmail.com wrote: On Wed, Apr 18, 2012 at 7:57 AM, brian.curtin python-check...@python.org wrote: diff --git a/Python/errors.c b/Python/errors.c --- a/Python/errors.c +++ b/Python/errors.c @@ -586,50 +586,43 @@ + args = PyTuple_New(1); + if (args == NULL) +return NULL; + + kwargs = PyDict_New(); + if (args == NULL) +return NULL; Shouldn't the second test be if (kwargs == NULL) ??? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Suggested addition to PEP 8 for context managers
On Thu, Apr 19, 2012 at 11:15:38AM -0400, Barry Warsaw ba...@python.org wrote: On Apr 19, 2012, at 11:00 AM, ??ric Araujo wrote: +- If operators with different priorities are used, consider adding + whitespace around the operators with the lowest priority(ies). This + is very much to taste; however, never use more than one space, and + always have the same amount of whitespace on both sides of a binary + operator. Does ???this is very much to taste??? means that it???s a style judgment where each team or individual may make different choices? I???m not a native speaker and I???m not sure about the intended meaning. If I change that phrase to Use your own judgement does that help? Yes, in my opinion. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] netiquette on py-dev
On Tue, Apr 24, 2012 at 01:46:51PM -0700, Ethan Furman et...@stoneleaf.us wrote: When responding to posts, should the poster to whom I am responding be listed as well as python-dev, or should my responses just go to python-dev? I reply to list only, except when I want extra attention (e.g. when I direct people to comp.lang.python). My MUA has 3 reply commands - reply to the author, group reply (reply to all) and list reply (mailing lists are configured) so it's easy for me to choose which way I'm replying. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Debian wheezy, amd64: make not finding files for bz2 and other packages
On Fri, May 04, 2012 at 02:07:28PM -0400, Edward C. Jones edcjo...@comcast.net wrote: From the Debian website, I got the list of all the files in these three packages: Don't know about amd64 arch, sorry. You can list content of a package from command line: dpkg [-L|--listfiles] libbz2-dev Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 3.3 cannot import BeautifulSoup but Python 3.2 can
On Mon, May 07, 2012 at 04:42:50PM -0400, Edward C. Jones edcjo...@comcast.net wrote: I use up-to-date Debian testing (wheezy), amd64 architecture. I compiled and installed Python 3.3.0 alpha 3 using altinstall. Debian wheezy comes with python3.2 (and 2.6 and 2.7). I installed the Debian package python3-bs4 (BeautifulSoup4 for Python3). I also downloaded a clone developmental copy of 3.3. Python3.3a3 cannot find module bs4. Could it be bs4 is installed in python3.2-specific path and hence it's not in python3.3 sys.path? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] How to build a browser in Paython. cannot import webkit object.
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Sat, May 26, 2012 at 09:42:23PM +0900, Mr.T Beppu anf...@gmail.com wrote: I think that I will make a browser in Official Python (not MacPorts Python). What should I do in order to install Webkit for Official Python (not MacPorts Python) ? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Cannot find the main Python library during installing some app.
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Jun 21, 2012 at 01:43:37AM -0700, Van Gao gaof...@126.com wrote: ERROR! You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. This is the key. You have to install the development version of the Python package *for your distribution*, not python from sources. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] import too slow on NFS based systems
On Thu, Jun 21, 2012 at 01:17:01PM +0300, Daniel Braniss da...@cs.huji.ac.il wrote: when lib/python/site-packages/ is accessed via NFS, open/stat/access is very expensive/slow. A simple solution is to use an in memory directory search/hash, so I was wondering if this has been concidered in the past, if not, and I come with a working solution for Unix (at least Linux/Freebsd) will it be concidered. I'm sure it'll be considered providing that the solution doesn't slow down local FS access. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Add os.path.resolve to simplify the use of os.readlink
On Thu, Jun 21, 2012 at 11:10:44AM -, Armin Ronacher armin.ronac...@active-4.com wrote: would have to check the POSIX spec for a reasonable value POSIX allows 8 links: http://infohost.nmt.edu/~eweiss/222_book/222_book/0201433079/ch02lev1sec5.html _POSIX_SYMLOOP_MAX - number of symbolic links that can be traversed during pathname resolution: 8 The constant _POSIX_SYMLOOP_MAX from unistd.h: #define _POSIX_SYMLOOP_MAX 8 Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] os.path.exists() / os.path.isdir() inconsistency when dealing with gvfs directories
On Wed, Jun 27, 2012 at 01:49:34AM +0200, Giampaolo Rodol? g.rod...@gmail.com wrote: I've just noticed a strange behavior when dealing with gvfs filesystems: giampaolo@ubuntu:~$ python -c import os; print(os.path.exists('/home/giampaolo/.gvfs')) True giampaolo@ubuntu:~$ sudo su root@ubuntu:~# python -c import os; print(os.path.exists('/home/giampaolo/.gvfs')) False This is due to os.stat() which internally fails with PermissionError (EACCES). BTW, the same is true for FUSE when an FS has been mounted without something like -o allow_other or -o allow_root: root@nb # ls /home/phd/mnt/net ls: cannot access /home/phd/mnt/net: Permission denied Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Bitbucket mirror?
On Thu, Jun 28, 2012 at 06:42:46PM +0100, Tim Golden m...@timgolden.me.uk wrote: Just recently I'm sure I saw a post saying that the main Python repo was mirrored on bitbucket.org for the convenience of developers who could then fork to their own accounts. For the life of me I can't find it now. Can someone confirm and/or nudge me in the right direction, please? This one? https://bitbucket.org/mirror/python-py3k Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Access a function
Hello. We'are sorry but we cannot help you. This mailing list is to work on developing Python (fixing bugs and adding new features to Python itself); if you're having problems using Python, please find another forum. Probably python-list (comp.lang.python) news group/mailing list is the best place. See http://www.python.org/community/lists/ for other lists/news groups/fora. Thank you for understanding. On Mon, Jun 28, 2010 at 11:09:35AM -0700, Zohair wrote: I am a very new to python and have a small question.. I have a function: set_time_at_next_pps(self, *args, **kwargs) but don't know how to use it... Askign for your help please. Cheers, Zoh -- View this message in context: http://old.nabble.com/Access-a-function-tp29008798p29008798.html Sent from the Python - python-dev mailing list archive at Nabble.com. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/phd%40phd.pp.ru Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library
On Mon, Jul 12, 2010 at 03:48:12PM -0400, Glyph Lefkowitz wrote: I feel your pain. It seems like every third person who starts playing with Twisted starts off by making a file called 'twisted.py' and then getting really confused by the behavior. I would love it if this could be fixed, but I haven't yet thought of a solution that would be less confusing than the problem itself. Doesn't absolute import help? Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with executing python interpretetor on special build of win server 2003
Hello. We'are sorry but we cannot help you. This mailing list is to work on developing Python (fixing bugs and adding new features to Python itself); if you're having problems using Python, please find another forum. Probably python-list (comp.lang.python) news group/mailing list is the best place. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Tue, Jul 13, 2010 at 03:20:02PM +0700, Бажен Ржеутский wrote: Hello. Actual problem in the next, when i trying to execute portable python on my build then nothing happens, and the error code is 128. What does mean this code 128? ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/phd%40phd.pp.ru Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Removing IDLE from the standard library
On Thu, Jul 15, 2010 at 09:23:06AM +1000, Nick Coghlan wrote: I use tabbed editors all the time (Kate, Notepad++) and find them to be excellent. Tastes will obviously vary though, since there are even people out there that use vim and emacs voluntarily ;) Sorry for being a wet blanket but vim implements tabbed windows even in console (text) mode. (-: Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python signal processing question
Hello. We'are sorry but we cannot help you. This mailing list is to work on developing Python (fixing bugs and adding new features to Python itself); if you're having problems using Python, please find another forum. Probably python-list (comp.lang.python) news group/mailing list is the best place. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. Regarding SIGKILL - read man kill carefully. Or better yet, a Unix programmer guide. On Mon, Jul 19, 2010 at 12:11:10PM -0400, Scott McCarty wrote: All, I have searched everywhere (mostly the code and a little google) and I cannot understand where the SIGKILL signal gets checked when it is set as a handler. I have scoured the Modules/signalmodule.c only to find two instances of the RuntimeError exception, but I cannot understand how python knows when a handler is set for SIGKILL. I understand that this changed in 2.4 and I am not trying to change it, I just really want to understand where this happens. I used grep to find SIGKILL and SIGTERM to see if I could determine where the critical difference is, but I cannot figure it out. I have about 2 hours of searching around and I can't figure it out, I assume it has to rely on some default behaviour in Unix, but I have no idea. I don't see a difference between SIGKILL and SIGTERM in the python code, but obviously there is some difference. I understand what the difference is in Unix/Linux, I just want to see it in the python code. Since python is checking at run time to see what signals handlers are added, I know there must be a difference. Please can someone just point me in the right direction. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python signal processing question
On Mon, Jul 19, 2010 at 01:09:36PM -0400, Scott McCarty wrote: I apologize if this is the wrong place to ask questions about Python C code, but I didn't know where else to turn. I don't think the regular user group will be technical enough to find this, am I wrong? I am sure there are quite a lot of skilled professionals in the python-list (comp.lang.python). On Mon, Jul 19, 2010 at 12:27 PM, Oleg Broytman p...@phd.pp.ru wrote: python-list (comp.lang.python) news group/mailing list is the best place. See http://www.python.org/community/ for other lists/news groups/fora. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python-dev signal-to-noise processing question
On Mon, Jul 19, 2010 at 04:08:00PM -0600, average wrote: Wha? How could this not be the right place? He's not asking about USING python, but asking: WHERE in the PYTHON CODE BASE does the signal get checked? A-bit-miffed-at-the-cold-shoulderly yours, Marcos (wink wink) I know, the task of sending answers like I've sent is quite unappreciated. I know, the meaning of my answer is rude because, in short, it's simply Please, go away, and however I stress the please part it's still go away. If I were a help seeker it'd be quite a hard blow for me to receive such an answer. Yes, I know. Still, two other alternatives are even worse. The first alternative is to not answer using questions at all; quite rude. The second is answer all questions and make the developers quit the list and found a new quiet one. I don't see any other alternative, do you? Of those three - which one do you prefer? The original question was about using python, that's my understanding. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python-dev signal-to-noise processing question
On Tue, Jul 20, 2010 at 01:51:07PM -0400, Terry Reedy wrote: On 7/20/2010 6:59 AM, Oleg Broytman wrote: 1. I suggested one improvement to the canned response in my previous post: expand 'using' to 'using or understanding'. I changed wording to if you're having problems learning, understanding or using Python 2. Here is another: mention that Python developers who are willing to answer non-development questions already participate on python-list/gmane.comp.python.general to answer such questions there. Good addition, thank you! I'll add something like there are Python developers who participate on python-list/comp.lang.python. 3. That brings up: also mention gmane.comp.python.general, for those like me who prefer the newsgroup interface. It is referenced at http://www.python.org/community/lists/ and my text points to http://www.python.org/community/; I think it's enough. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] What to do with languishing patches?
On Tue, Jul 20, 2010 at 02:53:53PM -0400, Alexander Belopolsky wrote: Have you ever cursed these extra clever address forms that make you select a state from a drop-down list of 50 if not a country from the list of 100+? Well, I have never, because in any of these drop-down lists I can press a few first letters of the name and the cursor jumps to the country. I often select countries in such lists in web browsers. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] What to do with languishing patches?
On Tue, Jul 20, 2010 at 03:13:41PM -0400, Alexander Belopolsky wrote: On Tue, Jul 20, 2010 at 3:05 PM, Oleg Broytman p...@phd.pp.ru wrote: .. Well, I have never, because in any of these drop-down lists I can press a few first letters of the name and the cursor jumps to the country. I often select countries in such lists in web browsers. Really? What smartphone are you using? :-) Are you developing an interface for smartphones? Wouldn't it hurt usability for desktops/notebooks? Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] What to do with languishing patches?
On Tue, Jul 20, 2010 at 04:27:45PM -0400, Alexander Belopolsky wrote: On Tue, Jul 20, 2010 at 3:38 PM, Oleg Broytman p...@phd.pp.ru wrote: .. Really? What smartphone are you using? :-) Are you developing an interface for smartphones? Wouldn't it hurt usability for desktops/notebooks? You missed the smiley in my response. I am a well-known wet blanket. (-: But seriously, I do find the interfaces that work well on smartphones to improve usability for desktops/notebooks. Sometimes they do and sometimes they don't. Big screen(s) and a wheeled multi-button mouse allow quite a different interface compared to small screen and single-finger taps. Back on the topic, I don't think a drop-down list of all modules is workable even in browsers that display them as combo boxes. How many modules do we have in std lib? About 100? Maybe more. What if the bug affects several modules? What if the patch modifies several modules? Do we want to allow selection of multiple modules for the given issue? The components window is already hard to use if you want to select say both Extension Modules and Windows. This is with just about 20 entries. Imagine over 100 entries there. In this particular case I'd rather tend to agree - an editable single-line box to enter space-*and*-comma-separated modules list would be the best interface. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python-dev signal-to-noise processing question
On Wed, Jul 21, 2010 at 07:28:24PM -0600, average wrote: As to your question of how best to handle inquiries from the blue or noisy questions, I personally prefer the following (only slightly tongue-in-cheek): ...After a sufficient period of waiting, say a day or two with no response: Ok, I'll wait a bit longer. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python-dev signal-to-noise processing question
On Thu, Jul 22, 2010 at 06:02:33PM +0900, Stephen J. Turnbull wrote: Oleg Broytman writes: On Wed, Jul 21, 2010 at 07:28:24PM -0600, average wrote: As to your question of how best to handle inquiries from the blue or noisy questions, I personally prefer the following (only slightly tongue-in-cheek): ...After a sufficient period of waiting, say a day or two with no response: Ok, I'll wait a bit longer. I don't think that's a good idea. It just encourages people to give a response on python-dev plus follow-ups, and if they give an answer without saying you'd better ask this on comp.lang.python, when you do, you look like a netcop rather than being helpful. Yes, that's a kind of a problem. Not a big one - I live in the wrong time zone and can afford to wait a few hours. Certainly not a few days. The mail you originally sent was sufficiently polite and clear IMO, but anything can be improved and I'm glad you took up the suggestions on the wording. OTOH I think as quick as possible an answer is a good idea here. It saves the intended audience the thought about whether to reply or not, and an instant, constructive answer says that somebody cares. The message should be The people who will answer your question on python-dev are also on comp.lang.python, as well as many more (you may get a faster, and probably more complete, answer on comp.lang.python). The people on python-dev don't need to see the answer (they already know it), but the people on comp.lang.python are likely to be happy to learn it. Thank you. I'll think how to add something like this so that my boilerplate wouldn't become too big, Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Compiling Free Cad on Rhel5
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. python-devel should be a package in your distribution - check the list of packages. On Wed, Jul 28, 2010 at 04:51:47PM +0530, Vikas Mahajan wrote: Hello to all..Today I was trying to install FreeCAD 0.10 from its source code. I am using RHEL5. I have firstly installed python2.6.5 from source and also tested it. Python is working fine. But when I try to compile FreeCAD 0.10, I got following configure error : #./configure --with-python-include=/usr/local/include/python2.6 --with-python-lib=/usr/local/lib/python2.6 - checking for a Python interpreter with version = 2.5... python checking for python... /usr/local/bin/python checking for python version... 2.6 checking for python platform... linux2 checking for python script directory... ${prefix}/lib/python2.6/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.6/site-packages checking Python.h usability... yes checking Python.h presence... yes checking for Python.h... yes checking for libpython2.6... no configure: error: Cannot find Python2.6 devel files. -- I also searched internet for python-devel source code but was unable to find any such pacage. Please help me to resolve this python error. Thanks Vikas Mahajan Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Best practice for new namespace (from C/API)
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. Though I must admit the question is deeper than usual. On Thu, Jul 29, 2010 at 08:11:39AM +1000, Campbell Barton wrote: - Whats the best way to manage the namespace for running multiple scripts one after another? clear and initialize __main__'s dict each time?, keep a copy and restore it after each run? - should the original __main__ namespace be restored after running a script? - pickle expects: __import__(__main__).__dict__ == ***the current namespace***, is this apart of the python spec or just something specific to pickle? - PyDict_SetItemString(d, __builtins__, PyEval_GetBuiltins()) acts differently to PyDict_SetItemString(dict, __builtins__, PyImport_AddModule(builtins)), using the PyEval_GetBuiltins() dict adds every member of __builtins__ when running: print(__import__(__main__).__dict__.keys()), rather then just showing __builtins__. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] unexpected import behaviour
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Jul 29, 2010 at 07:32:28AM +0100, Daniel Waterworth wrote: class Test: pass def test_1(): import test print Test == test.Test if __name__ == '__main__': test_1() and then run it ($ python test.py), it'll print False. The problem is that when you run the code as a script it is imported as module __main__; when you import it as 'test' you get the second copy of the module. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Basic Information about Python
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Fri, Jul 30, 2010 at 05:48:45PM +0530, Durga D wrote: Hi All, I am new to python based application developement. I am using Windows XP. 1. Can I create desktop application (just hello world program) with Python language like exe in VC++? 2. If First statement is Yes, Can I include this application with my existing setup(assume 10 MB) for windows? 3. If Second statement is Yes, What will be the setup size? Thank in advance. Regards, Durga. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] unexpected import behaviour
On Fri, Jul 30, 2010 at 07:26:26AM +0100, Daniel Waterworth wrote: @Oleg: ... This is purely CPython bug-fixing/the discussion of implementation choices. I am not sure it's a bug. By manipulating sys.path (or symlinks in the FS) one can import the same file as different modules as many times as [s]he wants. Should this be fixed for __main__? I doubt it. Instead of making __main__ a special case follow the rule: don't import the same module under different paths/names. Make your script simply from test import main main() Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] unexpected import behaviour
On Fri, Jul 30, 2010 at 07:46:44PM +0100, Daniel Waterworth wrote: can anyone think of a case where someone has been annoyed that, having imported that same module twice via symlinks, they have had problems relating to modules being independent instances? I've had problems with two instances of the same module imported after sys.path manipulations. Never had a problem with reimported scripts. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Metadata: charset (was: PEP 376 proposed changes for basic plugins support)
On Sun, Aug 01, 2010 at 10:37:47PM +0200, Tarek Ziad? wrote: The file is a CSV file In what encoding (charset)? I quickly skimmed over PEPs 262, 241, 314 and 376, but didn't encountered any mention of the words encoding or charset. Documentation for the csv module also doesn't provide any clear indication of encoding/charset. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Metadata: charset
On Mon, Aug 02, 2010 at 12:11:06AM +0200, Tarek Ziad? wrote: On Sun, Aug 1, 2010 at 11:58 PM, Oleg Broytman p...@phd.pp.ru wrote: On Sun, Aug 01, 2010 at 10:37:47PM +0200, Tarek Ziad? wrote: The file is a CSV file In what encoding (charset)? I quickly skimmed over PEPs 262, 241, 314 and 376, but didn't encountered any mention of the words encoding or charset. Documentation for the csv module also doesn't provide any clear indication of encoding/charset. utf-8. I'll add this info in PEP 376 -- Thanks Thank you for the clarification! Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] OT: PHB (was: Looking after the buildbots)
On Thu, Aug 05, 2010 at 07:49:31AM -0400, Steve Holden wrote: I'd have thought a pre-requisite for being a PHB was having hair. Not at all, not at all - being a PHB is a style of thinking, not hairdressing. ;) Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Working on the Python code-base with a VIM-based setup
On Wed, Sep 01, 2010 at 06:41:00AM +0300, Eli Bendersky wrote: I would like to ask those of you working on Python's code with VIM about your setups - the special tweaks to VIM plugins you use to make working with the code as simple and effective as possible. You have already seen Misc/Vim directory in Python distribution, have you? Shameless plug: look at my .vimrc and plugins: http://phd.pp.ru/Software/dotfiles/vimrc.html http://phd.pp.ru/Software/dotfiles/vim/ Borrow whatever you find useful. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Volunteer help with porting
Hello. Thank you for the offer! On Tue, Sep 07, 2010 at 06:36:10PM +0530, Prashant Kumar wrote: My name is Prashant Kumar and I wish to contribute to the Python development process by helping convert certain existing python over to python3k. Is there anyway I could obtain a list of libraries which need to be ported over to python3k, sorted by importance(by importance i mean packages which serve as a dependency for larger number of packages being more important). As there is already Python 3.2 alpha, the core of Python has already been ported - and this mailing list is for discussion of development of the very Python, not about working on 3rd-party libraries. I don't know if there are near core unported libraries that the core team would want to be ported. Hence the question belongs rather to python generic news groups/mailing lists/fora. See http://www.python.org/community/ . As for my personal preferences - I would like to see these ported: -- database drivers, especially MySQL-python and psycopg; -- GUI frameworks, especially wxPython. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Volunteer help with porting
On Tue, Sep 07, 2010 at 02:02:59PM -, exar...@twistedmatrix.com wrote: On 01:33 pm, p...@phd.pp.ru wrote: As there is already Python 3.2 alpha, the core of Python has already been ported How about the email package? What about email? It is a core library, right? It has been ported AFAIK. Or have I missed something? Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Volunteer help with porting
On Tue, Sep 07, 2010 at 02:58:41PM -, exar...@twistedmatrix.com wrote: On 02:34 pm, p...@phd.pp.ru wrote: On Tue, Sep 07, 2010 at 02:02:59PM -, exar...@twistedmatrix.com wrote: On 01:33 pm, p...@phd.pp.ru wrote: As there is already Python 3.2 alpha, the core of Python has already been ported How about the email package? What about email? It is a core library, right? It has been ported AFAIK. Or have I missed something? Are you just assuming that because there have been 3.x releases, everything in the standard library works properly in 3.x? Or do you know something about the email package specifically? Yes, I assumed that because the core team planned a beta release of 3.2 for October. 3.2 sounds more stable and complete than 3.0. Last I checked, there were a number of outstanding issues with email in 3.x. And as Michael Foord pointed out, there are other standard library modules in the same state. I see. Thank you for the clarification. I am sorry for being so haste. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (no subject)
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Sep 23, 2010 at 05:26:21PM +0530, Ketan Vijayvargiya wrote: Hi. I have an issue which has been annoying me from quite sometime and any help would be greatly appreciated: I just installed Python 2.6 on my centOS 5 system and then I installed nltk. Now I am running a certain python script and it gives me this error- ImportError: No module named _sqlite3 Searching the internet tells me that sqlite should be installed on my system which is confirmed when I try to install it using yum. Yum tells me that all of the following are installed on my system- sqlite-devel.i386 sqlite.i386 python-sqlite.i386 Can anyone tell me where I am going wrong. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] question/comment about documentation of relative imports
On Wed, Oct 06, 2010 at 07:09:48AM +1000, Nick Coghlan wrote: The remaining scenarios we have that can lead to duplication of a module happen regardless of the import style you use*. Cheers, Nick. *For the curious - those scenarios relate to ending up with the same module present both as __main__ and under its normal module name. I remember falling in the trap of importing the same module twice by manipulating sys.path and changing cwd (current working directory); the module was imported from different paths - from the current directory (entry '.' in the sys.path) and by its full path. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Inconsistencies if locale and filesystem encodings are different
On Thu, Oct 07, 2010 at 06:35:09PM +0200, M.-A. Lemburg wrote: It is well possible that the two are different. Mac OS X is just one example. Another common example is having a Unix account using the C locale (=ASCII) while working on a UTF-8 file system. My filesystems are always koi8-r, but sometimes I work with programs in utf-8 locale. Just an example... Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Inconsistencies if locale and filesystem?encodings are different
On Thu, Oct 07, 2010 at 09:12:13PM +0200, Victor Stinner wrote: Le jeudi 07 octobre 2010 18:44:19, Oleg Broytman a ?crit : My filesystems are always koi8-r, but sometimes I work with programs in utf-8 locale. Just an example... Are programs able to display correctly non-ascii filenames if your locale encoding is different than your filesystem encoding? Most of them don't because - you are right - most programs assume fs encoding to be the same as stdio locale. But some programs are more clever; for example, one can define G_FILENAME_ENCODING env var to guide GTK2/GLib programs; it can be a fixed encoding or a special value @locale. On the other side there are programs that ignore locale completely and read/write filenames using their own fixed encoding; for example, Transmission bittorrent client read/write files in the encoding defined in the .torrent metafile. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] okay to remove argparse.__all__?
On Mon, Nov 01, 2010 at 02:55:25PM +, Steven Bethard wrote: On Mon, Nov 1, 2010 at 2:53 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: Isn't it better to add the missing elements - what is the problem with that approach? It just requires extra synchronization, and history shows that I always forget to add them. ;-) Automate: for key, value in globals().items(): if not key.startswith('_'): __all__.append(key) Further filter (by key or value) to your needs. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] python3k vs _ast
Seems to be rather a usage question, not a development question (python-dev is about *developing* python, not *using* it). On Wed, Nov 17, 2010 at 01:48:06PM +0100, Emile Anclin wrote: hello everybody, migrating Pylint to python3.x, we encounter a little problem : in the tree generated by _ast, if we consider a args node (representing an argument of a function), the lineno (and the col_offset) information disappeared from those nodes. Is there a particular reason for that ? In python2.x, the args nodes were just Name nodes, and as for now we keep them as AssName nodes in astng/pylint and would like to know where it was defined. thx for any information -- Emile Anclin emile.anc...@logilab.fr http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique et gestion de connaissances Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] python3k vs _ast
On Wed, Nov 17, 2010 at 09:19:35AM -0500, R. David Murray wrote: On Wed, 17 Nov 2010 07:36:37 -0600, Benjamin Peterson benja...@python.org wrote: 2010/11/17 Oleg Broytman p...@phd.pp.ru: Seems to be rather a usage question, not a development question (python-dev is about *developing* python, not *using* it). Well, technically I think it's a feature request. On Wed, Nov 17, 2010 at 01:48:06PM +0100, Emile Anclin wrote: hello everybody, migrating Pylint to python3.x, we encounter a little problem : in the tree generated by _ast, if we consider a args node (representing an argument of a function), the lineno (and the col_offset) information disappeared from those nodes. Is there a particular reason for that ? In python2.x, the args nodes were just Name nodes, and as for now we keep them as AssName nodes in astng/pylint and would like to know where it was defined. I wouldn't object to adding them back if you want to file a bug report. It also seems to me that it was a perfectly appropriate question for this list. The question was why did you developers drop this (obscure) feature that we depend on in Python3? The problem for me is the wording. A question like why did you developers drop a feature? is certainly a development question, while like to know where it was defined seems more like a usage question. I apologize for misunderstanding. I don't think that question would make sense on python-list. Granted, there's a fuzzy line there, but pylint is really development infrastructure :) The python-porting list would have been a good alternate choice. -- R. David Murray www.bitdance.com Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Using logging in the stdlib and its unit tests
On Fri, Dec 10, 2010 at 06:47:50PM +0900, Stephen J. Turnbull wrote: Vinay Sajip writes: Indeed, and the very first code sample in the logging documentation shows exactly the simplistic easy usage you're talking about. I can't see why anyone would be scared off by that example. They're not scared by that example. What you need is a paragraph below it that says Do you think the above is all you should need? If so, you're right. You can stop reading now. If you think you need more, we've got that, too. Read on (you may need more coffee). Better yet (IMHO) would be to split the huge page into Logging: Simple start and Logging: Advanced usage (for the brave of of heart). Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Locale-specific formatting
On Sat, Dec 18, 2010 at 12:08:47AM +, MRAB wrote: This makes it harder to use more than one locale at a time This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible. ICU is perhaps the only way around the problem. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Locale-specific formatting
On Sat, Dec 18, 2010 at 06:21:24PM -0500, Terry Reedy wrote: On 12/18/2010 10:33 AM, Oleg Broytman wrote: This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible. ICU is perhaps the only way around the problem. This is about the third mention of 'ICU' in the last few weeks, so I looked it up: International Components for Unicode http://site.icu-project.org/ Several libraries (C/C++,Java), including prebuilt binaries for Windows (and some others). There is already a Python .cpp wrapper (but no Windows binaries, which limits usefulness) http://pyicu.osafoundation.org/ http://pypi.python.org/pypi/PyICU/1.0.1 A month ago there was a long thread that mentioned ICU many times: http://mail.python.org/pipermail/python-dev/2010-November/106068.html Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Locale-specific formatting
On Mon, Dec 20, 2010 at 01:09:19AM +0100, ??ric Araujo wrote: Le 18/12/2010 16:33, Oleg Broytman a ??crit : This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible. ICU is perhaps the only way around the problem. Babel rocks: http://babel.edgewall.org/ Unicode CLDR! Never heard of it before, thank you for pointing this out. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] phd.pp.ru = phdru.name
Hello! I need to inform people I'm changing my online identity. Domain phd.pp.ru will die Dec 27 (I'll try to reregister it to extend its life for a few months). My new personal domain will be phdru.name, primary email will be phd (in case one makes a mistake and write phdru two times - the address is an alias for phd). The new domain is already delegated, email and site works. I'm working on changing all my email subscriptions. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] devguide: Cover how to (un-)apply a patch.
On Mon, Jan 17, 2011 at 06:19:50PM -0600, s...@pobox.com wrote: Antoine On Mon, 17 Jan 2011 23:37:07 +0100 Antoine brett.cannon python-check...@python.org wrote: + +To undo a patch, do:: + +patch -R -p0 patch.diff + Antoine Or, simply and more reliably, use the corresponding VCS Antoine incantation (svn revert -R . or hg revert -a). I prefer Brett's solution. It's one command instead of one command per VCS. It works with other version control systems and provides me the opportunity to save a copy I can restore later. hg revert saves files before reverting as *.orig. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [concurrentrotatingfilehandler]: How are the log files split up ?
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Wed, Jan 19, 2011 at 01:02:09PM +0800, low kian seong wrote: Dear people, I am currently using concurrentrotatingfilehandler to handle my Python logs. The situation is okay when it's only one log, but when it needs to spill over to the next log (I configured to have 2) say test.log.2 then I see that the output is sort of shared between the first log test.log and test.log.2. Am I supposed to concatenate all the logs together to get my logs back ? Google hasn't brought back any results, so I am wondering is it just me using or reading the resultant logs wrong? ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/phd%40phdru.name Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Import and unicode: part two
On Mon, Jan 24, 2011 at 04:39:39PM +0100, Victor Stinner wrote: I missed something: VFAT stores filenames as unicode (whereas FAT only supports byte filenames). Well, VFAT stores filenames twice: as a 8+3 byte strings and as a 255 unicode (UTF-16-LE) string (UTF-16-LE). On which OS do you access this VFAT file system? On Windows, you have two APIs: bytes (*A) and wide character (*W). If you use the wide character, there is explicit encoding at all. Linux has two mount options to control unicode on a VFAT filesystem: codepage for the byte filenames (use Shift JIS here) and iocharset for the unicode filenames (I don't understand this option). AFAIU, `codepage` is remote charset while `iocharset` is local charset. I.e., to mount windows-1251 filesystem to my linux with koi8-r locale I use codepage=cp866,iocharset=koi8-r (cp866 is OEM encoding for cp1251 ANSI). Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (no subject)
On Mon, Jan 24, 2011 at 04:39:54PM +, Stefan Spoettl wrote: So it may be that the Python interpreter isn't working correctly onlyon Ubuntu 10.10 Than you should report the problem to the Ubuntu developers, right? And it would be nice if you investigate deeper and send a proper mail - with a subject, with a properly formatted text, not html. http://www.catb.org/~esr/faqs/smart-questions.html Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Import and unicode: part two
On Wed, Jan 26, 2011 at 11:12:02AM +0100, Martin v. L??wis wrote: There are cases where there is no real transfer, in the sense in which you are using the word. For example, with NFS, you can access the very same file simultaneously on two systems, with no file name conversion (unless you are using NFSv4, and unless your NFSv4 implementations support the UTF-8 mandate in NFS well). Also, if two users of the same machine have different locale settings, the same file name might be interpreted differently. I have a solution for all these problems, with a price, of course. Let's use utf8+base64. Base64 uses a very restricted subset of ASCII and filenames will never be interpreted whatever filesystem encodings would be. The price is users loose standard OS tools like ls and find. I am partially joking, of course, but only partially. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] xmlrpclib and communication verbosity
On Wed, Feb 02, 2011 at 03:52:17PM +0200, Erez Sh wrote: Also, ServerProxy should accept an optional output file (=a class with write,writelines methods), which will be the target of all prints. Why not logging? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] svn outage on Friday
On Tue, Feb 15, 2011 at 10:25:06AM +0100, Victor Stinner wrote: Le mardi 15 f??vrier 2011 ?? 09:30 +0100, Martin v. L??wis a ??crit : I'm going to perform a Debian upgrade of svn.python.org on Friday, between 9:00 UTC and 11:00 UTC. I'll be disabling write access during that time. The outage shouldn't be longer than an hour. It's time to move to Mercurial! :-) Never do two upgrades at once! Especially on Fridays! Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] What if replacing items in a dictionary returns the new dictionary?
Hi! Seems like a question for python-ideas mailing list, not for python-dev. On Fri, Apr 29, 2011 at 10:27:46AM -0400, Roy Hyunjin Han wrote: It would be convenient if replacing items in a dictionary returns the new dictionary, in a manner analogous to str.replace(). What do you think? :: # Current behavior x = {'key1': 1} x.update(key1=3) == None x == {'key1': 3} # Original variable has changed # Possible behavior x = {'key1': 1} x.replace(key1=3) == {'key1': 3} x == {'key1': 1} # Original variable is unchanged You can implement this in your own subclass of dict, no? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Commit messages: please avoid temporal ambiguity
On Tue, May 10, 2011 at 09:33:13AM -0400, R. David Murray wrote: commit: 11999: sync based on comparing mtimes, not mtime to system clock NEWS: Issue 11999: fixed sporadic sync failure mailbox.Maildir due to its trying to detect mtime changes by comparing to the system clock instead of to the previous value of the mtime. commit: #11873: Improve test regex so random directory names don't cause test to fail NEWS: Issue #11873: Change regex in test_compileall to fix occasional failures when when the randomly generated temporary path happened to match the regex. You will note the *active* verbs fixed, improve, and change figure in there prominently :) Why fixed is in the past tense, but improve, and change are in present tense? I use past tense to describe what I did on the code, and present simple to describe what the new code does when running. For example: Fixed a bug in time comparison: compare mtime to mtime, not mtime to system clock I.e., fixed - that what I did, and compare is what the code does. (I used an excerpt from above only for the example, not to correct something.) Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Implement Aspect-oriented programming
Hi! This mailing list is to work on developing Python (discussing bugs and patches). There is python-ideas mailing list to discuss possible future improvements. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation
On Mon, Jun 27, 2011 at 10:24:28AM +0200, Antoine Pitrou wrote: FWIW, I tend to understand members as methods + attributes, which makes it a nice term to use for that purpose. That's my feeling too. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] making socket.getaddrinfo use cached dns
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Jul 07, 2011 at 12:57:59PM -0400, high bandwidth wrote: I use cached dns lookups with pdnsd on my ubuntu machine to speed up web access as regular lookups can take 15-30 seconds. However, python's mechanize and urllib etc use socket.getaddrinfo, which seems not to be using dns cacheing or taking a long time because of ipv6 lookups. In either case, I subsequent access to the same site to be fast and not require lengthy calls to getaddrinfo. How can I get python to correctly use cached dns lookups and ipv4 only (at least in those cases where it is appropriate). As mentioned here: http://stackoverflow.com/questions/2014534/force-python-mechanize-urllib2-to-only-use-a-requests/2035686#2035686 It seems that many python libraries are hardcoded to look for both ipv6 and ipv4. Since ipv6 lookups are extremely slow at least for some users, perhaps the devs should carry over these optional arguments to higher level libraries like mechanize, urllib, httplib etc. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] making socket.getaddrinfo use cached dns
On Sat, Jul 16, 2011 at 04:12:45PM +0200, Maciej Fijalkowski wrote: On Thu, Jul 7, 2011 at 7:59 PM, Oleg Broytman p...@phdru.name wrote: We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); Well, it seems this post is about adding a new feature isn't it? I don't think so. The original post is about problems with pdnsd - could be just a local configuration problem, and has nothing with Python. The original post is about rolling back getaddrinfo and returning to gethostby* - certainly not a new feature. That's how I understand the original post. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] knee.py import hook in 2.6
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Tue, Jul 19, 2011 at 11:16:46AM -0700, Timothy D. Kadich wrote: I'm trying to use the import hook in Python2.6, but I'm having a problem. It doesn't work for numpy. My error is such: [skip] TypeError: import_hook() takes at most 4 arguments (5 given) Seems like import_hook is from an older version of Python. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PyPI went down
On Tue, Aug 30, 2011 at 07:30:01PM +0400, Oleg Broytman wrote: PyPI went down More information: ports 80 and 443 are open, the servers performs SSL handshake but timeouts on HTTP requests (with or without SSL). Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PyPI went down
It is back up. I am very sorry for the fuss. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] PyPI went down
Hello! I released the first package of two and PyPI went down while I was preparing to release the second. I hope it wasn't me? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] genious hack in python
Hi! On Fri, Sep 23, 2011 at 11:12:53AM -0400, Martin Goudreau wrote: Please check a very small module i'v made for improving the debugger traceback. See the pybettererror.py on sourceforge: http://pybettererror.sourceforge.net/projet.html Why do this in sys.stderr and not by monkey-patching traceback.py, probably format_list and format_exception_only? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] unittest missing assertNotRaises
On Tue, Sep 27, 2011 at 07:46:52PM +0100, Wilfred Hughes wrote: +def assertNotRaises(self, excClass, callableObj=None, *args, **kwargs): +Fail if an exception of class excClass is thrown by +callableObj when invoked with arguments args and keyword +arguments kwargs. + + +try: +callableObj(*args, **kwargs) +except excClass: +raise self.failureException(%s was raised % excClass) + + What if I want to assert my test raises neither OSError nor IOError? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] unittest missing assertNotRaises
On Wed, Sep 28, 2011 at 09:43:13AM +1000, Steven D'Aprano wrote: Oleg Broytman wrote: On Tue, Sep 27, 2011 at 07:46:52PM +0100, Wilfred Hughes wrote: +def assertNotRaises(self, excClass, callableObj=None, *args, **kwargs): +Fail if an exception of class excClass is thrown by +callableObj when invoked with arguments args and keyword +arguments kwargs. ++ +try: +callableObj(*args, **kwargs) +except excClass: +raise self.failureException(%s was raised % excClass) ++ But I can't see this being a useful test. Me too. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Generate Dynamic lists
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Oct 20, 2011 at 06:51:05PM +, Asif Jamadar wrote: So I'm trying to generate dynamic choices for django form. Here i'm usig formset concept (CODE is mentioned below) Suppose i have list called criteria_list = ['education', 'know how', 'managerial', 'interpersonal', ] now i need to generate choices as follows list1 = [('education', 1), ('education', 2), ('education', 3), (''education' , 4) , ('know how', 1) ('know ho', 2), ('know ho', 3), ('know ho', 4)] list2 = [('education', 1), ('education', 2), ('education', 3), (''education' , 4) , ('managerial', 1) ('managerial', 2), ('managerial', 3), ('managerial', 4)] list3 = [('education', 1), ('education', 2), ('education', 3), (''education' , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), ('interpersonal', 4)] list4 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' , 4) , ('managerial', 1) ('managerial', 2), ('managerial', 3), ('managerial', 4)] list5 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), ('interpersonal', 4)] list6= [('managerial', 1), ('managerial', 2), ('managerial ', 3), ('managerial' , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), ('interpersonal', 4)] How can i achive this in python? The above all eachh list become the choices for each form. Suppose i have formset of 6 forms. Then how can i assign above dynamic generates list to the choice field of each form. I tried by using this following code but no luck view.py def evaluation(request): evaluation_formset = formset_factory(EvaluationForm, formset=BaseEvaluationFormset, extra=6) if request.POST: formset = evaluation_formset(request.POST) ##validation and save else: formset = evaluation_formset() render_to_response(formset) forms.py class EvaluationForm(forms.Form): value = forms.ChoiceField(widget=forms.RadioSelect(renderer=HorizontalRadioRenderer)) class BaseEvaluationFormSet(BaseFormSet): def __init__(self, *args, **kwargs): super(BaseEvaluationFormSet, self).__init__(*args, **kwargs) for form_index, form in enumerate(self.forms): form.fields[value].choices = self.choice_method(form_index) def choice_method(self, form_index): list = [] item_list = [] criteria_list = [] criteria_length = len(sub_criterias)-1 for criteria_index in range(criteria_length): counter = 1 if criteria_index == form_index: for j in range(criteria_length-counter): x = 1 for i in range(6): criteria_list.append((sub_criterias[criteria_index], sub_criterias[criteria_index])) item_list.append((sub_criterias[criteria_index+ 1], sub_criterias[criteria_index+1])) list = criteria_list +item_list counter = counter + 1 if x != criteria_length: x = x + 1 return list ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/phd%40phdru.name Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] End of the mystery @README.txt Mercurial bug
On Tue, Jun 25, 2013 at 10:11:04PM -0400, Eric V. Smith e...@trueblade.com wrote: On 6/25/2013 9:33 PM, Senthil Kumaran wrote: On Tue, Jun 25, 2013 at 5:58 PM, Benjamin Peterson benja...@python.org mailto:benja...@python.org wrote: 2013/6/25 Victor Stinner victor.stin...@gmail.com mailto:victor.stin...@gmail.com: And then I ran make distclean... You've left us hanging... Yeah, the final part is here: http://bz.selenic.com/show_bug.cgi?id=3954#c4 But still I have question as why hg complained about @README in the first place. Also, I hope make distclean is not working inside .hg folder. I think that's exactly what's happening. From the bug report: find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ -o -name '[@,#]*' -o -name '*.old' \ -o -name '*.orig' -o -name '*.rej' \ -o -name '*.bak' ')' \ -exec rm -f {} ';' Will find files beginning with '@' inside subdirectories of $(srcdir)/.hg. Just this week I saw someone use the logical equivalent of: find $(srcdir)/* ... to avoid this problem. It won't expand the .hg top-level directory. Or find \( -type d -name .hg -prune \) -o ... Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] End of the mystery @README.txt Mercurial bug
On Wed, Jun 26, 2013 at 08:18:27AM -0400, Eric V. Smith e...@trueblade.com wrote: find $(srcdir)/* ... to avoid this problem. It won't expand the .hg top-level directory. Or find \( -type d -name .hg -prune \) -o ... I'm torn. Yours is more obvious, but we'd likely need to add .svn, .git, How many of those dot-files/directories are there beside .*ignore? etc. Maybe find $(srcdir)/[a-zA-Z]* ... would be good enough to ignore all dot directories/files? On the other hand yes, I think it'd be enough. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Add function to signal module for getting main thread id
On Fri, Aug 30, 2013 at 12:24:07PM +0300, Andrew Svetlov andrew.svet...@gmail.com wrote: Main thread is slightly different from others. Signals can be subscribed from main thread only. Tulip has special logic for main thread. In application code we can explicitly know which thread is executed, main or not. But from library it's not easy. Tulip uses check like threading.current_thread().name == 'MainThread' This approach has a problem: thread name is writable attribute and can be changed by user code. You can test threading.current_thread().__class__ is threading._MainThread or threading.current_thread().ident == threading._MainThread.ident My proposition is to add function like get_mainthread_id() - int which return ident for main thread threading._MainThread.ident ? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Offtopic: OpenID Providers
On Thu, Sep 05, 2013 at 02:16:29PM -0400, Donald Stufft don...@stufft.io wrote: On Sep 5, 2013, at 2:12 PM, Oleg Broytman p...@phdru.name wrote: I used to use myOpenID and became my own provider using poit[1]. These days I seldom use OpenID -- there are too few sites that allow full-featured login with OpenID. The future lies in OAuth 2.0. The Auth in OAuth stands for Authorization not Authentication. There is no authorization without authentication, so OAuth certainly performs authentication: http://oauth.net/core/1.0a/#anchor9 , http://tools.ietf.org/html/rfc5849#section-3 Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Offtopic: OpenID Providers
On Thu, Sep 05, 2013 at 07:31:59PM +0200, Jesus Cea j...@jcea.es wrote: I just received an email from my OpenID provider, myOpenID, saying that they drop OpenID service next February. I wonder what other OpenID providers are used by other python-dev fellows. What are you using?. bugs.python.org admins could share some data? I agree than OpenID is (quite) dead, but I rather prefer OpenID to use user/pass. I have big hopes for Mozilla Persona, looking forward Python infrastructure support :). PS: I use http://www.jcea.es/; as my OpenID identity, and I delegate the actual service to myOpenID. I can switch delegation trivially. I used to use myOpenID and became my own provider using poit[1]. These days I seldom use OpenID -- there are too few sites that allow full-featured login with OpenID. The future lies in OAuth 2.0. 1. http://yangman.ca/poit/ Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Offtopic: OpenID Providers
On Thu, Sep 05, 2013 at 02:35:16PM -0400, Donald Stufft don...@stufft.io wrote: Persona is the logical successor to OpenID. OpenID lived a short life and died a quiet death. I'm afraid Persona wouldn't live even that much. Dead-born idea, in my so humble opinion. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Offtopic: OpenID Providers
On Thu, Sep 05, 2013 at 02:50:44PM -0400, Donald Stufft don...@stufft.io wrote: On Sep 5, 2013, at 2:43 PM, Oleg Broytman p...@phdru.name wrote: On Thu, Sep 05, 2013 at 02:35:16PM -0400, Donald Stufft don...@stufft.io wrote: Persona is the logical successor to OpenID. OpenID lived a short life and died a quiet death. I'm afraid Persona wouldn't live even that much. Dead-born idea, in my so humble opinion. I don't think there's much evidence to support this. I'm seeing more sites support Persona not less. It solves some of the major problems with OpenID. I have seen exactly 0 (zero) sites that support Persona. Can you point me? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Offtopic: OpenID Providers
On Thu, Sep 05, 2013 at 04:53:18PM -0400, Barry Warsaw ba...@python.org wrote: On Sep 06, 2013, at 12:36 AM, Oleg Broytman wrote: You cannot login using OpenID to most interesting popular sites. GMail? No. Twitter? No. Facebook? FriendFeed? identi.ca? No, no, no. I'd be surprised if you ever saw the big social networking sites support OpenID or Persona. They want to own that space themselves, so probably have no business incentive to support 3rd party systems. But of course! And that IMO spells the end of the feature. Things that aren't available for millions seldom are available for a few, and if they are -- they are available for big price. We're open source, and I think it benefits our mission to support open, decentralized, and free systems like OpenID and Persona. But they also have disadvantages. Implementing such a major feature is a significant burden to sysadmins and is an additional vein for security breaches. That said, I don't mind if pydotorg would get such features. If FSF pays salaries and admins are willing to work -- no objections from me. But I am not going to use it. What gain if I can login to one site? I will change my mind when Google and GitHub start using them. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Offtopic: OpenID Providers
On Thu, Sep 05, 2013 at 02:07:11PM -0500, Skip Montanaro s...@pobox.com wrote: OpenID lived a short life and died a quiet death. I'm afraid Persona wouldn't live even that much. Dead-born idea, in my so humble opinion. I was completely unaware of OpenID's demise. There was no demise. Because there was no take-off. OpenID was never popular. I can remember a very limited set of major sites that allow login using OpenID: SourceForge, LiveJournal, BitBucket. The first two in the list allow limited login. BitBucket doesn't allow even that. They only allow full-featured login if you have already created an account and linked your OpenID URL with that account. You cannot login using OpenID to most interesting popular sites. GMail? No. Twitter? No. Facebook? FriendFeed? identi.ca? No, no, no. Small uninteresting blogs? Yes, but who cares? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com