using pyopengl 3.0.0b1 with py2exe

2008-01-16 Thread Sébastien Ramage
Hi !

How can I make an exe that use the new pyopengl 3.0.0b1 ???
I use py2exe 0.6.6

with the 3.0.0a6 version I have make it working by copying the egg and
by
forcing loading it at the start of the app
but it doesn't work with this version

py2exe correctly detect it and include it in the app but I get this

Traceback (most recent call last):
File "texas.py", line 8, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\GL\__init__.pyo", line 2, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\raw\GL\__init__.pyo", line 6, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\raw\GL\constants.pyo", line 7, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\platform\__init__.pyo", line 20, in 
ImportError: No module named pkg_resources

if I add an unzipped copy of setuptools in my app folder, py2exe
include
pkg_resources but I get this

Traceback (most recent call last):
File "texas.py", line 8, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\GL\__init__.pyo", line 2, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\raw\GL\__init__.pyo", line 6, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\raw\GL\constants.pyo", line 7, in 
File "zipextimporter.pyo", line 82, in load_module
File "OpenGL\platform\__init__.pyo", line 57, in 
File "OpenGL\platform\__init__.pyo", line 53, in _load
RuntimeError: Unable to find an implementation for the 'win32' ('nt')
platform


if anybody ahs a solution

Seb
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pyro and sqlite3 problem

2007-12-02 Thread Sébastien Ramage
I'm trying to build a client/server app
the server use a sqlite3 database to store differents things
the client ask the server to get value or store new entries in the
database.
The problem is that Pyro create a new thread for each client

at first time I create the connection to database at server start and
I would re use the connection for transaction but I get the error.
Maybe I can open/close database for each transaction but maybe it
would be slow ?

Seb


2007/12/1, Sergio Correia <[EMAIL PROTECTED]>:

If you are creating a cursor/connection object, you need to use it
in
the same thread that created it. Otherwise, some weird errors can
happen (as many of this list have said).

If you give us more info about the type of the problem (what are
you
trying to do?) we can help you build a safer app.

Best,
Sergio

PS: When faced with the same error, I just recycled the objects
used
in the I/O operations and the problem was solved. However, that
was
done locally, without using Pyro, so your milleage may vary.

On Dec 1, 2007 4:29 AM, Sébastien Ramage
<[EMAIL PROTECTED]> wrote:
>
> Hi !
>
> I'm trying to build an client/server app based on Pyro and
sqlite3.
> But I have a problem using sqlite3 on the server
>
> I got this error :
>
> sqlite3.ProgrammingError: ('SQLite objects created in a thread
can
> only be used
> in that same thread.The object was created in thread id 240 and
this
> is thread i
> d 4068', 'This error occured remotely (Pyro). Remote traceback
is
> available.')
>
> what can I do to avoid this ?
>
> I'm using Python 2.5.1,Pyro 3.7  under Windows
>
> Sébastien
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pyro and sqlite3 problem

2007-12-02 Thread Sébastien Ramage

> Off hand -- ensure that each remote access runs the entire sequence
> of "connect, cursor, execute, fetch, cursor-close, connection-close"
> rather than trying to, say, create a cursor in one access and then use
> that cursor on a second access...
>
> Or maybe create one long-running thread to handle the database
> access and use queue objects to transfer the remote access parameters to
> the database thread, then retrieve from a return queue.
> --

thanks you for answer.
Do you think the first solution will be slow? I think I must use
locking to avoid problem.

The second solution seems better and looks like what I wanted to build
at first time, but maybe an ever opened sqlite database isn't a good
thing ?
-- 
http://mail.python.org/mailman/listinfo/python-list


Pyro and sqlite3 problem

2007-12-01 Thread Sébastien Ramage

Hi !

I'm trying to build an client/server app based on Pyro and sqlite3.
But I have a problem using sqlite3 on the server

I got this error :

sqlite3.ProgrammingError: ('SQLite objects created in a thread can
only be used
in that same thread.The object was created in thread id 240 and this
is thread i
d 4068', 'This error occured remotely (Pyro). Remote traceback is
available.')

what can I do to avoid this ?

I'm using Python 2.5.1,Pyro 3.7  under Windows

Sébastien
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: searching algorithm

2007-05-10 Thread Sébastien Ramage
I have made a script that search anagram based on the ODS file ( call
OSW in english, Official Scrabble Words)
it load a file that contain 369085 words (one word per line)

I create a dictionnary and store word into using the length of the
word as key
example : mydict[2] contain a list of word with length = 2

first I select the correct dict entry and in a second time I scan this
list searching correct word

my file contains 369085 and it's pretty fast

Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Plugin for Web Browser

2006-12-12 Thread Sébastien Ramage
pour ceux que ça intéresse

http://base.google.com/base/a/1438658/D18001067256043490325

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Plugin for Web Browser

2006-12-06 Thread Sébastien Ramage


> Par contre, je pense qu'il existe une autre démarche, qui consiste à
> générer, à la volée, en Python, des sortes d'applets java/javascript.

Il est clair que mon projet est un peu plus complexe mais je l'espère
plus ambitieux aussi
Le but étant vraimment de faire des applets en Python et non Java via
Jython ou autre


> Avantages : rien à installer ; milti-navigateurs
> Inconvénient : ça se programme côté serveur.
> Voir : Pyjamas (http://pyjamas.pyworks.org/FR/overview/)

oui d'ailleurs un utilisateur de Pyjamas m'a déjà contacté et il
serait intéressé par un plugin tel que je l'imagine.
Concernant les avantages je ne suis pas d'accord avec toi:
- "rien à installer" : oui par javascript mais non pour java il y a le
runtime à installer donc finalement avoir un runtime Python pourquoi
pas
- multi-navigateur : idem, rien n'interdit d'avoir un plugin
multi-plateforme et multi-navigateur, Java le fait bien lui alors
pourquoi pas Python

bref ça va certainement poser des tas de problèmes de sécurité et
je pense qu'un plugin 100% opérationnel ne verra pas le jour avant un
bon moment mais rien n'empèche de se lancer dans l'aventure !

Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Plugin for Web Browser

2006-12-06 Thread Sébastien Ramage

oui COM je connais et ça fonctionne bien mais ce n'est pas portable
d'un navigateur à l'autre et ce n'est pas ce que je cherche à faire.
Mon but serait d'avoir un plugin qui permettrait d'embarquer des
applets écrient en python dans les pages html à l'image de Java ou
Flash, etc
Pour le moment j'essaie de générer un plugin pour firefox avec le
Gecko SDK fourni par Mozilla (car bizarrement je ne trouve rien coté
IE...) mais ce n'est pas gagné vu mon niveau en C++... Je n'arrive pas
à compiler l'exemple.
As-tu des connaissances en C++ ? avec Visual C++ ?

Seb


Michel Claveau a écrit :

> Re !
>
> Je ne sais pas quel est ton objectif, mais il est possible de couplet
> Python & Javascript, de manière à générer/modifier/piloter le contenu
> HTML de pages Web depuis Python. Je fais ça tous les jours (avec IE)
>
> Pour cela je passe par COM.
>
> Malheureusement, à cause de la paranoïa sécuritaire ambiante, il y a de
> plus en plus de contraintes et d'obtacles.
>
> Ainsi, s'il n'y a pas (encore) trop de problèmes tant que l'on est en
> local (avec les .HTA, par exemple), dès que l'on est distant (Intranet,
> Extranet, Web), il y a maintenant des confirmations à tout bout de
> champ, des avertissements peu utiles, mais devenus incontournables, des
> boîte de dialogues intempestives, etc.
>
> Donc, si c'est pour utiliser comme interface pour des applis sur le
> disque (ou le réseau local), OK ; sinon, ça posera des problèmes.
>
> C'en est à tel point que je me demande si l'utilisation de frontaux
> HTML comme GUI est toujours intéressante.
> Et le problème ne touche pas que Python. Par exemple, j'ai un client
> qui utilise un logiciel de gestion de l'assurance qualité, utilisant
> des navigateurs comme interface. Du coup, ils ont des patchs 2 fois par
> mois, et les utilisateurs ont toujours plus choses à valider...
> 
> -- 
> @-salutations
> 
> Michel Claveau

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Plugin for Web Browser

2006-12-06 Thread Sébastien Ramage
des exemples de plugins pour IE oui mais qui ne sont pas embarqué dans
une page Web
je souhaiterai créer qqchose qui ressemble vraiment à Java VM ou
Flash
J'ai trouvé un début de réponse pour Firefox en télécharger le
GeckoSDK
mais je n'arrive pas à compiler les exemples pour le moment...

merci


MC a écrit :

> Bonjour !
>
> Pour IE, il y a des exemples de plugins, fournis avec PyWin32.
> Pour FF (comme pour Opera), je ne sais pas.
> 
> -- 
> @-salutations
> 
> Michel Claveau

-- 
http://mail.python.org/mailman/listinfo/python-list

Python Plugin for Web Browser

2006-12-05 Thread Sébastien Ramage
I've an idea and I've made some search but I found nothing really
interesting.
There is somebody who have (or can help me to) try to developp a python
plugin for web browser just like java ??

I search an how-to for creating a plugin for Firefox and only find how
create extension...

I've find some informations about Python Active Scripting but this is
not what I want.

Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How Build VTK for Python 2.5 under Windows?

2006-10-03 Thread Sébastien Ramage
I've install MS Visual C++ toolkit 2003 and cmake
but I don't really know how it work.

there's somebody who can compile VTK for python 2.5 under windows for
me ?

thank you

(And sorry for my english, I'm French)

Seb



Sébastien Ramage wrote:
> Hello,
> I'm running on Windows and I want to test VTK but I don't understand
> how build it
>
> Somebody can help me to build VTK for Python 2.5 under Windows? (or
> Python 2.43 if python 2.5 is a problem)
>
> I have no C compiler but I can install one if it's free.
> 
> Thank you
> 
> Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


How Build VTK for Python 2.5 under Windows?

2006-10-03 Thread Sébastien Ramage
Hello,
I'm running on Windows and I want to test VTK but I don't understand
how build it

Somebody can help me to build VTK for Python 2.5 under Windows? (or
Python 2.43 if python 2.5 is a problem)

I have no C compiler but I can install one if it's free.

Thank you

Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyOpenGL pour python 2.5 ???

2006-09-25 Thread Sébastien Ramage
good news !

thank for links to the blog, very usefull

now I have to wait

seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyOpenGL pour python 2.5 ???

2006-09-25 Thread Sébastien Ramage
oh!
sorry, I made some search on comp.lang.python and fr.comp.lang.python
and finally I forgot where I was...

My question is :
how use pyopengl with python 2.5 ??
it seems that pyopengl was stop on 2005

I'm on windows and I've not tools to recompile pyopengl for python 2.5
(thinking recompilation is the only things)

Somebody can help me?

Seb





Bruno Desthuilliers a écrit :

> Sébastien Ramage wrote:
> > Bonjour à tous,
>
>
> Hi Sébastien.
>
> Wrong newsgroup, I'm afraid - either repost here in english, or post to
> fr.comp.lang.python...
>
>
> --
> bruno desthuilliers
> python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
> p in '[EMAIL PROTECTED]'.split('@')])"

-- 
http://mail.python.org/mailman/listinfo/python-list


PyOpenGL pour python 2.5 ???

2006-09-25 Thread Sébastien Ramage
Bonjour à tous,

Dans la folie j'ai installé le nouveau python, impatient de voir les
nouveautés
mais je pense que j'ai été un peu rapide car j'ai voulu utiliser
pyOpenGL et là problème il n'existe pas pour python 2.5 ?!!! de plus
il semble que pyopengl est été abandonné depuis 2005 ? plus rien ne
bouge sur le site...

je suis sous windows et je ne dispose pas des outils pour faire moi
même une compilation, (en supposant qu'il n'y aurait que ça a faire)

alors si quelqu'un a plus d'info pour utiliser l'opengl avec python
2.5...


Merci
Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Jython from CVS

2005-07-03 Thread Sébastien Ramage
Somebody can help me to recompile Jython from the CVS file ?


thank
--- 
other question : No python browser plugins avaible?


Seb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: embedded Python

2005-05-25 Thread Sébastien Ramage
PROBLEME RESOLU

j'ai résolu le problème en supprimant le commutateur \GZ de le link
http://support.microsoft.com/kb/q191669/

-- 
http://mail.python.org/mailman/listinfo/python-list


embedded Python

2005-05-25 Thread Sébastien Ramage
bonjour,

après bien du mal j'ai réussi à créer une dll pour 4e Dimension

maintenant j'aurai voulu intégré Python à cette dll
j'ai voulu faire simple pour le moment en utilisant l'exemple donné
dans la doc

exemple :
#include 

int
main(int argc, char *argv[])
{
  Py_Initialize();
  PyRun_SimpleString("from time import time,ctime\n"
 "print 'Today is',ctime(time())\n");
  Py_Finalize();
  return 0;

}

mais au moment du linkage j'obtient les erreurs suivantes :
Package.obj : error LNK2001: unresolved external symbol
[EMAIL PROTECTED]
Package.obj : error LNK2001: unresolved external symbol
[EMAIL PROTECTED]
Package.obj : error LNK2001: unresolved external symbol
[EMAIL PROTECTED]

Pourtant l'exemple fonctionne, j'ai essayé.
quel différence alors avec ma dll ?

comment utilisé Python sous forme d'une dll ?

-- 
http://mail.python.org/mailman/listinfo/python-list