Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Lawrence D’Oliveiro
On Friday, July 1, 2016 at 1:39:04 PM UTC+12, Ben Finney wrote: > Christian Gollwitzer writes: > >> The best place these days to publish software is on github. > > For what value of “best”? > > If one wants to avoid vendor lock-in, Github is not best: the workflow > tools (other than Git itself)

Re: Creating a calculator

2016-06-30 Thread Jussi Piitulainen
DFS writes: > Here's a related program that doesn't require you to tell it what type > of operation to perform. Just enter 'num1 operator num2' and hit > Enter, and it will parse the entry and do the math. > > --- > ui=raw_input('Enter calculation to pe

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Christian Gollwitzer
Am 01.07.16 um 01:16 schrieb Random832: On Thu, Jun 30, 2016, at 19:06, Lawrence D’Oliveiro wrote: On Friday, July 1, 2016 at 1:09:31 AM UTC+12, Christian Gollwitzer wrote: Github makes that extremely easy, just create an account, create a repo, "git pull" and start working. Your incremental ch

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Christian Gollwitzer
Am 01.07.16 um 03:38 schrieb Ben Finney: Christian Gollwitzer writes: The best place these days to publish software is on github. For what value of “best”? The question was about visibility of a project for a single beginner developer. If one wants to avoid vendor lock-in, Github is no

Re: Find a file

2016-06-30 Thread Karim
On 01/07/2016 02:51, tdspe...@gmail.com wrote: Hi All I have a web app that allows me to choose a file - the file name is returned but I need to find the path to the file so I can add it as an attachment to a email. The files I am returning could be in different folders/directories. Thanks

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Christian Gollwitzer
Am 01.07.16 um 01:12 schrieb Lawrence D’Oliveiro: On Friday, July 1, 2016 at 10:35:42 AM UTC+12, Chris Angelico wrote: On Fri, Jul 1, 2016 at 8:27 AM, Lawrence D’Oliveiro wrote: GUIs, by their nature, are not designed to be automated. Doesn't mean they can't be! It’s more trouble than it’

Re: Lost in descriptor land

2016-06-30 Thread Lawrence D’Oliveiro
On Friday, July 1, 2016 at 1:06:12 PM UTC+12, Ankush Thakur wrote: > 1) I don't get the idea behind the 'instance' and 'owner' parameters at > all. Is there some simple tutorial that can explain these? Read the GvR blog post I referenced separately. Then after that, the relevant section of the la

Re: Creating a calculator

2016-06-30 Thread Michael Torrie
On 06/30/2016 09:08 PM, Elizabeth Weiss wrote: > while True: > print("Options:") > print("Enter 'add' to add two numbers") > print("Enter 'subtract' to subtract two numbers") > print("Enter 'multiply' to multiply two numbers") > print("Enter 'divide' to divide two numb

Re: Lost in descriptor land

2016-06-30 Thread Lawrence D’Oliveiro
On Friday, July 1, 2016 at 1:06:12 PM UTC+12, Ankush Thakur wrote: > There's something I don't understand about descriptors. There’s a lot to not understand about them. :) Every time I feel unsure, I go back to the horse’s mouth: here

Creating a calculator

2016-06-30 Thread Elizabeth Weiss
while True: print("Options:") print("Enter 'add' to add two numbers") print("Enter 'subtract' to subtract two numbers") print("Enter 'multiply' to multiply two numbers") print("Enter 'divide' to divide two numbers") print("Enter 'quit' to end the prog

Re: Iteration, while loop, and for loop

2016-06-30 Thread jfong
Steven D'Aprano at 2016/6/30 7:59:40AM wrote: > py> mi = list('bananas') > py> for char in mi: > ... if char == 'a': > ... mi.extend(' yum') > ... print(char, end='') > ... else: # oh no, the feared for...else! > ... # needed to prevent the prompt overwriting the output > .

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Ben Finney
Christian Gollwitzer writes: > The best place these days to publish software is on github. For what value of “best”? If one wants to avoid vendor lock-in, Github is not best: the workflow tools (other than Git itself) are completely closed and not available for implementation on another vendor'

Re: Lost in descriptor land

2016-06-30 Thread Ian Kelly
On Thu, Jun 30, 2016 at 7:06 PM, Ankush Thakur wrote: > Hello, > > There's something I don't understand about descriptors. On a StackOverflow > discussion > (http://stackoverflow.com/questions/12846116/python-descriptor-vs-property) > one of the answers provides the following descriptors exampl

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Steven D'Aprano
On Thu, 30 Jun 2016 11:09 pm, Christian Gollwitzer wrote: > The best place these days to publish software is on github. http://nedbatchelder.com/blog/201405/github_monoculture.html -- Steven “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse.

Lost in descriptor land

2016-06-30 Thread Ankush Thakur
Hello, There's something I don't understand about descriptors. On a StackOverflow discussion (http://stackoverflow.com/questions/12846116/python-descriptor-vs-property) one of the answers provides the following descriptors example: class Celsius( object ): def __init__( self, value=0.0 ):

Find a file

2016-06-30 Thread tdsperth
Hi All I have a web app that allows me to choose a file - the file name is returned but I need to find the path to the file so I can add it as an attachment to a email. The files I am returning could be in different folders/directories. Thanks for any help. Cheers Colin -- https://mail.pyt

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Maitland Montmorency
On Thursday, June 30, 2016 at 3:35:42 PM UTC-7, Chris Angelico wrote: > On Fri, Jul 1, 2016 at 8:27 AM, Lawrence D’Oliveiro > wrote: > > On Friday, July 1, 2016 at 7:22:43 AM UTC+12, Maitland Montmorency wrote: > >> I'd like to use Python to do some simple OSX GUI manipulations such as > >> automa

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Random832
On Thu, Jun 30, 2016, at 19:06, Lawrence D’Oliveiro wrote: > On Friday, July 1, 2016 at 1:09:31 AM UTC+12, Christian Gollwitzer wrote: > > Github makes that extremely easy, just create an account, create a repo, > > "git pull" and start working. Your incremental changes will be updated > > with e

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Lawrence D’Oliveiro
On Friday, July 1, 2016 at 10:35:42 AM UTC+12, Chris Angelico wrote: > > On Fri, Jul 1, 2016 at 8:27 AM, Lawrence D’Oliveiro wrote: >> >> GUIs, by their nature, are not designed to be automated. > > Doesn't mean they can't be! It’s more trouble than it’s worth. Different (even minor) versions of

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Chris Angelico
On Fri, Jul 1, 2016 at 9:06 AM, Lawrence D’Oliveiro wrote: > On Friday, July 1, 2016 at 1:09:31 AM UTC+12, Christian Gollwitzer wrote: >> Github makes that extremely easy, just create an account, create a repo, >> "git pull" and start working. Your incremental changes will be updated >> with each

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Lawrence D’Oliveiro
On Friday, July 1, 2016 at 1:09:31 AM UTC+12, Christian Gollwitzer wrote: > Github makes that extremely easy, just create an account, create a repo, > "git pull" and start working. Your incremental changes will be updated > with each "git push". I start with “git init” and never pull, only push.

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Chris Angelico
On Fri, Jul 1, 2016 at 8:27 AM, Lawrence D’Oliveiro wrote: > On Friday, July 1, 2016 at 7:22:43 AM UTC+12, Maitland Montmorency wrote: >> I'd like to use Python to do some simple OSX GUI manipulations such as >> automatically arranging windows, periodically refreshing applications >> across multip

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Lawrence D’Oliveiro
On Friday, July 1, 2016 at 7:22:43 AM UTC+12, Maitland Montmorency wrote: > I'd like to use Python to do some simple OSX GUI manipulations such as > automatically arranging windows, periodically refreshing applications > across multiple desktops, etc.. > > I have tried to learn Applescript and Aut

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread hasan . diwan
>On 6/30/2016 3:22 PM, you wrote: >> I'd like to use Python to do some simple OSX GUI manipulations such >> as automatically arranging windows, periodically refreshing >> applications across multiple desktops, etc.. Is this possible and if >> so, is there a preferred package? Please see this page

Re: fastest way to read a text file in to a numpy array

2016-06-30 Thread Christian Gollwitzer
Am 30.06.16 um 17:49 schrieb Heli: Dear all, After a few tests, I think I will need to correct a bit my question. I will give an example here. I have file 1 with 250 lines: X1,Y1,Z1 X2,Y2,Z2 Then I have file 2 with 3M lines: X1,Y1,Z1,value11,value12, value13, X2,Y2,Z2,value21,value22

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Chris Angelico
On Fri, Jul 1, 2016 at 6:30 AM, Terry Reedy wrote: >> Seeking FMs to RT, so to speak. > > > Derivative of the old expression, "RTFM". Normally it means "Go read the manual that you ought to have already read", but AIUI, the OP is saying that he'd be happy to be pointed to documentation somew

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Terry Reedy
On 6/30/2016 3:22 PM, maitlandmontmore...@gmail.com wrote: I'd like to use Python to do some simple OSX GUI manipulations such as automatically arranging windows, periodically refreshing applications across multiple desktops, etc.. Is this possible and if so, is there a preferred package? Cpyt

Controlling the Mac OSX GUI via Python?

2016-06-30 Thread maitlandmontmorency
I'd like to use Python to do some simple OSX GUI manipulations such as automatically arranging windows, periodically refreshing applications across multiple desktops, etc.. Is this possible and if so, is there a preferred package? I know that Qt, Tkinter, and such are available for heavy-duty

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Fri, 1 Jul 2016 01:28 am, Rustom Mody wrote: > On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > >> you state that Turing "believes in souls" and that he "wishes to >> put the soul into the machine" -- what do his religious beliefs have to >> do with his work? > > Bi

Re: Operator Precedence/Boolean Logic

2016-06-30 Thread Steven D'Aprano
On Fri, 1 Jul 2016 02:01 am, Rustom Mody wrote: > On Thursday, June 30, 2016 at 5:10:41 AM UTC+5:30, Steven D'Aprano wrote: >> On Wed, 29 Jun 2016 11:30 pm, Rustom Mody wrote: >> >> > The other answers -- graphs and automata -- are questionable and/or >> > wrong >> > >> > You may wish to think a

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Thu, 30 Jun 2016 08:11 pm, Andreas Rc3b6hler wrote: > > > On 30.06.2016 10:24, Steven D'Aprano wrote: >> On Thursday 30 June 2016 12:13, Rustom Mody wrote: >> >> >> The irrational and emotional psychological forces that inspire >> mathematicians can make interesting reading, but they have no

Re: Operator Precedence/Boolean Logic

2016-06-30 Thread Rustom Mody
On Thursday, June 30, 2016 at 5:10:41 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 29 Jun 2016 11:30 pm, Rustom Mody wrote: > > > The other answers -- graphs and automata -- are questionable and/or wrong > > > > You may wish to think about them again? > > You may wish to justify your assertion.

Re: fastest way to read a text file in to a numpy array

2016-06-30 Thread Heli
Dear all, After a few tests, I think I will need to correct a bit my question. I will give an example here. I have file 1 with 250 lines: X1,Y1,Z1 X2,Y2,Z2 Then I have file 2 with 3M lines: X1,Y1,Z1,value11,value12, value13, X2,Y2,Z2,value21,value22, value23,... I will need to

Re: Can math.atan2 return INF?

2016-06-30 Thread Rustom Mody
On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > you state that Turing "believes in souls" and that he "wishes to > put the soul into the machine" -- what do his religious beliefs have to do > with > his work? Bizarre question -- becomes more patently ridiculous when

Re: Can math.atan2 return INF?

2016-06-30 Thread alister
On Thu, 30 Jun 2016 09:24:43 +0300, Marko Rauhamaa wrote: > Lawrence D’Oliveiro : >> Every time somebody tries to point to an example of a “topic that is >> beyond the reach of science”, it seems to get knocked over eventually. > > Of course, an experiment trumps theory, always. > > > Marko in

Re: sample chatting apps in pyqt

2016-06-30 Thread Michael Torrie
On 06/30/2016 07:45 AM, tommy yama wrote: > Hi all, > > Let me post my question here > Has anyone installed and run any of sample chat apps in pyqt? > > Although I've tried to install and run sample scripts in pyqt once, the > error said pyqt must be reinstalled. If you paste the error message h

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread MRAB
On 2016-06-30 14:09, Christian Gollwitzer wrote: Am 30.06.16 um 14:48 schrieb Natsu Dragneel: Im asking this because im working on a small project, but i won't say what it is because i want to do it completely on myself. I just say it has something to do with Steam and a Feature they rly need t

sample chatting apps in pyqt

2016-06-30 Thread tommy yama
Hi all, Let me post my question here Has anyone installed and run any of sample chat apps in pyqt? Although I've tried to install and run sample scripts in pyqt once, the error said pyqt must be reinstalled. Appreciate for your suggestions. Thanks. Tomo -- https://mail.python.org/mailman/list

Gramps 3.4 problem in ubuntu 16.04, maybe GTK related

2016-06-30 Thread ennoborg
Hello, I'm a Gramps user, and developer, and for a couple of reasons, I like to stay with GTK+2 based Gramps 3.4. This version works fine on Mint 17.3, and ubuntu versions up to 15.10, but not on Mint 18, or ubuntu 16.04. In the Gramps 3.4 GUI, which uses PyGTK, I have a tree view for persons,

Re: Iteration, while loop, and for loop

2016-06-30 Thread Ian Kelly
On Wed, Jun 29, 2016 at 5:59 PM, Steven D'Aprano wrote: > But there's no need to go to such effort for a mutable iterator. This is > much simpler: > > py> mi = list('bananas') > py> for char in mi: > ... if char == 'a': > ... mi.extend(' yum') > ... print(char, end='') > ... el

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Christian Gollwitzer
Am 30.06.16 um 14:48 schrieb Natsu Dragneel: Im asking this because im working on a small project, but i won't say what it is because i want to do it completely on myself. I just say it has something to do with Steam and a Feature they rly need to add there... so i write it myself :D and it alre

Re: Iteration, while loop, and for loop

2016-06-30 Thread Ian Kelly
On Wed, Jun 29, 2016 at 5:59 PM, Steven D'Aprano wrote: > I'm curious what REPL you are using, because in the vanilla Python > interactive interpreter, the output if over-written by the prompt. That is, > what I see in Python 3.6 is: > > py> nas yum yum yumpy> > > unless I take steps to prevent th

Were is a great place to Share your finished projects?

2016-06-30 Thread Natsu Dragneel
Im asking this because im working on a small project, but i won't say what it is because i want to do it completely on myself. I just say it has something to do with Steam and a Feature they rly need to add there... so i write it myself :D and it already is finished it only needs a GUI now. An

Re: Errors in installation of matplotlib and pandas on Macbook

2016-06-30 Thread tommy yama
Hi there, Why you would not use pip and anaconda for panda installation? It seems much easier to do the same. https://www.continuum.io/downloads#_macosx *Tomomi

Re: Iteration, while loop, and for loop

2016-06-30 Thread Tim Chase
On 2016-06-30 09:59, Steven D'Aprano wrote: > But there's no need to go to such effort for a mutable iterator. > This is much simpler: > > py> mi = list('bananas') > py> for char in mi: > ... if char == 'a': > ... mi.extend(' yum') > ... print(char, end='') > ... else: #

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 11:42, Lawrence D’Oliveiro wrote: On Thursday, June 30, 2016 at 9:31:29 PM UTC+12, Andreas Röhler wrote: Science is not about believing, but about models. The nice thing about science is, it works even if you don’t believe in it. Thats it! -- https://mail.python.org/mailman/

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 10:24, Steven D'Aprano wrote: On Thursday 30 June 2016 12:13, Rustom Mody wrote: The irrational and emotional psychological forces that inspire mathematicians can make interesting reading, but they have no relevance in deciding who is write or wrong. Hmm, so math is not inspir

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 9:31:29 PM UTC+12, Andreas Röhler wrote: > Science is not about believing, but about models. The nice thing about science is, it works even if you don’t believe in it. -- https://mail.python.org/mailman/listinfo/python-list

EuroPython 2016: On-desk rates and day passes

2016-06-30 Thread M.-A. Lemburg
It’s getting really close to the conference now and we will be switching to the on-desk rates for tickets on July 8. The prices will increase by about 30%, so if you want to still get tickets at the normal rate, please register for EuroPython 2016 as soon as possible: *** EuroPy

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 10:24, Steven D'Aprano wrote: On Thursday 30 June 2016 12:13, Rustom Mody wrote: [ ... ] Besides, the whole point of science is to develop objective, rational reasons to believe things. Science is not about believing, but about models. Believing is important to make the career

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Peter Otten
Lawrence D’Oliveiro wrote: > On Thursday, June 30, 2016 at 7:26:01 PM UTC+12, Peter Otten wrote: >> foo = lambda : >> >> there is syntactic sugar in Python that allows you to write it as >> >> def foo(): >> return >> >> with the nice side effects that it improves the readability of traceb

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Thursday 30 June 2016 17:16, Lawrence D’Oliveiro wrote: > The definition of “random” is “unknowable”. It really isn't. What Julius Caesar had for breakfast on the day after his 15th birthday is unknowable. To the best of our knowledge, the collapse of a quantum wave function is random.

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Thursday 30 June 2016 12:13, Rustom Mody wrote: > OTOH Computer Science HAPPENED because mathematicians kept hotly disputing > for more than ½ a century as to what is legitimate math and what is > theology/mysticism/etc: I really don't think so. Computer science happened because people invente

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Steven D'Aprano
On Thursday 30 June 2016 17:43, Lawrence D’Oliveiro wrote: > On Thursday, June 30, 2016 at 7:26:01 PM UTC+12, Peter Otten wrote: >> foo = lambda : >> >> there is syntactic sugar in Python that allows you to write it as >> >> def foo(): >> return >> >> with the nice side effects that it im

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 7:26:01 PM UTC+12, Peter Otten wrote: > foo = lambda : > > there is syntactic sugar in Python that allows you to write it as > > def foo(): > return > > with the nice side effects that it improves the readability of tracebacks > and allows you to provide a do

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 7:32:55 PM UTC+12, Paul Rubin wrote: > Lawrence D’Oliveiro writes: >> The definition of “random” is “unknowable”. So all you are stating is >> a tautology. > > What? No. You read a bunch of bits out of the device and you want to > know whether they are Kolmogorov-ra

Re: Can math.atan2 return INF?

2016-06-30 Thread Paul Rubin
Lawrence D’Oliveiro writes: > The definition of “random” is “unknowable”. So all you are stating is > a tautology. What? No. You read a bunch of bits out of the device and you want to know whether they are Kolmogorov-random (you can look up what that means if you're not familiar with it). Quan

Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Peter Otten
Lawrence D’Oliveiro wrote: > On Tuesday, June 28, 2016 at 5:03:08 PM UTC+12, Ben Finney wrote: > >> I would like to see a more Pythonic, more explicit and expressive >> replacement with its component parts easily understood. > > I don’t know why this fear and suspicion of lambdas is so widesprea

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 7:13:36 PM UTC+12, Andreas Röhler wrote: > On 30.06.2016 03:33, Lawrence D’Oliveiro wrote: > >> So you see, like it or not, we are drawn to the conclusion that there >> *was* indeed something before our particular Big Bang. > > That's linear like the Big Bang theorie

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 6:57:41 PM UTC+12, Paul Rubin wrote: >> Every time somebody tries to point to an example of a “topic that is >> beyond the reach of science”, it seems to get knocked over eventually. > > Generate a sequence of "random" bits from your favorite physical source > (radio

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 03:33, Lawrence D’Oliveiro wrote: So you see, like it or not, we are drawn to the conclusion that there *was* indeed something before our particular Big Bang. That's linear like the Big Bang theorie. What about assuming something beyond our notion of time and space, unknown s

Re: Errors in installation of matplotlib and pandas on Macbook

2016-06-30 Thread Chris Angelico
On Thu, Jun 30, 2016 at 4:21 PM, Madhavan Bomidi wrote: > How should I modify the profile/configuration of locale permanently? Is it > possible to do this on terminal other than using 'export' command always and > including the commands in .bash_profile? > > How does this locale configuration af

Re: Can math.atan2 return INF?

2016-06-30 Thread Paul Rubin
> Every time somebody tries to point to an example of a “topic that is > beyond the reach of science”, it seems to get knocked over eventually. Generate a sequence of "random" bits from your favorite physical source (radioactive decay, quantum entanglement, or whatever). Is the sequence really al