Re: Change value of element in list

2006-06-19 Thread Rony Steelandt
> Hi, > > I'm doing python tutorial, >> http://docs.python.org/tut/node5.html > > and I have these, > > lists = ['spam', 'eggs', 100, 1234] > lists[2] = lists[2] + 23 > > I expected this, > lists = ['spam', 'eggs', 123, 1234] > > but got this, > lists = ['spam', 'eggs', 100, 1234] > > What's my pro

Re: aligning SGML to text

2006-06-19 Thread Gerard Flanagan
Steven Bethard wrote: > Gerard Flanagan wrote: > > Steven Bethard wrote: > >> I have some plain text data and some SGML markup for that text that I > >> need to align. (The SGML doesn't maintain the original whitespace, so I > >> have to do some alignment; I can't just calculate the indices direc

Re: wxPython GUI designer

2006-06-19 Thread jean-michel bain-cornu
[EMAIL PROTECTED] a écrit : > I am newbie learning wxPython. I tried using GUI designer called > wxGlade. When it generated code I couldnt get the same level of > flexibility as writing the code by oneself. > > Any view on what you think about using GUI designer tools. > > Every help is appreciat

Re: wxPython GUI designer

2006-06-19 Thread Rony Steelandt
> >> I am newbie learning wxPython. I tried using GUI designer called >> wxGlade. When it generated code I couldnt get the same level of >> flexibility as writing the code by oneself. >> >> Any view on what you think about using GUI designer tools. >> >> Every help is appreciated. >> > Boa is ex

Re: any subway web dev experiences

2006-06-19 Thread bruno at modulix
a wrote: > subway is pythons ruby on rails competitor Nope - it's a Python MVC web framework. Like Django, Pylons and Turborgears. And FWIW, there have been recently some discussions about merging Subway and Turbogears. > pls tell me if u hav any expereinces Please take time to learn and write r

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Torben Ægidius Mogensen
Raffael Cavallaro <[EMAIL PROTECTED]'espam-s'il-vous-plait-mac.com> writes: > This is purely a matter of programming style. For explorative > programming it is easier to start with dynamic typing and add static > guarantees later rather than having to make decisions about > representation and have

Re: Python is fun (useless social thread) ;-)

2006-06-19 Thread Max M
bruno at modulix wrote: >> Or did you just like what you saw and decided to learn it for fun? > > Well, I haven't be really impressed the first time - note that it was at > the very end of the last century, with v1.5.2. 1.5.2 was an excellent version. Not really that different in use than cur

Re: [OT] code is data

2006-06-19 Thread bruno at modulix
Anton Vredegoor wrote: > With the inclusion of ElementTree (an XML-parser) in Python25 and recent > developments concerning JSON (a very Pythonesque but somewhat limited > XML notation scheme, let's call it statically typed XML) JSON stands for JavaScript Object Notation, and has *nothing* to do w

Re: code is data

2006-06-19 Thread bruno at modulix
BJörn Lindqvist wrote: >> Personally, I would like to see macros in Python (actually Logix >> succeeding is good enough). But I am no language designer and the >> community has no interest in it. When I absolutely need macros, I will >> go elsewhere. > > > One must wonder, when is that? When do y

Re: code is data

2006-06-19 Thread bruno at modulix
Ravi Teja wrote: > BJörn Lindqvist wrote: > >>>Personally, I would like to see macros in Python (actually Logix >>>succeeding is good enough). But I am no language designer and the >>>community has no interest in it. When I absolutely need macros, I will >>>go elsewhere. >> >>One must wonder, when

Re: any subway web dev experiences

2006-06-19 Thread Fredrik Lundh
bruno at modulix wrote: > Nope - it's a Python MVC web framework. Like Django, Pylons and > Turborgears. And FWIW, there have been recently some discussions about > merging Subway and Turbogears. recently? was that before or after the developer picked up his marbles and went home to complain to

Check if a file is closed

2006-06-19 Thread camillo
How to check if a file is closed? On Win32 you can call CreateFile with write and share write and if it raises an error, the file is closed. How to do it in Python??? Thanks, Camillo -- http://mail.python.org/mailman/listinfo/python-list

Re: code is data

2006-06-19 Thread bruno at modulix
Ravi Teja wrote: (snip) > Annoted variables, symbols and code > layout visually cue more efficiently to the object nature than do > explicit text definitions. Of course, this is only sensible when there > aren't too many of any of those. In that case, the cognitive cost of > notation outweighs the

Re: Tetris

2006-06-19 Thread [EMAIL PROTECTED]
pygame.org is what you need it has tutorials it's cool -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Rob Thorpe
Torben Ægidius Mogensen wrote: > "Rob Thorpe" <[EMAIL PROTECTED]> writes: > > > Torben Ægidius Mogensen wrote: > > > > That's the point: Bugs that in dynamically typed languages would > > > require testing to find are found by the compiler in a statically > > > typed language. So whil eit may take

Re: Seeking regex optimizer

2006-06-19 Thread Kay Schluehr
Mirco, with "special characters" I mentioned control characters of regular expressions i.e. one of ".^$()?[]{}\|+*" but not non ascii-127 characters. For a workaround you simply have to "mangle" those using an escape control character: REGEXCHAR = ".^$()?[]{}\\|+*" def mangle(s): pattern = [

Re: Check if a file is closed

2006-06-19 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > How to check if a file is closed? >>> f = open('trashme.txt', 'w') >>> f >>> dir(f) ['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__iter__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'close', '

Does anyone find what is fun in programming...?

2006-06-19 Thread Mohamad Nazzal
You all suck.   Am a programmer, and I must confess that I am dumb since am a programmer. Stop being silly and talk about programming as if you’re writing a beautiful story. You’re not more than coding generators. It’s the most boring work that anybody can imagine. Am a computer sciences

RE: Check if a file is closed

2006-06-19 Thread Tim Golden
[EMAIL PROTECTED] | How to check if a file is closed? | | On Win32 you can call CreateFile with write and share write and if it | raises an error, the file is closed. | | How to do it in Python??? It's not clear whether you want a cross-platform Python-only solution. But if all you want is a wa

Just out of curiosity: Which languages are they using at Google and what for?

2006-06-19 Thread alainpoint
I know Google are using Python for testing purposes. But for the rest ? is it PHP or Java or .NET? Which technology is rendering the google main page? And of course th obvious question, why not Python? Alain -- http://mail.python.org/mailman/listinfo/python-list

Re: Noob script needs some input: CVS PatchMaker

2006-06-19 Thread Holger
John Machin wrote: > > Any feedback on what would be "the pythonic way" to do this would be > > much appreciated! --snip-- > > IMHO that flight of geese heading equatorwards for winter is not Xic for > any language X. Compare with: He he, good point. > 2nd comment: Make a habit of NOT using the

memory-leak in pysqlite 2.3.0 ?

2006-06-19 Thread Michael Husmann
After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a sqlite database increases memory consumption heavily. A similar program with Ruby and sqlite-ruby 1.1.0 does not affect memory consumption at all. Here a short example: --- #!/usr/bin/env python impor

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Torben Ægidius Mogensen
"Rob Thorpe" <[EMAIL PROTECTED]> writes: > Torben Ægidius Mogensen wrote: > > "Rob Thorpe" <[EMAIL PROTECTED]> writes: > > > > > Torben Ægidius Mogensen wrote: > > > > Indeed. So use a language with type inference. > > Well, for most purposes that's the same as dynamic typing since the > compile

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread George Neuner
On 19 Jun 2006 10:19:05 +0200, [EMAIL PROTECTED] (Torben Ægidius Mogensen) wrote: >If you don't have definitions (stubs or complete) of the functions you >use in your code, you can only run it up to the point where you call >an undefined function. So you can't really do much exploration until >y

Re: Python with Eclipse

2006-06-19 Thread Dennis Benzinger
Stan Cook wrote: > I've been trying to use Eclipse with Python on Linux for a while and > have noticed something odd. After running the code or debugging a few > times, its responsiveness gets really bad. Upon checking the equivalent > of the task manager, I find several instances of Python ru

Yet Another Python Blog

2006-06-19 Thread Miki
Hello All, Decided that there are not enough blogs out there so http://pythonwise.blogspot.com/ is up :) This blog will feature a weekly (or about) Python code examples. I'll be glad to hear your comments. Miki, http://pythonwise.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-

Re: Just out of curiosity: Which languages are they using at Google and what for?

2006-06-19 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > I know Google are using Python for testing purposes. Not only: """ Where is Python used? * The Google build system is written in python. All of Google's corporate code is checked into a repository and the dependency and building of this code is managed by python.

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-19 Thread K P S
Thanks a lot. I'm really new to python, and haven't coded in over a decade, so please be patient. :-) I'm able to read a .jpg from a .zip archive, but can't seem to manipulate it. If I do this: zip=zipfile.ZipFile(inURL,mode="r") picture=zip.read("00.jpg") I get the image, but it is of "type"

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-19 Thread Ant
Try adapting the other posters example with something like: import Image, StringIO zip=zipfile.ZipFile(inURL,mode="r") picture=zip.read("00.jpg") image = Image.open(StringIO(picture)) image.thumbnail ((128,128), Image.ANTIALIAS) image.save (file + '.thumb.png') I haven't tested it, but some

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-19 Thread Fredrik Lundh
K P S wrote: > I'm able to read a .jpg from a .zip archive, but can't seem to > manipulate it. If I do this: > > zip=zipfile.ZipFile(inURL,mode="r") > picture=zip.read("00.jpg") > > I get the image, but it is of "type" ZipFile. string, more likely (zip is a ZipFile object, picture is a string

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-19 Thread Fredrik Lundh
K P S wrote: > What I want is a little more involved, I guess, since I > don't know the name of the file (for the zip.read command) the first example on this page shows you how to get the names of all files in a zip file: http://effbot.org/librarybook/zipfile.htm -- http://mail.python.

Re: Python with Eclipse

2006-06-19 Thread Fabio Zadrozny
On 6/18/06, Stan Cook <[EMAIL PROTECTED]> wrote: I've been trying to use Eclipse with Python on Linux for awhile and have noticed something odd.  After running thecode or debugging a few times, its responsiveness getsreally bad.  Upon checking the equivalent of the task manager, I find several inst

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Torben Ægidius Mogensen
George Neuner writes: > On 19 Jun 2006 10:19:05 +0200, [EMAIL PROTECTED] (Torben Ægidius > Mogensen) wrote: > >I expect a lot of the exploration you do with incomplete programs > >amount to the feedback you get from type inference. > > The ability to write functions and test them immediately wi

Amara installation

2006-06-19 Thread mirandacascade
O/S WinXP Home Vsn of Python: 2.4 Wish to install Amara. Using amara-allinone-1.0.win32-py2.4.exe (2965KB) Forder structure before installation: c: python24 DLLs Doc Include Lib site-packages [previously installed stuff] libs scripts tcl tools Wh

Re: Passing data to system command

2006-06-19 Thread Chris Hieronymus
Hi, Holy mackerel, this really works; thanks a lot, guys. I played around a little bit with the suggestions by faulkner and hdante and pieced together the following script. I like this very much because I can write a bunch of data to the pipe, rather than making one big string containing p

Re: Python is fun (useless social thread) ;-)

2006-06-19 Thread H J van Rooyen
Bruno wrote: 8<(snip)-- | The answer is 42. That's all you need to know. Right on, Ford Prefect !!! What's for Lunch? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: pyfcp

2006-06-19 Thread Thomas Moore
> http://www.python.org/pyfcp > It gets me to Error 404. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyfcp

2006-06-19 Thread aum
On Mon, 19 Jun 2006 14:45:19 +0800, Thomas Moore wrote: >> http://www.python.org/pyfcp >> > > It gets me to Error 404. Apologies - that URL should have been: http://www.python.org.nz/pyfcp -- Cheers aum -- http://mail.python.org/mailman/listinfo/python-list

Re: Detecting key presses

2006-06-19 Thread peter
Not a stupid question at all - its something I was looking for, and was (and still am) surprised not to find a cross platform implementation. It must be possible - for a short while I dabbled with yabasic and there the same source code would recognise a keypress in both Windows and Linux. My solut

comparing two arrays

2006-06-19 Thread Sheldon
Hi, I have two arrays that are identical and contain 1s and zeros. Only the ones are valid and I need to know where both arrays have ones in the same position. I thought logical_and would work but this example proves otherwise: >>> a = [0,1,2,5,6,6] >>> b = [5,4,1,6,4,6] >>> Numeric.logical_and(a=

Re: Seeking regex optimizer

2006-06-19 Thread John Machin
On 19/06/2006 7:06 PM, Kay Schluehr wrote: > Mirco, > > with "special characters" I mentioned control characters of regular > expressions i.e. one of ".^$()?[]{}\|+*" but not non ascii-127 > characters. > > For a workaround you simply have to "mangle" those using an escape > control character: >

Re: [OT] code is data

2006-06-19 Thread Anton Vredegoor
bruno at modulix wrote: > I still don't get the point. Well, I've got to be careful here, lest I'd be associated with the terr.., eh, the childp..., eh the macro-enablers. The idea is to have a way to transform a Python (.py) module into XML and then do source code manipulations in XML-space u

Re: comparing two arrays

2006-06-19 Thread Diez B. Roggisch
Sheldon wrote: > Hi, > > I have two arrays that are identical and contain 1s and zeros. Only the Obviously they aren't identical. They may be of same size. > ones are valid and I need to know where both arrays have ones in the > same position. I thought logical_and would work but this example p

crawlers in python with graphing?

2006-06-19 Thread bryan rasmussen
Hi I'm wondering if there is a toolkit in python anywhere for doing at a high level web crawling, dumping links to a data set that could be imported into R relatively easy or used in python natively to generate a graph over the website. It should hopefully be as high level as Wget, not download

interactive multi-file search and replace

2006-06-19 Thread Ryan Krauss
I need to do some searching and replacing in about 10 latex files. Does anyone have an existing script that does this on an interactive basis? I would like to show each match and ask whether or not it should be replaced. This seems like a fairly common task and I don't want to re-invent the wheel

Re: code is data

2006-06-19 Thread Michele Simionato
John Roth wrote: > I saw the "make" statement as a breath of fresh air. > Then it got shot down for what were, to me, totally > trivial reasons. Which reasons? I as I recall, Guido cut it out without giving any reason. Of course Guido has the right to do so, but it is not respectful of all the wo

Re: [Python-Dev] The baby and the bathwater (Re: Scoping, augmented assignment, 'fast locals' - conclusion)

2006-06-19 Thread Boris Borcic
Hello, just a couple points On 6/17/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: [errors involving the shadowing of a variable by another] > > Of course everybody makes errors, but it doesn't follow from this, that > > all make the same errors, or should. > > If I implied that everyone has

Re: copyfile avoiding overwrites and race conditions

2006-06-19 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Here is a code fragment, where I am trying to copy a file, avoiding > overwrites and race conditions. The filename gets a '02','03','04' etc > appended to the end if a file with that name already exists. > > I know the writing of the single space is overkill, but I am s

Tix Tree / HList widget?

2006-06-19 Thread Tim N. van der Leeuw
Hi, I need to display some hierarchical data, and because I don't want to force users to install too many things beyond Python itself, I'm hoping to use Tix which is at least included with Python. I've managed to use the Tix HList widget to display a tree of items (at least in a proof-of-concept

Re: Detecting key presses

2006-06-19 Thread blue99
> Someone suggested using curses, but that does crazy things with my > output, and leaves the terminal unusable after the program closes. It's very good suggestion but you should use also initscr and endwin functions. Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] code is data

2006-06-19 Thread bruno at modulix
Anton Vredegoor wrote: > bruno at modulix wrote: > >> I still don't get the point. > > > Well, I've got to be careful here, lest I'd be associated with the > terr.., eh, the childp..., eh the macro-enablers. > > The idea is to have a way to transform a Python (.py) module into XML > and then do

Re: comparing two arrays

2006-06-19 Thread Bas
You are comparing a normal python list to a constant, which are obviously unequal. Try converting your lists to arrays first (untested): import numeric/numpy as N a =N.array([0,1,2,5,6,6]) b = N.array([5,4,1,6,4,6]) print a==6 and b==6 print N.where(a==6 and b==6) hth, Bas Sheldon wrote: > Hi,

Re: wxPython GUI designer

2006-06-19 Thread DarkBlue
Take a look at pythoncard , we use it to produce database frontends , but apparently it also can be used for simple graphics apps and others. However if you are used to things like the Delphi IDE to build a gui app , then prepare to shed lots of tears before overcoming the initial disbelieve, th

Re: comparing two arrays

2006-06-19 Thread Diez B. Roggisch
Diez B. Roggisch wrote: > print [i for i, _ in enumerate((None for v in zip(a, b) where v == > (1,1)))] > > should give you the list of indices. I musunderstood your question. Use print [i for i, _ in enumerate((None for x, y in zip(a, b) where x == y))] instead. Diez -- http://mail.python.

Re: wxPython GUI designer

2006-06-19 Thread Luis M. González
[EMAIL PROTECTED] wrote: > I am newbie learning wxPython. I tried using GUI designer called > wxGlade. When it generated code I couldnt get the same level of > flexibility as writing the code by oneself. > > Any view on what you think about using GUI designer tools. > > Every help is appreciated.

Re: mapping None values to ''

2006-06-19 Thread imho
Roberto Bonvallet ha scritto: > imho <[EMAIL PROTECTED]>: >> map(lambda x:"" , [i for i in [a,b,c] if i in ("None",None) ]) > > You don't need map when using list comprehensions: > >["" for i in [a, b, c] if i in ("None", None)] > I know that... I tried to match the idiom used by the o.p. :

Re: [OT] code is data

2006-06-19 Thread Laurent Pointal
bruno at modulix a écrit : > Anton Vredegoor wrote: >> bruno at modulix wrote: >> >>> I still don't get the point. >> >> Well, I've got to be careful here, lest I'd be associated with the >> terr.., eh, the childp..., eh the macro-enablers. >> >> The idea is to have a way to transform a Python (.py

Re: Amara installation

2006-06-19 Thread tjreedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > O/S WinXP Home > Vsn of Python: 2.4 > > Wish to install Amara. Using amara-allinone-1.0.win32-py2.4.exe > (2965KB) > > Forder structure before installation: > > c: > python24 >DLLs >Doc >Include >Lib > site-packa

Re: Just out of curiosity: Which languages are they using at Google and what for?

2006-06-19 Thread Alex Martelli
bruno at modulix <[EMAIL PROTECTED]> wrote: ... > * Packaging. Google has an internal packaging format like RPM. > These packages are created using python. > * Binary Data Pusher. This is the area where Alex Martelli is > working, on optimizing pushing bits between thousands of server

Re: Just out of curiosity: Which languages are they using at Google and what for?

2006-06-19 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > I know Google are using Python for testing purposes. ...and many more besides, as per the other response. > But for the rest ? > is it PHP or Java or .NET? > Which technology is rendering the google main page? I think you can get a reasonable idea by perusing the 80

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Chris Smith
Torben Ægidius Mogensen <[EMAIL PROTECTED]> wrote: > That's not really the difference between static and dynamic typing. > Static typing means that there exist a typing at compile-time that > guarantess against run-time type violations. Dynamic typing means > that such violations are detected at r

Installing Python on Windows Vista

2006-06-19 Thread Padraig
Hi all, Just a quick question... when I try to install Python on Windows Vista Beta 2 the installer seems to hang after I select the destination folder, saying that it will "return when it has finished calculating disk space requirements". I just can't seem to get past that step. I've also tried i

Formatted string to object

2006-06-19 Thread janama
Hi, can such a thing be done somehow? aaa = self.aaa bbb = %s.%s % ('parent', 'bbb') Can you use strings or %s strings like in the above or aaa = 'string' aaa.%s() % 'upper' Somehow? Thanks for taking a look at this Regards Janama -- http://mail.python.org/mailman/listinfo/python-list

Re: crawlers in python with graphing?

2006-06-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, bryan rasmussen wrote: > It should hopefully be as high level as Wget, not download the pages > but just follow the links, and output graphs. How do you get at the links without downloading the page!? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailm

Re: memory-leak in pysqlite 2.3.0 ?

2006-06-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Michael Husmann wrote: > After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a > sqlite database increases memory consumption heavily. […] > > Here a short example: > --- > #!/usr/bin/env python > > import os > from pysqlite2 imp

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Rob Thorpe
Chris Smith wrote: > Torben Ægidius Mogensen <[EMAIL PROTECTED]> wrote: > > That's not really the difference between static and dynamic typing. > > Static typing means that there exist a typing at compile-time that > > guarantess against run-time type violations. Dynamic typing means > > that such

Re: [OT] code is data

2006-06-19 Thread Fredrik Lundh
Laurent Pointal wrote: >>> The idea is to have a way to transform a Python (.py) module into XML >>> and then do source code manipulations in XML-space using ElementTree. >> >> My my my... I'm not against the idea of dynamic source code >> transformation, but for heaven's sake, *why* would one pu

Re: pyfcp

2006-06-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, aum wrote: > On Mon, 19 Jun 2006 14:45:19 +0800, Thomas Moore wrote: > >>> http://www.python.org/pyfcp >>> >> >> It gets me to Error 404. > > Apologies - that URL should have been: > > http://www.python.org.nz/pyfcp I get: Unknown host www.python.org.nz Ciao,

Re: Installing Python on Windows Vista

2006-06-19 Thread [EMAIL PROTECTED]
Padraig wrote: > Hi all, > > Just a quick question... when I try to install Python on Windows Vista > Beta 2 the installer seems to hang after I select the destination > folder, saying that it will "return when it has finished calculating > disk space requirements". I just can't seem to get past t

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-19 Thread meyer
Roel Schroeven wrote: > [EMAIL PROTECTED] schreef: > > * The code created by the Windows GCC is not as good as the one created > > by the Microsoft compiler > > Isn't Python for other platforms built with GCC? Seems to me that if it > GCC is good enough for other platforms, it's good enough for Win

Re: comparing two arrays

2006-06-19 Thread Robert Kern
Bas wrote: > You are comparing a normal python list to a constant, which are > obviously unequal. Try converting your lists to arrays first > (untested): > > import numeric/numpy as N > a =N.array([0,1,2,5,6,6]) > b = N.array([5,4,1,6,4,6]) > print a==6 and b==6 > print N.where(a==6 and b==6) Car

Re: Installing Python on Windows Vista

2006-06-19 Thread Padraig
[EMAIL PROTECTED] wrote: > Padraig wrote: > > Hi all, > > > > Just a quick question... when I try to install Python on Windows Vista > > Beta 2 the installer seems to hang after I select the destination > > folder, saying that it will "return when it has finished calculating > > disk space require

Re: pyfcp

2006-06-19 Thread Fredrik Lundh
Marc 'BlackJack' Rintsch wrote: >> http://www.python.org.nz/pyfcp > > I get: Unknown host www.python.org.nz for future announcements, I'd recommend using: http://www.google.com/search?q=pyfcp -- http://mail.python.org/mailman/listinfo/python-list

Re: [pysqlite] memory-leak in pysqlite 2.3.0 ?

2006-06-19 Thread Gerhard Häring
Michael Husmann wrote: >> Michael Husmann wrote: >>> After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a >>> sqlite database increases memory consumption heavily. A similar program >>> with Ruby and sqlite-ruby 1.1.0 does not affect memory consumption at >>> all. >>> [...] >>> Pyth

Re: Formatted string to object

2006-06-19 Thread Tim Chase
> Can you use strings or %s strings like in the above or > > aaa = 'string' > aaa.%s() % 'upper' > > Somehow? Looks like you want to play with the eval() function. >>> aaa = 'hello' >>> result = eval("aaa.%s()" % 'upper') >>> result 'HELLO' Works for your second example. May work on your f

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Pascal Costanza
Chris Smith wrote: > Torben Ægidius Mogensen <[EMAIL PROTECTED]> wrote: >> That's not really the difference between static and dynamic typing. >> Static typing means that there exist a typing at compile-time that >> guarantess against run-time type violations. Dynamic typing means >> that such vio

Re: code is data

2006-06-19 Thread Kay Schluehr
Ravi Teja wrote: > People have however written various language interpreters (Scheme, > Forth and yes, even Basic) in Python, just for kicks. Still does not > make it a DSL language anymore than it makes C a DSL language. > > At present, the closest thing to writing a DSL in Python is Logix > htt

Re: transfer rate limiting in socket.py

2006-06-19 Thread Peter Silva
I looked at twisted briefly. It looks like it is server oriented. Does it work in for clients initiating connections? Jean-Paul Calderone wrote: > On 16 Jun 2006 13:53:48 -0700, Peter Silva <[EMAIL PROTECTED]> wrote: > >Hi folks, > > > >I have a need in a network data distribution application t

multithreading windows and embedding python

2006-06-19 Thread freesteel
I have posted about this problem before. SInce then I found a much better article to help with embedding python in a multithreaded application: http://www.linuxjournal.com/article/3641 I found this article very good and it clarified for me what needs doing. Now I have an example application that

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Chris Smith
Rob Thorpe <[EMAIL PROTECTED]> wrote: > A language is latently typed if a value has a property - called it's > type - attached to it, and given it's type it can only represent values > defined by a certain class. I'm assuming you mean "class" in the general sense, rather than in the sense of a sp

Re: Formatted string to object

2006-06-19 Thread bruno at modulix
Tim Chase wrote: >> Can you use strings or %s strings like in the above or >> >> aaa = 'string' >> aaa.%s() % 'upper' >> >> Somehow? > > > Looks like you want to play with the eval() function. > aaa = 'hello' result = eval("aaa.%s()" % 'upper') result > 'HELLO' Using eval() or ex

Re: Getting output from external programs...

2006-06-19 Thread Ten
On Monday 19 June 2006 03:44, Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Ten <[EMAIL PROTECTED]> wrote: > > >You can do this in various ways, ranging from the very simple and not very > > good > > > >from commands import getoutput > > > >x=getoutput(command) > > > > > >- to your more

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-19 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Also, there are many free software programs that use special > features of GCC and cannot be compiled using another compiler. This is precisely what bothers me about standardizing on GCC -- lock-in is lock-in whether you must pay cash or not. --Scott David Daniels

Re: Formatted string to object

2006-06-19 Thread Steven Bethard
janama wrote: > can such a thing be done somehow? > > aaa = self.aaa > bbb = %s.%s % ('parent', 'bbb') > > Can you use strings or %s strings like in the above or > > aaa = 'string' > aaa.%s() % 'upper' Use the getattr() function:: >>> class parent(object): ... class bbb(object):

Re: Formatted string to object

2006-06-19 Thread bruno at modulix
janama wrote: > Hi, > > can such a thing be done somehow? > > > aaa = self.aaa > bbb = %s.%s % ('parent', 'bbb') Given the first line, I assume this is inside a method body, and parent is a local var. Then the answer is: bbb = getattr(locals()['parent'], 'bbb') read the doc for these two func

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread George Neuner
On 19 Jun 2006 13:53:01 +0200, [EMAIL PROTECTED] (Torben Ægidius Mogensen) wrote: >George Neuner writes: > >> On 19 Jun 2006 10:19:05 +0200, [EMAIL PROTECTED] (Torben Ægidius >> Mogensen) wrote: > >> >I expect a lot of the exploration you do with incomplete programs >> >amount to the feedback you

Pydev 1.2.0 Released

2006-06-19 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.2.0 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: -

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Chris Smith
Pascal Costanza <[EMAIL PROTECTED]> wrote: > Types can be represented at runtime via type tags. You could insist on > using the term "dynamically tagged languages", but this wouldn't change > a lot. Exactly _because_ it doesn't make sense in a statically typed > setting, the term "dynamically ty

operator comparison for php vs python

2006-06-19 Thread brandon.mcginty
Hi All, I’ve already done a large amount of searching on Google to find out this information, but to no avale. Does anyone here know of a list of operators in python and there counterparts in php, or a website with this information? It would also be helpful to have this information along

Re: Installing Python on Windows Vista

2006-06-19 Thread Padraig
[EMAIL PROTECTED] wrote: > Padraig wrote: > > Hi all, > > > > Just a quick question... when I try to install Python on Windows Vista > > Beta 2 the installer seems to hang after I select the destination > > folder, saying that it will "return when it has finished calculating > > disk space require

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Matthias Blume
George Neuner writes: > I am, however, going to ask what > information you think type inference can provide that substitutes for > algorithm or data structure exploration. Nobody wants to do such a substitution, of course. In /my/ experience, however, I find that doing algorithm and data struc

Re: Python with Eclipse

2006-06-19 Thread Philippe Martin
Dennis Benzinger wrote: > Stan Cook wrote: >> I've been trying to use Eclipse with Python on Linux for a while and >> have noticed something odd. After running the code or debugging a few >> times, its responsiveness gets really bad. Upon checking the equivalent >> of the task manager, I find se

Re: [OT] code is data

2006-06-19 Thread bruno at modulix
Fredrik Lundh wrote: > Laurent Pointal wrote: >> Bruno Desthuilliers wrote: >>> Anton Vredegoor wrote: The idea is to have a way to transform a Python (.py) module into XML and then do source code manipulations in XML-space using ElementTree. > >>> > >>> My my my... I'm not against th

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Yet Another Dan
Chris Smith <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Rob Thorpe <[EMAIL PROTECTED]> wrote: >> A language is latently typed if a value has a property - called it's >> type - attached to it, and given it's type it can only represent >> values defined by a certain class. > > Now I def

Re: Need Help comparing dates

2006-06-19 Thread colincolehour
I kept getting a Python error for the following line: month = m[webMonth] I changed it to month = month_numbers[webMonth] and that did the trick. Tim Chase wrote: > > I am new to Python and am working on my first program. I am trying to > > compare a date I found on a website to todays date.

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Matthias Blume
"Rob Thorpe" <[EMAIL PROTECTED]> writes: > I don't think dynamic typing is that nebulous. I remember this being > discussed elsewhere some time ago, I'll post the same reply I did then > .. > > > A language is statically typed if a variable has a property - called > it's type - attached to it, an

Re: copyfile avoiding overwrites and race conditions

2006-06-19 Thread [EMAIL PROTECTED]
Larry Bates wrote: > I guess my approach would be different. To eliminate any race > conditions, I would keep a small text file that always contained > the next filename that is to be written. Something like: > > nextfiletowrite=/path/filename006.dat > > I would try to get a lock on this file, r

Re: What is Expressiveness in a Computer Language

2006-06-19 Thread Pascal Costanza
Matthias Blume wrote: > "Rob Thorpe" <[EMAIL PROTECTED]> writes: > >> I don't think dynamic typing is that nebulous. I remember this being >> discussed elsewhere some time ago, I'll post the same reply I did then >> .. >> >> >> A language is statically typed if a variable has a property - called

Re: Need Help comparing dates

2006-06-19 Thread Tim Chase
> I kept getting a Python error for the following line: > > month = m[webMonth] > > I changed it to month = month_numbers[webMonth] > > and that did the trick. Sorry for the confusion. Often when I'm testing these things, I'll be lazy and create an alias to save me the typing. In this case,

[ANN] PyYAML-3.03: YAML parser and emitter for Python

2006-06-19 Thread Kirill Simonov
Announcing PyYAML-3.03 A new bug-fix release of PyYAML is now available: http://pyyaml.org/wiki/PyYAML Changes === * Fix Python 2.5 compatibility issues. * Fix numerous bugs in the float handling. * Fix scanning some ill-formed documen

  1   2   >