Re: Question about math.pi is mutable

2015-11-07 Thread Marko Rauhamaa
Grant Edwards : > On 2015-11-07, Marko Rauhamaa wrote: >> "const" is a very ineffective tool that clutters the code and forces >> you to sprinkle type casts around your code. > > But it allows the compiler to warn you if you pass a pointer to a > read-only data to a function that expects a pointe

Re: Question about math.pi is mutable

2015-11-07 Thread Random832
Steven D'Aprano writes: > Surely that is obvious? I don't speak much C, but I would expect that inside > the functions, const parameters can be read, but not assigned to. "*const" > is a mystery to me though. There's a program (and now a website) called cdecl that can decode these: char *const e

Is there an archive of the gohlke python binaries on windows

2015-11-07 Thread Sayth Renshaw
Just wondering if there is an archive mirror for these binaries available. i was looking for lxml 3.4.1 and the current version is the latest on the page at 3.4.4 being on windows I cannot build it. http://www.lfd.uci.edu/~gohlke/pythonlibs/ Thanks Sayth -- https://mail.python.org/mailman/lis

Re: [Ubuntu] PyQt5

2015-11-07 Thread Vincent Vande Vyvre
Le 08/11/2015 04:13, Andrew Diamond a écrit : Hi! I'm fairly new to Python, and installed pyqt5 and began working through the examples at http://zetcode.com/gui/pyqt5/menustoolbars/ However, whenever I click one of the buttons or menus in the example apps I run that is supposed to quit the a

Re: Question about math.pi is mutable

2015-11-07 Thread Steven D'Aprano
On Sun, 8 Nov 2015 01:23 am, Marko Rauhamaa wrote: > Bartc : > >> Not just my option. From this 2010 paper for example ('High performance >> implementation of Python for CLI ...' by Antonio Cuni): >> >> "As a language, Python is very hard to implement efficiently: the >> presence of highly dynami

Re: Question about math.pi is mutable

2015-11-07 Thread Grant Edwards
On 2015-11-07, Marko Rauhamaa wrote: > Grant Edwards : > >> I take it you don't write embedded code that runs from ROM? I do. The >> const keyword is the most valuable addition to the C language since >> the function prototype. Without it, you used to have to jump through >> all sorts of hoops to

[Ubuntu] PyQt5

2015-11-07 Thread Andrew Diamond
Hi! I'm fairly new to Python, and installed pyqt5 and began working through the examples at http://zetcode.com/gui/pyqt5/menustoolbars/ However, whenever I click one of the buttons or menus in the example apps I run that is supposed to quit the application, it locks up. This happens with all

Re: Question about math.pi is mutable

2015-11-07 Thread Steven D'Aprano
On Sun, 8 Nov 2015 04:46 am, Marko Rauhamaa wrote: > Bartc : > >> (Yes, 'const' in C is a waste of time, and half the people using it >> don't appear to know what it means. > > It cannot mean anything meaningful; it's completely useless. > > For example, what could one think of standard library

Re: Question about math.pi is mutable

2015-11-07 Thread Steven D'Aprano
On Sun, 8 Nov 2015 02:01 am, Bartc wrote: > Neither have the simplicity of concept of Pascal's 'const', which is > just a named value. Not a variable that won't change once initialised, > not a parameter that won't be changed nor any addressable location.) Unfortunately the concept of "named valu

Re: Converting a string into a float that includes the negative

2015-11-07 Thread phamtony33
On Saturday, November 7, 2015 at 9:40:49 PM UTC-5, MRAB wrote: > On 2015-11-08 02:11, phamton...@gmail.com wrote: > > I am having issue with converting the string into a float because there is > > a negative, so only end up with "ValueError: invalid literal for float(): > > 81.4]" > > > > def con

Re: Converting a string into a float that includes the negative

2015-11-07 Thread MRAB
On 2015-11-08 02:11, phamton...@gmail.com wrote: I am having issue with converting the string into a float because there is a negative, so only end up with "ValueError: invalid literal for float(): 81.4]" def contains_words(word,msg): if word in msg: return true

Converting a string into a float that includes the negative

2015-11-07 Thread phamtony33
I am having issue with converting the string into a float because there is a negative, so only end up with "ValueError: invalid literal for float(): 81.4]" def contains_words(word,msg): if word in msg: return true else: return false

Re: Guide in Deskop Application Development in Python for newbies

2015-11-07 Thread Michael Torrie
On 11/07/2015 12:15 PM, paul.hermeneu...@gmail.com wrote: > Where would you say that web2py fits into this mix > of tools? I am not familiar with it but I know it's supposed to be a lightweight framework for developing web-based sites and applications. Could be an excelle

Re: Problems connecting to PostgreSQL

2015-11-07 Thread Chris Angelico
On Sun, Nov 8, 2015 at 10:40 AM, Cecil Westerhof wrote: > I used: > sudo -u postgres createuser stressTest > this create the role, but also gave: > could not change directory to "/root": Permission denied > and I did not get the questions. > You might need to become root before you can be

Re: Question about math.pi is mutable

2015-11-07 Thread Chris Angelico
On Sun, Nov 8, 2015 at 10:32 AM, Ben Finney wrote: > I recommend you ignore that request; “Bartc” is fine as a name here, > IMO. Given that LARTC means Linux Advanced Routing and Traffic Control, I'm guessing Bartc is all about *BSD networking? :) ChrisA -- https://mail.python.org/mailman/listi

Problems connecting to PostgreSQL

2015-11-07 Thread Cecil Westerhof
I followed http://zetcode.com/db/postgresqlpythontutorial/. I used: sudo -u postgres createuser stressTest this create the role, but also gave: could not change directory to "/root": Permission denied and I did not get the questions. Then I used: sudo -u postgres createdb stressTest -

Re: Question about math.pi is mutable

2015-11-07 Thread Ben Finney
Bartc writes: > On 06/11/2015 22:26, Thomas 'PointedEars' Lahn wrote: > > Bartc wrote: > > ^ > > Please fix. > > What's the problem? As far as I can tell, you're being asked to change that to your “real” name, whatever that is supposed to mean. I recommend you ignore that request; “Bartc” i

Re: Question about math.pi is mutable

2015-11-07 Thread Mark Lawrence
On 07/11/2015 23:02, Bartc wrote: On 06/11/2015 22:26, Thomas 'PointedEars' Lahn wrote: Bartc wrote: ^ Please fix. What's the problem? He is the problem. I assume it's because he thinks he's a dog, cat or some other animal. -- My fellow Pythonistas, ask not what our language can do

Re: Question about math.pi is mutable

2015-11-07 Thread Bartc
On 06/11/2015 22:26, Thomas 'PointedEars' Lahn wrote: Bartc wrote: ^ Please fix. What's the problem? -- https://mail.python.org/mailman/listinfo/python-list

Re: time module

2015-11-07 Thread Cameron Simpson
On 07Nov2015 21:27, input/ldompel...@casema.nl wrote: I like to have a function that prints time in seconds. I am looking for something for example that seconds count from zero. I search the internet for time module in python but could not found anathing usefull. Here: https://docs.python.

time module

2015-11-07 Thread input/ldompeling
hi, I like to have a function that prints time in seconds. I am looking for something for example that seconds count from zero. I search the internet for time module in python but could not found anathing usefull. Has someone an example for it. Thanks -- - ---

Re: Question about math.pi is mutable

2015-11-07 Thread Marko Rauhamaa
Grant Edwards : > I take it you don't write embedded code that runs from ROM? I do. The > const keyword is the most valuable addition to the C language since > the function prototype. Without it, you used to have to jump through > all sorts of hoops to get read-only data placed into read-only memo

Re: Question about math.pi is mutable

2015-11-07 Thread Marko Rauhamaa
Bartc : > (Yes, 'const' in C is a waste of time, and half the people using it > don't appear to know what it means. It cannot mean anything meaningful; it's completely useless. For example, what could one think of standard library functions whose prototypes are: char *strstr(const char *hays

Re: Question about math.pi is mutable

2015-11-07 Thread Grant Edwards
On 2015-11-07, Marko Rauhamaa wrote: > Marko Rauhamaa : > >> In my work, I currently use bash, Python and C. For many, many tasks, >> bash is superior to Python. For others, Python can't compete with C. >> Yet the vast gap between bash and C is nicely filled with Python. > > And, by the way, the i

Re: Scipy odeint (LSODA) gives inaccurate results; same code fine in MATLAB ode15s/ode23s

2015-11-07 Thread Michael Torrie
On 11/06/2015 11:54 PM, Christian Gollwitzer wrote: > It is very hard to analyze such a problem, unless you also post the > Matlab code and plot both solutions into a single graph. Also he may have a quicker response posting to the scipy list, where scientists and mathematicians regularly use and

Re: Guide in Deskop Application Development in Python for newbies

2015-11-07 Thread Michael Torrie
On 11/07/2015 07:44 AM, leonardmesi...@gmail.com wrote: > How do you start building a desktop application in python? I mean > where do I start? Besides installing python on your windows what else > do I need, and any suggestion on how do I accomplish this project. > > Right now I really want to fi

Re: Question about math.pi is mutable

2015-11-07 Thread Bartc
On 07/11/2015 14:23, Marko Rauhamaa wrote: Bartc : In my work, I currently use bash, Python and C. For many, many tasks, bash is superior to Python. For others, Python can't compete with C. Yet the vast gap between bash and C is nicely filled with Python. The gap between Python and C is stil

Re: Question about math.pi is mutable

2015-11-07 Thread Bartc
On 07/11/2015 14:28, Marko Rauhamaa wrote: Marko Rauhamaa : In my work, I currently use bash, Python and C. For many, many tasks, bash is superior to Python. For others, Python can't compete with C. Yet the vast gap between bash and C is nicely filled with Python. And, by the way, the introdu

Guide in Deskop Application Development in Python for newbies

2015-11-07 Thread leonardmesiera
How do you start building a desktop application in python? I mean where do I start? Besides installing python on your windows what else do I need, and any suggestion on how do I accomplish this project. Right now I really want to finish this beauty pageant judging system which requires to have

Re: Question about math.pi is mutable

2015-11-07 Thread Marko Rauhamaa
Marko Rauhamaa : > In my work, I currently use bash, Python and C. For many, many tasks, > bash is superior to Python. For others, Python can't compete with C. > Yet the vast gap between bash and C is nicely filled with Python. And, by the way, the introduction of the "const" keyword was maybe th

Re: Question about math.pi is mutable

2015-11-07 Thread Marko Rauhamaa
Bartc : > Not just my option. From this 2010 paper for example ('High performance > implementation of Python for CLI ...' by Antonio Cuni): > > "As a language, Python is very hard to implement efficiently: the > presence of highly dynamic constructs makes static analysis of > programs extremely di

Re: Question about math.pi is mutable

2015-11-07 Thread Laura Creighton
In a message of Sat, 07 Nov 2015 13:00:37 +, Bartc writes: >Not just my option. From this 2010 paper for example ('High performance >implementation of Python for CLI ...' by Antonio Cuni): > >"As a language, Python is very hard to implement efficiently: the >presence of highly dynamic constr

Re: Question about math.pi is mutable

2015-11-07 Thread Bartc
On 07/11/2015 12:15, Ben Finney wrote: Bartc writes: To my mind, Python allows far too much freedom in being able to change anything at any time. You're welcome to that opinion. I don't see you present a reason why it should affect anyone else's opinion of Python, though. Not just my optio

Re: Question about math.pi is mutable

2015-11-07 Thread Ben Finney
Bartc writes: > To my mind, Python allows far too much freedom in being able to change > anything at any time. You're welcome to that opinion. I don't see you present a reason why it should affect anyone else's opinion of Python, though. > Yet Python has to assume 100% of the time that it could

Re: Question about math.pi is mutable

2015-11-07 Thread Bartc
On 07/11/2015 11:35, Ben Finney wrote: Bartc writes: On 07/11/2015 03:43, Ben Finney wrote: Bartc writes: Is there no way then in Python to declare: pi = 3.141519 # etc and make it impossible to override? No, and it would be a bad thing if that were something a library author

Re: Question about math.pi is mutable

2015-11-07 Thread Ben Finney
Bartc writes: > On 07/11/2015 03:43, Ben Finney wrote: > > Bartc writes: > > > >> Is there no way then in Python to declare: > >> > >> pi = 3.141519 # etc > >> > >> and make it impossible to override? > > > > No, and it would be a bad thing if that were something a library author > > cou

Re: Question about math.pi is mutable

2015-11-07 Thread Bartc
On 07/11/2015 03:43, Ben Finney wrote: Bartc writes: Is there no way then in Python to declare: pi = 3.141519 # etc and make it impossible to override? No, and it would be a bad thing if that were something a library author could forbid. Python assumes the programmers using it are