Flython?

J

jmdeschamps

Daniel Ellison said:
Not to mention the size and ubiquity of the browser plugin.


Yes, I'd have to agree with that. The point isn't to get a free
replacement for the Flash authoring environment. I own a copy of Flash,
and know quite well how to use it: I've been using and programming Flash
since v4. No, we want a Pythonic way of producing Flash "swf" files, and
in doing so, simplifying (at least) the "view" considerably, and at the
same time creating a much more appropriate interface for web applications.
....


Dan


Well, what about Ming ???
http://www.freenet.org.nz/python/ming

I haven't been able to compile it from source for python 2.3, but
maybe someone out there can .

Jean-Marc
PS I've asked for help on this topic a few times in this list - to no
avail though, so I don't know if anyone as ever done it!
 
P

Peter Hansen

jmdeschamps said:

Not sure... Ming appears to be in an extremely early form,
and there are suggestions it's not very stable yet (and
I think that word was used in the sense of "unreliable",
not just "changing").

The script support appears to be "C-like, with a very limited
feature set". Doesn't even allow function calls?! That
can't be good.

Maybe improvements are on the roadmap. I'm not sure why
they would have chosen to go with a C-like scripting
language, however, instead of growing an ECMAScript
language piece by piece. Or just adopting an existing
component from some other project... maybe from
spidermonkey or something.

I really don't know. This stuff is not yet something
I know much about.

-Peter
 
P

Peter Hansen

simo said:
There's a few libraries for making SVG files in PHP, so there may be
Python versions too, but if you want ActionScript then I guess you're
determined to go with Flash instead.....

I just stumbled over the following text in this page
(http://www.webreference.com/programming/javascript/j_s/column2/)

'''Now some developers might say: "Big deal, who cares about Flash
animations ?" Well, as it turns out - quite a lot of folks in the
software business. First, Adobe has thrown in the towel on SVG and
adopted Flash's .SWF file format for animations as has just about
every other major player in the graphics, 3D modeling and image
design fields.
'''

Adobe has thrown in the towel on SVG?! When did that happen?
I can't find another reference to the news that inspired this
comment.

On another note: comparing Flash and SVG:
http://www.theopensourcery.com/osrsvgover.htm

-Peter
 
G

Graham Fawcett

Peter Hansen said:
Just been looking at Flash and ActionScript...

In the vein of Jython, I wonder what it would take to build
a Flython? (Lousy name, I know.) That would take Python
source, presumably a subset since some things couldn't be supported,
and compile it into ActionScript bytecode (aka the bytecode compiled
from ECMAScript source for the Macromedia Flash player environment).

I've written some code (twice, I think) to generate SWF from Python.
Didn't include ActionScript, but it's all there in the SWF spec, so it
shouldn't be *too* hard to implement. My code was less than fast, and
was highly specialized to do a few things that I was interested in
(and ignored the rest). If there's interest, I'll dig it out, though
it's far from project-grade code and is possibly broken. The toughest
part was just grokking the SWF spec, and building some Pythonic
primitives that can output SWF tags. Simply put, writing SWF from
Python isn't rocket science. But of course, you want more than just
that...
With that, it would be pretty easy to write applications which
have a Flash front end, but with pretty much all the logic
on front and back implemented in Python.

A neat idea, definitely begging for a proof-of-concept. I look forward
to testing it. ;-)

There will be times when you want to make a GUI "flashier" than your
framework will allow (unless you're planning to reimplement all of
Flash). Perhaps you might want to use the framework to prototype
something, and then knock the real thing out using Flash (perhaps
importing the ActionScript from your framework). I'd encourage you to
leave room in the design for the inclusion of non-native SWF
components (i.e. ones built using something other than your framework)
that could interact with your back-end (and, through it, with other
client components).

Dave Kuhlmann has done some interesting writing on generating Web
applications from declarations (google for him, Quixote, and REST, and
it should turn up). This might be useful, since your framework spans
the client/server boundary (and perhaps you'd like to obscure that
boundary just a little bit) and would be well suited to a declarative
style (except for the scripting). Quixote suits REST quite well, it
seems, and might be worth consideration as part of your back-end
design.

The last random snippet that comes to mind is that, on Win32, it's not
hard to build a SWF viewer using wxPython (and the SWF plugin, of
course). That might help with deployment where a browser really isn't
suitable.

I know I've said "your framework" half a dozen times, and there's no
such animal, but I do hope that you or someone else picks up the trail
on this and gives it a college try. It would be fun to use, I think.

-- Graham <[email protected]>
 
G

Graham Fawcett

Peter Hansen said:
Just been looking at Flash and ActionScript...

In the vein of Jython, I wonder what it would take to build
a Flython? (Lousy name, I know.) That would take Python
source, presumably a subset since some things couldn't be supported,
and compile it into ActionScript bytecode (aka the bytecode compiled
from ECMAScript source for the Macromedia Flash player environment).

I've written some code (twice, I think) to generate SWF from Python.
Didn't include ActionScript, but it's all there in the SWF spec, so it
shouldn't be *too* hard to implement. My code was less than fast, and
was highly specialized to do a few things that I was interested in
(and ignored the rest). If there's interest, I'll dig it out, though
it's far from project-grade code and is possibly broken. The toughest
part was just grokking the SWF spec, and building some Pythonic
primitives that can output SWF tags. Simply put, writing SWF from
Python isn't rocket science. But of course, you want more than just
that...
With that, it would be pretty easy to write applications which
have a Flash front end, but with pretty much all the logic
on front and back implemented in Python.

A neat idea, definitely begging for a proof-of-concept. I look forward
to testing it. ;-)

There will be times when you want to make a GUI "flashier" than your
framework will allow (unless you're planning to reimplement all of
Flash). Perhaps you might want to use the framework to prototype
something, and then knock the real thing out using Flash (perhaps
importing the ActionScript from your framework). I'd encourage you to
leave room in the design for the inclusion of non-native SWF
components (i.e. ones built using something other than your framework)
that could interact with your back-end (and, through it, with other
client components).

Dave Kuhlmann has done some interesting writing on generating Web
applications from declarations (google for him, Quixote, and REST, and
it should turn up). This might be useful, since your framework spans
the client/server boundary (and perhaps you'd like to obscure that
boundary just a little bit) and would be well suited to a declarative
style (except for the scripting). Quixote suits REST quite well, it
seems, and might be worth consideration as part of your back-end
design.

The last random snippet that comes to mind is that, on Win32, it's not
hard to build a SWF viewer using wxPython (and the SWF plugin, of
course). That might help with deployment where a browser really isn't
suitable.

I know I've said "your framework" half a dozen times, and there's no
such animal, but I do hope that you or someone else picks up the trail
on this and gives it a college try. It would be fun to use, I think.

-- Graham <[email protected]>
 
S

Sandy Norton

Peter said:
In the vein of Jython, I wonder what it would take to build
a Flython? (Lousy name, I know.) That would take Python
source, presumably a subset since some things couldn't be supported,
and compile it into ActionScript bytecode (aka the bytecode compiled
from ECMAScript source for the Macromedia Flash player environment).

Have you looked at http://ming.sourceforge.net/

Sandy
 
P

Peter Hansen

Sandy said:

Briefly, but I'm not fully qualified to judge. I wrote this
in another post that you might not yet have seen:

"""Ming appears to be in an extremely early form, and there are
suggestions it's not very stable yet (and I think that word was used
in the sense of "unreliable", not just "changing").

The script support appears to be "C-like, with a very limited
feature set". Doesn't even allow function calls?! That
can't be good.
"""

-Peter
 
D

Dave Benjamin

Briefly, but I'm not fully qualified to judge. I wrote this
in another post that you might not yet have seen:

"""Ming appears to be in an extremely early form, and there are
suggestions it's not very stable yet (and I think that word was used
in the sense of "unreliable", not just "changing").

The script support appears to be "C-like, with a very limited
feature set". Doesn't even allow function calls?! That
can't be good.
"""

This was roughly my reaction as well. It seems like the project kind of
stalled, and its support for ActionScript is very minimal. But it's a neat
library for simple stuff, like rendering (non-interactive) vector graphics,
and turning images into SWFs (which used to be necessary before Flash 6
added support for dynamic loading of JPEGs). I've actually used it from
mod_python for this purpose before.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top