Re: PEP 372 -- Adding an ordered directory to collections

2008-06-18 Thread [EMAIL PROTECTED]
On Jun 18, 3:15 pm, [EMAIL PROTECTED] wrote: > In Python 2.5 a dict(int:None) needs about 36.2 bytes/element. I am > suggesting to add 2 pointers, to create a linked list, so it probably > becomes (on 32 bit systems) about 44.2 bytes/pair. PyDictEntry is typedef struct { P

Re: ¡¶python in a nutshell¡·and¡¶programming p ython¡·

2008-06-18 Thread [EMAIL PROTECTED]
Learning Python may be another good choice. But really, for just starting out, nothing beats online documentation. http://docs.python.org/tut/tut.html http://diveintopython.org/ On Jun 18, 9:02 pm, "yps" <[EMAIL PROTECTED]> wrote: > as a new learner of python,which book

How do I create a new Node using pulldom?

2008-06-20 Thread [EMAIL PROTECTED]
I'm using xml.dom.pulldom to parse through an XML file. I use expandNode() to scrutinize certain blocks of it that I'm interested in. Once I find a block of XML in the input file that I'm interested in, I need to add my own block . to the pulldom tree I'm building in memory. The documentati

Re: sublassing as a verb

2008-06-20 Thread [EMAIL PROTECTED]
On 20 juin, 22:34, davidj411 <[EMAIL PROTECTED]> wrote: > docs on urllib module say this about the FancyUrlOpener: > "class FancyURLopener( ...) > > FancyURLopener subclasses URLopener providing default handling > for ..." > > does that mean the FancyURLop

Re: An idiom for code generation with exec

2008-06-20 Thread [EMAIL PROTECTED]
On 20 juin, 21:41, eliben <[EMAIL PROTECTED]> wrote: > > [1] except using compile to build a code object with the function's > > body, then instanciate a function object using this code, but I'm not > > sure whether it will buy you much more performance-wise. I&#x

Re: An idiom for code generation with exec

2008-06-20 Thread [EMAIL PROTECTED]
On 20 juin, 21:44, eliben <[EMAIL PROTECTED]> wrote: > On Jun 20, 3:19 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > (snip) > > It's still not clear why the generic version is so slower, unless you > > extract only a few selected fields, not all of them. Can yo

Time-out for regular expressions...

2008-06-20 Thread [EMAIL PROTECTED]
I'm doing a lot of regular expressions these days. Sometimes when I'm crafting them I mess up, and make them too complicated. So that when my program runs, they take forever. (Maybe not literally forever---I abort the program after a few seconds.) What I'd like to have happen is every time I se

[ANN] TPP Call for Papers, Volume 3 Issue 2

2008-06-20 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] Thanks, -Maurice Ling Co-Editor In Chief, The Python Papers -- http://mail.python.org/mailman/listinfo/python-list

Re: -1/2

2008-06-22 Thread [EMAIL PROTECTED]
On Jun 22, 2:32 pm, "Serve Lau" <[EMAIL PROTECTED]> wrote: > What is the expected result of -1/2 in python? I would say -1, but it depends on whether the "-" is a unary minus. >>> -1/2 -1 >>> 3 -1/2 3 -- http://mail.python.org/mailman/listinfo/python-list

Re: shorten this: if char in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":

2008-06-24 Thread [EMAIL PROTECTED]
On 24 juin, 20:32, cirfu <[EMAIL PROTECTED]> wrote: > if char in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz": > > cant i write something like: > if char in "[A-Za-z]": > Nope. But there are other solutions. Here are two: # 1 import string

Re: newb question on strings

2008-06-24 Thread [EMAIL PROTECTED]
, use subprocess.list2cmdline. Generally, the module that consumes the string should provide a function like escape(). On Jun 24, 1:27 pm, regex_jedi <[EMAIL PROTECTED]> wrote: > ok, I have looked a lot of places, and can't seem to get a clear > answer... > > I have a string c

logging module's documentation lies?

2008-06-24 Thread [EMAIL PROTECTED]
Quote from the docs: FORMAT = "%(asctime)-15s %(clientip)s %(user)-8s %(message)s" logging.basicConfig(format=FORMAT) d = {'clientip': '192.168.0.1', 'user': 'fbloggs'} logging.warning("Protocol problem: %s", "connection reset", extra=d) would print something like 2006-02-08

cannot load index value from mysql database

2008-06-25 Thread [EMAIL PROTECTED]
Hi I am trying to right a script to keep a local copy of my mysql database in a local access file. I was able to do this in Access visual basic, but cannot get it to work in python. The procedure works by storing the last index value after each update. Then I do a quarry for all records with a i

Re: reading from list with paths

2008-06-25 Thread [EMAIL PROTECTED]
On 25 juin, 20:59, antar2 <[EMAIL PROTECTED]> wrote: > Hello, > (snip repost of the very same question) > I already got one answer for this question, but it did not work For which definition of "did not work" ? How is your code ? What did you expect, and what did you

Re: Notice For All pyHook users

2008-06-25 Thread [EMAIL PROTECTED]
On 25 juin, 19:47, Gandalf <[EMAIL PROTECTED]> wrote: > If you want to compile your program the new py2exe release 0.6.8 wont > work! > the pyhook function will be ignored > > you'll have to uninstall the 0.6.8 version and to install the 0.6.6 > instead > > it

Re: Working with the Windows Registry

2008-06-25 Thread [EMAIL PROTECTED]
On Jun 25, 10:48 pm, teh_sAbEr <[EMAIL PROTECTED]> wrote: > Hi everybody. I'm trying to write a script that'll change desktop > wallpaper every time its run. Heres what I've gotten so far: > > #random wallpaper changer! > import _winreg > from os import w

Re: Adding functions to an existing instance

2008-06-26 Thread [EMAIL PROTECTED]
On 26 juin, 17:18, Allen <[EMAIL PROTECTED]> wrote: > I need a way to add a method to an existing instance, but be as close as > possible to normal instance methods. def set_method(obj, func, name=None): if not name: name = func.__name__ setattr(obj, name, func.__get__(o

Re: How do web templates separate content and logic?

2008-06-27 Thread [EMAIL PROTECTED]
On 27 juin, 18:09, "John Salerno" <[EMAIL PROTECTED]> wrote: > I've been doing some research on web templates, and even though I read that > they help enforce the MVC pattern, I don't really understand how they are > keeping content and logic separated. For

Re: "method involving two objects" is that possible in Python?

2008-06-27 Thread [EMAIL PROTECTED]
On 27 juin, 23:41, Kurda Yon <[EMAIL PROTECTED]> wrote: > Hi, > > I just started to learn Python. I understood how one can create a > class and define a method related with that class. According to my > understanding every call of a methods is related with a specific > obje

Money In Us $ No Investment Except Minimum Time Daily!!!

2008-06-28 Thread [EMAIL PROTECTED]
Worth Clicking If You Mean Time = Money In Us $ No Investment Except Minimum Time Daily! You Will Reveal A Great Home Business Opportunity By Opening The Below Link. http://www.govindswamy-govindaswamy.blogspot.com You Will Be Paid 2 US DOLLARS For Each Member Joining Under You (Provided they

complex numbers should respect the "I" representation

2008-06-28 Thread [EMAIL PROTECTED]
hi I think complex numbers should respect the "i" or "I" representation, instead of "j". No reason being cute and using a different character instead of the traditional representation? At least have the decency of supporting the orginal representation? Programmers use j as frequently as i as index

gelato - nvidia and python

2008-06-29 Thread [EMAIL PROTECTED]
Did somebody worked with gelato from nvidia and python? I have some C cod from books nvidia . This is : " GelatoAPI *r = GelatoAPI::CreateRenderer(); r->Camera ("main"); ... API calls through r ... r->Render ("main"); delete r; // Finished with this renderer " the code for python i create is only

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 19:19, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 10:57 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > > > Some (if not most) templating systems use their own mini-language to > > handle presentation logic. > > IMHO this is the funniest

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On Jun 27, 9:09 am, "John Salerno" <[EMAIL PROTECTED]> wrote: > Of course, I suppose whether or not any of this matters depends on if you > are a web designer or a programmer, but am I missing something about > templates, or is it really the case that they, more or less

Re: list extension ?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 21:05, Stef Mientki <[EMAIL PROTECTED]> wrote: > thanks guys, > > >>def __init__ ( self, value = [] ) : > > > Gotcha : default argument values are eval'd only once. Also, it would > > make more sense IMHO to follow the parent's class

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 21:34, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 1:49 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > > > Then what is so *good* about it, why embedding HTML into Python is not > > > good? > > > Who sai

ImportError: No module named _md5

2008-06-30 Thread [EMAIL PROTECTED]
Hello, Does anyone know how to fix this error when trying to build MySQL- python-1.2.2: python setup.py build Traceback (most recent call last): File "setup.py", line 5, in import ez_setup; ez_setup.use_setuptools() File "/Users/jasonnerida/Downloads/MySQL-python-1.2.2/ez_setup.py", line

How make regex that means "contains regex#1 but NOT regex#2" ??

2008-06-30 Thread [EMAIL PROTECTED]
I'm looking over the docs for the re module and can't find how to "NOT" an entire regex. For example. How make regex that means "contains regex#1 but NOT regex#2" ? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Please check my understanding...

2008-07-01 Thread [EMAIL PROTECTED]
On 1 juil, 21:35, Tobiah <[EMAIL PROTECTED]> wrote: > list.append([1,2]) will add the two element list as the next > element of the list. list.append(obj) will add obj as the last element of list, whatever type(obj) is. > list.extend([1,2]) is equivalent to list = list + [1, 2]

Re: Why is recursion so slow?

2008-07-01 Thread [EMAIL PROTECTED]
On 1 juil, 22:46, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: (snip) > By definition any function in a functional language will > always produce the same result if given the same arguments, This is only true for pure functional languages. I know you know it, but someone might t

Re: How to make a function associated with a class?

2008-07-01 Thread [EMAIL PROTECTED]
On 1 juil, 22:43, Kurda Yon <[EMAIL PROTECTED]> wrote: > Hi, > > I have a class called "vector". And I would like to define a function > "dot" which would return a dot product of any two "vectors". I want > to call this function as follow

Re: How to make a function associated with a class?

2008-07-01 Thread [EMAIL PROTECTED]
On Jul 1, 1:43 pm, Kurda Yon <[EMAIL PROTECTED]> wrote: > Hi, > > I have a class called "vector". And I would like to define a function > "dot" which would return a dot product of any two "vectors". I want > to call this function as follow

Re: How to make a function associated with a class?

2008-07-01 Thread [EMAIL PROTECTED]
On Jul 1, 2:24 pm, Kurda Yon <[EMAIL PROTECTED]> wrote: > > By the way, "type(self)" returns the name of the class to which the > "self" belongs? > Does "instance" return "true" if the first argument belongs to the > class whose name

Python and timezones

2008-07-01 Thread [EMAIL PROTECTED]
I'm trying to write some code to deal with world timezones, and I'm getting a strange result. America/Iqaluit should not be showing up in UTC+00:00, but it is. Can anyone see what's wrong with this code? import time from datetime import datetime import os import pytz def getZoneNamesOnThisComp

Re: Trouble using pinckle

2008-07-02 Thread [EMAIL PROTECTED]
On 2 juil, 18:40, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > > > I'll also try the dictionnary method. > > > My final idea was that a dictionnary would be perhaps simple in the > > > future to save/load as XML and a parser. > > XML ? What a strange id

Generating list of possible configurations

2008-07-02 Thread [EMAIL PROTECTED]
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software I'm testing. I figured that this was something that a script could probably do pretty easily, given all

Re: site-packages, unzipepd there but import fails

2008-07-03 Thread [EMAIL PROTECTED]
On 3 juil, 18:51, defn noob <[EMAIL PROTECTED]> wrote: > well the reason i unzipped and placed it in site-packages was because > nothign happened when i ran setup.py(unzipped). What do you mean, "running setup.py unzipped" ??? The correct way to install a package is to: -

Re: Python and timezones

2008-07-03 Thread [EMAIL PROTECTED]
l 2, 11:22 am, Mensanator <[EMAIL PROTECTED]> wrote: > On Jul 2, 12:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > I'm trying to write some code to deal with world timezones, and I'm > > getting a strange result.  America/Iqaluit s

Re: Python and timezones

2008-07-03 Thread [EMAIL PROTECTED]
I found a solution: http://groups.google.com/group/comp.lang.python/browse_thread/thread/aea64448eaca4778/250e908652e2646d If I use datetime.now(tz=tz) instead of datetime(Y,M,D,h,m,s, tzinfo=tz), it works. On Jul 3, 4:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread [EMAIL PROTECTED]
On Jul 3, 8:33 pm, Nagu <[EMAIL PROTECTED]> wrote: > ... > How do I go about addressing the copyright and licensing issues? (I do > not know if licensing is the right word here). > > Please advice. > > Thank you, > Nagu I suggest you take the advice of random i

Re: Generating list of possible configurations

2008-07-04 Thread [EMAIL PROTECTED]
Wow, I didn't have time to look back on this thread for a while, surprised of the activity. Anyhow, thanks for the answers, and thanks for pointing out that the itertools-variants are not available in 2.5. Cheers! //emil -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a path from a file object

2008-07-04 Thread [EMAIL PROTECTED]
On 4 juil, 20:37, Andrew Fong <[EMAIL PROTECTED]> wrote: > Newbie question: > > Let's say I open a new file for writing in a certain path. How do I > get that path back? > > Example: > > >>> f = open('/some/path/file.ext') > >>> s

Python with Ecmascript

2008-07-05 Thread [EMAIL PROTECTED]
Hello, for my Python application (Windows platform) to be standards compliant, I need to embbed Ecmascript(Javascript) interpreter - I need to execute plugins written in this language. Which engine is suitable for Python, I have found bunch of them. Any recomendations are welcome. To be more spec

Re: re.search much slower then grep on some regular expressions

2008-07-06 Thread [EMAIL PROTECTED]
On Jul 5, 11:13 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > Apparently, grep and Tcl convert a regex to a finite state machine. ... > But not all PCREs can be converted to a finite state machine ... > Part of the problem is a lack of agreement on what > 'regular expres

Re: Elisp Lesson on file processing (make downloadable copy of a website)

2008-07-06 Thread [EMAIL PROTECTED]
In this week i wrote a emacs program and tutorial that does archiving a website for offline reading. (See http://xahlee.org/emacs/make_download_copy.html ) In the process, i ran into a problem with the unix “cp” utility. I've been a unix admin for Solaris during 1998-2004. Even the first time i l

Re: conflict between multiple installs of python (linux)

2008-07-06 Thread [EMAIL PROTECTED]
; for more information. >>> import ctypes >>> import pyglet >>> print pyglet.version 1.1beta2 >>> Try python 2.6 To see the path this is some code: import sys print sys.path print sys.prefix print sys.prefix Have a nice day ! On Jul 5, 10:04 pm, casevh <[EMAIL

Re: Python with Ecmascript

2008-07-06 Thread [EMAIL PROTECTED]
On 6 Čec, 07:02, Tim Roberts <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > >for my Python application (Windows platform) to be standards > >compliant, I need to embbed Ecmascript(Javascript) interpreter - I > >ne

Re: Python with Ecmascript

2008-07-07 Thread [EMAIL PROTECTED]
On 7 Čec, 08:21, alex23 <[EMAIL PROTECTED]> wrote: > On Jul 7, 12:31 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > I personally does not like COM solution. I prefer some simple library > > but may be it is just a hope. > > Have y

how to remove oldest files up to a limit efficiently

2008-07-08 Thread [EMAIL PROTECTED]
I need to mantain a filesystem where I'll keep only the most recently used (MRU) files; least recently used ones (LRU) have to be removed to leave space for newer ones. The filesystem in question is a clustered fs (glusterfs) which is very slow on "find" operations. To add complexity there are more

Re: Anyone happen to have optimization hints for this loop?

2008-07-09 Thread [EMAIL PROTECTED]
On 9 juil, 18:04, dp_pearce <[EMAIL PROTECTED]> wrote: > I have some code that takes data from an Access database and processes > it into text files for another application. At the moment, I am using > a number of loops that are pretty slow. I am not a hugely experienced > pyth

Re: FOSS projects exhibiting clean/good OOP?

2008-07-09 Thread [EMAIL PROTECTED]
On 9 juil, 16:38, Phillip B Oldham <[EMAIL PROTECTED]> wrote: > I'm wondering whether anyone can offer suggestions on FOSS projects/ > apps which exhibit solid OO principles, clean code, good inline > documentation, and sound design principles? This is somewhat subjective...

Re: You, spare time and SyntaxError

2008-07-09 Thread [EMAIL PROTECTED]
On 9 juil, 16:56, [EMAIL PROTECTED] wrote: > def ine(you): > yourself = "what?" > go = list("something"), list("anything") > be = "something" > please = be, yourself > yourself = "great" > fo

Re: how to remove oldest files up to a limit efficiently

2008-07-09 Thread [EMAIL PROTECTED]
On Jul 9, 8:46 am, Dan Stromberg <[EMAIL PROTECTED]> wrote: > On Tue, 08 Jul 2008 15:18:23 -0700, [EMAIL PROTECTED] wrote: > > I need to mantain a filesystem where I'll keep only the most recently > > used (MRU) files; least recently used ones (LRU) have to be removed to

Re: how to remove oldest files up to a limit efficiently

2008-07-09 Thread [EMAIL PROTECTED]
On Jul 9, 7:08 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Dan Stromberg wrote: > > On Tue, 08 Jul 2008 15:18:23 -0700, [EMAIL PROTECTED] wrote: > > >> I need to mantain a filesystem where I'll keep only the most recently > >> used (MRU) files; least recen

Symposium "Image Processing and Data Visualization" within the SEECCM 2009, Greece - Announce & Call for Papers

2008-07-10 Thread [EMAIL PROTECTED]
select the Symposium “Image Processing and Data Visualization” or send your file by email to the organizers ([EMAIL PROTECTED], [EMAIL PROTECTED]). With kind regards, Yours sincerely, The Organizers, João Manuel R. S. Tavares ([EMAIL PROTECTED]) Faculty of Engineering of University of Porto, Porto

Re: You, spare time and SyntaxError

2008-07-10 Thread [EMAIL PROTECTED]
On 10 juil, 08:53, [EMAIL PROTECTED] wrote: > > just... great !-) > > Thanks :) Nope, really, I mean it. To me, there's a clear relation between code, mathematics and poetry. I've been wanting to write some "code poems" for a long time now but never managed to

Re: Elisp Lesson on file processing (make downloadable copy of a website)

2008-07-10 Thread [EMAIL PROTECTED]
Xah Lee wrote: « ... emacs program and tutorial that does archiving a website for offline reading. (See http://xahlee.org/emacs/make_download_copy.html ) » Sashi wrote: «Why not use wget or curl?» The Emacs lisp program makes a archive of parts of website you own, so that readers of your website

Re: why is "self" used in OO-Python?

2008-07-12 Thread [EMAIL PROTECTED]
On 12 juil, 18:32, ssecorp <[EMAIL PROTECTED]> wrote: > I first learned about OO from Java. > > I much prefer to program in Python though. > > However I am consufed about 2 things. > > 1. Why do I have to pass self into every method in a class? You mean "declar

Re: Beginner Question : Iterators and zip

2008-07-12 Thread [EMAIL PROTECTED]
On 12 juil, 20:55, [EMAIL PROTECTED] wrote: > Hi group, > > I have a basic question on the zip built in function. > > I am writing a simple text file comparison script, that compares line > by line and character by character. The output is the original file, > with an X in pl

New TTF fonts in IDLE on Linux question

2008-07-12 Thread [EMAIL PROTECTED]
nd it right away, but IDLEs in Python 2.5 and 3.0 don't seem to see it. Is there some special place IDLE looks for fonts that I'm missing? http://worldgame.blogspot.com/2008/07/idle-language-games.html http://www.flickr.com/photos/[EMAIL PROTECTED]/2662994560/ Kirby -- http://mail.pyt

Re: filtering keyword arguments

2008-07-12 Thread [EMAIL PROTECTED]
On Jul 12, 10:44 pm, Amir <[EMAIL PROTECTED]> wrote: > How do you filter keyword arguments before passing them to a function? > > For example: > > def f(x=1): return x > > def g(a, **kwargs): print a, f(**kwargs) > > In [5]: g(1, x=3) > 1 3 > > In [

new python podcast

2008-07-14 Thread [EMAIL PROTECTED]
http://www.podango.com/tag/python I just started to play with this and I wanted to know if there is any interest in this sort of thing now that the last (maybe I should say most proliffic) python podcaster has stopped being active.. I would also be intrested in knowing if there is a particular bi

Re: Moving to functional programming

2008-07-14 Thread [EMAIL PROTECTED]
On 14 juil, 11:51, James Fassett <[EMAIL PROTECTED]> wrote: > On Jul 12, 12:18 am, George Sakkis <[EMAIL PROTECTED]> wrote: > > > It relies on positional arguments, tuple unpacking and > > the signature of zip(), > > It moreso relies on the fact that: > &

Re: iterator clone

2008-07-14 Thread [EMAIL PROTECTED]
On 13 juil, 12:05, Yosifov Pavel <[EMAIL PROTECTED]> wrote: (snip) > def cloneiter( it ): > """return (clonable,clone)""" > return tee(it) This might as well be written as cloneiter = tee Or yet better, just remove the above code and s

Re: while var, but var ==16 != true

2008-07-14 Thread [EMAIL PROTECTED]
On 14 juil, 07:32, Tim Roberts <[EMAIL PROTECTED]> wrote: (snip) > Everything has a boolean value in > Python. 0, None, False, '' (empty string), [] (empty list), () (empty > tuple), and {} (empty dictionary) all have a False value. Everything else > has a True valu

How to write a custom tracer/profiler?

2008-07-14 Thread [EMAIL PROTECTED]
Hi, all, Just wanna look for some suggestions on how to appoarch this problem... I have some code ("main logic") which has a dependency on a library. Let's call it DS. ("data source"). The main logic will issue a number of calls to the DS in order to get the data it needs and then carry out some

Re: Method behavior for user-created class instances

2008-07-15 Thread [EMAIL PROTECTED]
On 15 juil, 01:24, [EMAIL PROTECTED] wrote: > Greetings. > > I am looking for a way to achieve method behavior for a class I > created. That is, it has a __call__ method, so can be called like a > function. But I also want it to be treated as a method when it appears > in a cla

Re: Amazon: "Practical Django Projects" by James Bennett (June 2008)

2008-07-17 Thread [EMAIL PROTECTED]
On 16 juil, 10:35, Stefan Scholl <[EMAIL PROTECTED]> wrote: > Dave U. Random <[EMAIL PROTECTED]> wrote: > > >http://snipr.com/PracticalDjango > > June 2008 is a bit too early. Django isn't ready. Oh, really ? Too bad. But, wait... If Django isn't ready, w

Re: How can i use a variable without define it ?

2008-07-17 Thread [EMAIL PROTECTED]
On 16 juil, 11:06, zhw <[EMAIL PROTECTED]> wrote: > On 7月16日, 下午4时47分, Ben Finney <[EMAIL PROTECTED]> > wrote: > > > > > zhw <[EMAIL PROTECTED]> writes: > > > How can i use a variable without define it ? > > > What do you mean b

Re: interpreter vs. compiled

2008-07-18 Thread [EMAIL PROTECTED]
On Jul 18, 2:31 pm, castironpi <[EMAIL PROTECTED]> wrote: > Given that, what does that column indicate? Offset. -- http://mail.python.org/mailman/listinfo/python-list

Re: storing references instead of copies in a dictionary

2008-07-18 Thread [EMAIL PROTECTED]
On 17 juil, 15:56, mk <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: > > To your actual problem... Why do you wanna do this anyway? If you want > > to change the function in the dictionary, why don't you simply define > > the functions you'll want to use,

Re: property getter with more than 1 argument?

2008-07-18 Thread [EMAIL PROTECTED]
On 17 juil, 16:57, mk <[EMAIL PROTECTED]> wrote: > It seems like getter is defined in such way that it passes only 'self': > > class FunDict(dict): > def __init__(self): > self.fundict = dict() What's the use of inheriting from dict he

Re: substitution of list elements

2008-07-18 Thread [EMAIL PROTECTED]
On 18 juil, 14:33, antar2 <[EMAIL PROTECTED]> wrote: > I want to replace each first element in list 5 that is equal to the > first element of the list of lists4 by the fourth element. I wrote > following code that does not work: > > list4 = [['1', 'a',

proliferation of computer languages

2008-07-18 Thread [EMAIL PROTECTED]
Today, i took sometime to list some major or talked-about langs that arose in recent years. Here's the result: http://xahlee.org/UnixResource_dir/writ/new_langs.html Plain text version follows. - There is a proliferation of computer languages today like never

atan2 weirdness

2008-07-19 Thread [EMAIL PROTECTED]
hi atan2 is supposed to return the angle to x-axis when given y and x, I suppose if I take [x,y] to one full circle, I should get 0-360 degree back but no, I get 3 full revolutions! maybe my understanding is wrong. from math import * def f(ang): a=ang if a>360: a-=360 if a>360: a-=360 if

Solutions Fast Track - Monitoring and Intrusion

2008-07-20 Thread [EMAIL PROTECTED]
Dear Reader, Designing for Detection - Get the right equipment from the start. Make sure all of the features you need, or will need, are available from the start. - Know your environment. Identify potential physical barriers and possible sources of interference. -

Re: Web Page Construction in Python

2008-07-22 Thread [EMAIL PROTECTED]
Also, look at: http://www.djangoproject.com/ /Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: proliferation of computer languages

2008-07-22 Thread [EMAIL PROTECTED]
into by my essay, with proper credits. (this esp has happened in my Python tutorial, emacs lisp tutorial, java tutorial, various classical literature on my site) Actually, most accusations about me falls apart if one just take 10 min to check the facts. • When i used my google email account to p

Re: maximum value in a column of file

2008-07-23 Thread [EMAIL PROTECTED]
> > thank you for your answer > > actually i've to do some statistics (maximum,minimum,mean,standard > > deviation,) of a file of data in which each column is a particular > > type of data. (the file is a tab separated value). > > I was trying to do this by using python (usually i work with for

Segv in mmap.move()

2008-07-23 Thread [EMAIL PROTECTED]
Does anyone recognize this little Python crasher? I'll file a bug report unless someone notices it as an already documented bug. I found some open mmap bugs, but it wasn't obvious to me that this problem was one of those... Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3

Confounded by Python objects

2008-07-24 Thread [EMAIL PROTECTED]
Hello group, take a look at the code snippet below. What I want to do is initialize two separate Channel objects and put some data in them. However, although two different objects are in fact created (as can be seen from the different names they spit out with the "diag()" method), the data in the

Re: Confounded by Python objects

2008-07-24 Thread [EMAIL PROTECTED]
On Jul 24, 11:59 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > tip: if you're not 100% sure why you would want to put an attribute > on the class level, don't do it. The reason I did it was sort of C++ish (that's where I come from): I somehow wanted a list of attribut

Rifle & Ammunition Retail Store - Sportsman, Wildlife and Outdoor Supply

2008-07-27 Thread [EMAIL PROTECTED]
Giuen Interpose & Outright Company – Huntingrifle, Ammunition, Optics, Navigation – Surplus Rifle Sale – Pre-Owned Rifles – Precision Rifle - Pistol A New Generation Outright Company begun in 2008 the funding for a battlefield data link that projected data onto a computer screen inside for exampl

write unsigned integer 32 bits to socket

2008-07-27 Thread [EMAIL PROTECTED]
hi i want to send unsigned 32 bit integer to socket, and looking for something equivalent to this method... http://livedocs.adobe.com/flex/2/langref/flash/net/Socket.html#writeUnsignedInt() is there such method / library available in python?! this is as far as i have gotten along >>> s = socket

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread [EMAIL PROTECTED]
On Sun, Jul 27, 2008 at 7:01 PM, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> i want to send unsigned 32 bit integer to socket, and looking for >> something equivalent to this method... >> http://livedocs.adobe.com/flex/2/langref/flash/net/S

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread [EMAIL PROTECTED]
On Sun, Jul 27, 2008 at 7:17 PM, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> On Sun, Jul 27, 2008 at 7:01 PM, Larry Bates <[EMAIL PROTECTED]> >> wrote: >>> [EMAIL PROTECTED] wrote: >>>> i want to send unsigned 32 bit i

Callback Python procedure from Delphi DLL

2008-07-28 Thread [EMAIL PROTECTED]
Hi! I have a component, and a tool in Delphi. I wanna call it from Python. I can implement all things I need into a Delphi generated DLL. It is ok, I can use this DLL from Python, but the DLL procedure needs a callback procedure to return the partially output, and needs a python passed variable

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread [EMAIL PROTECTED]
On Mon, Jul 28, 2008 at 5:45 AM, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Alan Franzoni wrote: >> >> Michael Torrie was kind enough to say: >> >>> Of course any time you send coherent numbers over the network, I highly >>> recommend you use w

Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's) msci stock index returns. http://www.mscibarra.com/webapp/indexperf/excel?priceLevel=0&scope=0¤cy=15&style=C&size=36&market=1897&asOf=Jul+25%2C+2008&export=Excel_IE

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi - experienced programmer but this is my first Python program. > > This URL will retrieve an excel spreadsheet containing (that day's) > msci stock index returns. > > http://www.mscibarra.

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:29 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > On Jul 28, 3:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> Hi - experienced programmer but this is my first Python

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 28, 3:29 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] schrieb: > > > > On Jul 28, 3:00 pm, "[EMAIL PROTECTED]" <

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 3:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Jul 28, 3:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> On Jul 2

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 4:04 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 28, 3:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > wrote: > >

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 4:20 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Jul 28, 3:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > >> On Mon, Jul

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 5:39 pm, MRAB <[EMAIL PROTECTED]> wrote: > On Jul 29, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > On Jul 28, 4:20 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > > On Mon, Jul 28,

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 6:05 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 28, 2008 at 9:39 PM, MRAB <[EMAIL PROTECTED]> wrote: > > On Jul 29, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> On Jul 28, 4:20 pm, "Guilh

Re: Download excel file from web?

2008-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 6:05 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 28, 2008 at 9:39 PM, MRAB <[EMAIL PROTECTED]> wrote: > > On Jul 29, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> On Jul 28, 4:20 pm, "Guilh

Re: block/lambda

2008-07-29 Thread [EMAIL PROTECTED]
> 2. Will it be possible in Python 3.0 to do the following: > > >>> def dotimes(n, callable): > >         for i in range(n): callable() > > >>> def block(): > >         nonlocal i >         for j in range(i): >                 print j, >         print dotimes seems ok and what is wrong with that

Re: How can I check nbr of cores of computer?

2008-07-29 Thread [EMAIL PROTECTED]
On Jul 29, 7:44 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Jul 29, 5:53 pm, defn noob <[EMAIL PROTECTED]> wrote: > > > How can I check how many cores my computer has? > > Is it possible to do this in a Python-app? > > If you're using Windows, get Py

<    40   41   42   43   44   45   46   47   48   49   >