Re: [ANN] Athens Python User Group - Meeting September 9, 2009, 19:00.

2009-09-21 Thread Orestis Markou
Blogged about the results of the meeting here: http://orestis.gr/blog/2009/09/21/athens-python-ug-1st-meeting-results/ Also announcing a dedicated maling list: http://mail.python.org/mailman/listinfo/pyathens Orestis On 04 Σεπ 2009, at 7:42 μ.μ., Orestis Markou wrote: == Announcing the

[ANN] Athens Python User Group - Meeting September 9, 2009, 19:00.

2009-09-04 Thread Orestis Markou
== Announcing the 1st meeting of the Athens Python User Group == If you live near Athens, Greece and are interested in meeting fellow Python programmers, meet us for a friendly chat at the Eleftheroudakis Bookstore café, on Wednesday 9 September, 7:00pm. If you plan to attend, please add a

ANN: PySmell 0.7.2 released, many TextMate improvements

2008-11-16 Thread Orestis Markou
n: "python setup.py install", then copy pysmell.vim, pysmell.el in the relevant places, or double click PySmell.tmbundle. More instructions included in README.markdown. Thanks, Orestis Markou -- [EMAIL PROTECTED] http://orestis.gr/ -- http://mail.python.org/mailman/listinfo/python-list

Asynchat and error handling

2008-11-05 Thread Orestis Markou
Hello, I'm trying to add some better error handling to an async_chat client. What I want is to retry or terminate gracefully if the connection to the server doesn't succeed. Here's what I have: import asyncore, asynchat, socket class http_client(asynchat.async_chat): def __init__(self, host

[ANN] PySmell v0.7, a Python auto-completion library

2008-11-02 Thread Orestis Markou
upport for Emacs and TextMate, on top of the already existing Vim support. This isn't tested as rigorously as I'd like, so please report any issues at Google Code. Thank you, Orestis Markou -- [EMAIL PROTECTED] http://orestis.gr/ -- http://mail.python.org/mailman/listinfo/python-list

In search for a simple build tool

2008-10-30 Thread Orestis Markou
n I need, but it's and it has a bootstrapping library I can distribute transparently. Any other options? Thanks, Orestis Markou -- [EMAIL PROTECTED] http://orestis.gr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Unit Testing: a couple of questions

2008-10-28 Thread Orestis Markou
For the first bit, a colleague has recently asked the philosophical question, "How do you test what happens when the power goes down?" :) In other words, only test the bits that your code does. If you want to provide type checking, then yes, you have to test that. It's fair to assume that everyth

Post easy_install hooks/message

2008-10-27 Thread Orestis Markou
ist and do python setup.py install, then copy pysmell.vim where it needs to live.". Being able to replace that with "easy_install pysmell and follow the instructions would be great". [1] http://code.google.com/p/pysmell [2] http://pypi.python.org/pypi/pysmell [3] http://orestis.gr/blog/

Re: Type feedback tool?

2008-10-27 Thread Orestis Markou
I think that rope has something like that; not really sure though. On Mon, Oct 27, 2008 at 1:41 AM, <[EMAIL PROTECTED]> wrote: > > (Sorry for any repeated recommendations. I'm offline until Monday morning. > You may well see some of these suggestions in the meanwhile, but so far it > seems you'v

Re: Exclude Directories from os.walk

2008-10-21 Thread Orestis Markou
You then have to also check the base: for d in dirs[:]: if os.path.join(base, d) == EXCLUDED_DIR dirs.remove(d) or if base == EXCLUDED_DIR while dirs: dirs.pop() continue WARNING: untest code - Show quoted text - On Tue, Oct 21, 2008 at 6:13 PM, D <[EMAIL PROTECTED]> wrote: > Ok, my brai

Re: Triple-quoted strings hath not the Python-nature

2008-10-21 Thread Orestis Markou
from textwrap import dedent dedent("""\ this is a multi-line string.""") will do what you want On Tue, Oct 21, 2008 at 9:58 AM, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > If triple-quoted strings had the Python-nature, then they would take > indentation into account. Thus:

Re: python3 - the hardest hello world ever ?

2008-10-15 Thread Orestis Markou
I would just use UTF-8 and be done with it. Set your editor to write UTF-8 files, set the correct #coding at your python script, make sure your terminal supports outputting UTF-8 characters (and your font has the correct glyphs) and everything should be fine. No trickery required. Even fo

Re: PyGUI as a standard GUI API for Python?

2008-10-13 Thread Orestis Markou
Just want to say, thank you for a very enlightening writeup. You should really post this somewhere that we can link to. -- [EMAIL PROTECTED] http://orestis.gr/ On 11 Oct 2008, at 10:19, lkcl wrote: On Sep 3, 4:34 pm, Michael Palmer <[EMAIL PROTECTED]> wrote: So far, development of PyGUI

ANN: PySmell v0.6 released

2008-10-13 Thread Orestis Markou
X^O to invoke Vim's omnicompletion. You can find more documentation in the README.markdown file. Orestis Markou -- [EMAIL PROTECTED] http://orestis.gr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe eval of insecure strings containing Python data structures?

2008-10-09 Thread Orestis Markou
The ast module in 2.6 has something... On Thu, Oct 9, 2008 at 1:34 AM, Warren DeLano <[EMAIL PROTECTED]> wrote: > > I would like to parse arbitrary insecure text string containing nested > Python data structures in eval-compatible form: > > # For example, given a "config.txt" such as: > > { > 'my

Re: Compiler, ast and forwards/backwards compatibility

2008-10-09 Thread Orestis Markou
On Wed, Oct 8, 2008 at 9:14 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> The documentation for the ast module states that it "helps to find out >> programmatically what the current grammar looks like". I can't find >> any reference (even when reading the code) on how you should go about >> t

Re: Upgrading an instance to a subclass

2008-10-08 Thread Orestis Markou
I would suggest rather than inheriting from socket, encapsulate over it: class MySocket(object): def __init__(self, socket): self.socket = socket Then you don't have to worry about patching instances... On Wed, Oct 8, 2008 at 12:54 PM, Antoon Pardon <[EMAIL PROTECTED]> wrote: > I have a

Re: Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Orestis Markou
On Tue, Oct 7, 2008 at 5:39 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Orestis Markou wrote: >> >> Hello, >> >> I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a >> static analysis/intellisense provider for Python. I am targeting

Re: Getting namespaces right when parsing/executing Python ASTs

2008-10-07 Thread Orestis Markou
Have you tried passing in empty dicts for globals and locals? I think that the defaults will be the *current* globals and locals, and then of course your namespace is broken... On Tue, Oct 7, 2008 at 1:26 PM, Gordon Fraser <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to parse Python code to an

Compiler, ast and forwards/backwards compatibility

2008-10-07 Thread Orestis Markou
Hello, I'm the developer of PySmell ( http://github.com/orestis/pysmell ), a static analysis/intellisense provider for Python. I am targeting Python 2.4 code so I'm using the compiler package. I've been toying around yesterday with the ast module in Python 2.6 and it seems much more cleaner. One