Comments (2)
You should write the absolute path in QPython3 or QPython.
On Thu, Jun 4, 2015 at 5:15 PM, rudi48 [email protected] wrote:
Hello,
I try to use the web framework bottle, with an application, which works on
Ubuntu 14.04.
When I try to load my template file from the web browser (firefox):
return template('index.tpl', **settings)
I will get an HTML error 500 (internal server error).
When I try to load a static file, I will get an HTML error 404 (file not
found).When I run in a test program:
print(os.path.abspath(os.getcwd()))
I will get just "/".Usually in "bottle" the program directory is the root for file loads.
How can I set it up, to make the root for file loads the program directory?Regards, Rudolf
β
Reply to this email directly or view it on GitHub
#3.
river's showtime, river's game
from qpython3-toolchain.
Hello riverfor,
Thank you very much for your hint.
I wanted to have a solution, which is good for several OS.
My working universal solution was:
# if system Android, set root directory, *** needs to be adopted
import platform
machine = platform.machine()
print('machine: ' + machine)
if (machine == 'armv7l'):
os.chdir('/sdcard/com.hipipal.qpyplus/projects3/LabPSU2m')
print(os.getcwd())
I hoped, you had a better idea for universal use.
Best regards, Rudolf
from qpython3-toolchain.
Related Issues (11)
- private31_py3.6.6.mp3 with numpy and scipy not work.libpytho3.6m.so.1.0 not found HOT 1
- Update to Python 3.7? HOT 1
- How does this toolchain workοΌ
- time.strptime returns locale query failed
- question about the android screencast
- datetime.datetime.strptime Returns locale.error: local query fail
- Crash on Android x86 HOT 3
- Update to Python 3.4 or newer? HOT 1
- No readline.set_pre_input_hook()
- [QCT] Initial QPython3 Toolchain HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qpython3-toolchain.