python - Openshift Write and Share via URL -


So basically, I write through Python in a file on OpenShift and then used to write a user If you want to be able to file it through a URL being included in the Git repository

So, in a nutshell, suppose I create a file through my script:.

  open X = "file .txt" (os.path.join (os.getenv ("OPENSHIFT_DATA_DIR"), x), 'one'). The close ()  

then creates an empty file with it's OPENSHIFT_DATA_DIR directory, which is not the only one that is not affected by Git and is guaranteed to be overwritten by OpenShift processes In the root of the file.txt name.

Will I then provide a link to File.txt? I think this is to deal with .htaccess. Should I write files in some other place?

I do not know how to move on here or if I'm on the right track, then I appreciate some help if you can thank you!

"itemprop =" text "> after

I used to find out how to do it.

Then you will action hook I made it ...

.openshift / action_hooks / post_deply

  #! / Bin / bash if [! -d $ OPENSHIFT_DATA_DIR / output]; Then mkdir $ OPENSHIFT_DATA_DIR / output fi ln -sf $ OPENSHIFT_DATA_DIR / output $ OPENSHIFT_REPO_DIR / WSGI / static / gifoutput  

and then make that file executable (just chmod + x it)

Acted like a charm!


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -