Python anyone?
Posted: 31 March 2008 04:55 PM   [ Ignore ]
New Member
Avatar
Rank
Total Posts:  88
Joined  2007-11-29

Anyone else in love with python?

Anyways, I have started working on a gui/framework for multi touch applications written in python.  I am currently using pyglet a toolkit for pyopengl.  Its really easy and super fast to do hardware accelerated drawing. 

Currently I only have a widget hierarchy and basic stuff written and I dont have the MY event system integrated yet (shouldn’t be too hard since touchlib can provide the events over network).  But if others are interested I will share my code. 

It’s not that i dont like actionscript or flash, but you have a lot more drawing options with openGL and python is a lot faster to write than C/C++. (Although I might port the core of the project to C or C++ once its more advanced and then provide a wrapper for python for some extra speed). 

Also python has tons of libraries for other programming tasks such as system programming and networking(dont know how much actionscript/flash lest you do in that regard)

 Signature 

http://cs.uiowa.edu/~tehansen

Profile
 
 
Posted: 31 March 2008 08:15 PM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  16
Joined  2007-03-10

I have used twisted to get OSC/TUIO messages into Flash using PyAMF (http://www.pyamf.org).  I have a short, blurry video showing it working using the TUIO simulator at :

Anyway, I like Python and if you need a bridge between OSC/TUIO and Flash in Python, using PyAMF is pretty straightforward.  I’ve kinda stopped pursuing Python though and have turned toward Processing, using JMyron because JMyron (http://webcamxtra.sourceforge.net/) seems fascinating and simple.  Processing has libraries for OSC that are really simple to use, I mean seriously simple.

Profile
 
 
Posted: 14 June 2008 03:02 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  35
Joined  2008-03-11

have you seen LibAVG?  http://www.libavg.de

Profile
 
 
Posted: 18 June 2008 12:34 PM   [ Ignore ]   [ # 3 ]
New Member
Avatar
Rank
Total Posts:  98
Joined  2008-03-02

I have implemented pyglet event system over tuio protocol .. with help of pyliblo

Profile
 
 
Posted: 19 June 2008 04:57 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRank
Total Posts:  389
Joined  2008-04-22

I would love to see your code.  jet-plane and I(Actually he has done all the work so far, im still building my displaysmile have been working on TouchPy.  You can find it on Google Code.  Its very easy to interface to client Python apps, and allows you to really quickly write useful apps.  I have started an App Launcher that I will be uploading.  It uses kinetic scrolling, and will be a nice addition to any table once its done.

TouchPy, at this moment, has only been tested on Linux, and would probably be difficult to port, due to its X dependencies.

 Signature 

I am more then willing to to test your Multi-Touch programs on Linux, PM me if you have something.  If you’re looking for something faster then AS3 and Easier then C, try Python!

My Blog

Profile
 
 
Posted: 19 June 2008 10:01 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  531
Joined  2006-11-09

Really looking forward to experimenting more with python+MT… it really is great option for rapid prototyping smile

Related Python Links:

http://nuigroup.com/forums/viewthread/850/

TUIO:
http://code.google.com/p/pytuio/
http://code.google.com/p/touchpy/
http://code.google.com/p/2dcur/

Visual Libraries (OSX):
http://nodebox.net/
http://drawbot.com/

 Signature 

~

Profile
 
 
Posted: 11 July 2008 01:35 PM   [ Ignore ]   [ # 6 ]
New Member
Rank
Total Posts:  63
Joined  2007-03-04

for the 2dcur project, i just uploaded a photo app… maybe not *quite* there, but 90% works… feedback greatly appreciated, but also note this area is getting a good amount of attention lately, and i can’t wait to see other people’s python hackery!

skreen.py source

Profile
 
 
Posted: 11 July 2008 09:30 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRank
Total Posts:  389
Joined  2008-04-22

You should check out Python-Lux(and help us code itrasberry).  Stop by at #python-lux on IRC.freenode.net, we would really appreciate it.  We are writing a whole graphics front end for this kind of stuff, it will make coding easier for all of us.  Oh, also, its in 100% pure Python.

Cheers!

Alex

 Signature 

I am more then willing to to test your Multi-Touch programs on Linux, PM me if you have something.  If you’re looking for something faster then AS3 and Easier then C, try Python!

My Blog

Profile
 
 
Posted: 01 September 2008 08:59 PM   [ Ignore ]   [ # 8 ]
New Member
Rank
Total Posts:  84
Joined  2008-05-17

th0m:

I’m just starting out with python and I’m having trouble connecting the dots here - i’m getting an error: “ImportError: No module named simplejson.” So I installed simplejson (I’m on a mac so I got it through macports), but I’m still getting the same message. Obviously I’m missing a step. Is it that I need to tell python where simpljson and the rest are? How do I do that?

 Signature 

Nuigroup wiki

Profile
 
 
Posted: 01 September 2008 10:28 PM   [ Ignore ]   [ # 9 ]
New Member
Rank
Total Posts:  63
Joined  2007-03-04

well, some pointers:

1. first thing you can try is to put the simplejson*.egg file in the same folder as the script you are executing…

2. there is a place where all your python library is located… try searching your drive for *.egg or *.py ... mine (ubuntu) was in a pretty typical unix spot and I would imagine mac is the same way:

thomas@mpc:/usr/lib/python2.5/site-packages$ ls -l simp*
-rw-r--r-- 1 root root 67839 2008-05-22 20:15 simplejson-1.9.1-py2.5-linux-i686.egg

so the path /usr/lib/python2.5/site-packages/ should have something related to that

using the ez_setup or easy_install scripts could help with this too.

sort of a basic python thing, but try:

easy_install simplejson

at a prompt (if you have easy_install installed)

... best of luck… try:

http://peak.telecommunity.com/DevCenter/setuptools

it is sort of the CPAN / Synaptic / Apt / Dpkg / auto updater of the python world.

but if you can’t get it installed, just comment out that line, and keep comment out the lines it mentions until you don’t get any errors… you won’t get any pictures, but perhaps you can put some choice “print” statements in there… or make a class like the flickr class with local images…

here’s also a replacement __init__ function for for the skreenPics class that I threw together for a memory test for some of the boys on irc about a month ago that skips the json-related flickr api call:

def __init__(self):
                
urls=os.listdir('./images/')
                
images=[pyglet.image.load('a.jpg',open('./images/'+x)) for x in urls[0:100]]
                self
.sprites=[rabbyt.Sprite(texture=x.texture) for x in images]
                [[sprite
._set_scale(0.5)for sprite in self.sprites]

this will look for all files in the /images/ subfolder of where the script is running…

best of luck!

Profile
 
 
Posted: 07 September 2008 07:23 AM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  508
Joined  2008-02-22

I have been waiting on the sidelines for a while now. I want to get on the python bandwagon smile
Any sites for newbies?

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 07 September 2008 08:23 AM   [ Ignore ]   [ # 11 ]
New Member
Rank
Total Posts:  63
Joined  2007-03-04

the official python tutorial at python.org is a great tutorial, second probably only to the php tutorial, or the tutorial that comes with flash which are great tutorials… anyway, its pretty good. also take a look at the pytuio source, its pretty clean and concise as well. loading up the python interpreter and playing with it is just fun all around, too :D best of luck!!! after the tutorial, its probably good to browse their library documentation, or the pyglet examples and demos are fun, too.

Profile
 
 
Posted: 07 September 2008 08:33 AM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  508
Joined  2008-02-22

Thanks for the super fast reply. I will check this out smile

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 07 September 2008 09:42 AM   [ Ignore ]   [ # 13 ]
Administrator
Avatar
RankRankRank
Total Posts:  389
Joined  2008-04-22

For a gigantic wealth of information, check out this thread.

 Signature 

I am more then willing to to test your Multi-Touch programs on Linux, PM me if you have something.  If you’re looking for something faster then AS3 and Easier then C, try Python!

My Blog

Profile