• Chilibird

    @dgelessus Thank you! Your tip of 'sharing' my file out of the files app got everything fixed up and running for me. I can get the data in, process it, and send the information back out to dropbox in the form of a plot or dat file. Hopefully a solution will come along before long that will allow the files to be operated on directly in dropbox so that they don't need to be copied, but for now this will definitely work.

    I'd honestly like to like iCloud Drive - $1/mo for 50 GB would work great for me since I don't have enough data to justify the $10/mo for Dropbox Pro. My only problem is that some games, etc, like to put files in to the Documents folder and there seems to be no way to exclude those from the backup. Hopefully some day this changes.

    posted in Pythonista read more
  • Chilibird

    @dgelessus - sure enough, it looks like files imported from Dropbox are put in to different, random, folders on the filesystem for each imported file, though I did not check to see what happens if files are batch imported. Which is fair enough. Just means that I need to import files in to Pythonista before working with them. A bit clunky on Apple's part, but no big deal. I can work with that.

    Now I'm just trying to figure out if the file import dialog only allows specific filetypes to be selected by design, or if this is something that can be fixed by the developer. Any idea there? My concern is that things like images, etc, might not be importable which is kind of important.

    posted in Pythonista read more
  • Chilibird

    Hi @Phuket2 , thanks for your response! I ended up taking the plunge and downloading Pythonista. It seems like a pretty great app, but I'm definitely struggling with getting my script to open a file in Dropbox. I'm hoping maybe you or someone else reading this could give me a nudge in the right direction.

    I can successfully import/open my processing script, called process.py, and I can run it. It makes it up to my first "f = np.loadtxt("./mydata.dat")" line and stops, saying it can't find that file. Fair enough - even though the script and files are in the same folder, I haven't imported the data files in to Pythonista yet.

    So, I go back to the "external files" section of the browser and hit "open". I go to my dropbox and navigate to my folder (same folder as my script is in). All of my ".dat" files are greyed out and unselectable, and the blue cloud icon is next to them, also dimmed out and non-functional. Alright, those cloud icons make me think maybe I need to go in to the Dropbox app and tell it to make the files available offline, so I do, but nothing changes (I've tried closing/reopening both Pythonista and Dropbox, and restarting the iPad in case it was an issue of data not updating across apps). I've tried importing a whole folder with no success either. I just get an error saying the folder couldn't be imported.

    I do some googling which suggests I need to use the "import" option under new files to make non-python files available, but I run in to the same not-selectable, greyed-out-with-cloud-icon.

    Edit: I realized I can also use the files app to download the files, which I've done. This removes the blue cloud icon, but the files are still unselectable within Pythonista.

    Edit 2: Renaming the file from "mydata.dat" to "mydata.txt" lets Pythonista import the file, so it seems like this is some kind of file extension issue. It's a bit cumbersome (and in some cases not an option) to have to rename files. Is there a way around this/is this intended behavior?

    Additionally, importing the files from dropbox does not allow the np.loadtxt("./mydata.txt") to be found - I have to actually copy the files in to pythonista for this to work. Is there information on the proper path formatting to find a file in Dropbox?

    Am I doing something silly here? Is this a dropbox limitation and would be resolved if I used iCloud? (Edit: Issue remains when using iCloud) Any help would be appreciated!

    posted in Pythonista read more
  • Chilibird

    I apologize if this question has been answered somewhere and I just haven't found it in my searching.

    In short: Can python scripts run through Pythonista access (non-script) files in places like Dropbox or iCloud?

    To give a usage example, I am a researcher who uses python to perform data analysis on images. I mainly use my work computer for this, but I'm picturing a situation where I might want to do some last minute analysis to fix up a plot on the flight to a conference when I'd be off wifi, for example.

    Say I have some image(s) in my Dropbox/iCloud (Also assume they've been downloaded to the device). Can I have my python script access files in either location for use in my script? If so, do I access these files a normal way (open(...) or similar), or using some other method - and will this method work offline? Let's say I generate a .dat file in the process - can I write that back to Dropbox/iCloud so I can get to it next time I'm on a computer?

    I currently travel with a laptop, but it's certainly much easier to fly with my iPad. Pythonista looks like the perfect app to bridge the gap - this is the last thing I'm curious to know if it can do.

    Thanks!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!