rJSmin 1.0.10

2014-11-08 Thread André Malo
Hello World, I'm pleased to announce version 1.0.10 of rJSmin. About rJSmin rJSmin is a javascript minifier written in python. The minifier is based on the semantics of jsmin.c by Douglas Crockford. The module is a re-implementation aiming for speed, so it can be used at runtime

rCSSmin 1.0.5

2014-11-08 Thread André Malo
Hello World, I'm pleased to announce version 1.0.5 of rCSSmin. About rCSSmin = rCSSmin is a CSS minifier written in python based on the semantics of the YUI compressor, which itself is based on the rule list by Isaac Schlueter. This module is a re-implementation aiming for speed

Raspberry model b -- program

2014-11-08 Thread gm
Hi ! I have one small program that should be completed till tomorrow so if someone can help am ready to pay this ( btw. budget for this is $40 ). Project: - usb scanner is connected to the PI. - when the user gets his e.g. coffe bill with barcode, he put this bill in from of scanner and

Leo 5.0 alpha 2 released

2014-11-08 Thread edreamleo
Leo 5.0a2 is now available at: http://sourceforge.net/projects/leo/files/Leo/ Leo is a PIM, an IDE and an outliner. Video tutorials: http://leoeditor.com/screencasts.html Text tutorials: http://leoeditor.com/tutorial.html The highlights of Leo 5.0 -- * Better

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-08 Thread Ned Batchelder
On 11/7/14 9:52 AM, Veek M wrote: Veek M wrote: new_col = self.b[row].index('def') self.w.cursor = row, new_col new_col = self.b[row].rindex('def') self.w.cursor = row, new_col There's also the different methods index vs

Re: Moving a window on the screen

2014-11-08 Thread Akira Li
ast nom...@invalid.com writes: Ok, thx, it works now with: import tkinter fen = tkinter.Tk() x=0 def moveW(): global x fen.geometry(200x200+%d+10 % x) x = x + 10 if (x 1200): fen.after(50, moveW) moveW() In general, to avoid the start time drift [1], you

Re: Moving a window on the screen

2014-11-08 Thread Terry Reedy
On 11/8/2014 11:35 AM, Akira Li wrote: ast nom...@invalid.com writes: Ok, thx, it works now with: import tkinter fen = tkinter.Tk() x=0 def moveW(): global x fen.geometry(200x200+%d+10 % x) x = x + 10 if (x 1200): fen.after(50, moveW) moveW() In general, to

Re: FYI: Micro Python running on kickstarter pyBoard project, now shipping

2014-11-08 Thread John Pinner
On Thursday, 23 October 2014 22:12:10 UTC+1, sohca...@gmail.com wrote: On Thursday, October 23, 2014 10:07:26 AM UTC-7, jkn wrote: Hi all I haven't heard in mentioned here, but since I saw one of the boards today thought I'd pass on the news: The Kickstarter 'MicroPython'

Re: [Python-Dev] Dinamically set __call__ method

2014-11-08 Thread Ethan Furman
On 11/07/2014 10:50 PM, dieter wrote: Ethan Furman et...@stoneleaf.us writes: On 11/06/2014 10:59 PM, dieter wrote: John Ladasky writes: On Tuesday, November 4, 2014 11:12:31 AM UTC-8, Ethan Furman wrote: If you really absolutely positively have to have the signature be correct for each

Re: Moving a window on the screen

2014-11-08 Thread Akira Li
Terry Reedy tjre...@udel.edu writes: On 11/8/2014 11:35 AM, Akira Li wrote: ast nom...@invalid.com writes: Ok, thx, it works now with: import tkinter fen = tkinter.Tk() x=0 def moveW(): global x fen.geometry(200x200+%d+10 % x) x = x + 10 if (x 1200):

Engaging, powerful - video inspriration/learning - Your best selections

2014-11-08 Thread flebber
Morning Have you seen any python videos that were part of a series or that were from a conference that you found engaging and made a point click or solidify a concept or drive you to action to create something you wanted. That took an advanced topic or concept and made it clear as day to you.

Re: Leo 5.0 alpha 2 released

2014-11-08 Thread flebber
On Saturday, 8 November 2014 23:26:20 UTC+11, edre...@gmail.com wrote: Leo 5.0a2 is now available at: http://sourceforge.net/projects/leo/files/Leo/ Leo is a PIM, an IDE and an outliner. Video tutorials: http://leoeditor.com/screencasts.html Text tutorials:

Re: Different behaviour in list comps and generator expressions

2014-11-08 Thread Wolfgang Maier
On 08.11.2014 02:50, Steven D'Aprano wrote: The following list comprehension and generator expression are almost, but not quite, the same: [expr for x in iterable] list(expr for x in iterable) The difference is in the handling of StopIteration raised inside the expr. Generator expressions

Re: [Python-Dev] Dinamically set __call__ method

2014-11-08 Thread Gregory Ewing
Ethan Furman wrote: On 11/06/2014 10:59 PM, dieter wrote: A possibility to get the original approach implemented looks like: make __call__ a descriptor on the class which looks up the real method on the instance. This still wouldn't get the signatrue correct, though. Why not?

Re: Different behaviour in list comps and generator expressions

2014-11-08 Thread Wolfgang Maier
On 08.11.2014 22:31, Wolfgang Maier wrote: On 08.11.2014 02:50, Steven D'Aprano wrote: The following list comprehension and generator expression are almost, but not quite, the same: [expr for x in iterable] list(expr for x in iterable) The difference is in the handling of StopIteration

Syncing audio and video for casual recording

2014-11-08 Thread Tobiah
I decided I'd like to publish some youtube videos of me playing an instrument. The audio being the important bit, I'd like to use my existing mics, which I've been sending through a USB audio interface to my computer. I don't have any camera yet, other than a prosumer digital camera that does

Re: [Python-Dev] Dinamically set __call__ method

2014-11-08 Thread Ethan Furman
On 11/08/2014 02:31 PM, Gregory Ewing wrote: Seems to depend on how you get hold of the object you're inspecting the signature of. I did an experiment: class C(object): @property def __call__(self): return self.call def f(x, y): print(Called f with %s, %s % (x, y))

Re: FYI: Micro Python running on kickstarter pyBoard project, now shipping

2014-11-08 Thread Terry Reedy
On 11/8/2014 2:41 PM, John Pinner wrote: They are quite different devices: * The Raspberry Pi is a low-power general purpose computer designed specifically for education purposes. It just so happens that it's ideal for geek experimentation as well... * MicroPython is an optimised version of

[issue22817] re.split fails with lookahead/behind

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is possible to change this behavior (see example patch). With this patch: re.split(r'(?=CA)(?=GCTG)', 'ACGTCAGCTGAAAAGCTGACGTACGT') ['ACGTCA', 'GCTGAAAA', 'GCTGACGTACGT'] re.split(r'\b', the quick, brown fox) ['', 'the', ' ', 'quick', ', ',

[issue22789] Compress the marshalled data in PYC files

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Compressing pyc files one by one wouldn't save much space because disk space is allocated by blocks (up to 32 KiB on FAT32). If the size of pyc file is less than block size, we will not gain anything. ZIP file has advantage due more compact packing of

[issue22817] re.split fails with lookahead/behind

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Previous attempts to solve this issue: issue852532, issue988761, issue3262. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22817 ___

[issue22789] Compress the marshalled data in PYC files

2014-11-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 08.11.2014 10:28, Serhiy Storchaka wrote: Compressing pyc files one by one wouldn't save much space because disk space is allocated by blocks (up to 32 KiB on FAT32). If the size of pyc file is less than block size, we will not gain anything. ZIP

[issue22818] Deprecate splitting on possible zero-width re patterns

2014-11-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now re.split doesn't split with zero-width regex. There are a number of issues for this (issue852532, issue988761, issue3262, issue22817). This is definitely a bug, but fixing this bug will likely break existing code which use regular expressions

[issue22819] Python3.4: xml.sax.saxutils.XMLGenerator.__init__ fails with pythonw.exe

2014-11-08 Thread Edward K. Ream
New submission from Edward K. Ream: In Python3.2 xml.sax.saxutils.XMLGenerator.__init__ succeeds if the out keyword argument is not given and sys.stdout is None, which will typically be the case when using pythonw.exe. Alas, on Python3.4, the ctor throws an exception in this case. This is a

[issue22820] RESTART line with no output

2014-11-08 Thread Edward Alexander
New submission from Edward Alexander: Whenever i run my code on Python IDLE editor, the output is as follows: == RESTART I am a newbie,it seems i cannot move from this point . This is my code: def convert_to_celsius(fahrenheit):

[issue2636] Adding a new regex module (compatible with re)

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is my (slowly implemented) plan: 0. Recommend regex as advanced replacement of re (issue22594). 1. Fix all obvious bugs in the re module if this doesn't break backward compatibility (issue12728, issue14260, and many already closed issues). 2.

[issue22819] Python3.4: xml.sax.saxutils.XMLGenerator.__init__ fails with pythonw.exe

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In any case XMLGenerator is not usable if the out keyword argument is not given and sys.stdout is None. Just the exception will be raised later. I consider early failure as a feature, not a bug. -- nosy: +serhiy.storchaka

[issue3511] Incorrect charset range handling with ignore case flag?

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue17381 (which has more realistic example than [9-A]). -- nosy: +serhiy.storchaka resolution: wont fix - duplicate superseder: - IGNORECASE breaks unicode literal range matching ___ Python tracker

[issue433028] SRE: (?flag:...) is not supported

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that they'd be nice. The regex module is too advanced and need much work and some transitional period for including in the stdlib, but this feature can be implemented right now. -- assignee: effbot - serhiy.storchaka nosy: +serhiy.storchaka

[issue433027] SRE: (?-flag) is not supported.

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think issue433028 supersedes this and looks more preferable. No need to implement several ways to do same things. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue433024] SRE: (?flag) isn't properly scoped

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue22493. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue433024 ___ ___

[issue22819] Python3.4: xml.sax.saxutils.XMLGenerator.__init__ fails with pythonw.exe

2014-11-08 Thread R. David Murray
R. David Murray added the comment: Agreed. I was going to ask what it was that 3.2 did that was useful. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22819 ___

[issue22820] RESTART line with no output

2014-11-08 Thread R. David Murray
R. David Murray added the comment: Your code doesn't produce any output (ie: there are no print calls). I don't use Idle myself, but I'm guessing that is why you don't see anything after the restart line. If that is the case, do you see a place in whatever help or documentation you have

[issue22819] Python3.4: xml.sax.saxutils.XMLGenerator.__init__ fails with pythonw.exe

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FYI the code was changed in issue1470548. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22819 ___ ___

[issue1282] re module needs to support bytes / memoryview well

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually non-hashable patterns are not supported. re.match(bytearray(b'.'), b'x') Traceback (most recent call last): File stdin, line 1, in module File /home/serhiy/py/cpython/Lib/re.py, line 163, in match return _compile(pattern,

[issue1708652] Exact matching

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Was implemented as fullmatch() in issue16203. -- nosy: +serhiy.storchaka resolution: rejected - duplicate superseder: - Proposal: add re.fullmatch() method ___ Python tracker rep...@bugs.python.org

[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-11-08 Thread Brett Cannon
Brett Cannon added the comment: So I disagree that the code needs to be tweaked before converting to Argument Clinic. If the Clinic conversion is not adding to the problem then the code churn is just going to make applying this patch that much harder. Thanks for the code review regardless,

[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If first convert to Argument Clinic then fixing bugs will be much harder. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20152 ___

[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: About argument names. You have changed argument names and docstrings in any case (e.g. was op, now code). Why not conform with standard documentation? This wouldn't add additional code churn if change it now. But will add if change it later. --

[issue1610654] cgi.py multipart/form-data

2014-11-08 Thread Rishi
Rishi added the comment: Hi, I have created a new patch with a small design change. The change is that in situations where I don't find the boundary instead of keeping the last x bytes in the buffer I simply drain the whole data and call a readline(). This seems like the right thing to do

[issue22821] Argument of wrong type is passed to fcntl()

2014-11-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Arguments of wrong type is passed to C function fcntl() in the fcntl module. Third argument of fcntl() should be either pointer to binary structure or C int. But C long is passed instead. All works on platforms where sizeof(long) == sizeof(int) or on

[issue2636] Adding a new regex module (compatible with re)

2014-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is my (slowly implemented) plan: Exciting. Perhaps you should post your plan on python-dev. In any case, huge thanks for your work on the re module. -- ___ Python tracker rep...@bugs.python.org

[issue22821] Argument of wrong type is passed to fcntl()

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. It is much easier than I expected. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file37150/fcntl_arg_type.patch ___ Python tracker rep...@bugs.python.org

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be atomic grouping or possessive quantifiers (issue433030) will help with this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22687 ___

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22800 ___ ___

[issue22434] Use named constants internally in the re module

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please make a review of any patch Antoine? This would help me to debug re engine. It doesn't matter which patch apply, with good chance all this will be changed before 3.5 release and may be not once. --

[issue2636] Adding a new regex module (compatible with re)

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Exciting. Perhaps you should post your plan on python-dev. Thank you Antoine. I think all interested core developers are already aware about this issue. A disadvantage of posting on python-dev is that this would require manually copy links and may be

[issue2636] Adding a new regex module (compatible with re)

2014-11-08 Thread Ezio Melotti
Ezio Melotti added the comment: So you are suggesting to fix bugs in re to make it closer to regex, and then replace re with a forked subset of regex that doesn't include advanced features, or just to fix/improve re until it matches the behavior of regex? If you are suggesting the former, I

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: The doc is unhelpful on this, but looking at the implementation and tests, only a prefix length is allowed, not an expanded netmask. This would therefore be a feature request. -- type: behavior - enhancement versions: -Python 3.4

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-08 Thread Chris PeBenito
Chris PeBenito added the comment: That's unfortunate. The library provides factory functions so v4 and v6 addresses/networks are easily handled together, and yet it seems to have been overlooked that you can do this: ipaddress.ip_network('192.168.1.0/255.255.255.0') but not this:

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know enough about IPv6 to give more insight (perhaps Peter Moody can answer), but the tests have this comment: # We only support CIDR for IPv6, because expanded netmasks are not # standard notation. -- ___

[issue22822] IPv6Network constructor docs incorrect about valid input

2014-11-08 Thread Chris PeBenito
New submission from Chris PeBenito: Here: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network In the constructor documentation, item 1 says: A string consisting of an IP address and an optional mask, separated by a slash (/). The IP address is the network address, and the

[issue1282] re module needs to support bytes / memoryview well

2014-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I don't see a reason why the *pattern* should be a bytearray or memoryview, only the string it is searching. But if you fixed it by casting it to bytes I won't stop you. :-) -- ___ Python tracker

[issue2636] Adding a new regex module (compatible with re)

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So you are suggesting to fix bugs in re to make it closer to regex, and then replace re with a forked subset of regex that doesn't include advanced features, or just to fix/improve re until it matches the behavior of regex? Depends on what will be easier.

[issue1282] re module needs to support bytes / memoryview well

2014-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is easy to fix with small (but non zero) cost, but I don't see a reason too. So I don't reopen this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1282

[issue22695] open() declared deprecated in python 3 docs

2014-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9001298e3094 by Berker Peksag in branch '3.4': Issue #22695: Fix rendering of the deprecated-removed role in HTML. https://hg.python.org/cpython/rev/9001298e3094 New changeset ec81edc30221 by Berker Peksag in branch 'default': Issue #22695: Fix

[issue22695] open() declared deprecated in python 3 docs

2014-11-08 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thanks for the reviews. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22695

[issue2636] Adding a new regex module (compatible with re)

2014-11-08 Thread Ezio Melotti
Ezio Melotti added the comment: Ok, regardless of what will happen, increasing test coverage is a worthy goal. We might start by looking at the regex test suite to see if we can import some tests from there. -- ___ Python tracker

[issue22434] Use named constants internally in the re module

2014-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I reviewed re_named_consts.patch and it looks great (I especially like the removal of superfluous OPCODES dictionary lookups and improved repr for the integer codes). Since the op codes are singletons, you can use identity tests instead of equality checks

[issue22434] Use named constants internally in the re module

2014-11-08 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +effbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22434 ___ ___

[issue22823] Use set literals instead of creating a set from a list

2014-11-08 Thread Raymond Hettinger
New submission from Raymond Hettinger: There are many places where the old-style of creating a set from a list still persists. The literal notation is idiomatic, cleaner looking, and faster. Here's a typical change: diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py ---

[issue22824] Update reprlib to use set literals

2014-11-08 Thread Raymond Hettinger
New submission from Raymond Hettinger: Currently reprlib outputs: reprlib.repr(set('supercalifragilisticexpialidocious')) set(['a', 'c', 'd', 'e', 'f', 'g', ...]) This should be: {'a', 'c', 'd', 'e', 'f', 'g', ...} -- keywords: easy messages: 230880 nosy: rhettinger

[issue22824] Update reprlib to use set literals

2014-11-08 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22824 ___ ___

[issue22824] Update reprlib to use set literals

2014-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Library (Lib) nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22824 ___

[issue22823] Use set literals instead of creating a set from a list

2014-11-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Note, to keep the tests stable, nothing in Lib/tests should be changed. Any update should target the rest of Lib and Doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-08 Thread Akira Li
Akira Li added the comment: from datetime import datetime, timezone datetime.fromtimestamp(0, timezone.utc) datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc) already works and it is documented [1] [1]

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I personally wish we could deprecate utcfromtimestamp. With timezone.utc in stdlib and being a singleton there is no reason to put UTC time in naive datetime instances. -- ___ Python tracker

[issue22823] Use set literals instead of creating a set from a list

2014-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-08 Thread INADA Naoki
INADA Naoki added the comment: akira: It seems cleaner than utcfromtimestamp().replace(). I think utcfromtimestamp() should have note about it. Note that it returns **naive** (tz=None) datetime. Naive datetime is treated as localtime in most functions. If you want to create aware datetime,