maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Python help and suggestions please (https://talk.maemo.org/showthread.php?t=25467)

mikkov 2008-12-26 21:03

Re: Python help and suggestions please
 
Quote:

Originally Posted by Munk (Post 252686)
Another question on Python. In my searches I could not find the answer.

Is there a way that I can have Python launch the web browser and a specific URL? Just to reword it, there's a giant button that says open this web page on the screen of the Python Pygame app. The user clicks it and then the browser opens up and is browsing to a specific URL?

Use the webbrowser module
http://docs.python.org/library/webbrowser.html

ciroip 2008-12-27 07:51

Re: Python help and suggestions please
 
Quote:

Originally Posted by Munk (Post 250524)
Hi yerga, (and everyone else that has helped me learn Python)

I finally put that little piece of code into my Python program and have it showing the icon in the task manager. Thanks, thanks, thanks. I'm getting close to releasing my program, but there's still more coding, centering, bug trapping, etc. to do. ...
IMG]http://www.xbox1.com/temp/traveller-Alarm.png[/IMG]
..

Hey it seem we had the same idea at the same time and we are walking in the same path (1st application in python, pygame and a full screen clock), but your project seem really more advanced than mine :
http://www.internettablettalk.com/fo...ad.php?t=25582
I decided to show my miseries pretty fast (just after I was able to make some number movings :) ) and the support from people in the forum is great. Kudos to your project (that seem pretty advanced). Once youll release your version we should merge the thread since the topic is pretty the same :)
Developing for the nokia tablet is a joy and, since the hardware is exactly the same for everyone, pretty easy to spot particular technics, optimizations and tricks that every developer use.
P.S. Xbox1?

Munk 2008-12-27 09:19

Re: Python help and suggestions please
 
Quote:

Originally Posted by ciroip (Post 252771)
Hey it seem we had the same idea at the same time and we are walking in the same path (1st application in python, pygame and a full screen clock), but your project seem really more advanced than mine :
http://www.internettablettalk.com/fo...ad.php?t=25582
I decided to show my miseries pretty fast (just after I was able to make some number movings :) ) and the support from people in the forum is great. Kudos to your project (that seem pretty advanced). Once youll release your version we should merge the thread since the topic is pretty the same :)
Developing for the nokia tablet is a joy and, since the hardware is exactly the same for everyone, pretty easy to spot particular technics, optimizations and tricks that every developer use.
P.S. Xbox1?

Croip, man, that is absolutely beautiful stuff you have going there. I really wish my graphics ability was even 1/10th of yours. Thanks for saying the nice stuff too. I see we both have Amiga backgrounds too. I had an A500 and A1200 both with HD's, expanded processors and memory, on and on. With my friends going with A2000's, etc. In fact the only real program I made on Windows Mobile was an Amiga UAE front end launcher that explained all of the items such as fast RAM, 68000 vs 010 vs 020 etc. before saving the config file out and launching the emulator. It's been updated since this release now that others have worked on it but you gbet the idea.

http://xbox1.com/puaelauncher/

The xbox1.com was a fan site I made a long time ago and then let die because a new way of thinking was taking place for me. I find that I, and many others, take sides. Sometimes to a fault. So take it with a grain of salt.

I got permission from accuweaher.com to use their data and they gave me a custom xml link for this program. But there were a few rules to follow in exchange including: displaying their logo, having at least two days of forecasts showing and making each day a link to theri website with expanded details. So this is why I am after this knowledge. Oh and BTW, the people at Accuweather.com couldn't have been any cooler, kinder and more down to earth. They were simply great.

The people of this forum are also some of the best people I know without knowing them. So helpful and similar in thoughts and at times so different. Sometimes a little strong on the Linux platform side. Just a good group. I love my NIT and hope this program could help others.

Sorry for rambling. :o

ciroip 2008-12-27 20:19

Re: Python help and suggestions please
 
Quote:

Originally Posted by Munk (Post 252777)
I really wish my graphics ability was even 1/10th of yours
...

well the graphics was initially meant to be used by other people. ( i have a big problem to call myself a developer...:) )
So if you spot something could be usefull for your projects just use it; i have no problem in case you need, togenerate particular sizes since I translated the approach of the kontori theme maker (1 file source) and i can easily create a different version with few steps.
Size changes= ok
hue changes(tones) =ok
completely new graphics= heavy challenged by time and mood

Munk 2008-12-27 22:40

Re: Python help and suggestions please
 
Quote:

Originally Posted by mikkov (Post 252691)

mikkov, thank you soooo much. In my quick checking, this works on my laptop with no issues but fails on the NIT. I'll do some more testing, configuring, etc. But, thank you. This is the answer I just need to do it correctly.

Munk 2008-12-29 03:58

Re: Python help and suggestions please
 
Anyone know why "webbrowser.open" seems to work perfectly on Windows but doesn't error or actually pop-up a browser on the NIT? Maybe I should just use the suggested command line from Qwerty12 of "os.system(browser --url=<url>)"

Sometimes, programming success is fast and exciting. Other times, I can waste an entire day just trying to pull a simple little item up. :mad:

mikkov 2008-12-29 15:36

Re: Python help and suggestions please
 
Well at least for me it works fine

this is what I do at python console
Code:

>>> import webbrowser
>>> webbrowser.open("http://www.maemo.org")
True



All times are GMT. The time now is 22:01.

vBulletin® Version 3.8.8