• Matteo

    @timtim said:

    1. And even if omz push Pythonista to App Store this time, how about the next version? We still have to wait for 2 years? After 2 years, I think Python 4.0 will be released, while we are still using Python 3.6.1. Guys, I really don't understand why are you so optimistic about all these things. Yeah, of course we can use it now and of course you can still use Windows XP and Python 2, just don't try to force all of the users to keep waiting Pythonista 3.3.
    2. We already waited for 2 years, and you just keep waiting and begging omz to update? Did he show up? He just said, oh, I'm coming.And you just wait like a dog waiting for food. But what did he do? From early 2019 to the end of 2019.
    3. Maybe you think it is normal for an application like this, but not for me and my friends.
    4. And don't tell me about Pyto. Imaging that you installed Python 3.6.1 2 years ago and python.org didn't release any updates about python any more, and after waiting for 2 years, you are told that python.org will close in 2 days. What would you think? Just smile and then try other tools?
    5. I don't know why are you so optimistic. Maybe you are using WIndows XP, iOS 5.0 and Python2?
    1. But in my opinion if Python.org updates Python to 4.0 version, it automatically doesn't mean it is a good thing also for Pythonista developer...it is like a car that has a lot of electronics: it is good for those who sell electronic components, not always for those who have to buy or maintain them (in this example the seller would be python.org or Apple (with ios versions) and who would buy and maintain the updates by python.org or Apple is omz: yes, about python no expense of money, because it is free, but certainly expense of time invested on maintaining).

    2. I don't know what omz is doing, personally I don't care much, because I consider privacy important, but I hope the best for him. Sorry but I don't see an employment contract between us users and the developer, and I think it's a good thing that it doesn't exist...I'm sorry for you that you need to use the latest Python 3 features not present in Pythonista and you have spent money to buy (from what I understand) several Pythonista licenses for you and other people, thinking of making a good deal because, maybe, you were hoping that Pythonista would continue to be updated with the frequency of a few years ago. I have not spent so much (the equivalent of a pizza and drink) and above all, for what I have to do, the version of Pythonista I use is great for me (I almost completely ignore the benefits that I could have using the last version of python 3 in the things I do, also because the things I do concern things discovered many years ago by people like this, this, this, this, this ..., which have very little to do with python 3...).

    3. I have a very personal opinion about these things, I'm not a programmer and for me a tool is valid as long as I can use it in the things I have to do, I don't need updates if I can add (someone can add) some extra capabilities to version I use. So for me the version of Pythonista may have stopped at the one I use, but clearly only for me, not for others that take more advantage of using the updated version.

    4. I read about Pyto, it is very poweful, I would like to install it but the ios version that I use does not allow it and I have little free mem space, and I have no intention of updating the ios operating system for now with my phone. About python.org nobody can decide the fate of something in which he is not directly involved, many things happen or can happen in the future and we don't want it. For example I'm interested in environmental issues but I still use a diesel car, when diesel will cost more than electric I will change car. So new tool when I will need it or will be imposed on me by other things that I cannot govern (ie: global economy) ...

    5. About an updated version of Pythonista I am neither an optimist nor a pessimist because the version I use (an old one) is fine and I know that here there are people who, with their knowledge and intellectual abilities, manage to increase the power of this application with programming (with Python as well or objc). I'm not a big fan of software updates in general, even less if they concern only graphic updates. I would still use Windows XP if Microsoft continued to update it with security patches, new and useful functions, optimization of ram and cpu usage, etc ... but the abandonment of certain versions of certain software is often related to economic and marketing aspects (new operating system that requires more power means that we need new hardware, even if, with programming only, someone could give more power to existing softwares / operating systems if they were extensible, even if they are not open-source, but this would involve less money...).

    posted in Pythonista read more
  • Matteo

    @timtim On the other hand, I consider stupid and useless the constant ranting against Pythonista, his active community and against some very active/skilled people here. Those who propose solutions or try to study them and make them available to others not only do something worthy of note but keep alive the interest and freedom to dream of many users, it is the most important thing for me.

    Take a tour in this forum (since six years ago) and you will see that there are many posts where people have written very interesting thing and what thay have written, driven by their passion for something, have allowed other people to start dreaming or simply to be more productive with Pythonista.

    posted in Pythonista read more
  • Matteo

    @cvp :-) , but my phone is so old and with storage memory so clogged that the hack works only randomly...;-)

    posted in Pythonista read more
  • Matteo

    Hi @cvp, exactly, you read me in thought!

    The choice to copy the highlighted text so that each word is on a different line is perfect for me, in this way after some calculation I can screenshot iphone screen with some highlighted text (also with different colors, thank you) and to send image to someone (it is easier to explain something with some text highlighted), with also the full string matched by your script as a text file, for further analysis (with spreadsheets or other tools).

    Thank you !
    Regards

    posted in Pythonista read more
  • Matteo

    @cvp Thank you, very nice and useful!

    As a curiosity, maybe I didn't understand before: do you know if the highlighted text with your script can be also copied in clipboard or it is impossible due to limits of OMTextView?

    If it is impossible to copy the highlighted text in Pythonista clipboard, do you know if a script exists that can write (in background, that is during Pythonista usage), in an external text file, the full output of the console, and the external file updates itself after each output print in console?

    Thank you for your interest :-)
    Bye

    posted in Pythonista read more
  • Matteo

    @cvp Wonderful!

    I can't understand how it is possible to have regex mode by modifying the code from

    st,end=m.span()
    ...
    p2 = tv.positionFromPosition_offset_(tv.beginningOfDocument(), st+len(txt))
    

    to

    st,en =m.span()
    ...
    p2 = tv.positionFromPosition_offset_(tv.beginningOfDocument(), en)
    

    Magic of programming and of those who know how to use this magic ...

    Thank you very much!
    Regards

    posted in Pythonista read more
  • Matteo

    Hi @cvp , nice, yes no need to clear the search text field! And thanks also for insensitive search!

    Sorry if I ask you something else, answer only if it's something that interests you too: is it possible to have a second version of your script that can search text with python Regex? I think a second script for only Regex would be simpler than adding a setting flag (that user could change by executing a script associated to another custom user key) that allows user to switch from regex to simple text and viceversa with your original script.

    For example, if I have the console output with a lot of text data and I want to select all text (numbers) after word value: , I'd like to use the regex pattern (?<=value: )(.*) in order to highlight all after word value: (to the new row/line).

    Do you think it is possible? I ask you this because, although it is something that would help me a lot, I can't understand how to enable Regex searching by taking inspiration from your update about insensitive search.

    Thanks
    Bye

    posted in Pythonista read more
  • Matteo

    @cvp You are right, to clear all I can use your Search button with empty text, perfect.

    Many thanks for your help!

    Regards

    posted in Pythonista read more
  • Matteo

    @cvp Hi, sorry I'm feel very unskilled, no objc problem, I must use Python3, no Python2...

    Problem solved!

    Sorry I ask you :when you touch built-in key Clear in console do you have the clear of full console content and the color red of last highligthed text?

    Thanks

    posted in Pythonista read more
  • Matteo

    @cvp Hi thanks for reply, with Pythonista I use (v.3.1 301016) on ios 10.3.3 I have different behavior from you , that is when I touch Find key , the previous highligtings can't disappear (text become red and more red...). Maybe it is due to different objc implementation of new version of Pythonista.

    I will try again , if I will notice some different behavior I will let you know.

    Thank you
    Regards

    posted in Pythonista read more
  • Matteo

    Hi @cvp, thanks again for your code, it helps me a lot! I tried to change it in order to clear highlighting of the text before each touch of the "Find" button, because if I search different words, the console becomes too colored and I can't understand where the last word is selected.

    If you want and have time, can you show me how to change your code in order to remove all highlighting before each touch of your "Find" user key?

    Thanks
    Bye

    posted in Pythonista read more
  • Matteo

    @cvp no no, I badly explained myself sorry, I meant I see your button search at left, at right I see the built-in recall command icons and the execute command is the return key of keyboard, yes sorry. I'm excited...

    posted in Pythonista read more
  • Matteo

    @cvp Yes! you are right, sorry, two buttons on console line! You created a second button at left of input line, Thank you again!

    posted in Pythonista read more
  • Matteo

    @mikael Hi, I still use Pythonista version 3.1 (I have an old iphone with ios 10.3.3) and it is a great software, I find it very exciting to think that user can even customize the interface of this application as you wish, if knows how to do it ;-)

    Pythonista is Great!

    posted in Pythonista read more
  • Matteo

    @cvp Hi, I haven't tried it yet your code but it is impressive! Thank you :-)

    I sometimes feel that there is a possibility to do something with programming, but every time I see that one of you programmers really manages to do it, I am fascinated.

    I want to try your code by saving it in the StatusBarMenu (by JonB) as an action to run with the little buttons of it. So my dream is to associate your script to a user key of StatusBarMenu in order to enable/disable the search text function.
    So do you know if it is possible to disable your search function (with a click) if user wants to return to use the console to run python commands instead of to search text?

    Thank you very much
    Regards

    posted in Pythonista read more
  • Matteo

    @cvp Hi, do you mean OMxxxxx is something related to omz library, not Apple?

    However, if it is programmatically impossible to interact with console output via objc, do you know something for pythonista_startup.py that can automatically save in a file (named for example console_output.txt) the output of any command executed in console or any script executed from editor environment, in a consecutive mode, in the same way the output in console appears? This file should contain the exact text user sees in console output/history, and this file should update itself after each execution where there is at least one print statement (that is when the console output changes its content by adding new text output).

    Do you know if something already exists?

    Thank you
    Bye

    posted in Pythonista read more
  • Matteo

    Hi @cvp , thank you so much for your time but don't worry, don't search for me, only if it is also your interest, no problem, really :-).
    My interest is if a code already exists that can search text in console, when there is a lot text in it and user doesn't want to search some specific words by scolling down the screen.

    I will try to search in official Apple doc about some obj-c for interaction with OMTextView. Maybe I will find something here (found now).

    Thank you for your always lively kindness in answering in this forum!
    Regards

    posted in Pythonista read more
  • Matteo

    @cvp Ok, thank you for your reply, so I understand that console has not a Find field like the editor and by using your code user can keep track of what has been written in console, but the problem could be how to keep track of what has been written directly from script execution (so from editor, not from console).
    However do you know some obj-c method to interact with Pythonista console (in this specific case with history of the console, not with input editable line of console environment)?

    Thanks

    posted in Pythonista read more
  • Matteo

    @cvp Hi, yes remember, I use your neat code to send to server some short commands that I write in console to obtain answer to be printed in console output, but I think it cant help me.

    I explain better: I don't need to copy in clipboard the text that I write in console input line, but I need to search/find/highligth some text in console output window (lets call it: the console history). For example, suppose I have a lot of text in console output, because I executed a lot of scripts that print a lot of things in console output: how can I find some specific text by using the built-in function Find (like in editor environment)?

    Thank you
    Bye

    posted in Pythonista read more
  • Matteo

    Hello, do you know a way (I searched in the forum but not found answer) to find text (also with regex) in console output field, select it, copy it in clipboard after the execution of a script or a command?

    Simple example: I write in the console command line print("hello dear") and press run: Pythonista executes the command and prints hello dear in the console output window. Well, I'd like, when I'm in console environment and as post-processing, to find only word dear (with direct searching of word dear or with regex, with pattern that selects all after word hello), select and copy it, or simply select it with a colored highlighting (in the same way user can do it in editor environment of Pythonista, where Pythonista highlights the searched text).

    So, can Pythonista allow user to find text in console output? If not, do you know some existing obj-c script written by someone to create a wrench button to search and highlight text in console (maybe with pop-up in order to insert the word to be searched)?

    Thank you
    Regards

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!