Post Reply 
Python App: Can you cut and paste source code (Android)
10-08-2024, 02:23 PM (This post was last modified: 10-08-2024 03:13 PM by StephenG1CMZ.)
Post: #1
Python App: Can you cut and paste source code (Android)
Loading source:
With source in my mobile clipboard:
Python App
Symb To File
Shift Paste
A menu box pops up with filenames - no mobile clipboard contents.

Saving source:
Python App
Symb to File
Shift Copy
Select Begin and End then Copy
Looks ok
The mobile clipboard doesn't have selected source

Trying it again:
Now in addition to the menu box popping up with files, it shows the selected source that I just saved.

So it seems that after you save a source within the app, that source can be cut and pasted within the Python app.

But, is there some mechanism to get source from your mobile in and out of the Python App other than re-typing?

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2024, 04:27 PM (This post was last modified: 10-08-2024 04:35 PM by goetz.)
Post: #2
RE: Python App: Can you cut and paste source code (Android)
(sorry, updated my post to save you unneccesary reading, as I noticed I actually used this on the new version for testing)

When testing the new Android Pro app, it worked like in the old app:

There is a "hamburger menu" outside of the simulated Prime, but within the app top left of the screen. The second menu from top is "Edit" and that has "Copy" and "Paste" items. Those interact with the Android system clipboard. This also has the advantage of copying the whole buffer when nothing is selected, so no need to select all the contents manually.
This is how i transferred some programs to the App which then crashed during verification in the program editor.


Any chance this works with the Python app of the new version as well?

I hope it is clear which menu I am referring to? Briefly tried the new one last week but immediately had a handful of force closes of the app after some seemingly harmless operations (including some Python statements and other programs that run fine on the old version), so I am still keeping the old Pro App for the time being.
Find all posts by this user
Quote this message in a reply
10-08-2024, 05:01 PM (This post was last modified: 10-08-2024 05:35 PM by StephenG1CMZ.)
Post: #3
RE: Python App: Can you cut and paste source code (Android)
Thanks.
Found the menu, and imported code from the mobile clipboard.
But have not yet succeeded in running the code.
It now crashes, and reinstalling the app and deleting the imported code doesn't help.
(The example I imported was my zsys program, from the hp prime library)

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
10-09-2024, 09:24 AM
Post: #4
RE: Python App: Can you cut and paste source code (Android)
Python on Prime is a comprehensive unabridged collection of bugs, discrepancies, annoyances and disappointments.

No wonder this is consequently continued with the App on Android. Although I had bought the Prime Pro App years ago and felt eligible for a cost free update, I was curious enough to buy the next HP Prime Pro. Now I have two.

Observations.
"Old" HP Prime Pro - Size 111MB; This HP Prime Pro 41MB - what does that mean?
Doesn't work on my Galaxy Tab S2 tablet (Android 7.0). Terminates immediately after start.

Works somehow on my Galaxy A53.
But it does not find and connect to the network. Therefor it's not connecting to the Connectivity Kit on the PC. No chance for a convenient software development.

As I stated in my talk about Python on Prime at HHUC 2023: Quick and dirty implementation of Python, not fit for serious use. Nice toy if your look for some "adventures" on a calculator.

Conclusion: Moravia completely failed to enhance what they inherited. Another 24€ wasted for total garbage.

Günter
Find all posts by this user
Quote this message in a reply
10-09-2024, 12:07 PM
Post: #5
RE: Python App: Can you cut and paste source code (Android)
(10-09-2024 09:24 AM)Guenter Schink Wrote:  Python on Prime is a comprehensive unabridged collection of bugs, discrepancies, annoyances and disappointments.

No wonder this is consequently continued with the App on Android.

I would have agreed with that before the release of the latest firmware. However, taking the physical HP Prime into consideration, it currently seems to me that most of the bugs related to stability have been fixed. Previously, Python caused restarts in many unforeseen situations, but now, I actually know of only one such case, which involves running Python code through the PPL wrapper while the Python app is active. Other than that, I don’t know of any other issues that would cause Python to be unstable. For the past few weeks, I’ve been working quite a lot with Python (a 'tml' library was created) and I haven't noticed any major problems.

Printing strings containing Unicode characters has also been fixed. Previously, garbage appeared alongside the string, but now all special characters are correctly displayed on the screen without any extra 'special effects'.

As for the Android app, I won't comment on that since I haven’t purchased it yet. However, unfortunately, from the descriptions I’ve read, it seems that it wasn’t well tested, or perhaps not tested at all, which is a serious oversight before release.
However, regarding the size, it may simply mean that the current version was compiled using newer tools that better optimize the code or compress resources, something that tools from a few years ago didn't do.

I don't want to defend Moravia, but it seems to me that to fully assess the progress made, we need to wait for the next firmware release, which includes CAS fixes contributed by Prof. Parisse (and other fixes as well), which, for some reason, wasn't released by the end of August (despite Klaas' announcement).

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
10-09-2024, 04:34 PM
Post: #6
RE: Python App: Can you cut and paste source code (Android)
Piotr, it depends very much on what you are trying to explore.
Try this snipped in the editor, but only when you've saved your work
Code:

from linalg import *
matrix(3,4)
No "Clearing Memory"yet? Then:
In the APP select Python, "Cancel", <SHIFT><ON> to ensure "Python" is selected upon next start of the Prime.
Now switch on the Prime and run the script.

I hope you agree, that a syntax error should never clear Memory.

I agree, that there are some improvements, but this is a device for some $,€ or what have you, Bugs have to be a rare exception, not the rule. And the documentation level is really offending.

As stated earlier by me, a steady flow of bugs, inconsistencies and annoyances.
Playing with my apps LSystems or Mandelbrot Explorer also results regularly in reboots, sometime in freezes and occasionally in clearing memory.

Günter
Find all posts by this user
Quote this message in a reply
10-09-2024, 06:18 PM
Post: #7
RE: Python App: Can you cut and paste source code (Android)
(10-09-2024 04:34 PM)Guenter Schink Wrote:  Piotr, it depends very much on what you are trying to explore.
Try this snipped in the editor, but only when you've saved your work
Code:

from linalg import *
matrix(3,4)

Yes, I am aware of that case; however, as far as I know, it has already been fixed in the firmware version I mentioned in my previous post (along with many other issues related to CAS and not only CAS). Some of the bugs that were closed (resolved) in the bug tracker are not fixed in this latest release, despite some of them having been fixed many months ago. That is why I wrote that a full assessment of progress can only be made when that firmware with all these fixes is made available to us. We know it exists, but it is not clear why it has not been released so far.
Klaas also mentioned a high interest in documentation among beta testers, so we can likely expect changes in that area as well.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
10-09-2024, 08:14 PM
Post: #8
RE: Python App: Can you cut and paste source code (Android)
Hard to believe. But for now I'll wait for the next release to be convinced.
Counter indication is the new release for Android. Missing the important connection to the connectivity kit is just another evidence for a careless development process.

Günter
Find all posts by this user
Quote this message in a reply
Post Reply 




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