Re: python to enable javascript , tried selinium, ghost, pyQt4 already

2014-01-19 Thread Giorgos Tzampanakis
On 2014-01-18, Jaiprakash Singh wrote: hi, can you please suggest me some method for study so that i can scrap a site having JavaScript behind it i have tried selenium, ghost, pyQt4, but it is slow and as a am working with thread it sinks my ram memory very fast. I have

Re: graphical python

2014-01-19 Thread Ian Kelly
On Sat, Jan 18, 2014 at 10:40 PM, buck workithar...@gmail.com wrote: I'm trying to work through Skienna's algorithms handbook, and note that the author often uses graphical representations of the diagrams to help understand (and even debug) the algorithms. I'd like to reproduce this in

Re: question about input() and/or raw_input()

2014-01-19 Thread Rustom Mody
On Sunday, January 19, 2014 10:29:58 AM UTC+5:30, Chris Angelico wrote: On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote: Because these two pieces of code def foo(x): print x+1 def bar(x): return x+1 look identical (to a beginner at least) foo(3) 4 bar(3) 4 As do these pieces

Re: Python declarative

2014-01-19 Thread sertorbe
El miércoles, 15 de enero de 2014 18:02:08 UTC+1, Sergio Tortosa Benedito escribió: Hi I'm developing a sort of language extension for writing GUI programs called guilang, right now it's written in Lua but I'm considreing Python instead (because it's more tailored to alone applications).

python-daemon for Python v3

2014-01-19 Thread Asaf Las
Hi Community Is there ported to Python v3 python-daemon package? https://pypi.python.org/pypi/python-daemon/ i am afraid it is not as simple as correction of relative path input feature and except clauses in mentioned package. Thanks Asaf --

Re: question about input() and/or raw_input()

2014-01-19 Thread Chris Angelico
On Sun, Jan 19, 2014 at 7:26 PM, Rustom Mody rustompm...@gmail.com wrote: If you want to give an irrelevant example at least give a correct one :D the difference between str and hex is an arcane difference (Ive never used hex) the difference between functions and procedures is absolutely

Re: python-daemon for Python v3

2014-01-19 Thread Ben Finney
Asaf Las roeg...@gmail.com writes: Is there ported to Python v3 python-daemon package? https://pypi.python.org/pypi/python-daemon/ Have a read through the archives for the ‘python-daemon-devel’ discussion forum URL:http://lists.alioth.debian.org/mailman/listinfo/python-daemon-devel, where we

Re: graphical python

2014-01-19 Thread Irmen de Jong
On 19-1-2014 6:40, buck wrote: I'm trying to work through Skienna's algorithms handbook, and note that the author often uses graphical representations of the diagrams to help understand (and even debug) the algorithms. I'd like to reproduce this in python. How would you go about this?

Re: python-daemon for Python v3

2014-01-19 Thread Asaf Las
On Sunday, January 19, 2014 12:41:31 PM UTC+2, Ben Finney wrote: Have a read through the archives for the ‘python-daemon-devel’ discussion forum URL:http://lists.alioth.debian.org/mailman/listinfo/python-daemon-devel, where we have had discussions about porting the library to Python 3. I'd be

Re: Need help vectorizing code

2014-01-19 Thread Oscar Benjamin
On 18 January 2014 20:51, Kevin K richyoke...@gmail.com wrote: I have some code that I need help vectorizing. I want to convert the following to vector form, how can I? I want to get rid of the inner loop - apparently, it's possible to do so. X is an NxD matrix. y is a 1xD vector. def

Re: question about input() and/or raw_input()

2014-01-19 Thread Grant Edwards
On 2014-01-18, Terry Reedy tjre...@udel.edu wrote: On 1/18/2014 1:30 PM, Roy Smith wrote: Pardon me for being cynical, but in the entire history of the universe, has anybody ever used input()/raw_input() for anything other than a homework problem? Homework problems (and 'toy' programs, such

Re: Can post a code but afraid of plagiarism

2014-01-19 Thread Grant Edwards
On 2014-01-18, indar kumar indarkuma...@gmail.com wrote: I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public http://www.python.org/community/jobs/ I'm sure once you've agreed on contract and

Re: question about input() and/or raw_input()

2014-01-19 Thread Ethan Furman
On 01/19/2014 12:26 AM, Rustom Mody wrote: On Sunday, January 19, 2014 10:29:58 AM UTC+5:30, Chris Angelico wrote: On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote: As do these pieces of code: -- def quux1(x): return str(x+1) -- def quux2(x): return hex(x+1)[2:] They do? -- quux1(2.3)

Re: question about input() and/or raw_input()

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman et...@stoneleaf.us wrote: -- def quux1(x): return str(x+1) -- quux1(2.3) '3.3' (Will be) fixed in 3.5 [1] :) [1] Which is to say, both will raise an exception. Why would that raise? ChrisA --

Re: question about input() and/or raw_input()

2014-01-19 Thread Grant Edwards
On 2014-01-19, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 19 Jan 2014 16:14:48 + (UTC), Grant Edwards invalid@invalid.invalid declaimed the following: On 2014-01-18, Terry Reedy tjre...@udel.edu wrote: On 1/18/2014 1:30 PM, Roy Smith wrote: Pardon me for being cynical, but in

Re: question about input() and/or raw_input()

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 4:42 AM, Grant Edwards invalid@invalid.invalid wrote: 2) I didn't claim that sys.stdin.readline() was as simple as using input. I didn't claim it was preferable. I merely presented it as a refutation to the argument that if you don't use input/raw_input then

Re: question about input() and/or raw_input()

2014-01-19 Thread Mark Lawrence
On 18/01/2014 18:41, Mark Lawrence wrote: On 18/01/2014 18:30, Roy Smith wrote: Pardon me for being cynical, but in the entire history of the universe, has anybody ever used input()/raw_input() for anything other than a homework problem? Not me personally. I guess raw_input must have been

Re: question about input() and/or raw_input()

2014-01-19 Thread Grant Edwards
On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote: On 18/01/2014 18:41, Mark Lawrence wrote: On 18/01/2014 18:30, Roy Smith wrote: Pardon me for being cynical, but in the entire history of the universe, has anybody ever used input()/raw_input() for anything other than a homework

Re: question about input() and/or raw_input()

2014-01-19 Thread Ethan Furman
On 01/19/2014 08:38 AM, Chris Angelico wrote: On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman et...@stoneleaf.us wrote: -- def quux1(x): return str(x+1) -- quux1(2.3) '3.3' (Will be) fixed in 3.5 [1] :) [1] Which is to say, both will raise an exception. Why would that raise? Sorry, should

Re: question about input() and/or raw_input()

2014-01-19 Thread Roy Smith
In article lbh4oc$nqv$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: I can still remember the point in my first trip to the UK when I accidentally stumbled across darts on TV. Given the endless variety (and quantity) of pointless crap that people watch here in the US, I

Re: question about input() and/or raw_input()

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman et...@stoneleaf.us wrote: The difference I was thinking of is: %h % 3.14 # this works vs. hex(3.14) # this raises In 3.5 both will raise. Now you have me *thoroughly* intrigued. It's not %h (incomplete format - h is a modifier), nor %H

Re: question about input() and/or raw_input()

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 5:37 AM, Roy Smith r...@panix.com wrote: What's so complicated? points = 501 for dart in throws(): if points - dart == 0 and dart.is_double(): raise YouWin if points - dart 0: continue points -= dart beer.drink() assert victory raise beer

What’s wrong with scientific Python?

2014-01-19 Thread candide
http://cyrille.rossant.net/whats-wrong-with-scientific-python/ Any comments ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Scalability TCP Server + Background Game

2014-01-19 Thread Philip Werner
On Sat, 18 Jan 2014 13:19:24 +, Mark Lawrence wrote: On 18/01/2014 12:40, phi...@gmail.com wrote: [snip the stuff I can't help with] Here's the link you need to sort the problem with double spacing from google groups https://wiki.python.org/moin/GoogleGroupsPython Thanks for the

Re: Python Scalability TCP Server + Background Game

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 5:53 AM, Philip Werner phi...@gmail.com wrote: On Sat, 18 Jan 2014 13:19:24 +, Mark Lawrence wrote: On 18/01/2014 12:40, phi...@gmail.com wrote: [snip the stuff I can't help with] Here's the link you need to sort the problem with double spacing from google

Re: What’s wrong with scientific Python?

2014-01-19 Thread Mark Lawrence
On 19/01/2014 18:46, candide wrote: http://cyrille.rossant.net/whats-wrong-with-scientific-python/ Any comments ? Not worth reading as doesn't seem to have anything new to say. As for Python 2 being obsolete, well I just give up :( -- My fellow Pythonistas, ask not what our language can

Re: question about input() and/or raw_input()

2014-01-19 Thread Grant Edwards
On 2014-01-19, Roy Smith r...@panix.com wrote: In article lbh4oc$nqv$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: I can still remember the point in my first trip to the UK when I accidentally stumbled across darts on TV. Given the endless variety (and quantity) of

Re: question about input() and/or raw_input()

2014-01-19 Thread Mark Lawrence
On 19/01/2014 18:15, Grant Edwards wrote: On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote: On 18/01/2014 18:41, Mark Lawrence wrote: On 18/01/2014 18:30, Roy Smith wrote: Pardon me for being cynical, but in the entire history of the universe, has anybody ever used

Re: What’s wrong with scientific Python?

2014-01-19 Thread Ben Finney
candide pascal.or...@gmail.com writes: http://cyrille.rossant.net/whats-wrong-with-scientific-python/ Any comments ? It's in need of a good summary. -- \ “I have never imputed to Nature a purpose or a goal, or | `\anything that could be understood as anthropomorphic.”

Re: question about input() and/or raw_input()

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 19/01/2014 18:15, Grant Edwards wrote: On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote: Actually, to go off at a tangent, I'm just getting into GUIs via wxPython. I've discovered there are distinct

Re: question about input() and/or raw_input()

2014-01-19 Thread Mark Lawrence
On 19/01/2014 19:24, Larry Martell wrote: On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 19/01/2014 18:15, Grant Edwards wrote: On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote: Actually, to go off at a tangent, I'm just getting into GUIs via

Re: python-daemon for Python v3

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las roeg...@gmail.com wrote: Hi Community Is there ported to Python v3 python-daemon package? https://pypi.python.org/pypi/python-daemon/ i am afraid it is not as simple as correction of relative path input feature and except clauses in mentioned

Re: graphical python

2014-01-19 Thread buck
On Sunday, January 19, 2014 12:19:29 AM UTC-8, Ian wrote: On Sat, Jan 18, 2014 at 10:40 PM, buck w***@gmail.com wrote: I'm trying to work through Skienna's algorithms handbook, and note that the author often uses graphical representations of the diagrams to help understand (and even

Re: question about input() and/or raw_input()

2014-01-19 Thread Ethan Furman
On 01/19/2014 10:41 AM, Chris Angelico wrote: On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman et...@stoneleaf.us wrote: The difference I was thinking of is: %h % 3.14 # this works vs. hex(3.14) # this raises In 3.5 both will raise. Now you have me *thoroughly* intrigued. It's not %h

Re: Help with simple code that has database defined

2014-01-19 Thread Denis McMahon
On Sat, 18 Jan 2014 18:23:01 -0800, indar kumar wrote: I have to save students information in a database that is keeping continuously track of the information. Format is as follows: You probably need to use one of the database modules. Note: if this name already exists there in database,

Re: question about input() and/or raw_input()

2014-01-19 Thread Gene Heskett
On Sunday 19 January 2014 15:11:52 Larry Martell did opine: On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 19/01/2014 18:15, Grant Edwards wrote: On 2014-01-19, Mark Lawrence breamore...@yahoo.co.uk wrote: Actually, to go off at a tangent, I'm just

Re: question about input() and/or raw_input()

2014-01-19 Thread Gene Heskett
On Sunday 19 January 2014 15:08:31 Roy Smith did opine: In article lbh4oc$nqv$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: I can still remember the point in my first trip to the UK when I accidentally stumbled across darts on TV. Given the endless variety (and

Re: graphical python

2014-01-19 Thread Ian Kelly
On Sun, Jan 19, 2014 at 12:30 PM, buck workithar...@gmail.com wrote: Thanks Ian. Have you personally used pyjs successfully? It's ominous that the examples pages are broken... I don't have any personal experience with either project. I don't know what's going on with pyjs.org currently, but

Re: question about input() and/or raw_input()

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 1:12 PM, Gene Heskett ghesk...@wdtv.com wrote: On Sunday 19 January 2014 15:11:52 Larry Martell did opine: On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 19/01/2014 18:15, Grant Edwards wrote: On 2014-01-19, Mark Lawrence

Documentation of dict views change request

2014-01-19 Thread Charles Hixson
Could it please be clearly documented that keys(), values(), and items() are not writeable. I agree that this is how they should be, but it would be still better if they were clearly documented as such. The labeling of them as dynamic, while true, was a bit confusing here. (I.e., it was

Re: Documentation of dict views change request

2014-01-19 Thread Mark Lawrence
On 19/01/2014 21:26, Charles Hixson wrote: Could it please be clearly documented that keys(), values(), and items() are not writeable. I agree that this is how they should be, but it would be still better if they were clearly documented as such. The labeling of them as dynamic, while true, was

Re: Documentation of dict views change request

2014-01-19 Thread Roy Smith
In article mailman.5728.1390166846.18130.python-l...@python.org, Charles Hixson charleshi...@earthlink.net wrote: Could it please be clearly documented that keys(), values(), and items() are not writeable. We'll, technically, they are. d = {'foo': 1, 'bar':2} k = d.keys() k ['foo',

Re: Documentation of dict views change request

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 8:40 AM, Roy Smith r...@panix.com wrote: In article mailman.5728.1390166846.18130.python-l...@python.org, Charles Hixson charleshi...@earthlink.net wrote: Could it please be clearly documented that keys(), values(), and items() are not writeable. We'll, technically,

Re: How to write this as a list comprehension?

2014-01-19 Thread Piet van Oostrum
John Allsup py...@allsup.co writes: Hi, I'd agree with the advice that it's not the best idea: readability sucks here, but consider the following: import time def somefunc(a,b,c,d): # dummy function return {} - {} - {} : {}.format(a,b,c,d) l = [(time.time(),name {}.format(n)) for n

Re: Documentation of dict views change request

2014-01-19 Thread Terry Reedy
On 1/19/2014 4:41 PM, Mark Lawrence wrote: On 19/01/2014 21:26, Charles Hixson wrote: Could it please be clearly documented that keys(), values(), and items() are not writeable. I agree that this is how they should be, but it would be still better if they were clearly documented as such. The

Re: Python program distribution - a source of constant friction

2014-01-19 Thread Göktuğ Kayaalp
On Mon, Jan 06, 2014 at 11:39:13PM +, Nicholas Cole wrote: This email is inspired by a YouTube video of a talk that Jessica McKellar Could you please share the link to the video please? recently gave. I was struck by her analysis that it is hard to remain a popular language (as Python

Re: How to write this as a list comprehension?

2014-01-19 Thread Rhodri James
On Sat, 18 Jan 2014 16:00:45 -, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Rustom Mody writes: On Saturday, January 18, 2014 2:06:29 PM UTC+5:30, Peter Otten wrote: What would a list-comp with `let` or `where` look like? Would it win the beauty contest against the loop? For

Re: [newbie] advice and comment wanted on first tkinter program

2014-01-19 Thread Jean Dupont
Op zaterdag 18 januari 2014 16:12:41 UTC+1 schreef Oscar Benjamin: On 18 January 2014 14:52, Jean Dupont jeandupont...@gmail.com wrote: Thanks Peter and Terry Jan for the useful suggestions. One thing which I find a bit weird: when asking for Python-help concerning raspberry pi code or

Re: python-daemon for Python v3

2014-01-19 Thread Asaf Las
On Sunday, January 19, 2014 9:30:21 PM UTC+2, larry@gmail.com wrote: On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las r@gmail.com wrote: I use this technique for demonizing: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ And has been ported to 3:

Re: Can post a code but afraid of plagiarism

2014-01-19 Thread Dan Stromberg
On Sat, Jan 18, 2014 at 10:31 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 18 Jan 2014 14:32:21 -0800, indar kumar wrote: @Roy Smith Can you help me privately because its an assignment and have to submit plagiarism free Then don't plagiarise. Plagiarism means

Re: python-daemon for Python v3

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 9:57 PM, Asaf Las roeg...@gmail.com wrote: On Sunday, January 19, 2014 9:30:21 PM UTC+2, larry@gmail.com wrote: On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las r@gmail.com wrote: I use this technique for demonizing:

Re: Can post a code but afraid of plagiarism

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 4:21 PM, Dan Stromberg drsali...@gmail.com wrote: I did a short time of teaching while I was in school. If three students all turned in the same assignment, they all got docked significantly. There was no who copied off of whom?, it was someone shared when they

Re: [newbie] advice and comment wanted on first tkinter program

2014-01-19 Thread Chris Angelico
On Mon, Jan 20, 2014 at 3:04 PM, Jean Dupont jeandupont...@gmail.com wrote: I started a thread [newbie] starting geany from within idle does not work both here and in the raspberry pi forum. I just wondered why I never got an answer concerning that topic. I saw that thread. It looked like a

Re: python-daemon for Python v3

2014-01-19 Thread Asaf Las
On Monday, January 20, 2014 8:19:04 AM UTC+2, larry@gmail.com wrote: Nope, no problems at all. Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Python declarative

2014-01-19 Thread Francesco Bochicchio
Looking at my own code after four years, I just realized that most of parentheses can be avoided by redefining the += operators to be a synonym of the add method. Go figure, I guess that with age it _does_ come a little wisdom ... :-) Ciao - FB --

Re: Can post a code but afraid of plagiarism

2014-01-19 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Mon, Jan 20, 2014 at 4:21 PM, Dan Stromberg drsali...@gmail.com wrote: I did a short time of teaching while I was in school. If three students all turned in the same assignment, they all got docked significantly. There was no who copied off of

Generating documentation for Python and JavaScript/AngularJS to the one doc server?

2014-01-19 Thread Alec Taylor
The advantages of this approach include: - Consistent docstring syntax everywhere - Centralsied documentation server; find all your docs in one place Search and jump-to-source from any documented function or class; in either language Are there any modules integrating with Sphinx or

[issue20301] Correct docs for default access argument for DeleteKeyEx

2014-01-19 Thread Justin Foo
New submission from Justin Foo: The default access for winreg.DeleteKeyEx is winreg.KEY_WOW64_64KEY (as per the function signature). This the documentation for Python 2.7 has this correct. Reference: http://hg.python.org/cpython/file/2e32462e4832/PC/winreg.c#l1089 -- assignee:

[issue20301] Correct docs for default access argument for DeleteKeyEx

2014-01-19 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +brian.curtin, tim.golden stage: - patch review type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20301 ___

[issue19906] Typo in urllib documentation

2014-01-19 Thread Ezio Melotti
Ezio Melotti added the comment: I think that what the note was trying to say is that urlopen in Python 3 is equivalent to urllib2.urlopen in Python 2, so before switching to Python 3, people might want to move from urllib.urlopen to urllib2.urlopen. Does the attached patch sound better?

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-19 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +eli.bendersky, scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9521 ___ ___

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-19 Thread Stefan Behnel
Stefan Behnel added the comment: When you write XML PI, do you mean the XML declaration? At least that's what Mark used in his original example. ET avoids writing them out when they are not necessary, i.e. for UTF-8 compatible encodings. IMHO that's perfectly ok and definitely not an

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-19 Thread Larry Hastings
Larry Hastings added the comment: Here is the hopefully-final patch for this issue. I incorporated the suggested changes from Zachary Ware. Also I fixed some cls parameters that were leaking into the signatures. I think this is ready for checkin! -- Added file:

[issue20293] pydoc fails with the unspecified default value

2014-01-19 Thread Larry Hastings
Larry Hastings added the comment: Closing. Reopen it if you get a reproducible test case with a fresh checkout of trunk. -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue20295] imghdr add openexr support

2014-01-19 Thread Martin Vignali
Martin Vignali added the comment: New patch with formatting correction and documentation update. I'm not sure about the place of the versionadded directive in the documentation. -- Added file: http://bugs.python.org/file33547/img_hdr_exr_2.patch ___

[issue20300] Argument Clinic raises exception for custom converter with default

2014-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc53c49d38c8 by Larry Hastings in branch 'default': Issue #20300: Fix exception when setting conversion class member default http://hg.python.org/cpython/rev/cc53c49d38c8 -- nosy: +python-dev ___ Python

[issue20300] Argument Clinic raises exception for custom converter with default

2014-01-19 Thread Larry Hastings
Larry Hastings added the comment: Thanks for the report. It was an easy fix. That said, I can't say I'm excited by the idea of a custom converter with a built-in default value. I hope you know what you're doing! -- assignee: - larry components: +Demos and Tools -Build resolution:

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: The relevant code in CallTips.py is argspec = if hasattr(ob, '__call__'): ... if isinstance(fob, (types.FunctionType, types.MethodType)): argspec = inspect.formatargspec(*inspect.getfullargspec(fob)) So I want to broaden the second condition (or

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Larry Hastings
Larry Hastings added the comment: I just want to mention, while we're all thinking about this stuff: I plan to enhance the Signature object to reflect optional groups. Right now Signature objects cannot express parameters that are optional but don't have a published default. (e.g. a string

[issue20295] imghdr add openexr support

2014-01-19 Thread SilentGhost
SilentGhost added the comment: Martin, it would be better if you do the check the way it's done in test_rast: h.startswith(b'\x76\x2f\x31\x01') Otherwise, you need to check that that h has at least 4 elements (if it doesn't you'll get an IndexError). -- nosy: +SilentGhost

[issue20300] Argument Clinic raises exception for custom converter with default

2014-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset d0e2437136f5 by Larry Hastings in branch 'default': Improve fix for issue #20300. http://hg.python.org/cpython/rev/d0e2437136f5 -- ___ Python tracker rep...@bugs.python.org

[issue3907] for line in file doesn't work for pipes

2014-01-19 Thread Francis Moreau
Francis Moreau added the comment: Sorry for reopening this bug, but I agree with the OP, and I can still see the exact same behaviour on python 2.7.6 (archlinux). At least, the documentation should clarify that doing for line in file is not strictly equivalent to the readline way regarding to

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Nick Coghlan
Nick Coghlan added the comment: Sounds reasonable - we'll need that to convert range() and slice() anyway (I totally failed at finding time to look at the builtins this weekend, but I'd still like to handle those before the 3rd beta). An alternative would be to actually add ParameterGroup as a

[issue20302] Argument Clinic: meaningful names for group flags

2014-01-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently flags for optional groups are named as group_left_N and group_right_N. It will be better if they have names use_param, use_param1_param2, etc. E.g. following declaration: /*[clinic input] curses.window.addstr self:

[issue20293] pydoc fails with the unspecified default value

2014-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just built from a new clone of trunk (last revision is d0e2437136f5), and I still get the error. -- resolution: works for me - stage: committed/rejected - status: closed - open ___ Python tracker

[issue20303] Argument Clinic: optional groups

2014-01-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: This is very very low priority issue. Currently Argument Clinic can't process following declaration: /*[clinic input] curses.window.chgat self: self(type=PyCursesWindowObject *) [ y: int Y-coordinate. x: int X-coordinate.

[issue20298] json library needs a non-strict option to decode single-quoted strings

2014-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +ezio.melotti, pitrou, rhettinger versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20298 ___

[issue20298] json library needs a non-strict option to decode single-quoted strings

2014-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is just not JSON. Try to use YAML parsers. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20298 ___

[issue19974] tarfile doesn't overwrite symlink by directory

2014-01-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Ah, thanks for the review, Serhiy. My bad. There is no underlying bug of tar. I was confused by the behaviour of tar which is converting the absolute path to relative path. So, adding '/home/user/dir/file' to tar when you are in '/home/user/dir' then

[issue20304] Argument Clinic: char convertor should use default values of type bytes

2014-01-19 Thread Tal Einat
New submission from Tal Einat: For example, in `Object/stringlib/transmogrify.h`, the methods `ljust` and `rjust` have an argument named `fillchar` of type char. It's Python default value should be b' ', but the only way I've found to do that is by setting `py_default = b' '`. --

[issue19974] tarfile doesn't overwrite symlink by directory

2014-01-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Serhiy commented, I think we should remove targetpath in all cases. Not only when softlink is extracted. I already did that in my latest patch but I am a little bit wary of this behaviour. -- ___ Python tracker

[issue20304] Argument Clinic: char convertor should use default values of type bytes

2014-01-19 Thread Tal Einat
Tal Einat added the comment: Additionally, the char converter doesn't create valid c defaults. For example, I got instead of ' ' for fillchar, which has type char, so I had to manually set c_default = ' '. -- ___ Python tracker

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, I saw your message on the tracker regarding adding support for parameters groups to the signature object. Would you mind if I join the discussion with my ideas of how this feature might be implemented? Yury On Sunday, January 19, 2014 at 5:44 AM,

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-19 Thread Nadeem Vawda
Nadeem Vawda added the comment: The patches for bz2 and lzma look good to me, aside from one nit for lzma. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20193 ___

[issue20305] Android's incomplete locale.h implementation prevents compilation

2014-01-19 Thread Shiz
New submission from Shiz: As a result of Android's relatively incomplete locale.h implementation[1], some functions are not defined and some standard structs are lacking fields (e.g. decimal_point, thousand_sep). This prevents proper cross-compilation using the Android NDK[2] from succeeding.

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-19 Thread Shiz
Changes by Shiz h...@shiz.me: -- title: Android's incomplete locale.h implementation prevents compilation - Android's incomplete locale.h implementation prevents cross-compilation ___ Python tracker rep...@bugs.python.org

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lemburg, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20305 ___ ___

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-01-19 Thread Shiz
New submission from Shiz: As the title states, mkpwent() in pwdmodule.c accesses `pw_gecos`, which is not defined for struct passwd in Bionic, Android's C library. Attached is a patch that works around the issue by setting the field to None on Android. -- components: Cross-Build

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-01-19 Thread Shiz
New submission from Shiz: Bionic, Android's C library, fails to expose the SYS_* constants used for the syscall(1) interface, which causes compilation of the _posixsubprocess module to fail as it directly attempts to call SYS_getdents64. Attached is an experimental patch that manually defines

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I'd be +1 on such a patch if we were to officially support Android, but we'd need a volunteer to champion for this (which would be a good thing, IMO). Otherwise, such changes need to be maintained externally. --

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-01-19 Thread Shiz
Shiz added the comment: I of course meant the syscall(2) interface, not syscall(1). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20307 ___ ___

[issue19990] Add unittests for imghdr module

2014-01-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. Here's a new version which uses real image files as testing data. -- Added file: http://bugs.python.org/file33552/test_imghdr_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19990

[issue19997] imghdr.what doesn't accept bytes paths

2014-01-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Updated patch to use real image files from issue #19990. -- Added file: http://bugs.python.org/file33553/imghdr_bytes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19997

[issue19906] Typo in urllib documentation

2014-01-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Yep, it sounds better. There's an additional warning in urllib.urlopen which states a similar thing: warnpy3k(urllib.urlopen() has been removed in Python 3.0 in favor of urllib2.urlopen(), stacklevel=2) --

[issue19776] Provide expanduser() on Path objects

2014-01-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Antoine, is this feature still wanted? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yuri, I am sure your ideas for enhancing signature objects would be welcome. Either a new issue or a thread on pydev or python-ideas lists would be best. When responding by email, please snip the quotation and footer, except possibly a line of the quoted

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Yury Selivanov
Yury Selivanov added the comment: Terry, Thanks. When responding by email, please snip the quotation and footer, except possibly a line of the quoted message. My email client played an evil (and a bit embarrassing) trick with me, showing Larry's name without an actual email address,

[issue20294] Argument Clinic: add support for __init__

2014-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Larry, now I can use Argument Clinic in the __init__ methods. But there is one problem. Docstring generated for the __init__ method contains the __init__ name in the signature. Therefore it can't be used as class docstring. On other hand, the

[issue20295] imghdr add openexr support

2014-01-19 Thread Martin Vignali
Martin Vignali added the comment: You're right, i make the correction, in a new patch. I make other tests, with official sample files : http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.4.0.tar.gz -- Added file: http://bugs.python.org/file33554/img_hdr_exr_3.patch

[issue20295] imghdr add openexr support

2014-01-19 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hi, Martin. Please see issue19990, which tries to add unit tests for imghdr module. It would be nice if you could expand on it with an exr file, for your use case. -- nosy: +Claudiu.Popa ___ Python tracker

  1   2   >