Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 11th, 2006, 11:07 AM   #1
python
Newbie
 
Join Date: Jun 2006
Posts: 7
Rep Power: 0 python is on a distinguished road
Marguee with Python

Is there any way to make words scroll in python. Like <marquee> in HTML?
thanks
-python
python is offline   Reply With Quote
Old Jun 11th, 2006, 1:00 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 11th, 2006, 1:09 PM   #3
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

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 looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jun 11th, 2006, 1:55 PM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
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?
Arevos is offline   Reply With Quote
Old Jun 11th, 2006, 5:58 PM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
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').
titaniumdecoy is online now   Reply With Quote
Old Jun 11th, 2006, 6:56 PM   #6
python
Newbie
 
Join Date: Jun 2006
Posts: 7
Rep Power: 0 python is on a distinguished road
thank you. the import os. os.startfile worked thank you.
- python
python is offline   Reply With Quote
Old Jun 12th, 2006, 10:39 AM   #7
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
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")
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jun 12th, 2006, 12:44 PM   #8
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Angry

Correction!!!!!!!!!!!!
import webbrowser
webbrowser.open("MyHTML.html")
Forgot about the 'open' part.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jun 12th, 2006, 12:57 PM   #9
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
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.
Cerulean is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:39 PM.

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