• Kluesi

    Hi

    I just bought Pythonista 3 for syncing Pythonista files between iPhone 6S and iPhone 4S. I am connected to iCloud on both devices to the same iCloud account. On both devices I see an iCloud folder and I can put files in it but it seems that both devices have a different iCloud folder. I don't see any files in the iCloud folder on the other device.

    Whats wrong?

    Thanks Jens

    posted in Pythonista read more
  • Kluesi

    Thats funny. I worked on this code many hours and right after I posted the problem I found the solution. After v.close() I put v.wait_modal() and then it works. It seems that the close process is not completely done when the next command is interpreted. Wait modal waits until the view is completely closed. May be a workaround but for me it is ok.

    posted in Pythonista read more
  • Kluesi

    Hi

    I want to present a view with a tiny little ui design. I use a dialogs.list_dialog to choose between options at the beginning. Everything works fine. Now I want to put this in a loop. The ui is visible, I choose the option, I do anything and when I finish this part I want to show the list_dialog again. But at the second time I get the Message: The view is already beeing presented. I analyzed some combinations and I see that everytime the ui.on_screen is true, the dialog comes up with the error message. If it is false everything is fine. It is false when I press the cross button of the ui. Then I come to the dialog again and the view ist not ui.on_screen.

    Now the question. How can I close the ui in the script so that ui.on_screen is false? ui.close and ui.View.close(v) does it not. When I close the view, ui.on_screen is already true.

    Thanks Jens

    posted in Pythonista read more
  • Kluesi

    Hi

    I want to add a greyscale image (a logo) to a picture. I wrote a little ios pythonista app in which I open a picture from an album and show it on the view in an ui.imageview. This works.

    And the other magic is missing. I want to show the logo (I have the black logo on a white background as an jpg or png image) on the loaded picture. I want to change the size of the logo by using two fingers and I want to move the logo by using one finger. The last step is to combine both pictures and save the result in an album.

    1. How to show only the non white parts of the logo on my picture
    2. How to move it with one finger
    3. How to chsnge the size with two fingers

    Many thanks

    Kluesi

    posted in Pythonista read more
  • Kluesi

    Thanks for the answers. Now I know what is wrong. I didn't mentioned that animated() ist a kind of separate thread and the following codelines ar interpreted while animate() is running.

    Thank you

    posted in Pythonista read more
  • Kluesi

    Hi

    I use Pythonista in Version 2.1.1 (211008) on my iPhone 6 and I want to fade in and fade out a Label on a UI view. I found many examples but none of them works for me.

    The scenario: The User of my app presses a button and in the background somthing happens. But the user gets no feedback. So I placed a Label on the screen center and after the button press event I want to show the label a secound and hide it.

    I found the animate() function and tried it this way:


    def showInfo(Infotext, aView):
    def doAnimation():
    aView['MyLabel'].alpha=1

    aView['MyLabel'].text='This is my message'
    ui.animate(doAnimation)


    If i call the showInfo function the Label fades in on the screen. This works. But after a second I want to fade out the label. I tried many ways to implement a fade out but none of them works. I tried to define an second function called doAnimation2 with aView['MyLabel'].alpha=0 and called it the same way like doAnimate. I also tried to set the alpha value to 0 after the ui.animate call. But the label dosen't show. No fade in, no fade out. I also serached for a definition of the animate function but I only found a very small doku about this.

    So, please help me.

    1. How can I fade in and after a secound fade out my label in the example above?

    2. What does the ui.animate function do exactly and what are the parameters of this function.

    Many thanks

    kluesi

    posted in Pythonista read more
  • Kluesi

    Hi

    1. How can I print from the iPad using a AirPrint printer?

    2. How to print on a standard (old) parallel LPT Interface Printer? E.g. over a printserver. But how to print images and so on?

    Thanks

    posted in Pythonista read more
  • Kluesi

    Hi

    I have something like

    x = [ [1, 2, 'Car'], [ [3, 4, 'House'], ... ]

    Is there an easy way to write it to a file and read it from a file? E.g. something like

    x.tostring() = ' [ [1, 2, 'Car'], [ [3, 4, 'House'], ... ]'

    or something else.

    Thanks Jens

    posted in Pythonista read more
  • Kluesi

    Ok, it seems that some things changes. If I uses background(0,0,0) and after that the image(...) I only get a black image. So I delete the background instruction.

    Thanks Jens

    posted in General Discussion read more
  • Kluesi

    I take a new scene an add this lines. On my iPhone 6s I get three lines with the colors black, green and red. But only the black one looks good. The black one is smooth. The other lines are very grainy and it looks like a bold font. What is the reason?

    def draw(self):

        tint(0,0,0,1)
        text('Hallo123456789','Helvetica',16,100,60)
    
        tint(255,0,0,1)
        text('Hallo123456789','Helvetica',16,100,40)
    
        tint(0,255,0,1)
        text('Hallo123456789','Helvetica',16,100,20)

    posted in General Discussion read more

Internal error.

Oops! Looks like something went wrong!