Re: Resize image NO PIL!!

2007-05-29 Thread Daniel Nogradi
them just as any other module you wrote. You might need to find out what the architecture of the machine is (as far as I remember PIL has some C extensions) and compile PIL for that architecture. HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: google maps api for py?

2007-05-30 Thread Daniel Nogradi
ed up on the way.....) HTH, Daniel ### # gmaps.py ### import urllib from time import sleep key = "here_goes_your_key" def location2latlong( query, key=key ): """Get the ( latitute, longitude ) coordinates correspo

Re: paste text with newlines into raw_input?

2007-05-30 Thread Daniel Gee
#!/usr/bin/python print "paste quote:" emptycount = 0 lines = [] while emptycount < 2: t = raw_input() if len(t) == 0: emptycount +=1 else: emptycount=0 lines.append(t) lines.append("\n") quote = " ".join(lines[:-3])

trouble with wxPython intro

2007-05-30 Thread Daniel Gee
I'm trying to learn WxPython with the tutorial: http://wiki.wxpython.org/Getting_Started But I can't seem to get the example for events to work. I pasted the code they had directly into an interpreter and it got a dialog to appear and the program was able to close itself, but my own copy won't wor

Re: trouble with wxPython intro

2007-05-31 Thread Daniel Gee
That's so simple I'm embarrassed. I should have noticed the change from the example before to this one. It works now, thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: first, second, etc line of text file

2007-07-25 Thread Daniel Nogradi
Thanks all! I think I will stick to my original method because the files can be quite large and without reading the whole file into memory probably enumerate( open( textfile ) ) is the only way to access an arbitrary Nth line. -- http://mail.python.org/mailman/listinfo/python-list

first, second, etc line of text file

2007-07-25 Thread Daniel Nogradi
A very simple question: I currently use a cumbersome-looking way of getting the first, second, etc. line of a text file: for i, line in enumerate( open( textfile ) ): if i == 0: print 'First line is: ' + line elif i == 1: print 'Second line is: ' + line ...

Re: first, second, etc line of text file

2007-07-26 Thread Daniel Nogradi
> > A very simple question: I currently use a cumbersome-looking way of > > getting the first, second, etc. line of a text file: > > > > for i, line in enumerate( open( textfile ) ): > > if i == 0: > > print 'First line is: ' + line > > elif i == 1: > > print 'Second line is

Re: Tix.Tk() on Mac Intel

2007-07-26 Thread Daniel Nogradi
On 7/26/07, Alan <[EMAIL PROTECTED]> wrote: > Hi List! > > I have I Macbook Pro Intel running OSX 10.4.10. > > I downloaded Python 2.5 and tried > TclTkAquaBI-8.4.10.0.dmg, but I got: > > Traceback (most recent call last): > File "", line 1, in > File > "/Library/Frameworks/Python.framework/Vers

Re: A/C Systems!

2007-08-19 Thread Daniel Pitts
On Aug 19, 10:42 am, [EMAIL PROTECTED] wrote: > On Aug 19, 7:39 pm, [EMAIL PROTECTED] wrote: > > > Everything you need to know about car air conditioners... > > >http://car-air-conditioning.spamspot.spam/ > > Great website man, I found everything I need Perhaps you did, after all, you advertise it

an eval()-like exec()

2007-08-27 Thread Abel Daniel
nd out what to do to get the results before they are turned into strings. Using compile() and then eval() didn't seem usable either. Any ideas? Thanks in advance, Daniel Abel -- http://mail.python.org/mailman/listinfo/python-list

wx.DirDialog defaultPath

2007-08-30 Thread Woo, Daniel
Is there some kind of parsing/checking that is done on the defaultPath? The path I would like to set as default is something like this: "c:\Somedirectory\engineering\somedirectory". When providing this as the default, the control seems to think it is an invalid path, although it IS a valid path

doctest and decorators

2007-09-04 Thread Daniel Larsson
Hi, I assume this is a FAQ, but I couldn't find much helpful information googling. I'm having trouble with doctest skipping my functions, if I'm using decorators (that are defined in a separate module). If I'm understanding what is happening correctly, it's because doctest checks if the function's

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/4/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > > I assume this is a FAQ, but I couldn't find much helpful information > > googling. I'm having trouble with doctest skipping my functions, if I'm > > using decorators (that are defined in a separate module). If I'm > > understanding what is

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/4/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > > @functools.wraps > > Correctly: > > @functools.wraps(f) > > Pass the function to be wrapped by the decorator to the wraps function. Ooops, right. That doesn't change the fact that decorated functions get hidden from doctest though. -- h

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > > > @functools.wraps(f) > > > Pass the function to be wrapped by the decorator to the wraps > function. > > Ooops, right. That doesn't change the fact that decorated functions get > > hidden from doctest though. I have no issue when the de

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/5/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Tue, 04 Sep 2007 19:29:11 -0300, Daniel Larsson > <[EMAIL PROTECTED]> escribi�: > > > On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > >> > >> > > @functools.wraps(f)

Re: doctest and decorators

2007-09-05 Thread Daniel Larsson
.__module__ elif inspect.getmodule(object) is not None: return module is inspect.getmodule(object) On 9/5/07, Michele Simionato <[EMAIL PROTECTED]> wrote: > > > En Tue, 04 Sep 2007 19:29:11 -0300, Daniel Larsson > > <[EMAIL PROTECTED]> escribi?:

Re: concise code (beginner)

2007-09-05 Thread Daniel Larsson
def process_devs(devs, fun): for dev in devs: try: fun(dev) except: print exception remove dev from devs return devs process_devs(devs, lambda d: d.read1()) process_devs(devs, lambda d: d.read2()) ... On 9/5/07, bambam <[EMAIL PROTECT

Re: decorator and signal handler

2007-09-05 Thread Daniel Larsson
On 9/5/07, stalex <[EMAIL PROTECTED]> wrote: > > Hi all, > > I wrote the following code since I want to try using a decorator to > install signal handler: > > ## The test.py script > # > import os > import time > import signal > > def sigHandler(sid): > def handler(f): >

Re: Accessing Module variables from another Module

2007-09-05 Thread Daniel Larsson
On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi > > I am new to Python (I have come from a large background of Java) and > wondered if someone could explain to me how I can access variables > stored in my main module to other functions within other modules > called > from this module

Re: python exec behaves inconsistent with respect to module imports

2007-09-05 Thread Daniel Larsson
On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello > > I am completely puzzled why the following exec code does not work: > > mycode = "import math\ndef f(y):\nprint math.floor(y)\nf(3.14)" > def execute(): > exec mycode > execute() > > > I get the error: > > [EMAIL PROTECTED

Re: handling modules in packages

2007-09-05 Thread Daniel Larsson
On 9/5/07, Tommy Grav <[EMAIL PROTECTED]> wrote: > > >> > > The simplest thing to do would be to have PyAstro.__init__.py > > import all > > the sub-modules, and define __all__ as the set of names that the > > package > > should inject into importing modules. > > > > Then you could write (for examp

Re: Checking if elements are empty

2007-09-05 Thread Daniel Larsson
On 9/5/07, Chris Mellon <[EMAIL PROTECTED]> wrote: > > On 9/5/07, Steve Holden <[EMAIL PROTECTED]> wrote: > > Doran, Harold wrote: > > > > > > > Is there a way to check if the first element of y is null? > > > > > > > len(y[0]) == 0 > > > > would be the obvious way, assuming "null" means "the null

Re: Soemthing wrong w/ urllib module or something.

2007-09-05 Thread Daniel Larsson
Are you using http proxying when you browse to the server? Have you tried to do $ curl http://DOMAINHERE/ If that works, connecting with a plain socket should work too. Otherwise, I believe urllib has support for a proxying server, check the docs. On 9/5/07, Lamonte Harris <[EMAIL PROTECTED]> wr

Re: concise code (beginner)

2007-09-05 Thread Daniel Larsson
On 9/5/07, Karthik Gurusamy <[EMAIL PROTECTED]> wrote: > > On Sep 5, 11:17 am, James Stroud <[EMAIL PROTECTED]> wrote: > > bambam wrote: > > > I have about 30 pages (10 * 3 pages each) of code like this > > > (following). Can anyone suggest a more compact way to > > > code the exception handling? I

Re: library to launch program in linux

2007-09-06 Thread Daniel Larsson
On 9/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi there, > > I'm a new user. What library should I use so that I can launch program > in linux using python? Thank you in advance. os.system or the commands library. -- > http://mail.python.org/mailman/listinfo/python-list > -- http:/

Re: Class design (information hiding)

2007-09-07 Thread Daniel Larsson
On 9/7/07, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote: > > Bruno Desthuilliers schrieb: > > > Nope. It's either 'interface' (no leading underscore), 'implementation' > > (single leading underscore), 'implementation with some protection > > against accidental overriding' (two leading underscores

Re: Class design (information hiding)

2007-09-07 Thread Daniel Larsson
On 9/7/07, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm wodering how the information hiding in python is ment. As I understand > there > doesn't exist public / protected / private mechanism, but a '_' and > '__' > naming convention. > > As I figured out there is only public

Re: pipes

2007-09-11 Thread Daniel Klein
provides an easier interface imo, eg: process = subprocess.Popen('tool.exe', stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=true) (self.outstream, self.instream) = (process.stdout, process.stdin) Daniel Klein -- http://mail.python.org/mailman/listinfo/python-list

Re: Where I could find older python releases ?

2007-03-04 Thread Daniel Nogradi
> Sorry jumped the gun a little there. Is this what you are looking for? > http://codespeak.net/download/py/py-0.9.0.zip Probably not, the OP is looking for a python distribution, what you are posting is a third party package *for* python and is actually a part of the pypy project. -- http://mail

list-like behaviour of etree.Element

2007-03-04 Thread Daniel Nogradi
The etree.Element (or ElementTree.Element) supports a number of list-like methods: append, insert, remove. Any special reason why it doesn't support pop and extend (and maybe count)? -- http://mail.python.org/mailman/listinfo/python-list

Re: list-like behaviour of etree.Element

2007-03-05 Thread Daniel Nogradi
> >> The etree.Element (or ElementTree.Element) supports a number of > >> list-like methods: append, insert, remove. Any special reason why it > >> doesn't support pop and extend (and maybe count)? > > > > Those methods would not be hard to add. Perhaps, submit a feature > > request to Fredrik Lun

Re: Hamburg Pythoneers Monthly Meeting: Wed, Apr 11

2007-03-10 Thread Daniel Miller
. I would love to know what others are using it for. Thanks, Daniel Miller Helge Stahlmann wrote: > + Hamburg Python User Group April Meeting + > > I am pleased to announce our next user group meeting: > > Wednesday, April 11, 2007 at 7:00pm > > L

Object instance "reporting" to a container class instance

2007-03-11 Thread Daniel Lipovetsky
nside the instance's __init__ and __del__ methods (that is, an instance "reports" to the container as soon as it is created or deleted)? Thanks! Daniel --- I'm working out a design where Object A is "linked" to Object B, and both objects become aware of that relationshi

Re: list comprehension help

2007-03-18 Thread Daniel Nogradi
open('file.txt','r') ] depending on what exactly you want to store. But reading 4GB into memory will be slow in any case. You can use the timeit module to find out which method is fastest. HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension help

2007-03-18 Thread Daniel Nogradi
mple because you wanted to use list comprehension and I didn't know what db is but as the name says it is for lists. Since the bsddb handle is not a list I'm afraid you won't be able to use list comprehension. This small thing will speed up your loop but since syncing is IO bound it won't give you much (the timeit module will tell you how much you save, if at all): for line in f: sp = line.split db[sp(' ')[0]] = sp(' ')[-1] db.sync( ) HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation for "str()" could use some adjustment.

2007-03-19 Thread Daniel Nogradi
> The Python documentation for "str" says > "str([object]) : > Return a string containing a nicely printable representation of an > object." > > However, there's no mention of the fact that "str" of a Unicode string > with non-ASCII characters will raise a conversion exception. The > document

from maple to python + numpy/scipy

2007-03-19 Thread Daniel Nogradi
I'm just getting started with numpy/scipy and first would like to get a view of what it can do and what it can't. The main idea is to move from maple to python and the first thing that poped up is the fact that maple is very convenient for both formal manipulations and exact integer calculations. F

Re: Join strings - very simple Q.

2007-03-23 Thread Daniel Nogradi
> > I was told in this NG that string is obsolet. I should use > > str methods. > > > > So, how do I join a list of strings delimited by a given > > char, let's say ','? > > > > Old way: > > > > l=['a','b','c'] > > jl=string.join(l,',') > > > > New way? > > Dunno if it's the "new way", but you can

On text processing

2007-03-23 Thread Daniel Nogradi
Hi list, I'm in a process of rewriting a bash/awk/sed script -- that grew to big -- in python. I can rewrite it in a simple line-by-line way but that results in ugly python code and I'm sure there is a simple pythonic way. The bash script processed text files of the form: ###

Re: On text processing

2007-03-23 Thread Daniel Nogradi
> This is my first try: > > ddata = {} > > inside_matrix = False > for row in file("data.txt"): > if row.strip(): > fields = row.split() > if len(fields) == 2: > inside_matrix = False > ddata[fields[0]] = [fields[1]] > lastkey = fields[0] >

Re: On text processing

2007-03-23 Thread Daniel Nogradi
> > I'm in a process of rewriting a bash/awk/sed script -- that grew to > > big -- in python. I can rewrite it in a simple line-by-line way but > > that results in ugly python code and I'm sure there is a simple > > pythonic way. > > > > The bash script processed text files of the form: > > > > ###

Re: Other classes in a module

2007-03-25 Thread Daniel Nogradi
> Can an instance of a class in a module, in any simple way find out which > other classes that exists in said module ? # module x ## class c1: pass class c2: pass ### Python 2.5 (r25:51908, Nov 1 2006, 11:42:37) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3

Re: YouTube showing repr() of a tuple

2007-03-29 Thread Daniel Nogradi
> Thought this might amuse some of you: > > > > I'd heard that YouTube uses Python, but it's fun to see proof of that, > even if it comes in the form of a minor bug. But their web frontend is (probably) in php: http://youtube.com/result

Re: ISO programming projects

2007-04-01 Thread Daniel Nogradi
> I'm looking for a collection of useful programming projects, at > the "hobbyist" level. > > My online search did turn up a few collections (isolated projects > are less useful to me at the moment), but these projects are either > more difficult than what I'm looking for (e.g. code a C compiler) >

Re: Parsing Problems

2007-04-03 Thread Daniel Nogradi
ser_par_num = ser_par_num + 1 > prim_num = prim_num + 1 > > service_num = service_num + 1 > variant_num = variant_num + 1 > ser = list(set(rval)) > > print "\n[Services]" > print "Supported="+str(ser)

Re: Lists and Tuples and Much More

2007-04-12 Thread Daniel Nogradi
the list that's in the list? I guess that goes in > conjunction with the section above, but still: > >>> my_list = [6, 4, 3, 5, 2, 1] > >>> my_list.append([7, 9, 8, 10]) > >>> my_list.sort() > >>> my_list > [1, 2, 3, 4, 5, 6, [7, 9, 8, 10]] How about: >>> my_list = [6, 4, 3, 5, 2, 1] >>> my_list.append([7, 9, 8, 10]) >>> my_list[6].sort() >>> my_list [6, 4, 3, 5, 2, 1, [7, 8, 9, 10]] HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary To File

2007-04-12 Thread Daniel Nogradi
this in python? Like binary2file() or > something along those lines? myblob = . # let's say you got it from your database somehow myjpeg = open( 'image.jpg', 'w' ) myjpeg.write( myblob ) myjpeg.close( ) Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Python editor/IDE on Linux?

2007-04-15 Thread Daniel Gee
In Linux I just use Gedit. In windows I settle for Notepad2. With python having help built into the interpreter, anything more than line numbering, simple syntax highlighting, and auto-indent when you hit enter just doesn't seem necessary. Vim has b and c, but not a. Using Kate for Python would pr

Re: is laziness a programer's virtue?

2007-04-15 Thread Daniel Gee
You fail to understand the difference between passive laziness and active laziness. Passive laziness is what most people have. It's active laziness that is the virtue. It's the desire to go out and / make sure/ that you can be lazy in the future by spending just a little time writing a script now.

Re: Python editor/IDE on Linux?

2007-04-15 Thread Daniel Gee
didn't know that one. Perhaps I'll look into Gvim (I still like to cut and paste with the mouse, even if I left that off my list). -- http://mail.python.org/mailman/listinfo/python-list

string methods of a str subclass

2007-04-16 Thread Daniel Nogradi
I am probably misunderstanding some basic issue here but this behaviour is not what I would expect: Python 2.4 (#1, Mar 22 2005, 21:42:42) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class mystr( str ): ...

Re: string methods of a str subclass

2007-04-16 Thread Daniel Nogradi
> > Why is the strip( ) method returning something that is not a mystr > > instance? I would expect all methods operating on a string instance > > and returning another string instance to correctly operate on a mystr > > instance and return a mystr instance. > > Why would you expect that? > Would y

Re: Deleting or Empty a File

2007-04-17 Thread Daniel Nogradi
file', 'w' )# or open( 'myfile', 'wb' ) f.close( ) Since you mentioned log files, you might want to look at the logging module: http://docs.python.org/lib/module-logging.html HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

python - dll access (ctypes or swig)

2007-04-17 Thread Daniel Watrous
e had support for COM but that it has since been separated into its own project. I couldn't find any information about how these work together. All help is appreciated. THANKS in advance... Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: array{uint32}

2007-04-18 Thread Daniel Nogradi
> I have a function that returns a array{uint32}, is there any way to output > that to screen in a more user friendly format? At the moment when I print it > by itself it appears as [65541L], which isn't much used to anyone. I'm not sure I understand your question precisely but this might help: >

Re: python - dll access (ctypes or swig)

2007-04-18 Thread Daniel Watrous
thank you for the responses and the links. I will give these ideas a try this week and post again if I have more questions. Thanks again for being so helpful! Daniel On 4/17/07, Cameron Laird <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Larry Bates <[EM

Re: We need PIGs :)

2007-09-16 Thread Daniel Larsson
On 9/16/07, Colin J. Williams <[EMAIL PROTECTED]> wrote: > > Marc 'BlackJack' Rintsch wrote: > > On Thu, 06 Sep 2007 09:00:02 +0200, Stefan Arentz wrote: > > > >> What I find really frustrating in Python (combined with usually bad > >> documentation) is that many people have different styles. The m

Re: Python 3K or Python 2.9?

2007-09-17 Thread Daniel Larsson
On 9/13/07, Stefan Bellon <[EMAIL PROTECTED]> wrote: > > On Thu, 13 Sep, TheFlyingDutchman wrote: > > > Bruce said that no other mainstream OO language is explicitly passing > > the object as a parameter to class methods. > > Ada 95 does. And Ada 95 was the first standardized OO language. Now tha

Re: which language allows you to change an argument's value?

2007-09-30 Thread Daniel Pitts
On Sep 30, 3:47 am, Summercool <[EMAIL PROTECTED]> wrote: > I wonder which language allows you to change an argument's value? > like: > > foo(&a) { > a = 3 > > } > > n = 1 > print n > > foo(n) # passing in n, not &n > print n > > and now n will be 3. I think C++ and PHP can let you do that,

python autoconf macro for building ming extension

2007-10-03 Thread Daniel Nogradi
It might be slightly off topic here but couldn't find a more suitable place for this question: I'm trying to build the python binding for ming -- http://ming.sf.net -- but for some reason the python macro for autoconf -- python.m4 -- doesn't seem to detect my python installation correctly. The str

Re: Python Magazine: Issue 1 Free!

2007-10-10 Thread Daniel Klein
ed of the availability of new issues automatically, yet I received no such notification. Daniel Klein -- http://mail.python.org/mailman/listinfo/python-list

Re: Python module for making Quicktime or mpeg movies from images

2007-10-12 Thread Daniel Fetchinson
> My Python script makes a bunch of images that I want to use as frames > in a movie. I've tried searching for a module that will take these > images and put them together in a Quicktime or mpeg movie, but haven't > found anything. My images are currently pdfs, but I could make them > into just a

Re: Yet another comparison of Python Web Frameworks

2007-10-13 Thread Daniel Fetchinson
is not many of us. Hi Massimo, In what way is gluon different from existing frameworks most notably django and turbogears? What do you think are the advantages to using gluon over these two? Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet another comparison of Python Web Frameworks

2007-10-13 Thread Daniel Fetchinson
the logic of your application without > writing one line of HTML and you have a working prototype. > > Massimo > > > Hi Daniel, > > > > in many respects Gluon is similar to Django and was greatly inspired > > by Django. Some differences are: > > > > Gluon is eas

Re: Entering username & password automatically using urllib.urlopen

2007-10-14 Thread Daniel Larsson
You form the URL thus: http://:@:/ This is defined in RFC 1738 On 10/14/07, rodrigo <[EMAIL PROTECTED]> wrote: > > I am trying to retrieve a password protected page using: > > get = urllib.urlopen('http://password.protected.url";').read() > > While doing t

Re: Distributed RVS, Darcs, tech love

2007-10-20 Thread Daniel Pitts
On Oct 20, 2:04 pm, llothar <[EMAIL PROTECTED]> wrote: > > I love math. I respect Math. I'm nothing but a menial servant to > > Mathematics. > > Programming and use cases are not maths. Many mathematics are > the worst programmers i've seen because they want to solve things and > much more often yo

Re: Can you escape a % in string that will used for substitution

2007-10-22 Thread Daniel Lenski
On Thu, 18 Oct 2007 15:21:41 -0400, Gerard Brunick wrote: > Is there a way to do: > > s = "I like python %i%s of the time." print s % (99, "%") > > without having to pass in "%"? > > Thanks, > Gerard Just double-up the % sign, e.g. "I like python %i%% of the time." -- http://mail.python.org/m

Re: Python - why don't this script work?

2007-10-22 Thread Daniel Larsson
Try: $ python image-harvester.py On 10/23/07, Ohmster <[EMAIL PROTECTED]> wrote: > > I am trying to use this cool script that some MIT guy wrote and it just > does not work, I get a stream of errors when I try to run it. It is > supposed to visit a URL and snag all of the pictures on the site. Her

New to Vim and Vim-Python

2007-10-24 Thread Daniel Folkes
I am new to using Vim's scripts. I was wondering if anyone uses Vim-Python and how to use it? This includes things like key bindings and such. Thanks in advance, Daniel Folkes [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: python project ideas

2007-10-25 Thread Daniel Fetchinson
r open source or python community ... > Well, just post what you think could be appropriate ... Hi, have you tried this: http://wiki.python.org/moin/CodingProjectIdeas Cheers, Daniel -- http://mail.python.org/mailman/listinfo/python-list

__init__ vs __new__

2007-01-11 Thread Daniel Klein
#return list.__new__(cls, alist) I don't really notice any behavioral difference. Is there in fact any difference in using one over the other? Performance? Side effects? ??? I am using Python version 2.5. Thanks, Daniel Klein -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python book, new edition?

2007-01-11 Thread Daniel Klein
On Thu, 11 Jan 2007 18:11:06 +0100, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >Demel, Jeff wrote: > >> Does anyone know if there's a plan in the works for a new edition >> of Learning Python? The current edition (2nd) is a few years old >> and looks like it only covers Python 2.3. > >IIRC, d

Re: Barcode recognition in Python

2007-01-13 Thread Daniel Nogradi
> I am searching for a python library for barcode recognition. We have > developed a rather complex application for document tracking and > document management in python/Zope, called PAFlow (www.paflow.it: > sorry, most of the information is in Italian...). > > As our project is completely free sof

sqlobject 0.8.0b1 and python 2.5

2007-01-13 Thread Daniel Nogradi
to complicated and complex for my needs. :)) Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlobject 0.8.0b1 and python 2.5

2007-01-13 Thread Daniel Nogradi
> > To my knowledge, the 0.8.x series is the current line of development, and > > has > > made major progress over the previous versions. What makes you think it will > > be stopped developing? And where does a sqlobject2 come from? > > http://www.sqlobject.org/2/ Yes, that's what I meant. The we

Re: installing/maintaining modules for multiple versions of python

2007-01-16 Thread Daniel Nogradi
> I have a suse box that has by default python 2.4 running and I have a > 2.5 version installed > in /reg/python2.5. How do I install new modules for only 2.5 without > disturbing the 2.4 default > installation. If you do 'python2.5 setup.py install' on a new module supporting distutils it will on

Re: Traversing the properties of a Class

2007-01-18 Thread Daniel Nogradi
> I'm using Python version 2.4 and I created a class with some properties > like: > > def GetCallAmount(self): > return somedata > > def GetCallCurrency(self): > return somemoredata > > moredefs..etc. > > CallAmount = property(GetCallAmount,None,None,None) > CallCurrency

Re: Match 2 words in a line of file

2007-01-19 Thread Daniel Klein
On 18 Jan 2007 18:54:59 -0800, "Rickard Lindberg" <[EMAIL PROTECTED]> wrote: >I see two potential problems with the non regex solutions. > >1) Consider a line: "foo (bar)". When you split it you will only get >two strings, as split by default only splits the string on white space >characters. Thus

pylab, matplotlib ... roots function question

2007-01-21 Thread Schüle Daniel
second try In [343]: roots([1,0,0]) Out[343]: array([], dtype=float64) ok, as it should be In [344]: roots([0,0,1]) Out[344]: array([], dtype=float64) here again, 0 is the root of x^2 Do I miss something important? Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: pylab, matplotlib ... roots function question

2007-01-22 Thread Schüle Daniel
such a tutorial on my own later Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Noob Question: Force input to be int?

2007-01-23 Thread Daniel Nogradi
n-numeric value in the buildNum input, the scripts throws an > exception. I need to constrict the user to ONLY use integers in the > input box. How can I solve this issue? How about this: while True: try: x = int( raw_input( 'Enter an integer: ' ) ) break except: pass print 'Okay, now I have this integer: %d' % x HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Noob Question: Force input to be int?

2007-01-23 Thread Daniel Jonsson
Ah, thank you for the respone! I have not gotten around to test it yet, but I hope it will work! :) -Daniel 2007-01-23 10:59:37 [EMAIL PROTECTED] wrote in message <[EMAIL PROTECTED]> > Hello everyone! > I have a piece of code that looks like this: > > if len(BuildList) >

My python programs need a GUI, wxPython or PyQt4?

2007-01-23 Thread Daniel Jonsson
ich one is easier to pick up? Thanks in advance! Daniel -- http://mail.python.org/mailman/listinfo/python-list

Python 2.5 and Zeus

2007-01-24 Thread Daniel Klein
Does anyone know if the Zeus IDE is compatible with Python 2.5? I sent an email to Zeus a couple days ago but have not heard anything. Thanks, Dan -- http://mail.python.org/mailman/listinfo/python-list

file -> open in stdlib patch

2007-01-24 Thread Daniel Nogradi
this is my first patch maybe it's better if someone knowledgeable takes a look at it before submitting it to SF. Daniel Index: Lib/site.py === --- Lib/site.py (revision 53548) +++ Lib/site.py (working copy) @@ -274,7 +

[ANN] markup.py 1.6

2007-01-25 Thread Daniel Nogradi
The new 1.6 release of markup.py is available for download: http://sourceforge.net/project/showfiles.php?group_id=161108 What is it? Markup.py is an intuitive, lightweight, easy-to-use, customizable and pythonic HTML/XML generator. Where is the documentation? http://markup.sourceforge.net/ Wh

Re: [ANN] markup.py 1.6 (bugfix: 1.6.1)

2007-01-26 Thread Daniel Nogradi
> The new 1.6 release of markup.py is available for download: > > http://sourceforge.net/project/showfiles.php?group_id=161108 > > What is it? > > Markup.py is an intuitive, lightweight, easy-to-use, customizable and > pythonic HTML/XML generator. > > Where is the documentation? > > http://markup.s

Please take me off the list

2007-01-30 Thread Daniel kavic
Sorry to waste email space , but I wish to be off this list because I have tried python and it is too difficult for me. -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: strip question

2007-01-30 Thread Daniel Klein
On 26 Jan 2007 21:33:47 -0800, [EMAIL PROTECTED] wrote: >hi >can someone explain strip() for these : >[code] x='www.example.com' x.strip('cmowz.') >'example' >[/code] > >when i did this: >[code] x = 'abcd,words.words' x.strip(',.') >'abcd,words.words' >[/code] > >it does not st

MoinMoin

2007-01-30 Thread Daniel Klein
Is it fair game to ask questions about MoinMoin here? If not, can someone recommend a resource please? Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: "Correct" db adapter

2007-01-31 Thread Daniel Nogradi
> Maybe you should take a look at sqlalchemy > > > Hi to all, > > > > i have started a month ago to seriously studying Python. I am now > > looking at the databases stuff > > and i want the opinion of more experienced Python programmers (than > > me) at the following : > > > > I see that there are

subway

2007-01-31 Thread Daniel Nogradi
Does anyone know what has happened to the codebase of the subway project? It seems the whole project has been shut down leaving no trace of the code on net but I would be very happy to see it, apparently it had some cool features that would be fun to look at. Does anyone have access to the code and

Re: subway

2007-01-31 Thread Daniel Nogradi
> Daniel> Does anyone know what has happened to the codebase of the subway > Daniel> project? It seems the whole project has been shut down leaving > Daniel> no trace of the code on net but I would be very happy to see it, > Daniel> apparently it had some

Re: subway

2007-01-31 Thread Daniel Nogradi
> > the egg file can not be downloaded completely, the connection is > > closed at byte 138903 all the time and the file is bigger than that. > > If anyone managed to grab the file please let me know so far I tried > > wget and firefox. > > I've checked on my hd and found a recent (Jun 2006) checko

pil, histogram, mask

2007-01-31 Thread Daniel Nogradi
How does one do a histogram on only a part of an image? This is what I found in the PIL documentation about histogram( ): """ im.histogram(mask) => list Returns a histogram for those parts of the image where the mask image is non-zero. The mask image must have the same size as the image, and be e

Problem saving changes in MoinMoin pages

2007-02-01 Thread Daniel Klein
[I'm having some difficulty contacting 'real' MoinMoin support channels so I am posting this question here. Hope that's ok.] I have a pressing need to get a wiki up and running in a fairly short timeframe. I did some investigations and the Python MoinMoin wiki seemed to be the best choice for me b

Re: pil, histogram, mask

2007-02-01 Thread Daniel Nogradi
> > I don't need the histogram really, only the mean color > > value, but as far as I can see the 'mean' attribute only applies to an > > image and a mask can not be specified. > > You can slice parts of the image, and then use the > ImageStat.Stat(im).mean > On it. > > Bye, > bearophile Okay, I'l

subway code

2007-02-07 Thread Daniel Nogradi
Does anyone know what happened to the subway project? The sites gosubway.org and subway.python-hosting.com have been down for a long time now. Actually, I would like to have the code just to look at it and maybe learn something, but it seems it completely disappeared from the net. Does anyone has

<    5   6   7   8   9   10   11   12   13   14   >