scalar vs array and program control

2015-07-24 Thread Seb
Hello, I'm fairly new to Python, struggling to write in a more object-oriented, functional style. I just wrote a function that takes two arrays representing sine (y) and cosine (x) angle coordinates, and returns the angle in degrees. I had initially written the function to take array-like argume

Re: what windows compiler for python 3.5?

2015-07-24 Thread Mark Lawrence
On 24/07/2015 13:24, Brian Gladman wrote: On 24/07/2015 12:04, Chris Angelico wrote: On Fri, Jul 24, 2015 at 8:53 PM, Robin Becker wrote: yes I build extensions for reportlab. Unfortunately, despite our MSDN subscription to the Visual Studio stuff we have no access to the Visual Studio Version

Re: How may I learn Python Web Frameworks

2015-07-24 Thread Nonami Animashaun
The official Django docs is pretty detailed https://docs.djangoproject.com/en/1.8/ You could also look at the Django book but it confesses to being written for version 1.4 even though it goes ahead to assure us that it's not outdated https://django-book.readthedocs.org/en/latest/ -- https://mail.

Re: About this mailing list

2015-07-24 Thread Nonami Animashaun
On Fri, Jul 24, 2015 at 9:27 PM, Stéphane Wirtel wrote: > Hi all, > > This mail is just to check if you receive it because I think I have a > problem with this list. > > Could you reply me to check it works ? > We hear you loud and clear > > Thank you > > You are welcome > -- > Stéphane Wirtel

Re: Which GUI?

2015-07-24 Thread Mark Lawrence
On 24/07/2015 23:20, Frank Miles wrote: On Fri, 24 Jul 2015 19:31:36 +0100, Paulo da Silva wrote: [snip] Which technology is better? matplotlib? tkinter? wxwidgets? qt? Sadly - I don't think wxpython has been ported to python3 yet. http://wxpython.org/Phoenix/docs/html/main.html -- My f

Re: Which GUI?

2015-07-24 Thread Frank Miles
On Fri, 24 Jul 2015 19:31:36 +0100, Paulo da Silva wrote: [snip] > Which technology is better? > matplotlib? > tkinter? > wxwidgets? > qt? Sadly - I don't think wxpython has been ported to python3 yet. -- https://mail.python.org/mailman/listinfo/python-list

Re: 42**1000000 is CPU time free

2015-07-24 Thread candide
Thanks to all for your response, I was not aware that the interpreter evaluated pure litteral expressions at compile time. -- https://mail.python.org/mailman/listinfo/python-list

Re: 42**1000000 is CPU time free

2015-07-24 Thread Cecil Westerhof
On Friday 24 Jul 2015 22:54 CEST, candide wrote: > Of course, computing 42**100 is not free: > > > # -- > import time > > a=time.clock() > > N=100 > 42**N > > b=time.clock() > > print("CPU TIME :", b - a) > # -- > > > ~~ > CPU TIM

Re: 42**1000000 is CPU time free

2015-07-24 Thread Mark Lawrence
On 24/07/2015 21:54, candide wrote: Of course, computing 42**100 is not free: # -- import time a=time.clock() N=100 42**N b=time.clock() print("CPU TIME :", b - a) # -- ~~ CPU TIME : 2.37 real0m2.412s user0m2.388

Re: 42**1000000 is CPU time free

2015-07-24 Thread Zachary Ware
On Fri, Jul 24, 2015 at 3:54 PM, candide wrote: > Of course, computing 42**100 is not free: > So please, explain the following: > > (focus on the CPU TIME!!) In your second example, the peephole optimizer gets hold of it and does the calculation at compile time: Python 3.4.3 (v3.4.3:9b73f1c

Re: 42**1000000 is CPU time free

2015-07-24 Thread Chris Kaynor
As you are doing an operation on a literal, Python is computing the value at import time, which occurs before your time.clock() calls run. Basically, what you really wrote in your code is: import time a = time.clock() 42000...00 # Replace the ... with z

Re: About this mailing list

2015-07-24 Thread Stéphane Wirtel
Blast ;) On 24 Jul 2015, at 22:38, Mark Lawrence wrote: > On 24/07/2015 21:27, Stéphane Wirtel wrote: >> Hi all, >> >> This mail is just to check if you receive it because I think I have a >> problem with this list. >> >> Could you reply me to check it works ? >> >> Thank you >> >> -- >> Stéphane

42**1000000 is CPU time free

2015-07-24 Thread candide
Of course, computing 42**100 is not free: # -- import time a=time.clock() N=100 42**N b=time.clock() print("CPU TIME :", b - a) # -- ~~ CPU TIME : 2.37 real0m2.412s user0m2.388s sys 0m0.016s ~~~

Re: password authentication failed (SOLVED)

2015-07-24 Thread Gary Roach
On 07/22/2015 04:44 PM, Chris Angelico wrote: On Thu, Jul 23, 2015 at 9:35 AM, Gary Roach wrote: At this point, I'm confused about a few things. Does the postgresql server and my archivedb reside globally or are they inside my archivedb virtual environment. I think globally. Your virtual envir

Re: register cleanup handler

2015-07-24 Thread Rob Gaddi
On Fri, 24 Jul 2015 12:01:58 -0400, Neal Becker wrote: > > This would work, but is not very elegant. I hope for a better way. > > need_cleanup = False try: >if (condition): > do_something_needing_cleanup need_cleanup = True >else: > do_something_else >code_executed_uncon

Re: About this mailing list

2015-07-24 Thread Mark Lawrence
On 24/07/2015 21:27, Stéphane Wirtel wrote: Hi all, This mail is just to check if you receive it because I think I have a problem with this list. Could you reply me to check it works ? Thank you -- Stéphane Wirtel - http://wirtel.be - @matrixise No, sorry :) -- My fellow Pythonistas, ask n

About this mailing list

2015-07-24 Thread Stéphane Wirtel
Hi all, This mail is just to check if you receive it because I think I have a problem with this list. Could you reply me to check it works ? Thank you -- Stéphane Wirtel - http://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list

Re: Which GUI?

2015-07-24 Thread Cecil Westerhof
On Friday 24 Jul 2015 20:37 CEST, Christopher Mullins wrote: > You might checkout pyqtgraph. I think a ton of the examples will be > relevant to your use case. Top-posting is (rightly) frowned upon in this group. Could you use inline posting next time? A3: Please. Q3: Should I avoid top postin

Re: How may I learn Python Web Frameworks

2015-07-24 Thread darnold via Python-list
you'll find a very extensive Flask tutorial at http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world . -- https://mail.python.org/mailman/listinfo/python-list

Re: what windows compiler for python 3.5?

2015-07-24 Thread mm0fmf via Python-list
On 24/07/2015 11:53, Robin Becker wrote: yes I build extensions for reportlab. Unfortunately, despite our MSDN subscription to the Visual Studio stuff we have no access to the Visual Studio Version 2015. Last one in my downloads is currently 2013. Pity. I received an email today re my work MSDN

Re: Which GUI?

2015-07-24 Thread Laura Creighton
You may be interested in bokeh. http://bokeh.pydata.org/en/latest/ It's a python interactive visualisation library. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: what windows compiler for python 3.5?

2015-07-24 Thread ElChino
Brian Gladman wrote: > Visual Studio 2015 Community was relased earlier this week so there is no need to work with the prerelease version. Hope MS have fixed all the "internal compiler errors". E.g. trying to compile GeoIpApi-C [1], consistently reports: libGeoIP/regionName.c(7596): fatal er

Re: Which GUI?

2015-07-24 Thread Christopher Mullins
You might checkout pyqtgraph. I think a ton of the examples will be relevant to your use case. On Fri, Jul 24, 2015 at 1:31 PM, Paulo da Silva < p_s_d_a_s_i_l_v_a...@netcabo.pt> wrote: > Hi all! > > I am about to write an application (python3 in linux) that needs: > > 1. Display time series grap

Which GUI?

2015-07-24 Thread Paulo da Silva
Hi all! I am about to write an application (python3 in linux) that needs: 1. Display time series graphics dynamically changed as the application runs, i.e. the graphics should reflect some internal variables states. 2. The same but for some network like diagrams. Basically nodes and connections

Re: How may I learn Python Web Frameworks

2015-07-24 Thread Laura Creighton
web2py http://www.web2py.com/ has extensive tutorials, videos, and a book. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: register cleanup handler

2015-07-24 Thread Neal Becker
Irmen de Jong wrote: > On 24-7-2015 16:57, Neal Becker wrote: >> I have code like: >> >> if (condition): >> do_something_needing_cleanup >> >> code_executed_unconditionally >> >> > continue or exception> >> >> Now, how can I make sure cleanup happens? Actually, what I really would >> like,

How may I learn Python Web Frameworks

2015-07-24 Thread subhabrata . banerji
Dear Group, I am slightly new in Python Web Frameworks. I could learn bit of Django, Flask and Bottle. But I am looking for a good web based tutorial like Python or NLTK. Somehow, I did not find documentations for web frameworks are very good, one has to do lot of experiments even to learn bas

Re: register cleanup handler

2015-07-24 Thread Irmen de Jong
On 24-7-2015 16:57, Neal Becker wrote: > I have code like: > > if (condition): > do_something_needing_cleanup > > code_executed_unconditionally > > or exception> > > Now, how can I make sure cleanup happens? Actually, what I really would > like, is: > > if (condition): > do_something_ne

Re: register cleanup handler

2015-07-24 Thread Neal Becker
Laura Creighton wrote: > In a message of Fri, 24 Jul 2015 10:57:30 -0400, Neal Becker writes: >>I know we have try/finally, but I don't think that helps here, because >>code_executed_unconditionally couldn't be inside the try. Or am I missing >>something obvious? > > I think so. Either that or

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-24 Thread Mark Lawrence
On 24/07/2015 15:13, Grant Edwards wrote: On 2015-07-24, Paul Rubin wrote: Grant Edwards writes: You can always pick out the topologist at a conference: he's the one trying to dunk his coffee cup in his doughnut. Did you hear about the idiot topologist? He couldn't tell his butt from a ho

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-24 Thread Paul Rubin
Grant Edwards writes: >> Did you hear about the idiot topologist? He couldn't tell his butt >> from a hole in the ground, but he *could* tell his butt from two >> holes in the ground. > > Wow. Now I know _two_ topologist jokes. The girls are going to be > impressed! I got it from here: http:/

Re: register cleanup handler

2015-07-24 Thread Laura Creighton
In a message of Fri, 24 Jul 2015 10:57:30 -0400, Neal Becker writes: >I know we have try/finally, but I don't think that helps here, because >code_executed_unconditionally couldn't be inside the try. Or am I missing >something obvious? I think so. Either that or I am badly misunderstanding you.

register cleanup handler

2015-07-24 Thread Neal Becker
I have code like: if (condition): do_something_needing_cleanup code_executed_unconditionally Now, how can I make sure cleanup happens? Actually, what I really would like, is: if (condition): do_something_needing_cleanup register_scoped_cleanup (cleanup_fnc) code_executed_unconditiona

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-24 Thread Grant Edwards
On 2015-07-24, Paul Rubin wrote: > Grant Edwards writes: > >> You can always pick out the topologist at a conference: he's the one >> trying to dunk his coffee cup in his doughnut. > > Did you hear about the idiot topologist? He couldn't tell his butt > from a hole in the ground, but he *could*

Re: Integers with leading zeroes

2015-07-24 Thread alister
On Wed, 22 Jul 2015 20:11:47 -0600, Michael Torrie wrote: > On 07/22/2015 07:51 AM, Grant Edwards wrote: >> On 2015-07-22, Ben Finney wrote: >>> Laura Creighton writes: >>> The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the l

Re: Find Minimum for element in multiple dimensional array

2015-07-24 Thread Robert Davis
On Wednesday, July 22, 2015 at 5:54:30 PM UTC-5, Robert Davis wrote: > Given a set of arrays within an array how do I find the arrays with the > minimum values based on two elements/columns in the array? Those two > elements/columns are the destination zip code and distance. > > I have an array

Re: what windows compiler for python 3.5?

2015-07-24 Thread Brian Gladman
On 24/07/2015 12:04, Chris Angelico wrote: > On Fri, Jul 24, 2015 at 8:53 PM, Robin Becker wrote: >> yes I build extensions for reportlab. Unfortunately, despite our MSDN >> subscription to the Visual Studio stuff we have no access to the Visual >> Studio Version 2015. Last one in my downloads is

Re: problem with selecting remote procedure calls

2015-07-24 Thread eric johansson
- Original Message - From: "Irmen de Jong" Eric, if you're concerned about performance, Pyro4 (the source distribution) comes with several examples that do simple performance related tests. You could run these and see what figures you get on your setup to see if it's anywhere a

Re: what windows compiler for python 3.5?

2015-07-24 Thread Mark Lawrence
On 24/07/2015 11:53, Robin Becker wrote: On 24/07/2015 11:38, Chris Angelico wrote: On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker wrote: ... more searching I find this on the 3.5 b1 download page "Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is

Re: what windows compiler for python 3.5?

2015-07-24 Thread Chris Angelico
On Fri, Jul 24, 2015 at 8:53 PM, Robin Becker wrote: > yes I build extensions for reportlab. Unfortunately, despite our MSDN > subscription to the Visual Studio stuff we have no access to the Visual > Studio Version 2015. Last one in my downloads is currently 2013. Pity. Ah. You may well be somew

Re: what windows compiler for python 3.5?

2015-07-24 Thread Robin Becker
On 24/07/2015 11:38, Chris Angelico wrote: On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker wrote: ... more searching I find this on the 3.5 b1 download page "Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is not yet officially released. (It's current

Re: what windows compiler for python 3.5?

2015-07-24 Thread Chris Angelico
On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker wrote: > On 24/07/2015 11:20, Robin Becker wrote: >> >> I read this >> >> https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the >> release as 3.6.0a0 :) >> >> but failed to find any details regarding which windows compiler is >> re

Re: what windows compiler for python 3.5?

2015-07-24 Thread Robin Becker
On 24/07/2015 11:20, Robin Becker wrote: I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. more searching I find this on the 3.5 b1 download page "Windows u

what windows compiler for python 3.5?

2015-07-24 Thread Robin Becker
I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list