iPad Pro connect to usb-c hub to access my external harddrive. I can copy them to my iPad (32GB for one year). I can access its Master folder to get the pictures. I think i can search the sub folders for images and save them one by one using the photo module. thanks.
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 henryaukc
-
RE: Any script to read the old Mac iPhotos files and transfer to my iPad Pro?
-
Any script to read the old Mac iPhotos files and transfer to my iPad Pro?
I have gone to iPad only for many years. I found an old external harddisk with my older pictures that backup from iPhoto. Did any one try to write a python script to import those files to iPad Camera Roll?
I don’t have any Mac now. thanks.
-
RE: [Feature Request] Password to lock Pythonista App for Parental Control
@JonB Hi, may I know how to use objc to remove the X button?
-
RE: Cv2 alternative?
@Jonathano agree. I will move if it makes its editor and interface more user friendly and more stable. also wanna see pythonista can resume its development. I suggest it can change to subscription model
-
Trying to move to Pyto but….
I didn’t use Pythonista much (even Python) after I bought it years ago. I need to use python for some data mining and sqlite db manipulation so I pick up Python and Pythonista recently. I found that there is a new app Pyto that support the latest Python and many modern library. Today I wanna try to run the scripts I made in the Pythonista to Pyto, and try to use it with iOS shortcut app…. It just crashes a lot of time….
Although Pythonista is an old app without recent update. I love it’s GUI and design. And it is very stable! I really hope its development will continue and it can make it through iOS 16…
And I can’t find a PyTo community like this one…this is a big deal to me too
-
How to have the code name of a certain Emoji?
Hi All,
I know now how to get the image of an emoji through this line:
ui.Image.named('emj:Multiplication_X').with_rendering_mode(ui.RENDERING_MODE_ORIGINAL)
But I search the forum and web but can’t find out how to know the code name of a certain emoji like “Multiplication_X” in the first place?
Thanks a lot!
-
RE: Publishing a UI Project to the App Store?
OH, this is what I need! Though I just discovered someone shared about using navigationView to do so. Thanks a lot!
-
RE: Publishing a UI Project to the App Store?
@donnieh Thank a lot! I will consider to try option 1 & 2 when my script becomes useful enough to be put on App store or TestFlight with the annual fee $99. But you just give me a very promising future for me to looking forward. Thanks again for you detailed reply.
Regarding option 3, can you illustrate more with simple code? Can we set the python files as read-only?
-
RE: [Share Code] `ui.View`: without x-Button
Thanks a lot!
I have used this to make my script acting a real app by using the “Add to Home Screen” to put my script on the home screen. Without x-button, it looks more like the normal app. However, I have encountered two problems:
- When my home screen shortcut was run again, the pythonista ran again my app but not return to the last screen
- When I run another Pythonista script on the home screen, it will run on my original script
Can I detect if my script is now running already and don’t run multiple times to fix problem 1?
Can I detect that there is another script running and stop Pythonista to load a new one? Or close the old one before loading the new one?
-
RE: Publishing a UI Project to the App Store?
It would be great if the non-development mode is implemented. I would like to know if it is possible that when the use tap the “X” in my view window(full screen), it will transfer the user to the home screen so that he/she won’t modify my code accidentally. Is it even possible to take away the “X” so that it would just like a real app?
-
RE: Upload any files from Any App via Pythonista Script to my Raspberry Pi connected Harddisk
It works very well. Thanks a lot!
-
RE: Upload any files from Any App via Pythonista Script to my Raspberry Pi connected Harddisk
This is my script. It works but slow as hell (maybe 40kb/s). Any suggestions? I would like to show the progress of upload too but can't figure out how to use the callback yet...
-
RE: Upload any files from Any App via Pythonista Script to my Raspberry Pi connected Harddisk
# coding: utf-8 import appex import console import os import ui import paramiko from io import BytesIO def UploadCallBack(tran_bytes, total_bytes): print("Bytes Transferred:" +tran_bytes + "\nTotal Bytes:" + total_bytes) def main(): # Sharing: receive file input_file = appex.get_file_path() if input_file == None: print('no file passed') return # SFTP Configuration host = '192.168.1.x' port = 22 password = 'password' username = 'Username' remoteFilePath = '/media/sda/' server_file = os.path.basename(input_file) filesize = os.path.getsize(input_file) # print("server_file:" + server_file) print("Starting to upload the file:" + input_file + "(Size: ", end='') print(filesize, end='') print(")... ") try: transport = paramiko.Transport((host, port)) transport.connect(username = username, password = password) sftp = paramiko.SFTPClient.from_transport(transport,max_packet_size=8*1024*1024) ''' sftp.open() while with open(input_file, 'rb') as ipad_file: read(ipad_file, ) ''' #sftp.putfo(ipad_file, remoteFilePath + server_file, callback=UploadCallBack(int, int )) ipad_file = open(input_file, 'rb') sftp.putfo(ipad_file, remoteFilePath + server_file) ipad_file.close() sftp.close() transport.close() print('Upload done!') except Exception as e: print(str(e)) appex.finish() if __name__ == '__main__': main()```
-
RE: Upload any files from Any App via Pythonista Script to my Raspberry Pi connected Harddisk
Thanks a lot @cvp ! I will try to modify using SFTP.
Hi @scj643, should I use the following method?
putfo(fl, remotepath, file_size=0, callback=None, confirm=True)
Copy the contents of an open file object (fl) to the SFTP server as remotepath. Any exception raised by operations will be passed through.The SFTP operations use pipelining for speed.
Parameters:
fl – opened file or file-like object to copy
remotepath (str) – the destination path on the SFTP server
file_size (int) – optional size parameter passed to callback. If none is specified, size defaults to 0
callback (callable) – optional callback function (form: func(int, int)) that accepts the bytes transferred so far and the total bytes to be transferred (since 1.7.4)
confirm (bool) – whether to do a stat() on the file afterwards to confirm the file size (since 1.7.7)
Returns:
an SFTPAttributes object containing attributes about the given file. -
Upload any files from Any App via Pythonista Script to my Raspberry Pi connected Harddisk
Hi All,
I am a newbie for Pythonista and stopped using it for a few months (just due to busy work). I would like to see if I can make a script to upload file from my iPad in any apps to my Raspberry Pi connected harddisk. I would like to know if it is possible to use the Share Sheet from any apps to invoke this Pythonista script to upload the file to my raspberry?
I can upload the file to my Raspberry through SFTP. Should I use the module "paramiko" to do it? Can I transfer the file byte by byte or I need to wait the original app to transfer the whole file to Pythonista so that I can upload to my raspberry? Can anyone give me some clues? Thanks a lot.
-
RE: [Feature Request] Password to lock Pythonista App for Parental Control
Thanks. I am thinking to open a full-screen window so that the user can't press the stop script button or modify the scripts...
-
RE: [Feature Request] Password to lock Pythonista App for Parental Control
@jonB really? We can even remove that 'X' button? That's so powerful... Can we just stop responding to the touch events outside the dialog box? Then no one can stop the script or modify any codes when running the login script.
-
RE: [Feature Request] Password to lock Pythonista App for Parental Control
Any method can be called to quit Pythonista if too many failed attempt?