ANN: Bokeh 0.5.1 released

2014-07-24 Thread Damian Avila
On behalf of the Bokeh team, I am very happy to announce the release of Bokeh version 0.5.1! (http://continuum.io/blog/bokeh-0. http://continuum.io/blog/bokeh-0.55.1) Bokeh is a Python library for visualizing large and realtime datasets on the web. This release includes many bug fixes and

PyTexas 2014 Conference

2014-07-24 Thread Glen Zangirolami
Pythonistas, PyTexas 2014 http://pytexas.org/ is well on its way. This year it will be be located at the Texas AM University Memorial Student Center https://www.pytexas.org/2014/about/venue/ and will take place Friday October 3rd through Sunday October 5th. Friday will be a tutorial day. Saturday

Re: My sys.excepthook dies painfully

2014-07-24 Thread Jason Swails
On Wed, Jul 23, 2014 at 6:30 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 23 Jul 2014 13:02:51 -0700, Jason Swails wrote: I'm not sure how the mylogger variable is getting set to None in your my_error_handler callback, but I don't see how that can possibly be

Re: Question about asyncio doc example

2014-07-24 Thread Terry Reedy
On 7/24/2014 1:15 AM, Saimadhav Heblikar wrote: On 24 July 2014 05:54, Terry Reedy tjre...@udel.edu wrote: On 7/23/2014 6:43 AM, Saimadhav Heblikar wrote: Hi, The example in question is https://docs.python.org/3/library/asyncio-task.html#example-hello-world-coroutine. I'd like to learn the

one to many (passing variables)

2014-07-24 Thread Martin S
My coding is slowly (*) progress at the moment. Looking at my more or less horrible efforts so far one (well that's understatement) questions pops up. How do you pass data from one function to many? I have functions A B and C. If data generated in A is useable in both B and C how do I ensure this

Re: one to many (passing variables)

2014-07-24 Thread Chris Angelico
On Thu, Jul 24, 2014 at 4:36 PM, Martin S shieldf...@gmail.com wrote: How do you pass data from one function to many? I have functions A B and C. If data generated in A is useable in both B and C how do I ensure this data is passed as needed? Or is it a symptom of bad code? This is a little

Re: Question about asyncio doc example

2014-07-24 Thread Marko Rauhamaa
Terry Reedy tjre...@udel.edu: 18.5.3. Tasks and coroutines, seems to be devoid of event wait examples. However, there is a 'yield from' network example in 18.5.5 Streams using socket functions wrapped with coroutines. These should definitely be used instead of sleep. In fact, for

Re: one to many (passing variables)

2014-07-24 Thread Martin S
Function A collects data and then calls function B with some, but also has data that should be passed to function C. But ofc if nested functions are allowed then that might solve the issue. I don't think I've seen nested functions mentioned in a tutorial I've been looking at. /martin s On

Re: one to many (passing variables)

2014-07-24 Thread Chris Angelico
On Thu, Jul 24, 2014 at 5:27 PM, Martin S shieldf...@gmail.com wrote: Function A collects data and then calls function B with some, but also has data that should be passed to function C. But ofc if nested functions are allowed then that might solve the issue. I don't think I've seen nested

Re: one to many (passing variables)

2014-07-24 Thread Steven D'Aprano
On Thu, 24 Jul 2014 09:27:10 +0200, Martin S wrote: Function A collects data and then calls function B with some, but also has data that should be passed to function C. It might help if you give a bit more information. How does it collect data, how does it decide which bits of information

Re: one to many (passing variables)

2014-07-24 Thread Ben Finney
Martin S shieldf...@gmail.com writes: I have functions A B and C. If data generated in A is useable in both B and C how do I ensure this data is passed as needed? Or is it a symptom of bad code? This is very vague; an accurate answer is “it depends”. You seem to be asking about how to design

Re: My sys.excepthook dies painfully

2014-07-24 Thread Steven D'Aprano
On Thu, 24 Jul 2014 11:50:47 +1000, Chris Angelico wrote: On Thu, Jul 24, 2014 at 11:30 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: However, I think I have a glimmer of an idea for how the global variable might be set to None. When the Python interpreter shuts down, it

Re: OT: usenet reader software

2014-07-24 Thread cl
Sturla Molden sturla.mol...@gmail.com wrote: Monte Milanuk memila...@gmail.com wrote: Aaaannnd here we have a good example of why it would be really nice to be able to filter/score based on the message *body*, not just the headers. 8( Actually, here we have the reason why Usenet died.

Re: My sys.excepthook dies painfully

2014-07-24 Thread Chris Angelico
On Thu, Jul 24, 2014 at 8:12 PM, Steven D'Aprano st...@pearwood.info wrote: Would it be possible to snapshot all critical globals with a closure, to force them to be held? Something like: Probably. Or even as default argument parameters. But I'd like to know if that's actually fixing it or

Re: Distributing python applications as a zip file

2014-07-24 Thread Alan
On Wednesday, July 23, 2014 4:43:11 AM UTC-4, Leo jay wrote: But if you use windows and you happen to use multiprocessing, please be aware of this bug I encountered several years ago. https://mail.python.org/pipermail/python-dev/2011-December/115071.html It looks like this was fixed for 3.2.

What is the simplest method to get a vector result?

2014-07-24 Thread fl
Hi, I have read a lot about Python, but it still has a problem now on a simple exercise. For example, I want to generate a sine curve. First, I get a time sequence: index=range(100) I import math module, try to calculate sine with math.sin(index*math.pi/2) but it fails. It is possible to

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Alan
You can use `list(math.sin(x * math.pi / 2) for x in index)` or use `numpy`, which supports array math. -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Vlastimil Brom
2014-07-24 14:53 GMT+02:00 fl rxjw...@gmail.com: Hi, I have read a lot about Python, but it still has a problem now on a simple exercise. For example, I want to generate a sine curve. First, I get a time sequence: index=range(100) I import math module, try to calculate sine with

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Steven D'Aprano
On Thu, 24 Jul 2014 05:53:12 -0700, fl wrote: Hi, I have read a lot about Python, but it still has a problem now on a simple exercise. For example, I want to generate a sine curve. First, I get a time sequence: index=range(100) I import math module, try to calculate sine with

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Marko Rauhamaa
fl rxjw...@gmail.com: I have read a lot about Python, but it still has a problem now on a simple exercise. For example, I want to generate a sine curve. Here you go: #!/usr/bin/env python3 import math for x in range(0,

Exploring Python for next desktop GUI Project

2014-07-24 Thread Noble Bell
I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of requirements. My requirements will be: 1. Needs to be portable across platforms with native LAF (Windows,Linux,OSX) 2. Python 2 or 3? Which will serve me

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread INADA Naoki
1. PyQt (or PySide) 2. Python 2 will be legacy soon. Use Python 3 for new project. wxPython is also good option but doesn't support Python 3 for now. I don't know when wxPhenix (next wxPython supporting Python 3) will be released. On Fri, Jul 25, 2014 at 12:57 AM, Noble Bell nobleb...@gmail.com

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Zachary Ware
On Thu, Jul 24, 2014 at 10:57 AM, Noble Bell nobleb...@gmail.com wrote: I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of requirements. My requirements will be: 1. Needs to be portable across platforms

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 1:57 AM, Noble Bell nobleb...@gmail.com wrote: I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of requirements. My requirements will be: 1. Needs to be portable across platforms

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Noble Bell
On Thursday, July 24, 2014 10:57:22 AM UTC-5, Noble Bell wrote: I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of requirements. My requirements will be: 1. Needs to be portable across platforms

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Grant Edwards
On 2014-07-24, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Thu, Jul 24, 2014 at 10:57 AM, Noble Bell nobleb...@gmail.com wrote: I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of requirements. My

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 2:29 AM, Noble Bell nobleb...@gmail.com wrote: I was leaning toward Python 3 and Tkinter. I suppose the best way to do the GUI with Tkinter is to just roll-up my sleeves and do it via code rather than with the aid of a GUI editor. Yep. In fact, I recommend that for

Re: Question about asyncio doc example

2014-07-24 Thread Ian Kelly
On Jul 24, 2014 1:26 AM, Marko Rauhamaa ma...@pacujo.net wrote: Terry Reedy tjre...@udel.edu: 18.5.3. Tasks and coroutines, seems to be devoid of event wait examples. However, there is a 'yield from' network example in 18.5.5 Streams using socket functions wrapped with coroutines. These

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris “Kwpolska” Warrick
On Jul 24, 2014 6:28 PM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Thu, Jul 24, 2014 at 10:57 AM, Noble Bell nobleb...@gmail.com wrote: I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 3:04 AM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: I personally recommend PyQt4/PySide. wxPython is also worth checking out. And it might be better to stay with Python 2, there are still things that don't work with Py3k that you might find crucial. Can you be

Re: Question about asyncio doc example

2014-07-24 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com: Callbacks can easily schedule coroutines, but they can't wait on them, because that would require suspending their execution, dropping back to the event loop, and resuming later -- in other words, the callback would need to be a coroutine also. I guess the

How can I import unnecessary_math?

2014-07-24 Thread fl
Hi, I want to write some test code. Some on-line tutorials have such codes: from unnecessary_math import multiply When it runs, it has errors: from unnecessary_math import multiply Traceback (most recent call last): File interactive input, line 1, in module ImportError: No module named

Re: How can I import unnecessary_math?

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 3:33 AM, fl rxjw...@gmail.com wrote: Hi, I want to write some test code. Some on-line tutorials have such codes: from unnecessary_math import multiply Which tutorials? That's where you'll find the answer to your question. ChrisA --

Re: How can I import unnecessary_math?

2014-07-24 Thread Ian Kelly
On Thu, Jul 24, 2014 at 11:33 AM, fl rxjw...@gmail.com wrote: Hi, I want to write some test code. Some on-line tutorials have such codes: from unnecessary_math import multiply When it runs, it has errors: from unnecessary_math import multiply Traceback (most recent call last): File

Re: How can I import unnecessary_math?

2014-07-24 Thread fl
On Thursday, July 24, 2014 1:37:49 PM UTC-4, Chris Angelico wrote: On Fri, Jul 25, 2014 at 3:33 AM, fl r...@gmail.com wrote: Hi, I want to write some test code. Some on-line tutorials have such codes: from unnecessary_math import multiply Which tutorials? That's where you'll find the

Re: How can I import unnecessary_math?

2014-07-24 Thread fl
On Thursday, July 24, 2014 1:48:02 PM UTC-4, fl wrote: On Thursday, July 24, 2014 1:37:49 PM UTC-4, Chris Angelico wrote: On Fri, Jul 25, 2014 at 3:33 AM, fl rx...@gmail.com wrote: Thanks. The source of that snippet is from this link:

Re: How can I import unnecessary_math?

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 3:54 AM, fl rxjw...@gmail.com wrote: It is also a question about the symbol '@' on that link. I don't find an explanation about '@' yet. Could you tell me? Thanks, @with_setup(my_setup_function, my_teardown_function) def test_numbers_3_4(): print

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Mark Lawrence
On 24/07/2014 17:18, Chris Angelico wrote: On Fri, Jul 25, 2014 at 1:57 AM, Noble Bell nobleb...@gmail.com wrote: I am exploring the idea of creating my next desktop GUI project in Python and would like a little advice from you folks about a couple of requirements. My requirements will be: 1.

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 4:04 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 24/07/2014 17:18, Chris Angelico wrote: The first one is certainly possible. Pick any of the well-known toolkits (Tkinter, wxwidgets, GTK, etc), and see how it feels. All of them are portable across the three

Re: How can I import unnecessary_math?

2014-07-24 Thread Terry Reedy
On 7/24/2014 1:58 PM, Chris Angelico wrote: On Fri, Jul 25, 2014 at 3:54 AM, fl rxjw...@gmail.com wrote: It is also a question about the symbol '@' on that link. I don't find an explanation about '@' yet. Could you tell me? The Python docs have an index. I STRONGLY recommend that everyone

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Zachary Ware
On Thu, Jul 24, 2014 at 11:37 AM, Grant Edwards invalid@invalid.invalid wrote: On 2014-07-24, Zachary Ware zachary.ware+pyl...@gmail.com wrote: The Python standard library includes the tkinter package, which is an interface to Tcl/Tk. That's not always true for Linux systems. AFAIK, all

Re: How can I import unnecessary_math?

2014-07-24 Thread fl
On Thursday, July 24, 2014 1:58:45 PM UTC-4, Chris Angelico wrote: On Fri, Jul 25, 2014 at 3:54 AM, fl rxj...@gmail.com wrote: @with_setup(my_setup_function, my_teardown_function) def test_numbers_3_4(): print 'test_numbers_3_4 actual test code'

Re: How can I import unnecessary_math?

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 4:17 AM, Terry Reedy tjre...@udel.edu wrote: That's a function decorator. You can look them up on the web now that you know what they're called. :) The Symbol index page was added to make knowing names unnecessary. And I clock this up on my learn something every day

Re: Using pyVmomi

2014-07-24 Thread Ethan Furman
On 07/23/2014 01:14 PM, Joseph L. Casale wrote: I am doing some scripting with pyVmomi under 2.6.8 so the code may run directly on a vmware esxi server. As the code is long running, it surpasses the authentication timeout. For anyone familiar with this code and/or this style of programming,

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Zachary Ware
On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Tk is neither sane How so? Like any other facet of programming, using Tk(inter) has it's frustrations, but for the most part it has always worked as expected for me. Granted, I haven't done anything terribly

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris Angelico
On Fri, Jul 25, 2014 at 4:33 AM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On other platforms, it also is not 100% native. On Windows, at least, ttk comes very very close to it. What exactly does that mean? The Windows default UI changed significantly from W2K - XP - Win8, and each

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Chris “Kwpolska” Warrick
On Thu, Jul 24, 2014 at 8:33 PM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Tk is neither sane How so? Like any other facet of programming, using Tk(inter) has it's frustrations, but for the most

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Zachary Ware
On Thu, Jul 24, 2014 at 1:51 PM, Chris Angelico ros...@gmail.com wrote: On Fri, Jul 25, 2014 at 4:33 AM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Windows, at least, ttk comes very very close to [a 100% native look]. What exactly does that mean? The Windows default UI changed

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Glenn Linderman
On 7/24/2014 11:15 AM, Chris Angelico wrote: On Fri, Jul 25, 2014 at 4:04 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 24/07/2014 17:18, Chris Angelico wrote: The first one is certainly possible. Pick any of the well-known toolkits (Tkinter, wxwidgets, GTK, etc), and see how it feels.

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Ian Kelly
On Thu, Jul 24, 2014 at 1:02 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: AFAIK, Qt follows the system style properly, and it looks quite native on every Windows OS. No idea about ttk though. My understanding is that Qt merely emulates the native LAF, although it does a good job of

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Zachary Ware
On Thu, Jul 24, 2014 at 2:02 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Pretty much everyone in the world hates Tcl and Tk. Ask your favorite search engine for some results. Whee, I'm an alien! ;) I'm not saying Tk is the best thing since sliced bread, I just don't see what so

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Noble Bell
On Thursday, July 24, 2014 2:32:04 PM UTC-5, Ian wrote: On Thu, Jul 24, 2014 at 1:02 PM, Chris Kwpolska Warrick kwpol...@gmail.com wrote: AFAIK, Qt follows the system style properly, and it looks quite native on every Windows OS. No idea about ttk though. My understanding is

How to place several import .... lines in one .py file?

2014-07-24 Thread fl
Hi, I have seen several kinds of module import examples, but most of the programs are small and less content. They only have one or two module import. I'll use the following modules in a small project. I would like to know whether it is appropriate to put all of them at the file header, like

Re: How to place several import .... lines in one .py file?

2014-07-24 Thread Ian Kelly
On Thu, Jul 24, 2014 at 2:25 PM, fl rxjw...@gmail.com wrote: Hi, I have seen several kinds of module import examples, but most of the programs are small and less content. They only have one or two module import. I'll use the following modules in a small project. I would like to know

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Rob Gaddi
On Thu, 24 Jul 2014 13:10:03 -0700 (PDT) Noble Bell nobleb...@gmail.com wrote: If I were to us wxPython then I would be limited to Python 2.x at present. If I were to use PyQt I would have to pay, as I understand the licenses, for it to use in commercial programs and/or programs that I ask

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Grant Edwards
On 2014-07-24, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Tk is neither sane How so? Like any other facet of programming, using Tk(inter) has it's frustrations, but for the most part it has always

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Michael Torrie
On 07/24/2014 01:11 PM, Glenn Linderman wrote: Not knowing any of these GUI platforms (although I've read some about Tk), I have some questions. * Which of them use UTF-8 as their native Unicode interface? * Which makes it easiest to discover and adjust font metrics such as kerning?

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Grant Edwards
On 2014-07-24, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: On Thu, Jul 24, 2014 at 8:33 PM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Tk is neither sane How so? Like any other facet of

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Michael Torrie
On 07/24/2014 12:51 PM, Chris Angelico wrote: On Fri, Jul 25, 2014 at 4:33 AM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On other platforms, it also is not 100% native. On Windows, at least, ttk comes very very close to it. What exactly does that mean? The Windows default UI

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Michael Torrie
On 07/24/2014 01:32 PM, Ian Kelly wrote: On Thu, Jul 24, 2014 at 1:02 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: AFAIK, Qt follows the system style properly, and it looks quite native on every Windows OS. No idea about ttk though. My understanding is that Qt merely emulates the

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Michael Torrie
On 07/24/2014 10:46 AM, Chris Angelico wrote: On Fri, Jul 25, 2014 at 2:29 AM, Noble Bell nobleb...@gmail.com wrote: I was leaning toward Python 3 and Tkinter. I suppose the best way to do the GUI with Tkinter is to just roll-up my sleeves and do it via code rather than with the aid of a GUI

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread ismeal shanshi
Herion, Ketamine,Actavis promethazine codeine 16oz and 32oz available Ketamine Oxycontine Hydrocodone xanax and medicated marijuana US- free shipping and other related products for sell at competitive prices.We do world wide shipping to any clear address.Delivery is 100% safe due to our

RE: Using pyVmomi

2014-07-24 Thread Joseph L. Casale
You could: - have a single point of entry that can check and, if necessary, revalidate - create a helper that checks and, if necessary, revalidate, which is then called where ever needed - create a decorator that does the above for each function that needs it Hi Ethan,

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Gregory Ewing
Chris Angelico wrote: The Windows default UI changed significantly from W2K - XP - Win8, and each time, it's possible to revert to the old styling; Well, sort of. I find that using the classic theme with Win7 is a less-than-satisfying experience, because it still lays things out the same way

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Terry Reedy
On 7/24/2014 3:11 PM, Glenn Linderman wrote: Not knowing any of these GUI platforms (although I've read some about Tk), I have some questions. * Which of them use UTF-8 as their native Unicode interface? tk uses UCS-2 internally for the BMP subset. It does not display astral chars. tkinter

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Terry Reedy
On 7/24/2014 1:04 PM, Chris “Kwpolska” Warrick wrote: And it might be better to stay with Python 2, there are still things that don't work with Py3k that you might find crucial. It is true that there are 3rd-party modules that do not work with 3.x, including a few that one might want to use

Re: What is the simplest method to get a vector result?

2014-07-24 Thread fl
On Thursday, July 24, 2014 10:25:52 AM UTC-4, Marko Rauhamaa wrote: #!/usr/bin/env python3 import math for x in range(0, 361, 15): print(int((math.sin(x / 180 * math.pi) + 1) * 30 + 0.5) * + *) Marko

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Ian Kelly
On Thu, Jul 24, 2014 at 7:29 PM, fl rxjw...@gmail.com wrote: On Thursday, July 24, 2014 10:25:52 AM UTC-4, Marko Rauhamaa wrote: #!/usr/bin/env python3 import math for x in range(0, 361, 15): print(int((math.sin(x / 180 * math.pi) + 1) * 30 + 0.5) * + *)

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Dave Angel
fl rxjw...@gmail.com Wrote in message: I am puzzled about the last part of your code and want to learn from it ( * + * ). 6 * + x will produce a string of 6 blanks followed by an x. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the simplest method to get a vector result?

2014-07-24 Thread Steven D'Aprano
On Thu, 24 Jul 2014 22:44:51 -0400, Dave Angel wrote: fl rxjw...@gmail.com Wrote in message: I am puzzled about the last part of your code and want to learn from it ( * + * ). 6 * + x will produce a string of 6 blanks followed by an x. Dave is correct, but if you want to

ANN: bcolz 0.7.0, columnar, chunked and compressed datasets at your fingertips

2014-07-24 Thread Francesc Alted
== Announcing bcolz 0.7.0 == What's new == In this release, support for Python 3 has been added, Pandas and HDF5/PyTables conversion, support for different compressors via latest release of Blosc, and a new `iterblocks()` iterator. Also,

Re: Question about Pass-by-object-reference?

2014-07-24 Thread alex23
On 23/07/2014 10:27 AM, Terry Reedy wrote: When you call a function, Python binds function parameter names to argument objects in the function's local namespace, the same as in name assignments. Given def f(a, b): pass a call f(1, 'x') starts by executing a, b = 1, 'x' in the local

[issue22055] Incomplete sentence in asyncio BaseEventLoop doc

2014-07-24 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: -- assignee: docs@python components: Documentation, asyncio files: asyncio-eventloop-doc-incomplete-sent.diff keywords: patch nosy: docs@python, gvanrossum, haypo, sahutd, yselivanov priority: normal severity: normal status:

[issue21580] PhotoImage(data=...) apparently has to be UTF-8 or Base-64 encoded

2014-07-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I will try test the problem and fix on Windows within a day. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21580 ___

[issue22052] Comparison operators called in reverse order for subclasses with no override.

2014-07-24 Thread Mark Dickinson
Mark Dickinson added the comment: the subclass provides doesn't actually imply anything about overriding, I think. Yes, that was the thrust of one of the SO answers. Unfortunately, that explanation doesn't work for arithmetic operators, though: there an explicit override is necessary.

[issue16733] Solaris ctypes_test failures

2014-07-24 Thread Mark Lawrence
Mark Lawrence added the comment: Only one Solaris box was online when I looked and that had passed ctypes tests, but surely this will have been sorted out by now? -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker

[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: I don't remember why I added a specific check on the proto parameter. I tested on Windows: socket.socket(proto=1) raises an OSError(WSAEPROTONOSUPPORT): WSAEPROTONOSUPPORT 10043: Protocol not supported. The requested protocol has not been configured into

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-24 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: I came up with a patch that shifts the compatibility hack we have for the tuple form of exec from run-time (in exec_statement()) to the CST-to-AST transformation (in ast_for_exec_stmt()). It seems to pass the tests (including the ones Robert pasted in here).

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-24 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Oh, one specific question: I'm not sure if I should free the old expr1 (the top-level exec value) before overwriting it with the new one. -- ___ Python tracker rep...@bugs.python.org

[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: By the way, we should reuse socket.socketpair() in asyncio.windows_utils. The Tulip is written for Python 3.3 and shares exactly the same code base, so you should write Something like: if hasattr(socket, 'socketpair'): socketpair =

[issue19875] test_getsockaddrarg occasional failure

2014-07-24 Thread Mark Lawrence
Mark Lawrence added the comment: Clearly the long term solution is to fix the problems in the cpython code referenced in msg205227, but in the short term is it worth attempting a work around as suggested in msg205131 ? -- nosy: +BreamoreBoy ___

[issue22055] Incomplete sentence in asyncio BaseEventLoop doc

2014-07-24 Thread Andrew Svetlov
New submission from Andrew Svetlov: Fixed in f578e1d717b7 and f578e1d717b7. Thanks. -- nosy: +asvetlov resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22055

[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: 2014-07-24 10:11 GMT+02:00 Charles-François Natali rep...@bugs.python.org: Please also fix socketpair() in asyncio to add the while/drop unknown connection (well, the function in socket.py and windows_utils.py must be the same). That's a separate issue.

[issue20055] On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py

2014-07-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 84f26a437893 by Victor Stinner in branch '3.4': Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence. http://hg.python.org/cpython/rev/84f26a437893 New changeset f657b64c67ab by Victor Stinner in branch 'default': (Merge 3.4) Issue

[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: I don't understand this. If you're ok with calling fileno() under Linux, why not under Windows? I propose to add set_wakeup_socket() for all platforms. This function doesn't really call the fileno() method, it gets the socket file descriptor/socket handle

[issue19884] Importing readline produces erroneous output

2014-07-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0177d8a4e82a by Victor Stinner in branch '2.7': Issue #19884: readline: Disable the meta modifier key if stdout is not a http://hg.python.org/cpython/rev/0177d8a4e82a New changeset 6303266beb80 by Victor Stinner in branch '3.4': Issue #19884:

[issue19884] Importing readline produces erroneous output

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: I commited my patch. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19884 ___

[issue21813] Enhance doc of os.stat_result

2014-07-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 833325d45113 by Victor Stinner in branch '3.4': Issue #21813: Enhance documentation of the os.stat_result class. http://hg.python.org/cpython/rev/833325d45113 New changeset 5d70ac83d104 by Victor Stinner in branch 'default': Issue #21813: Enhance

[issue21813] Enhance doc of os.stat_result

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: Thanks Zachary Ware for your review. I'm not sure that I addressed all your comments, but I'm not interested to spend too much time on the documentation. Please open an issue if your saw other things that can be improved. -- resolution: - fixed

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-24 Thread akira
akira added the comment: STINNER Victor rep...@bugs.python.org writes: I have implemented and would continue to lean towards continuing to hide BrokenPipeError on the additional API endpoints. FYI asyncio.Process.communicate() ignores BrokenPipeError and ConnectionResetError, whereas

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: Do Popen.write_nonblocking() and Popen.read_nonblocking() methods belong to the second category? Should they raise BrokenPipeError? IMO when you write directly to stdin and read from stdout/stderr of a child process, your code should be written to handle

[issue13533] Would like Py_Initialize to play friendly with host app

2014-07-24 Thread Yukihiro Nakadaira
Yukihiro Nakadaira added the comment: This problem easily happen when there is no python installation and there is standalone python application compiled with py2exe or cx_Freeze (e.g. Mercurial). Such application have pythonXX.dll in its directory. But its python library can not be loaded

[issue5718] Problem compiling ffi part of build on AIX 5.3.

2014-07-24 Thread David Edelsohn
David Edelsohn added the comment: ffi_closure_helper_DARWIN should have been declared extern in the assembly file. This has been fixed in more recent versions of libffi and imported into more recent versions of CPython, including 2.7. .extern .ffi_closure_helper_DARWIN Is it worth updating

[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 24/07/2014 06:00, STINNER Victor a écrit : STINNER Victor added the comment: I don't understand this. If you're ok with calling fileno() under Linux, why not under Windows? I propose to add set_wakeup_socket() for all platforms. That's not what I'm

[issue5718] Problem compiling ffi part of build on AIX 5.3.

2014-07-24 Thread Stefan Krah
Stefan Krah added the comment: Thanks, David. If this is fixed in 2.7 we can close the issue. -- nosy: +skrah resolution: - out of date stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

2014-07-24 Thread akira
akira added the comment: I've made the title more explicit: curses.isblank function doesn't match ctype.h - curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09) If a core developer could review the open questions from the previous message msg221008 then I

[issue21813] Enhance doc of os.stat_result

2014-07-24 Thread Zachary Ware
Zachary Ware added the comment: The only comments you didn't address you were right not to (sorry for the noise about path_fd, I completely missed that it was just a link reference); what you committed looks fine to me. Thanks for your work on this, it looks like a big improvement to me!

[issue20055] On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py

2014-07-24 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- Removed message: http://bugs.python.org/msg223821 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20055 ___

[issue22055] Incomplete sentence in asyncio BaseEventLoop doc

2014-07-24 Thread Zachary Ware
Zachary Ware added the comment: Misposted to #20055: New changeset 84f26a437893 by Victor Stinner in branch '3.4': Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence. http://hg.python.org/cpython/rev/84f26a437893 New changeset f657b64c67ab by Victor Stinner in branch

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2014-07-24 Thread Alon Mishne
New submission from Alon Mishne: According to the documentation of eval(): If the globals dictionary is present and lacks '__builtins__', the current globals are copied into globals before expression is parsed. However in practice only the __builtins__ items are copied, see:

  1   2   >