Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old March 4th, 2004, 03:23 PM
malnart malnart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 malnart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
creating an .EXE for a Python module wrapping Flash

hi,

I managed to get Python to be a wrapper for flash and they work well together but even after 3 days of working on it, I still cannot get py2exe to create a standalone.

Has anyone successfully done this?

Reply With Quote
  #2  
Old March 4th, 2004, 05:12 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Do tell, very intersted. How exactly do you mean wrapping flash? Anyway creating exe's with py2exe is usually very easy, or i've never had a problem with it... what exactly is the problem?

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old March 4th, 2004, 06:49 PM
malnart malnart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 malnart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by netytan
Do tell, very intersted. How exactly do you mean wrapping flash? Anyway creating exe's with py2exe is usually very easy, or i've never had a problem with it... what exactly is the problem?

Mark.


To use Flash as a standalone application, we need something more powerful to wrap Flash, treating Flash as a COM object. Flash can then use fscommands to talk to the wrapper, the wrapper can talk to the OS, do stuffs, then send back stuffs to Flash. The usual combination for this is using VB and Flash. I guess a better word usage is to have VB as the backend and Flash as the front-end? But you should get the idea by now...

So I use Python as the wrapper for Flash and it works great in authoring. But having py2exe to create an executable is extremely problematic for me.

First, it seems using "win32com.client.gencache.EnsureModule" call prevents proper importing of the flash object, so I tried a different approach of using makepy.py to make a Python equivalence of the Flash object and use the "import" call instead of the "win32com.client.gencache.EnsureModule" and sure enough, it works in authoring, and the "ImportError" is gone when I execute the resulting .EXE, but now, I get a:

"Application Error : The instruction at "0x1e034336" referenced memory at "0x00000004". The memory could not be "read"."

Now, I'm stuck.

Reply With Quote
  #4  
Old March 17th, 2004, 02:37 AM
klaut klaut is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 klaut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
malnart, i am stuck with similar problems and i am wondering if by this time you have found a solution?

I, too, am embeding a swf in a python program and while authoring everything works fine. Even when building with py2exe i get no problems, but when trying to run the .exe i get AttributeError: 'module' object has no attribute 'ShockwaveFlash'

if anybody has found a working solution i would be really happy if you could share

thank you.

Reply With Quote
  #5  
Old March 18th, 2004, 04:16 AM
klaut klaut is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 klaut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
if anyone is interested, i finally found a way around this problem
URL

Reply With Quote
  #6  
Old March 18th, 2004, 06:27 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Looks great! I'll have to try and remember this for if i ever do any flash Python interaction ! Anyway one little thing i knowticed from you're blog. The last line 'flashControl = flash'...

Code:
if wxPlatform == '__WXMSW__':
    from wxPython.lib.activexwrapper import MakeActiveXClass
    import flash
    flashControl = flash


could be writen like this using the as keyword in the import statment, which simply imports the 'flash' module and binds it to a different name...

Code:
if wxPlatform == '__WXMSW__':
    from wxPython.lib.activexwrapper import MakeActiveXClass
    import flash as flashControl


Doesn't make much sence to me to have a copy of the 'flash' module (flashControle and flash) floating around in you're program but i may have missed something .

Anyway have fun,

Mark.

Reply With Quote
  #7  
Old March 19th, 2004, 12:50 PM
klaut klaut is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 klaut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
you're completely right Netytan
<lame excuse>
i just wanted to "illustrate" the thing that has changed and as i reference the flashControl later on i left it that way...
</lame excuse>

Reply With Quote
  #8  
Old March 19th, 2004, 02:36 PM
malnart malnart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 malnart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
well, I downloaded and compiled your code and I got the exact same error as my code, that's when I figure I didnt do anything wrong code-wise. So I reinstalled Python and everything works. I think it's because I had ActivePython installed...

Anyhow, it's time to get rid of VB!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > creating an .EXE for a Python module wrapping Flash


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway