Re: Where are we in the Python 3 transition?
On 31/12/2015 16:12, Mark Lawrence wrote: "Or, how the Kübler-Ross model aptly applies to Python 3". http://www.snarky.ca/the-stages-of-the-python-3-transition I thought I had a need for asyncio and that means Python3. So I started converting some web facing apps to Python3 for practice and it wasn't that hard. I've not written anything new in Python2 for about 9 months now. I never did need asyncio in the end but the thought I might pushed me to change. YMMV -- https://mail.python.org/mailman/listinfo/python-list
Re: The computer that mastered Go
On 29/01/2016 19:46, Seymore4Head wrote: https://www.youtube.com/watch?v=g-dKXOlsf98 Is it written in Python? -- https://mail.python.org/mailman/listinfo/python-list
Re: The computer that mastered Go
On 29/01/2016 22:13, Paul Rubin wrote: mm0fmf writes: Is it written in Python? One would expect it to be written in Go, but it turns out to be C++ and Lua :(. Why did he post it in comp.lang.python then? -- https://mail.python.org/mailman/listinfo/python-list
Re: Ah Python, you have spoiled me for all other languages
On 22/05/2015 18:47, Grant Edwards wrote: And of course, the truly_great_ thing about Javascript is... It's not PHP! ROTFL ;-) -- https://mail.python.org/mailman/listinfo/python-list
Re: bottle app "crashes"
On 05/07/2015 17:45, Martin S wrote: Hi all, Last summer I fumbled together a small appplication that calculates both LASK and Elo ratings for chess. I managed to "webify" it using Bottle. This works nicely on my laptop for testing. [snip] Do anyone have a pointer to an idiot proof instruction on how to deploy a simple bottle application to a live server. /Martin S I use bottle as it comes to provide 2 apps that face straight onto the web. I have to say that I have only done half the job because I never got as far as daemonising them. I simply run them from a "screen" session. This is fine as they run on my own teeny-tiny Linux VM (256MB ram/5GB disk with 1 Xeon core). I simply log in and type "screen python3 myapp.py" and remember to exit with ctrl-A D. One of them has been up for about 3 months now without issue. That might not explain why you are seeing problems but could give you a solution that works whilst you fix the underlying issue. Or not in my case! Andy -- https://mail.python.org/mailman/listinfo/python-list
Re: Need assistance
On 18/07/2015 18:34, Mark Lawrence wrote:
What is an {HP calculator} roll operation?
HP calculators were proper in that they used RPN entry.
i.e. 2 enter 2 + would show 4 instead of 2 + 2 =
Gawd it's so long but ISTR there were 3 stack registers and the display.
So you could press
1 enter
2 enter
3 enter
4
and Z = 1, Y = 2, X = 3 and display = 4. Roll would rotate the entries
through the display register.
ROLL and Z = 2, Y = 3, X = 4 and display = 1
and so on. There was an INV ROLL to go the other way.
The 3 level stack was equivalent to nesting parentheses three times. I
only had a TI-59 as it was half the price of an HP67. The TI had more
memories and program steps and was faster. But it didn't say HP on the
front!
--
https://mail.python.org/mailman/listinfo/python-list
Re: Need assistance
On 18/07/2015 20:10, Joel Goldstick wrote:
On Sat, Jul 18, 2015 at 2:51 PM, mm0fmf via Python-list
wrote:
On 18/07/2015 18:34, Mark Lawrence wrote:
What is an {HP calculator} roll operation?
HP calculators were proper in that they used RPN entry.
i.e. 2 enter 2 + would show 4 instead of 2 + 2 =
Gawd it's so long but ISTR there were 3 stack registers and the display. So
you could press
1 enter
2 enter
3 enter
4
and Z = 1, Y = 2, X = 3 and display = 4. Roll would rotate the entries
through the display register.
ROLL and Z = 2, Y = 3, X = 4 and display = 1
and so on. There was an INV ROLL to go the other way.
The 3 level stack was equivalent to nesting parentheses three times. I only
had a TI-59 as it was half the price of an HP67. The TI had more memories
and program steps and was faster. But it didn't say HP on the front!
I have an hp35. But to be 'really' cool you have to have an hp35 that
just says hp. Those were the very first ones
I want a real HP16C and have been tempted to buy one from eBay.
--
https://mail.python.org/mailman/listinfo/python-list
Re: what windows compiler for python 3.5?
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 subscription telling me VS2015 was now available to download. Sorry I didn't study it to see if all the versions were available now or just some. I've only just started using VS2013 at work so wasn't worried about VS2015! -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Questions - July 25, 2015
On 26/07/2015 20:17, E.D.G. wrote: "E.D.G." wrote in message news:[email protected]... Posted by E.D.G. July 26, 2015 These are some additional comments related to my original post. The effort I have been discussing actually involves developing a totally free version of some language that scientists around the world could easily install and use. 1. With my own science related Perl programs I provide people with .exe versions in addition to the .pl versions. And for the .pl versions, at one of my Web sites there is actually an entire Perl programming language directory available in a .zip package. So, people can download the file, unzip it, and then save it as the Perl directory and .pl programs will then run on that computer. We would like to be able to do the same thing with Python if we start working with that language. And a response in another post indicates that this should be possible. 2. Python looks especially attractive because so many people are using it. And I myself have a friend who is a very experienced professional Python programmer. On the other hand, there are so many versions of Python that it might be difficult at first to determine which one to start with. 3. I asked that Python programmer if Python could run on an Internet server as a CGI program. And the answer was "I have no idea." So, amusingly, apparently even experienced professional programmers don't know everything there is to know about a given programming language! 4. I myself know that Perl programs will run on Internet servers as CGI programs and have written several myself using a development program called Xampp to create and test them before installing them on the server computer. 5. My retired professional programming colleague has now told me that he downloaded and installed the ActiveState Windows version of Python with no difficulties. So, that is encouraging news. 6. He said that he is looking around for a good IDE for Python and found one called "Eric" that he is checking. 7. With my Perl language programs I have developed a resource that will do the following. And I imagine that this could also be done with Python. This resource can't be developed with many and probably most programming languages. In part because of limited calculation speeds it can take one of my important probability calculation Perl programs as much a two hours to run and create all of the necessary data arrays. Many, many millions of calculations are involved. And once everything is set, for time limitation reasons it would be ordinarily be impossible to make any changes to the data or to the original program code without losing all of the data. So, I have developed a special Perl program that makes that possible. And as I said, I am guessing that this approach would also work with Python. When the Perl program is done with its calculations, instead of ending it jumps to another Perl program. But all of the data in the arrays it created remain active in memory. The original program code can then be changed. The second Perl program is then told that the changes are complete and that it should return to the first program. Perl then attempt to recompile the original code. If it is successful it then uses the new code and does whatever is specified. The previously created arrays are still active in memory using the same array names etc. If there was an error in the new code, a Windows screen appears explaining that there was an error and the compilation ends. But, the data remain in the active computer memory. Changes can then be are made to the program code to fix the error. And, the second Perl program is told to try again. If there are no new errors the first program recompiles and runs using the already created arrays etc. This is a very useful resource for scientists as it lets them create and test new program code without having to recreate all of the data arrays. And as I stated, it would probably not be possible to develop such a resource with most programming languages. Regards, E.D.G. Am I the only person thinking Troll? -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Questions - July 25, 2015
On 27/07/2015 01:18, Mark Lawrence wrote: On 27/07/2015 00:12, Ned Batchelder wrote: On Sunday, July 26, 2015 at 5:15:31 PM UTC-4, mm0fmf wrote: On 26/07/2015 20:17, E.D.G. wrote: [around 90 lines snipped] Am I the only person thinking Troll? Yes. --Ned. Was it really necessary to resend all of the original for the sake of a seven word question and a one word answer? Yes? ;-) -- https://mail.python.org/mailman/listinfo/python-list
Re: Successfully send sms with python
On 22/09/2015 12:19, Timon Rhynix wrote:
Hello, I have used pyserial, sms0.4 and other libraries to send sms via huawei
E1750 modem.
The code runs well and no error is thrown but the text message is not
sent/delivered to the number.
One of my code is as follows:
import serial
import time
class TextMessage:
def __init__(self, recipient="0123456789", message="TextMessage.content not
set."):
self.recipient = recipient
self.content = message
def setRecipient(self, number):
self.recipient = number
def setContent(self, message):
self.content = message
def connectPhone(self):
conn = 'COM13'
self.ser = serial.Serial(conn, 460800, timeout=5)
time.sleep(1)
def sendMessage(self):
self.ser.write('ATZ\r')
time.sleep(1)
self.ser.write('AT+CMGF=1\r')
time.sleep(1)
self.ser.write('''AT+CMGS="''' + self.recipient + '''"\r''')
time.sleep(1)
self.ser.write(self.content + "\r")
time.sleep(1)
self.ser.write(chr(26))
time.sleep(1)
print "message sent!"
def disconnectPhone(self):
self.ser.close()
When run it, the "message sent!" is printed but no message is sent/delivered.
Please assist on what I am missing. Thank you
If it's like the GSM modem I used then you should replace those "\r"
strings with "\r\n".
--
https://mail.python.org/mailman/listinfo/python-list
Re: Python IDLE won't start
On 26/09/2015 18:14, Jacob Chaar wrote: Hi there, So, I download Python 3.5.0 and I while I execute the Python IDLE, it won’t start up. Also, I try to open the python command line and a message error pop up. If you can help me, it will be really appreciate. Regards, Jacob Chaar Maybe if you told us the error (cut & paste it, don't retype it) we could help? Similarly knowing the OS you are using would help. Without that info how can anyone help you? -- https://mail.python.org/mailman/listinfo/python-list
Re: using binary in python
On 10/11/2015 20:14, Dennis Lee Bieber wrote: The Ada language defines the end of Text file to consist of It is 15 years this month since I last worked in place that used Ada. I think that calls for a wee dram to celebrate ;-) -- https://mail.python.org/mailman/listinfo/python-list
OT: Re: using binary in python
On 10/11/2015 21:02, Dennis Lee Bieber wrote: On Tue, 10 Nov 2015 20:36:52 +, mm0fmf via Python-list declaimed the following: On 10/11/2015 20:14, Dennis Lee Bieber wrote: The Ada language defines the end of Text file to consist of It is 15 years this month since I last worked in place that used Ada. I think that calls for a wee dram to celebrate ;-) Given that a dram is 1/8 of a "fluid ounce" that leads to the conclusion that a "wee dram" is based on US standard fluid once, vs British standard fluid ounce... My language preferences do tend to be the extremes: Python for quick throw-away stuff, Ada for more formal stuff (since it has a much more rigorous syntax than Pascal, Modula-2, C/C++, Java -- no optional block delimiters, no dangling else, etc.) Unfortunately, as a hobbyist dabbler at home, I can't justify the time to port an Ada compiler to Arduino, TIVA, Propeller, Beaglebone (though the latter may just be a case of porting the hardware access). So... I'm stuck with variants of C for those devices (again, excluding the Linux based Beaglebone) I escaped having to produce new code in Ada, I merely had to run some scripts that added the compiled C binaries into the Ada gloop! C user since 1983, C++ user since 2002, Python and C# since 2010. I regularly pinch myself that it seems to be painfully easy to be productive using Python compared to the other langauges! -- https://mail.python.org/mailman/listinfo/python-list
