Post Reply 
April 27th beta
04-27-2021, 02:45 PM
Post: #1
April 27th beta
Hello,

Another beta is available at http://www.hpcalc.org/prime/beta/

Here is the change log.
Code:

Fix strings in Python
Fix indent in program editor
More translations for Netherlands

Have a good day,
Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
04-27-2021, 03:01 PM
Post: #2
RE: April 27th beta
Hi Cyrille,

Many thanks for this.

Couple of comments:

1) "Indent" now works, great ! Smile Actually it works so much, that it even continues to work when "indent" is unchecked Smile Not that I care much for that, since I don't see why "indend" should not be checked in the first place, but it is still a bug, since the checkbox is certainly meant to be used...

2) "Indent" does not go as far as automatically shifting the line to the right automatically when a new block is obviously about to start, likely after ":" terminates the previous line. Do you intent to implement this behaviour for this release, or not ?

3) Same question for more advanced editing features, such a syntax coloring and auto-completion (as the Numworks does really well).

Thanks again and best regards,

Vincent
Find all posts by this user
Quote this message in a reply
04-27-2021, 03:51 PM
Post: #3
RE: April 27th beta
It’s cool !!

I have spyder on my windows 10 pc…

With my G2 calc connected to the PC:

1) create a new file in pyton app calc, « test.py »;
2) on the connectivity kit tree go for python>>file>>test.py and then choose open from a right click -> you have test.py on spyder editor;
3) use spyder as you like and save from spyder;
4) go back to connectivity kit and click « save all »…
5) « test.py » on the calc is update !

Have fun !
Find all posts by this user
Quote this message in a reply
04-27-2021, 05:47 PM
Post: #4
RE: April 27th beta
I tested more, and I think the Python editor behaves a bit strangly.

First, it can reboot the Prime ! I came into a situation where it asked me if I wanted to reload the files that have changed and execute them. I said "yes", I had some gross syntax errors in one of my files since I use it to play with the editor, and oops... "Your calculator will reboot in 3 seconds !" After reboot I was in the function app, not the Python app anymore...

Then, the "indent" check is inconsistent. Sometimes it indents, sometimes not, sometimes when checked, sometimes with unchked, seems random...

Finally, about the feature I asked for (automatic shifting a line when starting a new block), there is actually a partial implementation of that, but kind of weird: type a line, type ENTER, the next line is aligned with the previous one; press ENTER again (generating a blank line), and then you get a shifting ! ENTER again, another shifting !

I failed to find the real logic behind that - bug or feature ? Smile

Thanks and cheers,

Vincent
Find all posts by this user
Quote this message in a reply
04-27-2021, 10:59 PM
Post: #5
RE: April 27th beta
(04-27-2021 03:51 PM)dg1969 Wrote:  With my G2 calc connected to the PC:

1) create a new file in pyton app calc, « test.py »;
2) on the connectivity kit tree go for python>>file>>test.py and then choose open from a right click -> you have test.py on spyder editor;
3) use spyder as you like and save from spyder;
4) go back to connectivity kit and click « save all »…
5) « test.py » on the calc is update !

Does this series of steps work when using the HP Prime Virtual Calculator instead of your real G2 Prime?

For me it does not work i.e I cannot update the files in the HP Prime Virtual Calculator via the HP Connectivity Kit and an external editor. Using the latest 2021-4-27 beta.

Might have to bite the bullet and install the beta onto my real G1 hardware...
Find all posts by this user
Quote this message in a reply
04-28-2021, 12:16 AM
Post: #6
RE: April 27th beta
(04-27-2021 10:59 PM)tcab Wrote:  For me it does not work i.e I cannot update the files in the HP Prime Virtual Calculator via the HP Connectivity Kit and an external editor. Using the latest 2021-4-27 beta.

Might have to bite the bullet and install the beta onto my real G1 hardware...

I updated my G1 to the new firmware and tried editing/updating Calculator Python App files on my G1 Prime using an external editor on Windows (in my case, vscode). Doesn't work for me.

Perhaps it only currently works on a G2?
Find all posts by this user
Quote this message in a reply
04-28-2021, 01:32 AM
Post: #7
RE: April 27th beta
Thank you Cyrille!

For the new modules cas, arit, linaig, and mtplotl; are we to assume that the syntax for those commands match the syntax for the HP Prime equivalent? Is matplotl a subset of matplotlib?
Visit this user's website Find all posts by this user
Quote this message in a reply
04-28-2021, 03:50 AM
Post: #8
RE: April 27th beta
in the input command in python
after making the entry
what was typed does not appear in the terminal
and only the text of the following input command appears

M= float(input("M="))
fc = float(input("fc="))

only show this:

M=fc=

hardware G1
Find all posts by this user
Quote this message in a reply
04-28-2021, 04:54 AM (This post was last modified: 04-28-2021 04:56 AM by Dougggg.)
Post: #9
RE: April 27th beta
(04-28-2021 03:50 AM)churichuro Wrote:  in the input command in python
after making the entry
what was typed does not appear in the terminal
and only the text of the following input command appears

M= float(input("M="))
fc = float(input("fc="))

only show this:

M=fc=

hardware G1

I was having to put a print statement after the input example

M= float(input("M="))
print (M)

print will do a CR
Find all posts by this user
Quote this message in a reply
04-28-2021, 10:39 AM
Post: #10
RE: April 27th beta
(04-27-2021 10:59 PM)tcab Wrote:  
(04-27-2021 03:51 PM)dg1969 Wrote:  With my G2 calc connected to the PC:

1) create a new file in pyton app calc, « test.py »;
2) on the connectivity kit tree go for python>>file>>test.py and then choose open from a right click -> you have test.py on spyder editor;
3) use spyder as you like and save from spyder;
4) go back to connectivity kit and click « save all »…
5) « test.py » on the calc is update !

Does this series of steps work when using the HP Prime Virtual Calculator instead of your real G2 Prime?

For me it does not work i.e I cannot update the files in the HP Prime Virtual Calculator via the HP Connectivity Kit and an external editor. Using the latest 2021-4-27 beta.
I just checked on my pc… I don't know why but it does not seem to work with the virtual calculator…
Find all posts by this user
Quote this message in a reply
04-28-2021, 12:33 PM
Post: #11
RE: April 27th beta
Great to see the new cas, arit, linalg, and matpltl libraries. Before official release, it would be preferable if these command libraries were listed so similar areas of functionality follow each other. e.g. cas, arit and linag follow math, cmath and matplt follows graphic.

From a first peek through the new libraries a couple of questions spring to mind. What's the difference between casevel and xcas? And, are the matplotl commands using Prime drawing algorithms or are they custom routines as Bernard provides with KhiCAS?
Find all posts by this user
Quote this message in a reply
04-28-2021, 12:45 PM
Post: #12
RE: April 27th beta
caseval, xcas and eval_expr are synonyms (the last one is an attempt to have a common commandname with a similar command authored by Adrien Bertrand for the Nspire CX II builtin Python).

matplotl should be fixed, show() is currently not linked to something valid on the Prime.
Find all posts by this user
Quote this message in a reply
04-28-2021, 04:22 PM
Post: #13
RE: April 27th beta
(04-28-2021 12:45 PM)parisse Wrote:  caseval, xcas and eval_expr are synonyms (the last one is an attempt to have a common commandname with a similar command authored by Adrien Bertrand for the Nspire CX II builtin Python).

matplotl should be fixed, show() is currently not linked to something valid on the Prime.

Thanks for the info.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 7 Guest(s)