Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Python (http://www.programmingforums.org/forum43.html)
-   -   Marguee with Python (http://www.programmingforums.org/showthread.php?t=10286)

python Jun 11th, 2006 11:07 AM

Marguee with Python
 
Is there any way to make words scroll in python. Like <marquee> in HTML?
thanks
-python

DaWei Jun 11th, 2006 1:00 PM

What do you mean, "scroll IN python"? Python is a programming language, HTML is a mark-up language. A clear question is essential to a good response. Unclear questions cause response threads to run about forty-leben half-worthless posts. I see you are new to the forum. Welcome. Please the the rules/FAQ and a "How to Post..." thread.

Dietrich Jun 11th, 2006 1:09 PM

Write a small HTML file with the marquee you want, save it as MyMarquee.html and run in from your Python program with these two lines:
:

import os
os.startfile("MyMarquee.html")

There is probably a way to doctor one up with wxPython.

Arevos Jun 11th, 2006 1:55 PM

Quote:

Originally Posted by python
Is there any way to make words scroll in python. Like <marquee> in HTML?

Using what system? Do you want a GUI? A console program? A browser page?

titaniumdecoy Jun 11th, 2006 5:58 PM

Quote:

Originally Posted by Dietrich
Write a small HTML file with the marquee you want, save it as MyMarquee.html and run in from your Python program with these two lines:
:

import os
os.startfile("MyMarquee.html")

There is probably a way to doctor one up with wxPython.

I'm curious as to what this is supposed to do. I tried what you said, but it gave me an error (AttributeError: 'module' object has no attribute 'startfile').

python Jun 11th, 2006 6:56 PM

thank you. the import os. os.startfile worked thank you.
- python

Dietrich Jun 12th, 2006 10:39 AM

Quote:

Originally Posted by titaniumdecoy
I'm curious as to what this is supposed to do. I tried what you said, but it gave me an error (AttributeError: 'module' object has no attribute 'startfile').

In the manual it states that this is only good for Windows OS, it simulates the double-click on the filename.

I think this will work with most operating systems according to the manual:
:

import webbrowser
webbrowser("MyHTML.html")


Dietrich Jun 12th, 2006 12:44 PM

Correction!!!!!!!!!!!!
:

import webbrowser
webbrowser.open("MyHTML.html")

Forgot about the 'open' part.

Cerulean Jun 12th, 2006 12:57 PM

I think that should be
:

import webbrowser
webbrowser.open("MyHTML.html")

edit: Heh, beaten to it

As for os.startfile, i'd imagine that uses Windows' start command or some such. KDE has similar functionality (and i'd bet Gnome does too). That would be cool to have cross platform, but would be tricky enough to implement.


All times are GMT -5. The time now is 11:22 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC