omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Matteo

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 2
    • Topics 18
    • Posts 244
    • Best 13
    • Controversial 0
    • Groups 0

    Matteo

    @Matteo

    14
    Reputation
    3911
    Profile views
    244
    Posts
    2
    Followers
    0
    Following
    Joined Last Online

    Matteo Unfollow Follow

    Best posts made by Matteo

    • RE: No update?

      @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
      Matteo
      Matteo
    • RE: Transition to Python 3

      @ccc Hi, interesting thank you for sharing it, but I keep wondering why it was necessary to create Python 3 instead of implementing all these new features (like "f-strings", "Pathlib", "Type hinting" and others listed in the site you shared) in Python 2 with a progressive numbering in its versions (for example: in Python 2.7.15 implemented "f-strings", in Python 2.7.16 implemented "Pathlib" and "Type hinting", and so on...).

      I suppose that all the new features in Python 3 could be implemented also in Python 2 if Python 2 had the same low level features of Python 3. I mean: if "f-strings", to work properly, needs some new low level features implemented only in Python 3 core, why not implement this low level feature also in Python 2 in order to have a Python 2 capable to use "f-strings" and also the "old" format?

      In this way no need to completely change a full programming language and no problems when people want to run with Python some python 2 or 3 scripts or entire libraries. Python users could have had a single Python distribution, updated progressively, with all the new features that we find only in Python 3.

      With the hypothetical single Python distribution, user could execute directly, for example, a script where somewhere in the source there are some pieces of code that use "f-strings" and somewhere else other pieces of code that use the standard format version, without problems (the interpreter of the single Python distribution would be able to interpret/understand, in the same source script/library, the code with "f-strings" and the code with format without syntax errors).

      Thank you for sharing
      Bye

      posted in Pythonista
      Matteo
      Matteo
    • RE: Transition to Python 3

      @ccc Hi, it doesn't worry me too much because I think I will continue to use my personal Python 2 scientific scripts (for work and hobby) that usually don't require any Python 3 features, but I have often asked myself some questions that I have never been able to answer.

      Really I never understood why it was useful to develop a different version of Python (why create a new big version of Python, from 2 to 3, instead to give Python 2 the same useful features of Python 3? maybe too complicated the upgrade of the existing Python 2 and more easy the develompment from zero of a new programming language that is Python 3?).

      Has Python 3 started to be developed due to several requests by users about usage of Python 2 programming language? I mean, what had prompted developers to start creating Python 3 instead of upgrading Python 2 with the additions (new/different features) requested by users that now are implemented in Python 3?

      Was it not enough to modify Python 2 with the purpose of interpreting the new Python 3 syntax, in order to have Python 2 updated with the most interesting things provided for Python 3?

      And apart from some syntax differences between Python 2 and 3 (for example the different syntax of the "print" function), what features are really more efficient in Python 3 to justify the abandonment of Python 2, and the consequent abandonment of innumerable Python 2 libraries which are no longer updated to Python 3 by the developers?

      Bye

      posted in Pythonista
      Matteo
      Matteo
    • RE: Time to release a new version to App Store

      @lpl ok yes you are right sometimes it is not possible to do something with current versions of some libs in Pythonista, the only thing I can suggest is to try searching alternatives in Python world, you should search for some pure-python libs that can help you about your specific task: trust me, in Python world someone thinks something, and it already exists at 99,999% (python is so famous...;-))

      @cvp @ccc and many others, thanks that you continue to share useful info and propose code with which many other users can experiment!

      Bye bye

      posted in Pythonista
      Matteo
      Matteo
    • RE: Time to release a new version to App Store

      @lpl Hi, I can understand your disappointment, because omz in the last year was significantly more absent on this forum than some years ago. People who bought Pythonista in the last year are less lucky (in my opinion) than people who bought Pythonista in previous years, due to less support by omz on this forum in the last year compared to previous years, so for this reason (in my opinion) people who bought Pythonista in the last year feel more abandoned than others. I should say also that in this forum you will find a lot of info about Pythonista written by a lot of great people, you know omz can't answer every question personally, especially if the questions are often the same made by different people.

      Unfortunately for us (who buy softwares) the cost of a software does not always means that the author provides future updates included in the purchase; about Pythonista you pay once for the application itself and the author has not specified anywhere that he will release regular updates (in other words, like someone already said before in this forum, when you pay about $ 10 for Pythonista, you pay only the app, not future updates because nowhere it is known that the $ 10 also includes updates). It is also for this reason that those who bought Pythonista some years ago were more lucky to pay for the same price the app and to see several updates of it.

      I use only (I think) some little percent of all features provided by Pythonista, that is one of the very few apps in AppStore that tries to be customizable through ObjC. It is really powerful and if you can perform experiments on it, you could improve a lot of things of Pythonista without needing any updates by omz. But I suppose that it is possibile to perform experiments on ObjC for Pythonista only if you have XCode and a Mac computer...

      If you, instead, wants to be able to install anything on Pythonista, unfortunately not even the powerful and mysterious objc world can allow you to install anything you want, it needs suitable full C-Fortran compiler, and in ios world it doesn't currently exist. But even if it existed, in order to create your application with some not-pure python code, you should pay Apple to install on your iPhone or iPad your app... So you understand that Apple make things a little strange...arousing the disappointment of many people, which then attack the developer...

      I'd like to ask you what would you expect in a new version of Pythonista, regardless of the fact that the author does not answer frequently on the forum and gives poor info about his app in the last year?
      Bye

      posted in Pythonista
      Matteo
      Matteo
    • RE: MapMan (made in Pythonista) Available NOW in the App Store

      @mapmangame Hi, thank you for sharing it, it is interesting. I'm not a player with phones/pc but I was curious to see how an app developed entirely with Pythonista works .

      Obviously feel free to answer my questions (just curious):

      1. did you developed your app using mainly your idevice with Pythonista or using a computer with other tools? I mean to test/debug your source codes during development.
      2. still need a mac to develop applications for iphone/idevices and still need to pay Apple to develop, upload to App Store (or similar) and download an app from it in own idevice that user has already paid for? I mean, is there a way to test own apps created with Pythonista downloading them in idevice from a sort of alternative but official Apple store only for testing without desire to sell anything (a sort of GitHub for idevices test apps created with Pythonista)?
      3. your app works very well in my idevice, but it consumes about 165 MB as app plus about 100 MB as Documents and data, for a total of about 265 MB. Is it ok? About it, how much memory could occupy a simple application that writes "Hello World" in a window that appears for 5 seconds, as a very very simple example? From the compilation tests you did to create your application, do you know something about empirical/rational math formula that estimates the memory consumption of a full app written with Pythonista starting from the memory consumption of its source code without comments?
      4. for your application how much (%) of pure python and how much of compiled code (about)?

      Thank you if you want to share these infos.
      Regards

      posted in Pythonista
      Matteo
      Matteo
    • RE: Will pandas and scipy be available on Pythonista in the near future ??

      @JonB Hi yes, if I will be able to create my own cocalc account and a way to interact with it using Pythonista or any online python environment it would be very useful.
      With a cocalc account user could install any library supported by anaconda (I suppose).

      For now I will try to create a temporary folder with SageMath, starting from the following piece of code

      import os
      import tempfile
      
      directory_name = tempfile.mkdtemp()
      print(directory_name)
      
      sys.path.append(directory_name)
      

      in order to save inside it, during any math session, some not-built-in libraries I have in my dropbox.
      Inside 'directory_name' I will download some external libraries from dropbox and I will test if I will be able to import these libraries with the common 'import ....'. If sagemathcell can edit sys.path and user can add any temp folder in it, maybe the remote python interpreter would import the libs.

      Thank you
      Regards

      posted in Pythonista
      Matteo
      Matteo
    • RE: Copyfile action

      @zrzka Hi, thank you, I had not noticed it and now I know also what is Markdown!
      Regards

      posted in Pythonista
      Matteo
      Matteo
    • RE: Restore files and folders from Trash

      @dgelessus Hi thanks for useful info about python versions, I use Python mainly (only) for scientific purposes (for work that is: calculation tools/scripts for environmental/mechanical eng. , and for hobby) and I use mainly python 2.7 for best compatibility with my scripts, that are largely ported from my fortran90 database with a very basic manual rewriting from fortran to python.
      So compatibility is for me a substantial problem. But I will begin to use python 3.6 as you suggest :-)
      Regards
      Bye

      posted in Pythonista
      Matteo
      Matteo
    • RE: Restart interpreter with function or command

      @Phuket2 Thank you for the suggestion about the podcast, however I'm not an expert about programming and computer science and in general, due to little free time, I limit myself to deepening only the things I need at a certain moment.
      Anyway thank you!
      Bye

      posted in Pythonista
      Matteo
      Matteo

    Latest posts made by Matteo

    • RE: No update?

      @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
      Matteo
      Matteo
    • RE: No update?

      @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
      Matteo
      Matteo
    • RE: Find text in console

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

      posted in Pythonista
      Matteo
      Matteo
    • RE: Find text in console

      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
      Matteo
      Matteo
    • RE: Find text in console

      @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
      Matteo
      Matteo
    • RE: Find text in console

      @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
      Matteo
      Matteo
    • RE: Find text in console

      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
      Matteo
      Matteo
    • RE: Find text in console

      @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
      Matteo
      Matteo
    • RE: Find text in console

      @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
      Matteo
      Matteo
    • RE: Find text in console

      @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
      Matteo
      Matteo