• AceNinjaFire

    @mikael

    DANG NICE!! Thanks I appreciate it. Ima go check it out

    posted in Pythonista read more
  • AceNinjaFire

    @ccc

    Thanks for pointing me in the right direction. From what I’ve read it’s not possible unless omz took steps to piece them together in Pythonista. I appreciate the help!

    posted in Pythonista read more
  • AceNinjaFire

    I’ve just about learned everything in the ui module that comes Pythonista. Although the only thing giving me trouble is ui.TableView, otherwise I’ve just about got it down.

    The only reason I want to install one of these modules is because it’s much easier to work with scripts/programs on Pythonista than my laptop.

    posted in Pythonista read more
  • AceNinjaFire

    I hope everyone is having a good day!

    Hey all, I’ve been using Pythonista for a good while and wanted to know if it would be possible to install one of the modules above to Pythonista so I could practice using them? I remember omz mentioning that Pythonista is not a pure-python application. So I imagine something like these modules wouldn’t likely work in Pythonista. I appreciate any responses on the topic!!

    posted in Pythonista read more
  • AceNinjaFire

    @ccc

    Ah thank you lol, I got as far as image_data = BytesIO(requests.get().content)

    I never thought about using the Context Manager and putting the “.getvalue()” on the image_data. Lol I appreciate the help!

    posted in Pythonista read more
  • AceNinjaFire

    @stephen @ccc

    Shiiiiit sorry lol I had not realized that anyone had replied. I knew I could do that from the beginning, I was just trying to go from jpeg/image object straight to ui.Image/Ui.ImageView.

    I ended up just making a list from each requests.get().content and using that.
    I was just trying to swim up river to see if I could do it I guess lol.

    posted in Pythonista read more
  • AceNinjaFire

    Nvm I think I figured it out, it has to be a bytes-like object. I just have to figure out how to get image.tobytes() to byte-like and not bytes

    posted in Pythonista read more
  • AceNinjaFire

    Been trying to get an idea of mine working. I made a script to download galleries, and I’m trying to set the image view after the image has been downloaded.
    But for some reason what I did below doesn’t do anything. Could someone tell me what I’m doing wrong?

    import ui,requests,Image
    from io import BytesIO
    Image_url =“some image url”
    
    image_data = BytesIO(requests.get(image_url).content)
    
    image = Image.open(image_data)
    
    w,h = ui.get_screen_size()
    testview = ui.View()
    testview.frame = (0,0,w,h)
    
    Img_view = ui.ImageView()
    
    Img_view.frame() = testview.frame()
    
    testview.add_subview(img_view)
    
    testview.present()
    
    Img_view.image= ui.Image.from_data(image.tobytes())
    
    
    
    

    posted in Pythonista read more
  • AceNinjaFire

    @JonB

    thanks that did it!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!