need some help in serving static files inside a wsgi apps

2008-05-24 Thread Tool69
Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article Why so many Python web frameworks? about wsgi apps [http:// bitworking.org/news/Why_so_many_Python_web_frameworks] and have a question

Re: Python Magazine: Issue 1 Free!

2007-10-05 Thread Tool69
Thanks for it, what tools did you use to build the mag : Scribus ? -- http://mail.python.org/mailman/listinfo/python-list

Parsing nested constructs

2007-09-08 Thread tool69
Hi, I need to parse some source with nested parenthesis, like this : cut- { {item1} { {item2} {item3} } } cut- In fact I'd like to get all start indexes of items and their end (or lenght). I know regexps are rather limited for this type

Re: Parsing nested constructs

2007-09-08 Thread tool69
David a écrit : On 9/8/07, tool69 [EMAIL PROTECTED] wrote: Hi, I need to parse some source with nested parenthesis, like this : If this is exactly how your data looks, then how about a loop which searches for {item and the following }? You can use the find string method

encoding problems

2007-08-29 Thread tool69
Hi, I would like to transform reST contents to HTML, but got problems with accented chars. Here's a rather simplified version using SVN Docutils 0.5: %- #!/usr/bin/env python # -*- coding: utf-8 -*- from docutils.core import

Re: encoding problems

2007-08-29 Thread tool69
Lawrence D'Oliveiro a écrit : In message [EMAIL PROTECTED], tool69 wrote: p2.content = Ce poste possède des accents : é à ê è My guess is this is being encoded as a Latin-1 string, but when you try to output it it goes through the ASCII encoder, which doesn't understand the accents. Try

Re: encoding problems

2007-08-29 Thread tool69
Diez B. Roggisch a écrit : tool69 wrote: Hi, I would like to transform reST contents to HTML, but got problems with accented chars. Here's a rather simplified version using SVN Docutils 0.5: %- #!/usr/bin/env python

Re: New UI Toolkit

2007-08-26 Thread tool69
Gerdus van Zyl a écrit : Seems very promising. But I'm afraid with the Swing-like interface, i.e : did you use the same widget positionning ? -- http://mail.python.org/mailman/listinfo/python-list

Re: running a Delphi part from Python ?

2007-07-16 Thread tool69
Stef Mientki a écrit : AFAIK, Scintilla is a code editor. What I need looks more like ms-word, handling lists, tables, images, formulas. thanks, Stef Mientki So you'll need the RichTextCtrl http://www.wxpython.org/docs/api/wx.richtext.RichTextCtrl-class.html See a sample in the demo

Re: NLTK: Natural language processing in Python

2007-05-25 Thread tool69
NLTK seems very interesting, and the tutorial are very well done. Thanks for it ! Kib² -- http://mail.python.org/mailman/listinfo/python-list

Re: preferred windows text editor?

2007-05-09 Thread tool69
Notepad++ with NppExec plugin and you can launch your scripts inside Np++. some others, very Powerfull : http://e-texteditor.com/ http://intype.info/home/index.php -- http://mail.python.org/mailman/listinfo/python-list

Re: cyclic iterators ?

2007-03-03 Thread tool69
Paul Rubin a écrit : As Bruno says, you can use itertools.cycle, but the problem above is that you're not looping repeatedly through the list; you yield all the elements, then yield the first element again, then stop. So for ['a','b','c'] you'd yield the sequence a,b,c,a. Yes, that was

cyclic iterators ?

2007-03-02 Thread Tool69
Hi, Let say I've got a simple list like my_list = [ 'a', ',b', 'c' ]. We can have an iterator from it by k = iter( my_list), then we can access each of her (his ?) element by k.next(), etc. Now, I just wanted k to have the following cyclic behaviour (without rising the ) : k.next() 'a'

Re: Newbie Test

2007-03-02 Thread Tool69
On 3 mar, 01:44, Nicholas Parsons [EMAIL PROTECTED] wrote: Greetings, This is just a test to see if I can post to this mailing list. Can someone from the list please respond to this email so I know it worked? Thanks in advance! --Nick Hi Nicholas, Does it work for you ? --

question with inspect module

2007-02-20 Thread Tool69
Hi, I would like to retrieve all the classes, methods and functions of a module. I've used the inspect module for this, but inside a given class (subclass of some other one), I wanted to retrieve only the methods I've written, not the inherited one. How can I do ? Thanks. --

Re: question with inspect module

2007-02-20 Thread Tool69
Thanks Miki, that's exactly what I need :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Vim scripting with python

2007-02-04 Thread Tool69
Thanks Stuart, I'll take a look at it. Another thing : Is there any way to made some modification de the python.syntax file to highlight the functions call, i.e : os.popen(...) --- popen(...) will be highlighted. Cheers. -- http://mail.python.org/mailman/listinfo/python-list

Vim scripting with python

2007-02-03 Thread Tool69
Hi, I saw several old posts speaking of vim scripting in Python. This one in particular : http://www.velocityreviews.com/forums/t351303-re-pythonising-the-vim-eg-syntax-popups-gt-vimpst.html But I didn't find where to put this vimrc.py on my Windows machine. My normal _vimrc file is in

Re: need clarification with import statements

2006-12-15 Thread Tool69
Hi John, 1. Your directory/package hierarchy is far too complicated. Flatten it. Ok. 2. You have circular references: the others module will import from utils, but utils wants to import from others. This is prima facie evidence that your modules are not structured properly Yes, that's why I

need clarification with import statements

2006-12-14 Thread Tool69
Hi, I've got the following hierarchy: mainprog/ __init__.py prog.py utils/ __init__.py myutils.py others/ __init__.py myothers.py Inside prog.py I need to have full access to myutils.py and myothers.py; Inside myutils.py, I need to access two

Re: oo problem

2006-12-13 Thread tool69
Hi, First, let me thanks you for all your clear comments. This is, in my mind, both a usage and a design flaw. You are creating (and throwing away) instances of drawable objects to the draw method of a paper instance. But what does paper.draw() actually do with the

Re: oo problem

2006-12-12 Thread Tool69
Dennis Lee Bieber a écrit : On 10 Dec 2006 03:47:21 -0800, Tool69 [EMAIL PROTECTED] declaimed the following in gmane.comp.python.general: Thanks for your answers, I though about the first solution too, but I've redundant code, say ie: p = Paper(100,200) p.draw( Rectangle(p,10,20,50,60

Re: oo problem

2006-12-12 Thread Tool69
Dennis Lee Bieber a écrit : Perhaps you missed that the loop (in Paper) that invokes each primitive's draw() is passing itself (the Paper instance)... Oops, sorry I missed it in fact. But I still have a problem with my the primitives (some pathes I had to build ): i.e a mathematical

Re: Pydev configuration

2006-11-24 Thread tool69
Sébastien Boisgérault a écrit : Hi, Did anyone managed to change the code font family/size in Pydev (Python Editor Plugin for Eclipse) ? I found how to change the color mapping (Windows/Preference/Pydev) but did not found the font setting. Cheers, SB Salut Sébastien,

Re: The Python Papers Edition One

2006-11-23 Thread Tool69
I've recently tried the docutils's reST module with Pygments ( to highlight Python sources), so you can have LaTeX + HTML + PDF output (You can see what it renders here : h**p://kib2.free.fr/geoPyX/geoPyX.html ). It worked fine, but needs a little work to suit your needs (you'll have to write your

Finding the carret position in a regular expression

2006-11-23 Thread Tool69
Hi, supposed I've got the following text : mytext = for myvar in somelist: with the following simple pattern : pattern = [a-z]+ I use re.findall(pattern, mytext) wich returns : ['myvar','somelist'] Now, I want my prog to return the positions of the returned list elements, ie : myvar was found

Re: Finding the carret position in a regular expression

2006-11-23 Thread Tool69
Thanks Fredrik, I was not aware of finditer. Iterators are very usefull ! -- http://mail.python.org/mailman/listinfo/python-list

Re: [Zopyrus] A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread tool69
Sorry, but did someone knows if Pida works under Windows ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

ini files and plugins

2006-11-16 Thread tool69
Hi, I've made a basic LaTeX file editor in wxPython, but now I wanted to add it some features : 1 - create a sort of ini file where I can put the user configuration that will load itself on the application startup ; 2 - a simple plugin system with python files ( maybe to add new langages,

Re: ini files and plugins

2006-11-16 Thread tool69
Fredrik Lundh a écrit : tool69 wrote: 1 - create a sort of ini file where I can put the user configuration that will load itself on the application startup ; http://docs.python.org/lib/module-ConfigParser.html ? 2 - a simple plugin system with python files ( maybe to add new langages

Re: ANN: PyQt v4.1 Released

2006-11-09 Thread Tool69
David Boddie a écrit : Do you mean the example from the PyQt4 distribution? Yes, that was it. That uses a port of an old syntax highlighting example from Qt 4.0. Someone needs to port the C++ example from Qt 4.2 to PyQt4. So, we've got no sample to use QScintilla2 ?? Thanks, 6TooL9 --

Re: ANN: PyQt v4.1 Released

2006-11-09 Thread Tool69
Thanks David, your sample works nicely ! -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyQt v4.1 Released

2006-11-09 Thread Tool69
Sorry, I just tried with other lexers, but I'm having some errors (names not defined errors) with those ones : 1.lexer = QsciLexerRuby() 2.lexer = QsciLexerTeX() Are they implemented ? -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyQt v4.1 Released

2006-11-09 Thread Tool69
Shame on me, I forgot to import the lexers. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyQt v4.1 Released

2006-11-06 Thread Tool69
Hi Phil, I followed the docs to build qscintilla2, all is going well with no errors, but when I launched the PyQt Syntax Highlighter Example, nothing is highlighted but the first line of text, whereas the C++ sample works well in the demo. Any hints ? Thanks. --

Re: ANN: PyQt v4.1 Released

2006-11-05 Thread Tool69
Thanks Phil, Can you put some hints about how to build QScintilla2 on Windows please ? -- http://mail.python.org/mailman/listinfo/python-list

SetBackgroundColor doesn't work for me

2005-10-06 Thread Tool69
Hi, I'm on Linux Ubuntu Breezy with wxPython 2.6.1 and Python 2.4.1 installed. I've made an app, but the BackgroundColors won't work on any of my ListBoxes, they only work with Windows XP. Does someone had this problem before ? Any suggestion ? thanks. --