Sorry about the typo. I meant 2.1.1.
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.
Posts made by zencuke
-
Beta 2.1.1 expires in 13 hours.
TestFlight says Beta 2.1.1 will expire n 13 hours. Should. Be concerned?
-
RE: What's with canvas in Pythonista 3.
@omz Works for me. ;-) The nice thing about Pythonista is that I have so many choices. Thanks for that.
-
RE: What's with canvas in Pythonista 3.
@omz I'm happy with that. I guessed as much when so few people responded. I was already looking for other examples. The ability to save to an image file would be useful.
I figured you would want to know about it. If it doesn't work you should probably either fix it or delete it. I'm not invested and am already switching. As an interim step you could take it out of the documentation or mark it officially deprecated and unsupported. That would have saved me time. I haven.t done much testing but I don't think canvas works at all in Python 2.7. I suspect that it actually works at some level (there are no error messages) but that you can't see it because there is a problem displaying the canvas layer. Simple canvas tests work in 3.5 but there is the text problem @JonB found.
I just want to look at some very simple geometry. Right now I want to look at some polygons my software generates. Looking at the drawing is the point. Think of it as a viewer displaying artwork. Drop shadows and the like would degrade the "view the artwork" experience. In the bad old days of DOS I would just write pixels directly into the frame buffer. I spend months drawing Mandelbrot sets and other fractals one pixel at a time, not even vectors, directly into VGA memory. When I needed vectors I invented the Bresenham without realizing it needed inventing. Before that I wrote a graphics package on an embedded platform driving a fancy spectrometer. The package drove a stepper motor driven plotter. Again I had direct control of pixels. There was no OS to get in the way.
Windows is great with sophisticated multi-threaded multimedia type stuff but the overhead to write a program to just display a simple drawing is staggering. I miss having access to the graphic card frame buffer. Fortunately in python you solve that for me. ;-) I just need to extract the minimal functionality I need from the massive documentation and then figure out how to get it on the display in all my different platforms.
Thanks
I really should try to do it in as portable way as I can to ease my multi platform problem. That probably means doing the core work in pillow images (ui is obviously custom) with a simple platform specific wrapper to display the result. On Windows and Mac I'm currently using Processing in python mode which is its own custom world. It has its own non standard graphics environment and probably doesn't support pillow. Processing will never be standard python so I'll probably move my desktop apps away from Processing to direct Python scripts that use Tk or Qt for portability but stick with pillow for the portable core.
-
RE: What's with canvas in Pythonista 3.
@Phuket2 I just changed xrange to range in my version and the clock demo worked for me. I don't think this is a Pythonista bug. The demo needs to change if it wants to be portable between python versions. xrange is in the list of P3 backwards incompatibilities. The translate tool would probably have fixed this. There is only one range function in p3 called range which basically does what the old P2 xrange did and there is no longer anything called xrange. xrange was a speedup but even in p2.7 between range(12) and xrange(12) the difference would be hard to measure. It was really written for very big ranges.
It is interestingly difficult to say the change briefly and clearly. "xrange is still there but it is called range and xrange is gone." "Range is gone but it has been replace by xrange which is now called range."
-
RE: What's with canvas in Pythonista 3.
OK new information. I mislead people because I screwed up changing the python version. I was hitting the version icon in the console not realizing that only changed the version running in the console. When I used the correct methodology and changed the default versions in "file viewer settings" to 3.5 canvas code demo works. On my system the failure "silent (no errors) missing canvas output" only happens in 2.7. There are probably other issues though. After I run the canvas red circle example (in 3.5) I can't clear the console with the clear button. Actually (more experimentation) I can clear normal console text output but the canvas layer stays. Text output is masked by content in canvas layer. Wait... Typing canvas.clear() in the console does clear it. Maybe that's actually a feature and I just missed in the documentation?
The clock demo bug @Phuket2 reported also fails when I correctly set the version to 3.5.
Could someone try the canvas demo in 2.7 please to see if that failure is repeatable.
-
RE: What's with canvas in Pythonista 3.
OK now that I read one days worth of response I want to summarize.
- So far 151 people have viewed this topic. Not many responded which makes me think almost no one uses canvas.
- No one reports having the same problem.
- @JonB Doesn't have my problem but had a problem with canvas text functions in py3. He posted a workaround.
- ccc filed a bug against @JonB 's canvas text issue.
- @Phuket2 has a problem with the "clock face demo" He seems to think it uses canvas but the version I have does not use canvas and it works for me. I'm not sure his problem is related to mine. Maybe he has a different version of the clock demo?
-
RE: What's with canvas in Pythonista 3.
@omz Thank you. That will be helpful. I experimented with several gestures but didn't hit on that one. I kept trying to pull it down by grabbing the top edge. Are the supported gestures documented anywhere? There are a few documented in the "Using Pythonista" section. I sometimes have this paranoid feeling that everyone else gets much more from Pythonista because they know all these cool features I never heard of. I need a 4 year old to beat on my iPhone. They try everything and seem to find new gestures faster than anyone else.
BTW: I haven't told you this lately but Pythonista is the absolutely the coolest app I have ever seen. I tell everyone who will listen how great it is. My next project is to sell my kids on it who are both learning python in other contexts. And the best part is you keep adding cool new features. I was glad that I was finally able to give you a little money by getting Pythonista 3. I would have happily paid ten times that amount.
-
RE: What's with canvas in Pythonista 3.
@Phuket2 Now I'm confused. I couldn't find anything in the example directory that uses canvas. Maybe that is why it is buggy. Everything uses scene which I guess I should do as well. Canvas just looked simpler. Also I thought clock.py was removed from the release. After reading your post I finally found a copy in the "share with original Pythonista" area but that copy works fine for me. It also doesn't use canvas. It uses scene like everything else.
-
RE: What's with canvas in Pythonista 3.
@JonB I forgot to mention that I tried your slightly simpler example and it didn't work.
Side note: I wish I could figure out how to make the key pad go away. I understand that iPad users get a keypad icon but the iPhone "doesn't have enough space" for that button.
-
RE: What's with canvas in Pythonista 3.
@JonB I intentionally didn't post an example because I just used the example in the canvas documentation. I assumed everyone had fast access to that. It comes with the app. It is probably about as fast for someone to run the example as it would be to cut and paste it from the forum. It also emphasizes that it is not my code failing. I haven't started writing canvas code because the examples fail and I don't know what to do next. If I had written any code I would have posted it. I simply opened the doc, went to canvas section, scrolled to the first example, clicked on the "open in editor" button then clicked the run icon. I did this many times before I got bored and gave up, sometimes shutting down the app or powering down in between. I ran out of variations to test. I haven't reset yet. I probably should. I reset so seldom I forget how.
I am running on iPhone6 plus running 9.3.2 (I think that is the latest) and the official (non beta) version 3.
As I said the same process/example code works on the same device running original Pythonista v. 2.1 (210000). It is sort of handy having them by side by side for A-B testing. It tends to reduce operator error.
-
What's with canvas in Pythonista 3.
I want to draw some simple mostly path based things so I decided to try canvas, For one reason or another I've never used it. I started with the first example (red circle) clicking on "open in editor" and running. Nothing visible happens. I know it is running because I can add print statements and they show. No errors. Just no graphics. I switch to Pythonista 2 and sure enough the example prints a big red circle as promised. It is agnostic. It fails on both 2,.7 and 3.5. I power cycled and tried again. Still nothing. Is this a known Pythonista 3 problem or is it just me?
bug -
RE: Pythonista 2 beta expiry
Yep. I just got the notification email from apple.
-
RE: Bug list for beta release 160037
I think I have a bug demo strategy I can create so other people can try it. I'll create an extension script that ignores incoming data. I'll code the plotted data into the script. That should be run-able from any app that supports share and not depend on my Tap Form context.
-
RE: Bug list for beta release 160037
Sorry I was not more clear. This is an extension script which I thought was only in the beta. And this is a thread for beta bugs. The problem happens in the recent beta. I've been running the current beta exclusively for over a year. This problem is so bizarre I'm having a tough time trying to debug it. The only symptom is that old data is plotted even though the script prints current data before calling the plot routines. I believe it only happens in extensions and is an artifact of the independent extensions context. I have only seen it there. I assume that a general matplotlib bug of this magnitude in normal scripts would have been found long since. However assumptions are dangerous so my next step will to prove that one way or the other.
Oh yes. The other symptom is that the correct data is plotted after power cycling with no change in the script.
I wonder if anyone else has tried matplotlib in an extension.
I'll also try using one or more of the clear methods at the top of the script once I figure out the difference between them.
-
RE: Bug list for beta release 160037
Bug with matplotlib in extensions.
I'm writing extensions in pythonista for the TapForms database. Tap Forms exports a csv format file. Everything works fine except I was having problems debugging some plot strangeness and I noticed plot_date wasn't reflecting changes in the code. For example I reverse sorted the data but still saw the original data. I plotted only the slice of the last 10 points but still saw all the data. I added debug to print the data to the console and it didn't match what was plotted. I was pulling my hair out trying to figure out what I was doing wrong when in desperation I powered down the iPhone and powered it back up. The plot was correct this time. Is there context for matplotlib I need to clear between extension calls? How could it remember the data from the last extension call and ignore new data passed in? Is it showing a stale plot image maybe? Restarting pythonista is not enough to clear the condition. Only a full power down fixes it. I could post my script but it is hard to run without the Tap Forms app and my specific database format. I would be glad to write a simpler case if someone could suggest a methodology.I've also crashed pythonista several times while editing code. It apparently had something to do with autocomplete because it happened while trying to type a library method name. I only noticed it while editing the extension script but that might be a coincidence. I launched pythinosta about 10 times in a row trying to do the same edit over and over. I finally had to enter restructured code to work around the problem.
-
RE: Bug list for beta release 160037
@Webmaster4o: Intentional or not I'm having difficulty understanding the value of this. The tiny view of the file on the right adds no useful functionality to the UI. It just takes away functionality from the file list window. The iPhone screen is small as it is. Squeezing it even more is a pain, especially for no benefit. It may mean something on the iPad but it looks like a bug on the iPhone. It is bad enough on the iPhone 6 plus. It must be even worse on smaller iPhones like the regular iPhone 6. The edit window gets a whole screen. The console and doc screens get to be full width but for some reason the file list has to be narrower? With no useful functionality in exchange? Makes no sense.
-
RE: Bug list for beta release 160037
Missing documentation. The current process for adding an icon to execute an extensions script directly doesn't seem to be documented. I think the current documentation refers to an earlier process. I looked in "Pythonista Modules/appex - Using the Pythonista Sharing Extension" doc and .extensions/_Readme.md and didn't see it in either place.
-
RE: App extension help in the beta
I looked in the "Pythonista Modules/appex - Using the Pythonista Sharing Extension" doc and .extensions/_Readme.md. It isn't either of those. I don't know where else to look. I guess I'll add this documentation issue to the recent beta bugs list thread.