Re: Usefulness of the "not in" operator

2011-10-08 Thread Stefaan Himpe
So what is the usefulness of the "not in" operator ? Recall what Zen of Python tells There should be one-- and preferably only one --obvious way to do it. the zen of python also says (amongst other things): ... Readability counts. ... Although practicality beats purity ... Best regards, St

Re: Easiest framework to develop simple interactive web site in python?

2011-09-12 Thread Stefaan Himpe
The simplest one to learn is web2py http://www.web2py.com No configuration needed, just unpack and get started. It also has very good documentation and tons of little examples to get things done. The other options you mentioned are good too :) -- http://mail.python.org/mailman/listinfo/python-

Re: list comprehension to do os.path.split_all ?

2011-07-28 Thread Stefaan Himpe
Hi, [python 2.7] I have a (linux) pathname that I'd like to split completely into a list of components, e.g.: '/home/gyoung/hacks/pathhack/foo.py' --> ['home', 'gyoung', 'hacks', 'pathhack', 'foo.py'] Not sure what your exact requirements are, but the following seems to work: pathname

Re: Implicit initialization is EXCELLENT

2011-07-06 Thread Stefaan Himpe
No! I was serious. I've spent *ages* trying to find the link to the article... if you know it, please share. Ok - I thought you were referring to some troll's rant with similar title. I'm probably way off, but were you referring to the RAII technique? http://en.wikipedia.org/wiki/Resource_A

Re: Implicit initialization is EXCELLENT

2011-07-05 Thread Stefaan Himpe
Hello, I agree with the contents of this post. I see a similar problem with API's requiring to initialize all kinds of data using setters/properties instead of receiving it in the initializer (or constructor). Python generally follows this design. Apart from files, I can't easily think off

Re: Python IDE/text-editor

2011-04-27 Thread Stefaan Himpe
Thanks for all the suggestions, glad I found the right one! You're welcome :D -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-04-16 Thread Stefaan Himpe
Here's a mockup of the app I'm looking for: http://i52.tinypic.com/2uojswz.png Which would you recommend? You drew editra! http://editra.org/preview -- http://mail.python.org/mailman/listinfo/python-list

surprised by import in python 2.6

2010-12-10 Thread Stefaan Himpe
Hello list, Recently someone asked me this question, to which I could not give an answer. I'm hoping for some insight, or a manual page. What follows is python 2.6. The problem is with the difference between from test import * and import test First things first. Here's the code to test.py

Re: A web site using Python

2010-12-09 Thread Stefaan Himpe
1. Pick a web framework, I'd suggest looking at: web2py: http://web2py.com - probably the easiest to install (no configuration needed) and learn. Suitable for both small and big projects. No worries when upgrading to a newer version as backward compatibility is an explicit design goal. -- h

Re: Distribution of Python Scripts

2010-11-19 Thread Stefaan Himpe
So, what's my options. Maybe this page can give some inspiration? http://wiki.python.org/moin/deployment -- http://mail.python.org/mailman/listinfo/python-list

Re: Spreadsheet-style dependency tracking

2010-10-21 Thread Stefaan Himpe
Florian Weimer wrote: Are there libraries which implement some form of spreadsheet-style dependency tracking? The first that come to mind (I have very limited experience with them): trellis http://peak.telecommunity.com/DevCenter/Trellis pycells http://pycells.pdxcb.net/ Best regards, Stefaa

Re: Only one forum app in Python?

2010-07-09 Thread Stefaan Himpe
Is Pocoo really the only solution available out there? No. See e.g. http://www.pyforum.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Reactive programming in Python ?

2010-04-16 Thread Stefaan Himpe
You can find more information on this project at www.yoopf.org. Your comments are more than welcome! Is this something similar to trellis? http://pypi.python.org/pypi/Trellis -- http://mail.python.org/mailman/listinfo/python-list

Re: can python make web applications?

2009-08-23 Thread Stefaan Himpe
Deep_Feelings wrote: can python make powerfull database web applications that can replace desktop database applications? e.g: entrprise accounting programs,enterprise human resource management programs ...etc In addition to the recommendations by other people, I'd like to recommend the very eas

Re: html ui + py background? any tut?

2009-05-23 Thread Stefaan Himpe
Or maybe you are looking for something like nufox? http://nufox.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: html ui + py background? any tut?

2009-05-23 Thread Stefaan Himpe
Perhaps you want to investigate pyjamas[1] and pyjamas-desktop[2] [1] http://pyjs.org/ [2] http://pyjd.sourceforge.net/ Best regards, Stefaan. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python after a few years of Ruby

2009-04-14 Thread Stefaan Himpe
Hi, 1) Is there anything like a Python build tool? (Or do I even need something like that?) If you're going to run the python source code, you don't need anything. Python builds what it needs automagically. Some tools exist to build stand-alone executables though, if you'd like to do so (e.g.

Re: Pythonic way to determine if one char of many in a string

2009-02-16 Thread Stefaan Himpe
An entirely different approach would be to use a regular expression: import re if re.search("[abc]", "nothing expekted"): print "a, b or c occurs in the string 'nothing expekted'" if re.search("[abc]", "something expected"): print "a, b or c occurs in the string 'something expected'" Best

Re: Building musical chords starting from (a lot of) rules

2008-11-15 Thread Stefaan Himpe
The costrunction of a chord is based on a root note and a structure, so by default, giving just a note, it creates a major chord adding the third and fifth note. Quite some time ago I wrote something to solve the reverse problem: given a list of note names, find out a chord name. (http://chord

Re: p2exe for python 2.6

2008-10-22 Thread Stefaan Himpe
How can convert my python script in exe for the python version 2.6? You must use a standalone executable builder like * py2exe (Windows) * py2app (Mac OS) * PyInstaller (all platforms) * cx_Freeze (Windows and Linux) * bbFreeze (Windows and Linux) Presumably you could use GU

Re: raw_input on several lines

2008-08-02 Thread Stefaan Himpe
How can I change this behavior, so that another action is needed to stop the input? For example, CTRL-G. It would allow the user to input several lines. I don't think you can change raw_input's behaviour in this respect, but you could build something yourself that's based on interpretation o

Re: Profiling weirdness: Timer.timeit(), fibonacci and memoization

2008-08-02 Thread Stefaan Himpe
Nothing weird about this ... The difference will become larger as your input value becomes larger. You can easily understand why if you try to calculate fib(10) by hand, i.e. work through the algorithm with pencil and paper, then compare the work you have to do to the memoized version which just

Re: I donä't get while-loops

2008-08-02 Thread Stefaan Himpe
def read2(): expr = "" while expr != "quit": expr = raw_input("Lisp> ") print parse(expr) read2() ^ print "Good session!" You shouldn't call read2() inside read2()... just remove that line and retry... Each time you call read2() recursivel

Re: regarding SWIG

2008-07-22 Thread Stefaan Himpe
Hi.. I'm new to SWIG and need to create Wrapper for C code, so, I have installed the SWIG already but doesnot know how to run it for generating Interface file... As far as I understand, SWIG will not generate an interface file for you. You have to write it yourself, to tell SWIG what parts of y

Re: auto upgrade scripts?

2006-09-13 Thread stefaan . himpe
> Since you mention .NET and didn't state otherwise, I'm assuming > Windows platform? No, I need both linux and windows. I guess this means I'll have to make something myself ... Thanks, and best regards, Stefaan. -- http://mail.python.org/mailman/listinfo/python-list

Re: auto upgrade scripts?

2006-09-12 Thread stefaan . himpe
> Auto-upgrade from what to what? > -Larry Bates Interesting question. In my case I want my program to check for (e.g.) bug-fix releases on some location (network drive or ftp), and if available, allow to automatically download and install them. Kind of like the AutoUpgrade functionality in .net

auto upgrade scripts?

2006-09-11 Thread stefaan . himpe
Hello list, Is anyone aware of a (light-weight, easy-to-use) auto-upgrade framework for python scripts? I find it hard to believe no one has wanted this before, yet google doesn't find too much relevant stuff. Thanks, Best regards, Stefaan. -- http://mail.python.org/mailman/listinfo/python-lis