furmada / PythonOS

A touchscreen interface, library, and app platform for Python and Raspberry Pi.
MIT License
66 stars 14 forks source link

Question: Shutdown app #11

Closed ghost closed 8 years ago

ghost commented 8 years ago

https://github.com/furmada/PythonOS/blob/master/apps/shutdown/__init__.py

Hi, is this code actually shutdown the host system too? It says sudo system shutdown, and I think it's a yes. Can I ask, if pyos were installed in Pi, what it will do? Is this linux/OSX specific code?

I thought this app only shutdown the pyos, and not the host system.

furmada commented 8 years ago

The Shutdown app will actually shut down any Linux host system (including the Pi). I made it to prevent users from "pulling the plug" and potentially ruining files. To simply exit Python OS, use the "Quit" app.

And yes, the Linux code to shut down is sudo shutdown -h now

ghost commented 8 years ago

Ah, I see. I'm a bit confused at first, because I'm not familiar with Pi, and don't know if some commands are same like on Linux.

furmada commented 8 years ago

The Pi actually runs Debian Linux, so most (if not all) of the commands you use on Ubuntu work on a Pi as well.

However, you can install a multitude of other operating systems on the Pi as well. You can see just a few at https://www.raspberrypi.org/downloads/

ghost commented 8 years ago

I see. Thanks. Now I feel comfort to play with Python OS and interact with the shell and the API.

furmada commented 8 years ago

Awesome. I'm currently working on API docs, so if you have any questions feel free to open another issue.

ghost commented 8 years ago

I'm currently tinkering with the api through the apps/ codes. The system to build apps for it is amazingly easy and fun.

furmada commented 8 years ago

Thank you. My intention was to make it easy to get started, but powerful enough to handle complex apps (much like Python itself!)

ghost commented 8 years ago

I'm honestly think this project should deserve more contributors, because I see a big potential on this. And maybe who knows, Python language itself can integrate to build kernels, and in that time, PythonOS can take advantage on that situation.

ghost commented 8 years ago

and, also another question:

Why there is 3 separate applications that serves related function (sleep, quit, shutdown). Why these 3 are not into one application?

furmada commented 8 years ago

You're right, the Shutdown and Quit apps could be integrated. The Sleep app is intended to have one-button functionality, so it will probably remain a dedicated app.

ghost commented 8 years ago

It will be nice to integrate them both together. As long, the buttons are not too small.

furmada commented 8 years ago

I was thinking that I might integrate the apps while dumping the dialog based interface. That way, I could make three big buttons and be able to handle Sleep as well.

ghost commented 8 years ago

Nice