-
zipit
You can import any file type into pythonista, you have just to press the share button in your source app, then select pythonista and then import file.
-
zipit
It is a bit unclear to me what you are trying to do.
- An
ui.NavigationView
is just a (weirdly named) StackPanel - You cannot present an instance of a view twice. If you do present your
main_view
you cannot add it to thenav_view
and present it again. - You can however present as many views as you want alongside (views are always modal though).
edit: You can present an instance of a view multiple times as a popover (popovers behave it a bit weirdly). Also nothing should crash if you try to present a view twice. You should just get an exception informing you that the view is already being presented. So if your code is crashing for you, you should probably provide a more extensive code example.
Your code should look something like this:
import ui some_view = ui.View() nav_view = ui.NavigationView(some_view) nav_view.present('popover')
- An
-
zipit
Hi, then, this not what can I do?...
Depends on your definition of this. You cannot set the background color but you can set the text color and font. Just follow the link provided by @ccc or use the Pythonista documentation and look up the
console
module. -
zipit
Hi,
the short and probably most useful answer is : 'No, you cannot.' The longer answer is : Pythonista does not allow custom virtual keyboard shortcuts at the moment. It is however possible to register shortcuts for physical keyboards programmatically - with some limitations/problems (for details see [1]). You can also head over to the recent Python 3.6 and A better keyboard threads where you will find partially a discussion on the very thing you want to do. @omz said he might consider it, but as always things are mostly tied to demand, so if you want to see some virtual keyboard customization you might want to express your whishes there (or more officially on github).
[1] https://forum.omz-software.com/topic/3156/editor-configurability/2
-
zipit
console.write_link
is function of Pythonistas proprietaryconsole
module. You cannot reproduce that behaviour with a standard CPython (aka normal Python) installation since desktop shells usually do not support mouse interaction and therefore there is no such functionallity in CPython. However you can use a different Python platform on your desktop computer. IPython [1] is a very popular Python platform that has an interactive shell. IPython runs in the browser on a platform called Jupyter, so you could run IPython everywhere - on your iPad or iPhone for example. -
zipit
Your CheckerBoard class is sitting at
position=parent.bounds.center()
, so I do not understand what you do mean with 'is not placed at the 0, 0 pixel', it seems to be working asintendedexpected. If you want the board to sit whithin screen bounds you have to choose your Board center somewhere in the lower left corner. -
zipit
Sound mysterious, I am using both using numpy and matlotlib quite regularly. The only things I can say are:
- The polar plot example runs fine for me in both Python enviroments.
What you told us about the exception is a bit confusing since neither numpy nor matplotlib have an init.py file afaik (they have both multiple __init__.py files though)edit: I just realized that you were probably only struggling with the forums markdown interface since your init.py is printed bold (you have to escape the first two underscores:\_\_init__.py
).- The polar plot example does not import anything from
numpy.random
and neither doesmatplotlib.pyplot
.
I cannot think of anything obvious, I think you will have to describe more precisely (actually copy and paste the full trace of the exception) what you are doing and what is going wrong.
-
zipit
Jeah, I did not state that very clearly. Was I meant was that since they forbid using deprecated methods the (kinda) opposite - future imports - are also not a good idea as mixing versions goes against the zen-priniciple concise and clear.
edit: And what is common is IMHO not an indicator of what is good. People also use cryptic bit shifts, overly complex list comprehensions, etc. all over the place and they are also not good.
But that is just my opinion. But you are right there are cases where you need future.