|
Post by Admin on Jul 9, 2018 20:37:55 GMT
Reading some about Python. www.amazon.com/Python-Power-Comprehensive-Matt-Telles/dp/1598631586/ref=sr_1_1?ie=UTF8&qid=1531167564&sr=8-1&keywords=python+powerI have to say that my initial reaction is rather negative. I am very happy with compiled languages, like C/C++. I know that computers are much faster now, so that interpretive is not always that slow anymore. But there are other problems. It encourages casual tinkering. So the only reason I can see for using it is if you want to distribute something where users are supposed to alter it, make their own version, okay. But the interpretive language portion should be short, simple easily inspectable. But loosely typed, variables not predeclared, indentation part of the logical structure? It it is not actually ambiguous, I bet a lot of time is spent making sure. Would you want to fly in an airplane which is run on Python? But I still have more to learn. Compared with PHP and Perl, is it better for client side web page scripting? I see some other potentials though. Open source, interpreter written in C, and not that big. What this means is that you could make the Python interpreter the core of a large and complex C++ application, where the way you interface with it is via python scripts. And when you start some types of things, the C++ actually spits out the Python code where the variables are established and it lets you look at it. And of course these are duals, Python and C, variables. So then you supply what you want via Python. Will their IDLE Integrated Environment text editor work well with this, and using its immediate mode? Much still to learn. What are the new compiled languages, how do they work, and then how about functional programming languages? And then, they say Python is drawing some from Haskel. As I know Haskel is not a bit old, but it is starting to gain some following, because it is considered a functional language. Need to see how it gets stuff in and out of SQL databases, and with the new NoSQL databases like MongoDB, and see how it handles enumerated variables in IDLE. Much to learn for me to provide good Over Watch.
|
|
|
Post by Admin on Jul 12, 2018 23:17:22 GMT
Lots of books written by the above Mikell P. Groover .
Finishing up with Python Power, by Matt Telles
Gives good examples of how to do things. But if you want to do complex things, or need more understanding for strategy, you need much more than this.
Shows how to use their GUI, TkInter.
Then it comes to databases, MySQL.
Shows how to set it all up, using the SQL admin tools. Then to get to it from Python you need to import MYSQLdb.
They say it is all "socket-based". I gather that you are using the client server features of the os, on your "localhost".
BUt to me, I know that this cannot be the fastest way. SQLite has you link right in to its run time library. Lighter weight data base, but it runs faster.
With socketed approach, still cannot tell if it passes number by the internal format, and if it does a good job with enumerated variables, important in databases.
They pass a year, but it is text, not a number.
Probably R and Ruby do it all the same. And pForth could easily be made to do it the same.
But so much more to learn.
SJG
|
|
|
Post by Admin on Jul 13, 2018 22:22:04 GMT
So I finish up with the Python book. I feel that to do much with Python, one would need much more documentation. They talk about importing extra modules. Thing is, with an interpreted langauge, it is already sandboxed. There is not way it can get to anything which is not already provided for in the interpreter. www.pythonware.com/maybe out of date? In the book they talk about using 'import' for MySQLdb, cgi, cyc, cgitb, os, Cookie. I look at this: effbot.org/librarybook/Over 200 modules Talks about OS stuff, must be provided for in the C-language interpreter effbot.org/librarybook/core-modules-index.htmusing XML format files, can be good effbot.org/librarybook/file-formats-index.htmfor databases. I believe people use Python with MongoDB effbot.org/librarybook/data-storage-index.htmanyway, short of checking the source code for the intepreter, let me point out another books which looks promising: this is not what I meant: Learning path : get started with natural language processing using Python, Spark, and Scala / O'Reilly Media, Inc. (2017) Python programming on Win32 / Mark Hammond and Andy Robinson (2000) Actually there are lots and lots of books. SJG
|
|
|
Post by Admin on Jul 18, 2018 23:54:10 GMT
So here looking at a 2000 book about Python: www.amazon.com/Python-Programming-Win32-Windows-Programmers/dp/1565926218/ref=la_B001HCXSJU_1_1?s=books&ie=UTF8&qid=1531952370&sr=1-1page 471 of the book says that a Sam Rushing has written an extension which allows Python to call any DLL. As I understand this then that means that Rushing has extended the C language source code for the Python Interpreter, so it can access Windows DLL's. You would juat about to do this to connect with things not allowed for in the Python Interpreter, the sand box. www.nightmare.com/www.python.org/www.nightmare.com/software.htmlThis O'Reilly book is much better than the other Python book I had. Really gives good hard info. Excel sounds very complex. But there is a Visual Basic way to connect to it. There is now also such for Python. Spread sheets have lots and lots of legitimate uses. Under appreciated, in my opinion. So Python allows integration with Excel. Why would you want to use a hand held calculator, when the desktop computer gets you Excel, and your math stuff could then become a part of that. Python has lots of stuff about Data Bases, not sure how all of it works. By now this is a very old book. But it is still very complex. Really need to inspect the interpreter source code to know how this all works. The additions for this language was huge, even back in year 2000. Complex because it all has to somehow go thru the Interpreter, or a Client-Server socket, or something. page 6, says Windows uses DLLs ( Dynamic Link Libraries ) extensively, and that the API is all DLLs. Python written in ANSI C, and most of its functionally is in a DLL. So other programs can import Python at run time and start using it to evaluate expressions. ( So much better than that other book I was reading. O'Reilly books are always good. ) So they say that Python extensions ( presumably offered to the interpreter though DLL ) can be written in C, C++, or Delphi. Chapter 22 shows how this works. COM = Component Object Model, Microsoft's newest integration technology, and it pervades Windows 95, 98, NT, and 2000. DLL lets you call functions someone else has written. COM lets you talk to objects someone else has written. They don't even need to be on the same computer. COM is easier to use than making windows API calls directly from C. And you can fully integrate with Excel. Wow, so much better than that other book, and this does make Python sound much more attractive. To Be Continued SJG
|
|
|
Post by sjgliveson on Jul 19, 2018 18:39:49 GMT
Python programming on Win32 / Mark Hammond and Andy Robinson (2000 O'Reilly)
So the above Python book is awesome. You can use COM (Component Object Model, Microsoft's newest integration technology) to enter into Excel with Python, or you can pull Excel into an application, Python or other!
Why would anyone want an HP-48, 49, 50 when you could do things with that.
For long, I have been using spread sheets for things beyond just money versus time cases. Very pleased to see that Elon Musk does that to. When you understand the math, and the problem, you can do that.
Whereas the Silicon Chip industry uses commercial simulators as busy boxes, so they can hire people who know nothing.
The earlier Python books was not good for much, by comparison.
Now, the book I have is old. I cannot find a second edition. But there are zillions of other Python books. Here, just a few:
Advanced data analytics using Python : with machine learning, deep learning and NLP examples / Sayan Mukhopadhyay (2018)
The Beaglebone Black primer / Brian McLaughlin. (2016)
Beginning Django e-commerce / Jim McGaw (2009)
Data science fundamentals for Python and MongoDB / David Paper (2018)
MongoDB and Python / Niall O'Higgins. (2011 O'Reilly )
Remember, one of the things I started this thread with was saying that to have well expanded programs, for database use and more, you have to use dynamic linking. Well, Python is built entirely around dynamic linking.
Also notice, 'PROLOG Programming', by Nigel Ford, 1989
|
|
|
Post by Admin on Jul 19, 2018 18:49:35 GMT
Starting FORTH : an introduction to the FORTH language and operating system for beginners and professionals / Leo Brodie and Forth, Inc. ; with a foreword by Charles H. Moore (1987)
Ada 95 : problem solving and program design / Michael B. Feldman, Elliot B. Koffman (1995)
|
|