The latest version of Python definitely contains pandas. It is version 1.4.4.
Highly recommended!
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 upwart
-
RE: Pandas
-
RE: PySimpleGUI wrapper for Pythonista...?
It would indeed be nice, if we had PySimpleGUI basic functionality (what is that?) in Pythonista. But, that would be quite a job, although not impossible.
BTW, Although PySimpleGUI claims to be cross-GUI, in fact it only runs properly under tkinter. So, if we would have tkinter at our disposal under Pythonista, we could run PySimpleGUI as well. But, it's quite unlikely that we will ever see tkinter running under Pythonista or on an iPad in general (unless we get full Linux one day). Just dreaming .... -
RE: Any chance that the greenlet module would be supported in Pythonista?
@cvp
Thanks.
I was already afraid of that. -
Any chance that the greenlet module would be supported in Pythonista?
I am developing a package which uses the excellent greenlet module (https://pypi.org/project/greenlet/).
Alas, this seems not to be supported by Pythonista.
Can we expect this to be included in a future version? -
RE: Bizarre bug in Pythonista 3.4
@cvp
12 till 17 (including 13) causes crash here. -
Very minor bug in Pythonista 3.4
When I run this code
import inspect class X: ... sig = inspect.signature(X)
on Pythonista 3.4, a
ValueError : No signature for builtin <class 'object'>
exception is raised.This did not happen on Pythonista 3.3 and not on a Windows machine running Python 3.10.4 (same version as Pythonista 3.4).
If I add an__init__
method, the exception is not raised anymore,Of course, I can just use a try/except block to solve the problem, but it is very strange.
-
Bizarre bug in Pythonista 3.4
I ran into a bizarre bug with the latest version of Pythonista.
It took me quite a long time to discover the cause of a Pythonista crash.
Here's a MWE (minimal working example), showing the bug:from PIL import ImageFont, Image, ImageDraw font = ImageFont.truetype(font="calibri.ttf", size=15) im = Image.new("RGBA", (100, 100), (0, 0, 0, 0)) draw = ImageDraw.Draw(im) draw.text(xy=(0, 0), text="a", font=font) print("never reached")
In this script, a text is written into a Pillow message.
When I run this, the system crashes and the crash log shows:Fatal Python error: Aborted Current thread 0x000000016d847000 (most recent call first): File "/var/containers/Bundle/Application/A061EDB8-1B89-41D2-B706-1F4E042DE8E4/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/PIL/ImageFont.py", line 666 in getmask2 File "/var/containers/Bundle/Application/A061EDB8-1B89-41D2-B706-1F4E042DE8E4/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/PIL/ImageDraw.py", line 429 in draw_text File "/var/containers/Bundle/Application/A061EDB8-1B89-41D2-B706-1F4E042DE8E4/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/PIL/ImageDraw.py", line 484 in text File "/private/var/mobile/Containers/Shared/AppGroup/11021B83-B419-4F67-A331-D54B9BAFC718/Pythonista3/Documents/salabim/a1_1.py", line 6 in <module> Extension modules: pykit_io, _ui, _appex, _frameworksimporter, console, _debugger_ui (total: 6)
The strange thing is that this seems to happen only with this specific font (
calibri.ttf
) and only with font sizes between13
and17
!
The code used to run fine on Python 3.3 and works well on all other platforms, I have used.I found a workaround by using the Arial font instead of
calibri.ttf
. But it is very strange! -
RE: Change black linelength
@cvp
Thanks for thinking with me.
I know how to add the Black section to pyproject.toml. Just can't work out where to put it in Pythonista to work with reformat.
Anyway, I've it working now via a user installation of Back. -
RE: Change black linelength
@ccc
What do you mean with ruff.toml?
I tried pyproject.toml, but could get that working. -
RE: Change black linelength
This is to tell that I have managed to get black to use an alternative line length (160 in my case), by pip installing black. It will be installed in the site-packages (user) folder. And there, I can just patch the const.py file.
It seems to work perfectly. Hooray! -
RE: Change black linelength
@ccc
As far as I can see only pyproject.toml or command line parameters are supported. And changing const.py.
But none of these seem to be possible in Pythonista. Pitty! -
RE: Change black linelength
@ccc
That's a good suggestion.
I tried putting a proper pyproject.toml in the folder where the to-be-reformatted file resides or the parent folder. But it doesn't work.
@omz
It would be nice if I just could edit a file in the site-packages (built-in) , but that folder is obviously readonly. Making that folder read/write would also allow patches in other built in modules. -
Change black linelength
I would like to reformat with black with another line length than the default of 88.
I know that this is in black/const.py, but this seems to be read only.
How can I change const.py, copy black completely or give command line parameters in the reformat command. Or ...? -
Crash log?
I have a script that crashes. I read somewhere about a crash log. If that exist, where can I find it? That would make it easier to drill down the problem.
-
RE: Black on Pythonista?
@ccc
Thanks.
That works perfectly ... after I deleted an older version of click. -
RE: Bug: scene.load_pil_image raises SystemError
@JonB
Thanks for this advise.
In fact in my application, I just start every tick with an empty canvas a throw lots of PIL images in it. No copies, nothing destroyed (explicitely). So, your suggestion might work very well for me.
Thanks. -
RE: Black on Pythonista?
@omz
I can't find information on how to use Black in "What's new" part of the documentation. Is there something else called Release notes? If so, where can I find them?
If not, where are instructions to install/use Black? -
RE: Black on Pythonista?
@ccc
Maybe a stupid question, but where can I find the release notes ad/or instructions to install/use black?