Re: Python internal design

2005-04-26 Thread Ville Vainio
esign. Emre> I wonder how these issues are implemented in Python are Emre> there any documents or articles about it, which I can read Emre> and get an idea. It's built around string lookup. obj.stuff() -> look up what object is associated with string 'stuff'

Re: names of methods, exported functions

2005-04-27 Thread Ville Vainio
re.UNICODEre.__name__ re.finditer re.subn re.LOCALE re.VERBOSEre.compilere.match re.template re.M re.X re.engine re.purge re.__class__ [~]|129> re. ISTR the completion can be added to plain old python prompt as well, through rlcompleter.

Re: Which IDE is recommended?

2005-04-27 Thread Ville Vainio
>>>>> "pydev" == Brian Beck <[EMAIL PROTECTED]> writes: pydev> * PyDev isn't yet mature enough to make it practical for me What version? PyDev has increased in maturity quite a bit lately. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Which IDE is recommended?

2005-04-28 Thread Ville Vainio
#x27;ve used does it. This is Brian> more like semi-automatic code completion. It works like that for me. I type: import os os. And I get the list of completions. Perhaps you are just being impatient? Also, make sure that Preferences/pydev/code completion has "Autocomplete on '.&

Re: Which IDE is recommended?

2005-04-28 Thread Ville Vainio
hing in your source file that trips up pydev? Whining at the pydev mailing list might work as well. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Which IDE is recommended?

2005-04-28 Thread Ville Vainio
>>>>> "Brian" == Brian Beck <[EMAIL PROTECTED]> writes: Brian> Ville Vainio wrote: >> Perhaps you are just being impatient? >> >> Also, make sure that Preferences/pydev/code completion has >> "Autocomplete o

Re: large dictionary creation takes a LOT of time.

2005-04-29 Thread Ville Vainio
>>>>> "Kent" == Kent Johnson <[EMAIL PROTECTED]> writes: Kent> if frequency.has_key(word): Kent> frequency[word] += 1 Kent> else: Kent> frequency[word] = 1 This is a good place to use 'get' method of dict: frequency[word]

Re: Which IDE is recommended?

2005-04-29 Thread Ville Vainio
nd debugger are the most obvious ones. Eclipse itself is also quite a "feature". -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

IPython 0.7.3 beta 2 is out!

2006-12-08 Thread Ville Vainio
Yes, next version of IPython is closing in on final release around the years end, with lots of new exiting features (full list TBD, but it *does* include proper python 2.5 support if that's what you've been waiting for). Get the 0.7.3 beta 2 it at http://projects.scipy.org/ipython/ipython/wiki/Re

IPython 0.7.3 upgrade notes

2006-12-20 Thread Ville Vainio
Something I forgot to emphasize in the announcement, knowing that not everyone reads the release notes - if you are upgrading from a previous version of IPython, you must either: - Delete your ~/ipython (or ~/_ipython) directory OR - Run %upgrade once IPython starts. -- http://mail.python.org/ma

Re: IPython 0.7.3 upgrade notes

2006-12-20 Thread Ville Vainio
Ville Vainio wrote: > Something I forgot to emphasize in the announcement, knowing that not > everyone reads the release notes - if you are upgrading from a previous > version of IPython, you must either: > > - Delete your ~/ipython (or ~/_ipython) directory OR > - Run %up

Re: IPython 0.7.3 upgrade notes

2006-12-20 Thread Ville Vainio
Ville Vainio wrote: > Something I forgot to emphasize in the announcement, knowing that not > everyone reads the release notes - if you are upgrading from a previous > version of IPython, you must either: > > - Delete your ~/ipython (or ~/_ipython) directory OR > - Run %up

IPython 0.7.3 is out

2006-12-20 Thread Ville Vainio
Hi all, The IPython team is happy to release version 0.7.3, with a lot of new enhancements, as well as many bug fixes (including full Python 2.5 support). We hope you all enjoy it, and please report any problems as usual. WHAT is IPython? 1. An interactive shell superior to Py

IPython 0.7.3 upgrade notes

2006-12-20 Thread Ville Vainio
Something I forgot to emphasize in the announcement, knowing that not everyone reads the release notes - if you are upgrading from a previous version of IPython, you must either: - Delete your ~/ipython (or ~/_ipython) directory OR - Run %upgrade once IPython starts. -- http://mail.python.org/ma

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread Ville Vainio
Torsten Bronger wrote: > Has Wax exceeded the critical mass so that one can be quite certain > that it will still be maintained, say, next year? (Sincere question > since I don't know.) I was a bit worried about this myself, but after browsing the source I have to say I'm not terribly so anymor

Re: How many web framework for python ?

2006-02-18 Thread Ville Vainio
Bo Yang wrote: > There are very good web framework for java and ruby , > Is there one for python ? There are many good ones. > I want to write a web framework for python based on > mod_python as my course homework , could you give some > advise ? Implement yet another web framework? It needs to

Re: How many web framework for python ?

2006-02-19 Thread Ville Vainio
Sybren Stuvel wrote: > Why forget it? I've written my own web framework > (http://www.unrealtower.org/) and it works great! It was a good Some reasons: - Waste. When you write your own framework, you are helping yourself. If you use an existing framework and possibly contribute patches to it, yo

Re: BitKeeper for Python?

2005-05-02 Thread Ville Vainio
odeville, also written in Python. Or bazaar-ng, also written in python. Bruce> Codeville's said to be pretty usable. Ditto, through the repo format has not been stabilized yet. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between Python CGI applications and Php applications

2005-05-04 Thread Ville Vainio
and psp (python server pages) for a more straightforward conversion: http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Ville Vainio
of) are connected "directly" to the internet (in the sense that all ports are open). Blocking is reserved for the modem, just the way it should be... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Interactive shell for demonstration purposes

2005-05-11 Thread Ville Vainio
console window has a limited number of Brian> selectable fonts, it doesn't work terribly well. Hmm, do you consider the fonts in a console window unreadable? I've given a few presentations using ipython on win32 and it worked alright - but I suppose the projector quality is

Ruby blocks finally coming to python? (was Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Ville Vainio
ony> and invoke it as something like:: Tony> block locking(lock): Tony> CODE -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Ville Vainio
nly real reason for choosing Ruby over Python blown away... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Ville Vainio
2005-May/053702.html It's convincing, but I would still prefer to leave the decision of pulling the trigger on the foot for the implementor of the block function, with the recommendation that all exceptions are propagated. What happened to "we are all adults here"? I don't min

Re: Like Christ PBBUH Prayed

2005-05-17 Thread Ville Vainio
t; George> Maybe they know something we don't. The information is generally reserved for 34DEG pythonistas. All will be cleared for lower degree aspirants in due time. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python suitable for a huge, enterprise size app?

2005-05-19 Thread Ville Vainio
>>>>> "brian" == brian <[EMAIL PROTECTED]> writes: brian> to build expertise and confidence, etc. People are more brian> important than programming language. Or so you would think before writing sizeable software in C++. -- Ville Vaini

Re: first release of PyPy

2005-05-21 Thread Ville Vainio
rations) to avoid dict lookups in method dispatch. This is not about PyPy but it might help: http://www.python.org/pycon/dc2004/papers/1/paper.pdf -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: first release of PyPy

2005-05-21 Thread Ville Vainio
>>>>> "Ville" == Ville Vainio <[EMAIL PROTECTED]> writes: Ville> This is not about PyPy but it might help: Ville> http://www.python.org/pycon/dc2004/papers/1/paper.pdf (It's about starkiller, sorry about the opaque url) -- Ville

Re: moving from c++ to python

2005-05-21 Thread Ville Vainio
n python. MyClass* c = new MyClass(12,13); is equal to c = MyClass(12,13) There is no equivalent to MyClass c(12,13); because it's not needed. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: first release of PyPy

2005-05-22 Thread Ville Vainio
Christian> RPython, a sub-language of Python that is implicitly Christian> defined by "simple and static enough to be compilable". Could it be possible to tag some modules in application code as RPython-compatible, making it possible to implement the speed critical par

Re: Just remember that Python is sexy

2005-05-26 Thread Ville Vainio
nd you won't have anything to remember: Peter> 'foo bar baz'.find('spam') Peter> 'spanish inquisition'.index('parrot') But which one raises an exception, and which one returns -1? -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Just remember that Python is sexy

2005-05-26 Thread Ville Vainio
this: "index" and "sex" both end with "ex", which Greg> is short for "exception". Or something about the use of index finger being an exception from the conventional strategy... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python analog of Ruby on Rails?

2005-05-26 Thread Ville Vainio
#x27; Shane> I'm Christian and I think it's funny. ;-) Some background: Shane> http://scriptures.lds.org/rev/13/16-18#16 Shane> http://www.greaterthings.com/Word-Number/666HolyBible.htm Ah, it was *obvious* from the start that the placement of ASCII letters was

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-08 Thread Ville Vainio
the interesting tidbits from the depths of 500-post threads where people can't be bothered to change the subject line... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

ANN: IPyKit, the standalone IPython prompt

2007-05-28 Thread Ville Vainio
Some of you might want to play with IPyKit, especially you need a swiss-army-knife Python prompt on a (win32) machine where you don't really want to install anything (python, pyreadline, ipython, PATH settings...). It's basically a py2exe'd "preconfigured" IPython. http://ipython.scipy.org/moin/I

3D libraries (was The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations)

2007-05-28 Thread Ville Oikarinen
languages, here are two for java: https://jogl.dev.java.net/ http://www.lwjgl.org/ - Ville Oikarinen -- http://mail.python.org/mailman/listinfo/python-list

ANN: IPython 0.8.2 released!

2007-11-30 Thread Ville Vainio
Hi all, The IPython team is happy to release version 0.8.2, with lots of new enhancements (especially for system shell use - it has never been a better time for switching to "pysh" or "ipython -p sh" as your system shell of choice), as well as many bug fixes. We hope you all enjoy it, and please

IPython team needs a student for a google "Summer of Code" project.

2006-05-03 Thread Ville Vainio
This comes in a bit of a hurry (you only have time until next monday to sign up), but here's the deal: The next version of ipython (0.7.2, "out soon", pretty much done already) will include an extension for browsing and manipulating tabular data (e.g. file name, file size, permissions etc.) called

ILeo (IPython-Leo bridge); a marriage made in heaven?

2008-02-22 Thread Ville Vainio
definitions etc. The contents of of the node itself will be ignored. @ipy-results ---- When you create a new node (wb.foo.v = 'stuff'), the node foo will be created as a child of this node. If @ipy-results does not exist, the new node will be created after the currently selected

Re: ILeo (IPython-Leo bridge); a marriage made in heaven?

2008-02-23 Thread Ville Vainio
On Feb 23, 10:54 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Are you part of Leo? This smells like a marketing scheme to me. Yes, Edward is part of Leo and I am part of IPython. In fact, most of my income comes from selling IPython T-shirts at the local flea market and I therefore have to reso

Re: LGPL license for Qt 4.5

2009-01-17 Thread Ville Vainio
On Jan 14, 2:57 pm, sturlamolden wrote: > According to a Norwegian publication, Nokia will release Qt under LGPL > as of version 4.5. > > If I had stocks in Riverbank Computing ltd., I would sell them now... Isn't that a tad thankless and premature? It may be that the "support" aspect needs to

Re: ANN: Leo 4.4.8 final

2008-04-06 Thread Ville Vainio
On Apr 6, 8:10 pm, "Edward K Ream" <[EMAIL PROTECTED]> wrote: > - Completed ILeo: a bridge between IPython and Leo. > See http://webpages.charter.net/edreamleo/IPythonBridge.html Additional note: to use ILeo, you need a new IPython. Download the not- yet-blessed release candidate (I don't fores

pywin32 vista installer fix & general distutils installer name bug

2008-04-09 Thread Ville Vainio
I just noticed that pywin32 does not work with vista directly (tried import win32clipboard, => ImportError). The problem is the installer name; it's the usual pywin32-210-win32-py2.5.exe It needs to be renamed to: pywin32-210.win32-setup-py2.5.exe In order for vista to catch it as "installer".

Re: is Pylons alive?

2008-04-10 Thread Ville Vainio
On Apr 9, 2:25 pm, Mage <[EMAIL PROTECTED]> wrote: > Before spending much time for investigating, I would like to ask you: is > Pylons the framework I look for if I want to come back to Python and > develop MVC web apps? Why not play with Django and the Google App Engine that everyone is raving a

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-07 Thread Ville Vainio
On May 6, 11:27 pm, hdante <[EMAIL PROTECTED]> wrote: > GPL can mix with other free software licenses, so people who write > BSD code and do not wish to remain BSD clean are free to use GPL'd > code. That's the important point. No, it can't. It can only mix through aggregation, i.e. you can ship

Re: python vs. grep

2008-05-07 Thread Ville Vainio
On May 6, 10:42 pm, Anton Slesarev <[EMAIL PROTECTED]> wrote: > flines = (line for line in f if pat.search(line)) What about re.findall() / re.finditer() for the whole file contents? -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs. grep

2008-05-09 Thread Ville Vainio
On May 8, 8:11 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > All these examples assume your regular expression will not span multiple > lines, but this can easily be the case. How would you process the file > with regular expressions that span multiple lines? re.findall/ finditer, as I said earl

list.clear() missing?!?

2006-04-11 Thread Ville Vainio
I tried to clear a list today (which I do rather rarely, considering that just doing l = [] works most of the time) and was shocked, SHOCKED to notice that there is no clear() method. Dicts have it, sets have it, why do lists have to be second class citizens? -- http://mail.python.org/mailman/lis

Re: list.clear() missing?!?

2006-04-11 Thread Ville Vainio
Fredrik Lundh wrote: > > I tried to clear a list today (which I do rather rarely, considering > > that just doing l = [] works most of the time) and was shocked, SHOCKED > > to notice that there is no clear() method. Dicts have it, sets have it, > > why do lists have to be second class citizens? >

Re: list.clear() missing?!?

2006-04-11 Thread Ville Vainio
Steven Bethard wrote: > If you feel really strongly about this though, you might consider > writing up a PEP. It's been contentious enough that there's not much > chance of getting a change without one. No strong feelings here, and I'm sure greater minds than me have already hashed this over suf

Re: list.clear() missing?!?

2006-04-11 Thread Ville Vainio
John Salerno wrote: > Thanks guys, your explanations are really helpful. I think what had me > confused at first was my understanding of what L[:] does on either side > of the assignment operator. On the left, it just chooses those elements > and edits them in place; on the right, it makes a copy

Re: list.clear() missing?!?

2006-04-12 Thread Ville Vainio
Raymond Hettinger wrote: > * easier to figure-out, look-up, and remember than either s[:]=[] or > del s[:] Easier is an understatement - it's something you figure out automatically. When I want to do something w/ an object, looking at its methods (via code completion) is the very first thing. >

Re: list.clear() missing?!?

2006-04-12 Thread Ville Vainio
Ville Vainio wrote: > Assigning to slices is much less important, and is something I always > never do (and hence forget). ALMOST never, of course. -- http://mail.python.org/mailman/listinfo/python-list

Re: list.clear() missing?!?

2006-04-14 Thread Ville Vainio
Duncan Booth wrote: > Looking in the 'obvious' place in the Tutorial, section 5.1 'More on > Lists' I found in the immediately following section 5.2 'The del > statement': I read the tutorial 6 years ago, and don't read it regularly. What's in the tutorial is not really important, what can be eas

Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-20 Thread Ville Vainio
Has anyone implementing something like what the subject line indicates? The idea: To run functions that execute a series of system commands without blocking the ui, *and* without adding state machine logic. The syntax would be something like: def work(): showstatus("building") r = yield ru

Re: Python equivalent for C module

2008-10-20 Thread Ville M. Vainio
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > STDOUT is for *normal* program outputs. Debug informations, > warnings, and all verbosity should go to STDERR. Actually, stderr is for errors, by convention. It's rather impolite to dump trivial debug info to stderr, which often "alerts" the user

Re: Porting VB apps to Python for Window / Linux use

2008-10-20 Thread Ville M. Vainio
Stef Mientki <[EMAIL PROTECTED]> writes: > >> Sorry but for GUI design, Python is pre-historic ;-) > > > > Time to show the "don't feed the troll" sign, I guess. > Even without the smiley, I'm convinced of my statement. > cheers, I don't think I'm feeding the troll, but - ever took a look at PyQ

Re: Python equivalent for C module

2008-10-21 Thread Ville M. Vainio
Vinay Sajip <[EMAIL PROTECTED]> writes: > import logging > > logging.warning("Message with %s data", "variable") # or debug, info, > error > > and I'd like to know what simpler interface you think would be better/ > easier to grok for quick hack jobs. It's not the logging itself that is a probl

Re: Developing for Python (2.x or 3)?

2008-10-21 Thread Ville M. Vainio
"Paulo J. Matos" <[EMAIL PROTECTED]> writes: > I am in the process of choosing which Python version for a brand new > application. Van Rossum in an interview recently advised all new > applications to use Python3 but I am afraid, most libraries (PyGtk, I don't think he meant "all new" application

Re: Commercial Products in Python

2008-10-21 Thread Ville M. Vainio
"Paulo J. Matos" <[EMAIL PROTECTED]> writes: > Hi all, > > I was just wondering, if you wish to commercialize an application > developed in Python, what's the way to go? > I guess the only way is to sell the source, right? That should be a good way to go about it. It doesn't make it "open source

Re: Email Program

2009-03-07 Thread Ville M. Vainio
J wrote: > Is it possible to make a GUI email program in Python that stores > emails, composes, ect? Here's one with less than 600 lines: http://code.google.com/p/pyqtimap/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Chandler, Python, speed

2009-03-07 Thread Ville M. Vainio
Alan G Isaac wrote: > 3. Chandler is not really an email client. So specifically, > which of its functionalities is it slow, and what evidence > if any is there that Python is causing this? I remember reading "somewhere" that the cause of slowness is/was architectural - perhaps it was that chand

Re: Chandler, Python, speed

2009-03-08 Thread Ville M. Vainio
Ville M. Vainio wrote: > Alan G Isaac wrote: > >> 3. Chandler is not really an email client. So specifically, >> which of its functionalities is it slow, and what evidence >> if any is there that Python is causing this? > > I remember reading "somewhere

Re: python vs. grep

2008-05-12 Thread Ville M. Vainio
Ricardo Aráoz <[EMAIL PROTECTED]> writes: > The easy/simple (too easy/simple?) way I see out of it is to read THE > WHOLE file into memory and don't worry. But what if the file is too The easiest and simplest approach is often the best with Python. Reading in the whole file is rarely too heavy, a

Re: portable way to tell what Popen will call

2008-05-14 Thread Ville M. Vainio
Brendan Miller <[EMAIL PROTECTED]> writes: > For instance on unix systems, Popen will work for files flagged with > the executable bit, whereas on windows Popen will work on files > ending the in .exe extension (and I don't think anything else). Is > there a portable way Actually, if you pass the

Re: datamining .txt-files, library?

2008-05-15 Thread Ville M. Vainio
Chris <[EMAIL PROTECTED]> writes: > On May 15, 2:27 pm, globalrev <[EMAIL PROTECTED]> wrote: >> i have a big collection of .txt files that i want to open and parse to >> extract information. >> >> is there a library for this or maybe even built in? > > os.open to open the files and iterate throug

Re: Shelve or pickle module

2008-05-18 Thread Ville M. Vainio
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > A shelve is just a persistent dictionary that uses pickle to store > the objects. If you want to store one or a few objects, using > pickle directly may be easier. Any problem you may have with pickle > (nonpickleable objects, security risks) wi

Re: feature proposal, debug on exception

2008-05-20 Thread Ville M. Vainio
Simon Forman <[EMAIL PROTECTED]> writes: > This is not exactly an answer to your proposal, I know, but FWIW > Ipython has exactly this capability. Yes. When you %run a scripts and get exception, you can launch post-mortem pdb on it by typing %debug. -- http://mail.python.org/mailman/listinfo/pyt

Re: Storing objects in relational database

2008-05-24 Thread Ville M. Vainio
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I don't know if you'd label it 'elegant', but as far as I'm > concerned, storing serialized objects as blobs in a relational > database is mostly non-sense. If I use a relational database, it's > because it is a *relational* database. If you want

Re: Why does python not have a mechanism for data hiding?

2008-05-24 Thread Ville M. Vainio
Fuzzyman <[EMAIL PROTECTED]> writes: > The 'we told you not to use that' approach, when applied to paying > customers doesn't really work... all they see is that you broke > their spreadsheet code by changing your API. And the customer point of view is quite reasonable - they have a job to do, a

Re: Why does python not have a mechanism for data hiding?

2008-05-25 Thread Ville M. Vainio
Fuzzyman <[EMAIL PROTECTED]> writes: >> Perhaps a lint-like validation tool would be optimal for this >> problem... > > So we can refuse to execute their code if they use private APIs? No, but it could complain and point out the exact offending lines, pointing their development effort to right d

Re: Why does python not have a mechanism for data hiding?

2008-05-25 Thread Ville M. Vainio
Duncan Booth <[EMAIL PROTECTED]> writes: > Or if you code in C++ and they *really* need to get at something you > made private they will still get at it. I've been there and done > that: 'private' in languages which have it is rarely an advantage > and frequently a pain. Indeed. In C++, they rec

ANN: IPython 0.8.3 is out

2008-05-29 Thread Ville M. Vainio
Hi all, The IPython team is happy to release version 0.8.3, with lots of new enhancements as well as many bug fixes, and updated documentation that has been long in the coming. We hope you all enjoy it, and please report any problems as usual. WHAT is IPython? 1. An interactiv

Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Ville M. Vainio
Eduardo Schettino wrote: > DoIt is a build tool that focus not only on making/building things but on > executing any kind of tasks in an efficient way. Designed to be easy to use > and "get out of your way". I took a look at dolt syntax, and saw this: QQQ def create_folder(path): """Create

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-23 Thread Ville M. Vainio
Eduardo Schettino wrote: I find the doit syntax a bit cumbersome, especially as you can avoid 'args' by just returning a lamda in 'action'. My idea was to: do *not* add any new syntax (to avoid being cumbersome). It is just python, you dont have to import or subclass Yeah, decorators get

Re: Unix Device File Emulation

2008-04-23 Thread Ville M. Vainio
blaine wrote: example usage: echo 'line 0 0 10 10' > /dev/screen On the actual embedded device this is handled by a kernel module. We can spit commands into it as fast as we can and the kernel module can keep up. This is typical unix device file behavior. Any suggestions or advice would be s

Re: Python application distribution

2008-05-05 Thread Ville M. Vainio
ron.longo wrote: unable to execute. Why is this? At this point I'm not really keen on handing out the source files to my application, it feels unprofessional. If you plan to deploy on windows, py2exe could be the more "professional" approach you are thinking of. -- http://mail.python.org/m

Re: Python application distribution

2008-05-05 Thread Ville M. Vainio
ron.longo wrote: > unable to execute. Why is this? At this point I'm not really keen on > handing out the source files to my application, it feels unprofessional. If you plan to deploy on windows, py2exe could be the more "professional" approach you are thinking of. -- http://mail.python.org

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Ville M. Vainio
"Zed A. Shaw" <[EMAIL PROTECTED]> writes: > GPLv3? > > How do people feel about Vellum's GPLv3 status? It actually doesn't > impact anyone unless you embed Vellum into a project/product or you Yeah, but it effectively prevents people from embedding it into their apps that wish to remain BSD/MIT

Re: [ANN] Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Ville M. Vainio
[EMAIL PROTECTED] writes: > I didn't find your language offensive but you might consider toning down > your review of the Awesome Window Manager :) Nah - keep up the bad attitude. Your (Zed) blog/articles are one of the few things on the programmosphere that actually make me laugh audibly. -- ht

Re: ISBN Barecode reader in Python?

2008-05-05 Thread Ville M. Vainio
Max Erickson <[EMAIL PROTECTED]> writes: > The killer application for ISBN lookup on Amazon is checking prices > while in the bookstore. Being able to email a photo from your phone > and then getting an email with the Amazon price in response would be > way easier than typing the isbn into Goo

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Ville M. Vainio
Paul Boddie <[EMAIL PROTECTED]> writes: > Anyway, I'm just confirming that I'm clearly not one of the "many" > described above. A lot of my own work is licensed under the GPL or I guess it's safe to assume that you are not opposed to using code based on more liberal license, right? :-) My point

Re: License selection for free software

2008-05-06 Thread Ville M. Vainio
Excuse the long post. Ben Finney <[EMAIL PROTECTED]> writes: >> I guess it's safe to assume that you are not opposed to using code >> based on more liberal license, right? :-) > > I'm less inclined to base work on, or contribute to, a work under a > non-copyleft license, because I have less assu

Re: License selection for free software

2008-05-07 Thread Ville M. Vainio
Paul Boddie <[EMAIL PROTECTED]> writes: > original licence as well. Now, I did leave a fair amount of > information about the heritage of the code, so that anyone who is > scared of the LGPL could just go and get the original work, but that I doubt anyone is really afraid of LGPL. The only probl

Re: observer pattern question #1 (reference to subject)

2008-05-08 Thread Ville M. Vainio
Alan Isaac <[EMAIL PROTECTED]> writes: > Is anything lost by not maintaining this reference (other > > than error checking ...)? If I feel the observer needs > > access to the subject, what is wrong with just having the > > subject pass itself as part of the notification? It reduces the number

Re: observer pattern question #1 (reference to subject)

2008-05-08 Thread Ville M. Vainio
Alan Isaac <[EMAIL PROTECTED]> writes: > the following: "OK, here's the pattern, now your listener > wants to know the event source, do not ask something new the > subject to respond to that need. That is unnecessary > coupling. Instead, just rewrite your listener to maintain > a reference to th

Re: observer pattern (notification chain synchronization)

2008-05-11 Thread Ville M. Vainio
Alan Isaac <[EMAIL PROTECTED]> writes: > Here is one way: > > - for each fund, create a ``reportreceived`` dict that maps stocks to > booleans (initially False) > - as each stock notifies its funds, the fund changes False to True and checks > ``all(reportreceived.values())`` to determine whethe

Re: observer pattern (notification chain synchronization)

2008-05-11 Thread Ville M. Vainio
Alan Isaac <[EMAIL PROTECTED]> writes: > OK, thanks. > > Another approach is to begin with a set of stocks > > and remove them as they report. You can then trigger > > a report with the empty set instead of repeatedly > > calling ``all``. After a report the set can be > > "refilled". Ah, and I

Re: File Creation Not Working In A Thread Class?

2008-05-11 Thread Ville M. Vainio
bc90021 <[EMAIL PROTECTED]> writes: > The error message was at the top of the thread (am I incapable of posting > it, or are you incapable of following a thread?), but here it is again: > > IOError: [Errno 2] no such file u'tempfileName' Typically, when you report an error message, it helps to

How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-06 Thread Ville M. Vainio
Background: PyOS_InputHook is something that gets run when python is doing raw_input. TkInter and friends use it to run their event loops, so that their events are handled while python is doing raw_input. What I'd like to do is run the same function without having to do raw_input. I.e. I'd like to

Re: ANN: Leo 4.6 rc1 released

2009-07-10 Thread Ville M. Vainio
On Jul 10, 9:54 pm, "Edward K Ream" wrote: > The highlights of Leo 4.6: > -- > - Leo now features a modern Qt interface by default. >   Leo's legacy Tk interface can also be used. And to drive home this point (Qt ui), some screenshots for the visually oriented: http://i

Re: Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-20 Thread Ville M. Vainio
On Jul 20, 1:12 pm, Ville Vainio wrote: > Has anyone implementing something like what the subject line ImplentED. I don't think this is that hard to do in the first place, but a "generic" solution that can be easily tuned for different gui mainloops would be nice. -- http

Re: Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-20 Thread Ville M. Vainio
On Jul 20, 1:12 pm, Ville Vainio wrote: > I imagine runshell() would be implemented in terms of QProcess, or > subprocess.Popen/os.system and a worker thread. Actually, the problem is that of general serialization of worker thread operations. That is, it could be something akin to: res =

Re: Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-26 Thread Ville M. Vainio
On Jul 23, 11:29 pm, Nick Craig-Wood wrote: > >  The syntax would be something like: > > >  def work(): > > >    showstatus("building") > >    r = yield runshell("make") > >    showstatus("installing") > >    r = yield runshell("make install") > >    showstatus("Success") > > >  mygui.startwork(w

Re: Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-26 Thread Ville M. Vainio
Apologies for the long subject line, here it is again: "Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops" On Jul 21, 7:48 pm, John Nagle wrote: > > The idea: > > > To run functions that execute a series of system commands without > > blocking th

<    1   2