Re: sed to python: replace Q

2008-04-30 Thread happyriding
On Apr 29, 11:27 pm, Raymond <[EMAIL PROTECTED]> wrote: > For some reason I'm unable to grok Python's string.replace() function. line = "abc" line = line.replace("a", "x") print line --output:-- xbc line = "abc" line = line.replace("[apq]", "x") print line --output:-- abc Does the 5 character

Re: computing with characters

2008-04-30 Thread Kam-Hung Soh
On Wed, 30 Apr 2008 16:13:17 +1000, SL <[EMAIL PROTECTED]> wrote: How can I compute with the integer values of characters in python? Like 'a' + 1 equals 'b' etc Try: ord('a') See also: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65117 -- Kam-Hung Soh http://kamhungsoh.com/blog";>

Re: sed to python: replace Q

2008-04-30 Thread Robert Bossy
Raymond wrote: For some reason I'm unable to grok Python's string.replace() function. Just trying to parse a simple IP address, wrapped in square brackets, from Postfix logs. In sed this is straightforward given: line = "date process text [ip] more text" sed -e 's/^.*\[//' -e 's/].*$//' a

Re: sed to python: replace Q

2008-04-30 Thread Kam-Hung Soh
On Wed, 30 Apr 2008 15:27:36 +1000, Raymond <[EMAIL PROTECTED]> wrote: For some reason I'm unable to grok Python's string.replace() function. Just trying to parse a simple IP address, wrapped in square brackets, from Postfix logs. In sed this is straightforward given: line = "date process text

Re: py2exe Icon Resources

2008-04-30 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: > I have created an app using python and then converting it to an exe > using py2exe, and have the following code: > > "icon_resources": [(1, "appFavicon.ico"), (2, "dataFavicon.ico")] > > in my py2exe setup file, the appFavicon works fine and it sets that as > the app

Re: computing with characters

2008-04-30 Thread SL
"Lutz Horn" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] Hi, 2008/4/30 Gary Herron <[EMAIL PROTECTED]>: SL wrote: > How can I compute with the integer values of characters in python? > Like 'a' + 1 equals 'b' etc You can get an integer value from a character with the ord()

Re: computing with characters

2008-04-30 Thread Gabriel Genellina
En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió: "Lutz Horn" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] So just for completion, the solution is: chr(ord('a') + 1) 'b' thanks :) I'm a beginner and I was expecting this to be a member of string so I

Re: Problem with variables assigned to variables???

2008-04-30 Thread n00m
for listmember in mylist: print listmember + ".shp", eval(listmember) -- http://mail.python.org/mailman/listinfo/python-list

Re: computing with characters

2008-04-30 Thread Arnaud Delobelle
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió: > >> "Lutz Horn" <[EMAIL PROTECTED]> schreef in bericht >> news:[EMAIL PROTECTED] >>> >>> So just for completion, the solution is: >>> >> chr(ord('a') + 1) >>> 'b' >> >> thank

Re: computing with characters

2008-04-30 Thread SL
"Arnaud Delobelle" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] "Gabriel Genellina" <[EMAIL PROTECTED]> writes: En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió: "Lutz Horn" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] So just for compl

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Eric Brunel
On Tue, 29 Apr 2008 17:09:18 +0200, blaine <[EMAIL PROTECTED]> wrote: [snip] I'll try the update() again. I would want to use that on the canvas itself right? Not the root window? Well, in fact, there is no difference at all... In tcl/tk, update is a function, and isn't applied to a particul

Re: list.reverse()

2008-04-30 Thread Gabriel Genellina
En Tue, 29 Apr 2008 10:32:46 -0300, Roy Smith <[EMAIL PROTECTED]> escribió: What you want to do is look at the reversed() function. Not only does it return something (other than Null), but it is much faster because it doesn't have to store the reversed list anywhere. What it returns is an iter

Free YouTube Video Downloader Software

2008-04-30 Thread GoodieMan
Friends, Here is an absolutely free tool to download any video from YouTube. SmoothTube downloads videos from YouTube and converts them to MPEG format, which is supported by almost all media players and devices. It also post processes videos, smoothing out some of the compression artifacts often i

Re: computing with characters

2008-04-30 Thread SL
"Gabriel Genellina" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió: And that's a very reasonable place to search; I think chr and ord are builtin functions (and not str methods) just by an historical accident.

Re: Who makes up these rules, anyway?

2008-04-30 Thread Gabriel Genellina
En Tue, 29 Apr 2008 13:15:33 -0300, Roel Schroeven <[EMAIL PROTECTED]> escribió: Cameron Laird schreef: In article <[EMAIL PROTECTED]>, Gabriel Genellina <[EMAIL PROTECTED]> wrote: Explicit variable declaration for functions: http://groups.google.com/group/comp.lang.python/browse_

Re: @classmethod question

2008-04-30 Thread Bruno Desthuilliers
Scott SA a écrit : On 4/24/08, Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: It is a series of convenience methods, in this case I'm interacting with a database via an ORM (object-relational model). out of curiosity : which one ? I'm rapidly becoming a "django junkie"^TM (snip) Then if

Re: computing with characters

2008-04-30 Thread Torsten Bronger
Hallöchen! SL writes: > "Gabriel Genellina" <[EMAIL PROTECTED]> schreef in bericht > news:[EMAIL PROTECTED] > >> En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió: And >> that's a very reasonable place to search; I think chr and ord are >> builtin functions (and not str methods)

Re: Sending Cntrl-C ??

2008-04-30 Thread Gabriel Genellina
En Tue, 29 Apr 2008 20:48:42 -0300, Christian Heimes <[EMAIL PROTECTED]> escribió: gamename schrieb: Thanks, Christian. Would that work on win32 as well? No, Windows doesn't support the same, rich set of signal as Unix OSes. True but irrelevant to the question. To the OP: you can downloa

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Robert.Spilleboudt
blaine wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is well, except one thing. When I am not in the program, and the program receives a draw

Re: computing with characters

2008-04-30 Thread Gabriel Genellina
En Wed, 30 Apr 2008 05:00:26 -0300, Arnaud Delobelle <[EMAIL PROTECTED]> escribió: "Gabriel Genellina" <[EMAIL PROTECTED]> writes: En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió: "Lutz Horn" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] So just for co

Re: Code/test ratio wrt static vs dynamic typing [was: Re: Python Success stories]

2008-04-30 Thread cokofreedom
> > A rather off-topic and perhaps naive question, but isn't a 1:4 > production/test ratio a bit too much ? Is there a guesstimate of what > percentage of this test code tests for things that you would get for > free in a statically typed language ? I'm just curious whether this > argument against

help: Question regarding parallel communication using python

2008-04-30 Thread pramod sridhar
Hello, I would like from my Python application to control 2 (or more devices) using the existing port's interface in my PC,like serial (COM1) or Parallel port (lpt) or any other like PCI...etc. The control mechanism usually involves sending messages to the connected devices in parallel. For instan

Re: Problem with variables assigned to variables???

2008-04-30 Thread M.-A. Lemburg
On 2008-04-30 07:25, [EMAIL PROTECTED] wrote: I have a simple line of code that requires the following inputs - an input file, output file and a SQL expression. the code needs to be run with several different SQL expressions to produce multiple output files. To do this I first created a list of

Re: File IO Issues, help :(

2008-04-30 Thread Peter Otten
Dennis Lee Bieber wrote: > On Tue, 29 Apr 2008 08:35:46 +0200, Peter Otten <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >> jsfile.truncate(0) >> jsfile.seek(0) >> > I'd suggest first doing the seek to start, then do the truncate I usually overwrite the file, and that s

Re: __getattr__ and recursion ?

2008-04-30 Thread Peter Otten
Stef Mientki wrote: > hello, > > I tried to find an easy way to add properties (attributes) to a number > of different components. > So I wrote a class, from which all these components are derived. > By trial and error I created the code below, which now works, but > there is one thing I don't un

crack the sims 2 hm stuff

2008-04-30 Thread urquhart . nak
crack the sims 2 hm stuff http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

call of duty modern warfare keygen

2008-04-30 Thread meisnernel73884
call of duty modern warfare keygen http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

soul patch

2008-04-30 Thread meisnernel73884
soul patch http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

Re: xml.dom.minidom weirdness: bug?

2008-04-30 Thread Gabriel Genellina
En Tue, 29 Apr 2008 23:51:14 -0300, JYA <[EMAIL PROTECTED]> escribió: What I'm doing, is read an xml file, create another dom object and copy the element from one to the other. At no time do I ever modify the original dom object, yet it gets modified. for y in x.getElement

Re: Where to get BeautifulSoup--www.crummy.com appears to be down.

2008-04-30 Thread Florian Diesch
John Nagle <[EMAIL PROTECTED]> wrote: >Perl has CPAN, which is reasonably comprehensive and presents modules > in a uniform way. If you need a common Perl module that's not in the > Perl distro, it's probably in CPAN. "Installing a new module can be as > simple as typing perl -MCPAN -e 'insta

Re: DO YOU KNOW ANY THING ABOUT ISLAM???

2008-04-30 Thread ABDULLAH
On Apr 27, 1:52 pm, Lie <[EMAIL PROTECTED]> wrote: > On Apr 24, 1:40 pm, ABDULLAH <[EMAIL PROTECTED]> wrote: > > > What you are about to read might sound unusual but it could be very > > enlightened. So I would be thankful if you give my article 5 minute > > of > > your value time. THANK YOU > > No

Re: Problem with variables assigned to variables???

2008-04-30 Thread Bruno Desthuilliers
n00m a écrit : for listmember in mylist: print listmember + ".shp", eval(listmember) eval and exec are almost always the wrong solution. The right solution very often implies a dict or attribute lookup, either on custom dict or on one of the available namespaces (globals(), locals(), or a

wep key crack

2008-04-30 Thread meisnernel73884
wep key crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

wep key crack

2008-04-30 Thread meisnernel73884
wep key crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

microsoft office 2007 crack

2008-04-30 Thread urquhart . nak
microsoft office 2007 crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's doc problems: sort

2008-04-30 Thread John Thingstad
På Wed, 30 Apr 2008 06:26:31 +0200, skrev George Sakkis <[EMAIL PROTECTED]>: On Apr 29, 11:13 pm, Jürgen Exner <[EMAIL PROTECTED]> wrote: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Is this self-promoting maniac still going at it? >Although i disliked Perl very much [...] Then why o

free fiction

2008-04-30 Thread mickey333
http://www.authspot.com/Short-Stories/Sunfish.107015 -- http://mail.python.org/mailman/listinfo/python-list

call of duty modern warfare keygen

2008-04-30 Thread meisnernel73884
call of duty modern warfare keygen http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

vws crack

2008-04-30 Thread meisnernel73884
vws crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

crack cream

2008-04-30 Thread urquhart . nak
crack cream http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

cracks and keygens

2008-04-30 Thread meisnernel73884
cracks and keygens http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

soul patch

2008-04-30 Thread meisnernel73884
soul patch http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

avg crack

2008-04-30 Thread urquhart . nak
avg crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

patch management

2008-04-30 Thread urquhart . nak
patch management http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

cracks and keygens

2008-04-30 Thread meisnernel73884
cracks and keygens http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

rar password crack

2008-04-30 Thread meisnernel73884
rar password crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

rar password crack

2008-04-30 Thread meisnernel73884
rar password crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

autocad 2005 cracks and cheats

2008-04-30 Thread meisnernel73884
autocad 2005 cracks and cheats http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

fifa manager 08 crack

2008-04-30 Thread meisnernel73884
fifa manager 08 crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

Re: computing with characters

2008-04-30 Thread Duncan Booth
Torsten Bronger <[EMAIL PROTECTED]> wrote: > The biggest ugliness though is ",".join(). No idea why this should > be better than join(list, separator=" "). Besides, ",".join(u"x") > yields an unicode object. This is confusing (but will probably go > away with Python 3). It is only ugly because

Re: ssh

2008-04-30 Thread gert
Eric Wertman wrote: > >from popen2 import Popen3 > >def ssh(host,command) : >''' Wraps ssh commands ''' >ssh_exec = ['/usr/bin/ssh -qnx -F ssh_config', host, command] >cmd = ' '.join(ssh_exec) >output,errors,status = process(cmd) >return output,errors,status > >def process(cmd)

Re: best way to host a membership site

2008-04-30 Thread Bruno Desthuilliers
Magdoll a écrit : Hi, I know this is potentially off-topic, but because python is the language I'm most comfortable with and I've previously had experiences with plone, I'd as much advice as possible on this. I want to host a site where people can register to become a user. They should be

Essentio CS5110 the first produced desktop from asus

2008-04-30 Thread speedman2010
When I search web as every day I was surprised when I readied that ASUA company announced about it is new Essentio CS5110 desktop and I Saied " cool ASUS enter to the world of desktop manufactories " because ASUS produced good product and have a good Reputation On computer market and I waited fo

Re: computing with characters

2008-04-30 Thread Torsten Bronger
Hallöchen! Duncan Booth writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> The biggest ugliness though is ",".join(). No idea why this should >> be better than join(list, separator=" "). Besides, ",".join(u"x") >> yields an unicode object. This is confusing (but will probably go >> away

crack rock cooking

2008-04-30 Thread meisnernel73884
crack rock cooking http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

vws crack

2008-04-30 Thread meisnernel73884
vws crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

the sims 2 crack

2008-04-30 Thread soray6034rao
the sims 2 crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

daylight savings time patch

2008-04-30 Thread soray6034rao
daylight savings time patch http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

ulead video studio 8 serial crack

2008-04-30 Thread soray6034rao
ulead video studio 8 serial crack http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

microsoft office word 2007 keygen download

2008-04-30 Thread soray6034rao
microsoft office word 2007 keygen download http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

age of empires 3 crack serial

2008-04-30 Thread soray6034rao
age of empires 3 crack serial http://crack.cracksofts.com -- http://mail.python.org/mailman/listinfo/python-list

Re: computing with characters

2008-04-30 Thread Marco Mariani
Torsten Bronger wrote: However, join() is really bizarre. The list rather than the separator should be the leading actor. No, because join must work with _any sequence_, and there is no "sequence" type to put the join method on. This semantic certainly sets python apart from many other lang

Re: computing with characters

2008-04-30 Thread Marc 'BlackJack' Rintsch
On Wed, 30 Apr 2008 13:12:05 +0200, Torsten Bronger wrote: > However, join() is really bizarre. The list rather than the > separator should be the leading actor. You mean any iterable should be the leading actor, bacause `str.join()` works with any iterable. And that's why it is implemented *on

Re: computing with characters

2008-04-30 Thread Torsten Bronger
Hallöchen! Marco Mariani writes: > Torsten Bronger wrote: > >> However, join() is really bizarre. The list rather than the >> separator should be the leading actor. > > No, because join must work with _any sequence_, and there is no > "sequence" type to put the join method on. No, but for the s

Re: computing with characters

2008-04-30 Thread Duncan Booth
Torsten Bronger <[EMAIL PROTECTED]> wrote: > However, join() is really bizarre. The list rather than the > separator should be the leading actor. Do you mean the list, or do you mean the list/the tuple/the dict/the generator/the file and anything else which just happens to be an iterable seque

Re: how to convert a multiline string to an anonymous function?

2008-04-30 Thread Scott David Daniels
Matimus wrote: On Apr 29, 3:39 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: Danny Shevitz schrieb: Simple question here: ... str = ''' def f(state): print state return True ''' but return an anonmyous version of it, a la 'return f' so I can assign it independently. The body is multilin

Re: xml.dom.minidom weirdness: bug?

2008-04-30 Thread Marc Christiansen
JYA <[EMAIL PROTECTED]> wrote: >for y in x.getElementsByTagName('display-name'): >elem.appendChild(y) Like Gabriel wrote, nodes can only have one parent. Use elem.appendChild(y.cloneNode(True)) instead. Or y.cloneNode(False), if you want a shallow copy (i

relative import broken?

2008-04-30 Thread test
basic noob question here. i am trying to reference a package, i have the structure: mypack/ __init__.py test.py subdir1/ __init__.py mod1.py subdir2/ __init__.py mod2.py can someone please tell me why the statement: from mypack.subdir1.mod1 import * doe

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-30 Thread n00m
>>> a = ['zzz', 'aaa'] >>> id(a[0]), id(a[1]) (12258848, 12259296) >>> a.sort() >>> id(a[0]), id(a[1]) (12259296, 12258848) >>> -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Eric Brunel
On Wed, 30 Apr 2008 10:58:06 +0200, Robert.Spilleboudt <[EMAIL PROTECTED]> wrote: blaine wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is

Stream I/O to a java applet (os.popen?)

2008-04-30 Thread Cody Woolaver
Hello, I have designed a script (in java) that allows me to input a command like "Move 325 642" and the mouse cursor will move to that x,y position. The way that the java program works is when it initializes it runs in a constant loop reading the input each time something is sent to it... Here i

I messed up my wxPython install (Eclipse Configuration Issue)

2008-04-30 Thread blaine
The wxPython group is a bit stale compared to this group, so I'll give it a shot :) (READ: Originally when I started htis post, Python 2.5 at the shell did not work (identical behavior to eclipse). I'm not sure why, but it has since worked fine with no problems. Not sure whats going on there...

Re: Tremendous slowdown due to garbage collection

2008-04-30 Thread s0suk3
On Apr 12, 11:11 am, [EMAIL PROTECTED] wrote: > I should have been more specific about possible fixes. > > > > python2.5 -m timeit 'gc.disable();l=[(i,) for i in range(200)]' > > > 10 loops, best of 3: 662 msec per loop > > > > python2.5 -m timeit 'gc.enable();l=[(i,) for i in range(200)]'

Re: relative import broken?

2008-04-30 Thread Peter Otten
test wrote: > basic noob question here. > > i am trying to reference a package, i have the structure: > > mypack/ > __init__.py > test.py > subdir1/ > __init__.py > mod1.py > subdir2/ > __init__.py > mod2.py > > can someone please tell me why the

Python Search Engine powered by Google

2008-04-30 Thread Giovanni Giorgi
Hi all, I am working on a customized python search engine: http://blog.objectsroot.com/python/ It is done using a special feature of Google, and it is focused on python I'd like to have the contribution of other guys out of there to fine tuning it. Feel free to use it and give me your feedback. You

PIL and IPTC

2008-04-30 Thread Jumping Arne
I'm completely new to PIL and I'm trying to read IPTC info, I understand that it's possible but I can't find out how (and for once Google doesn't seem to be able to help). Does anyone have an example of how it's done? -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread blaine
Still doesn't work. I'm looking into using wx instead... This is the full code - does it work for anyone else? Just do a echo 'line 0 0 10 10' > dev.file import sys, os, time, Tkinter, threading class nokia_fkscrn(Tkinter.Toplevel): fp=None def __init__(self, file): self.fname

Re: list.reverse()

2008-04-30 Thread blaine
On Apr 29, 8:51 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > > blaine <[EMAIL PROTECTED]> wrote: > > Check out this cool little trick I recently learned: > > >>> x=range(5) > > >>> x.reverse() or x > > [4, 3, 2, 1, 0] > > > Useful for returning lists that you need

Re: how to convert a multiline string to an anonymous function?

2008-04-30 Thread Danny Shevitz
Thanks All! you've solved my problem. D -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to host a membership site

2008-04-30 Thread Aaron Watters
> We're about to start a couple somewhat similar projects here, and while > our chief engineer is a definitive Ruby/Rails addict, we finally settled > on Django. While it's not my own personal favorite Python MVC framework, > it's still a very good one, and probably the more mature and stable so >

Re: List all files using FTP

2008-04-30 Thread Giampaolo Rodola'
On 6 Mar, 18:46, Anders Eriksson <[EMAIL PROTECTED]> wrote: > Hello, > > I need to list all the files on myFTPaccount (multiple subdirectories). I > don't have shell access to the account. > > anyone that has a program that will do this? > > // Anders > -- > English is not my first, or second, lang

Re: best way to host a membership site

2008-04-30 Thread Jeroen Ruigrok van der Werven
-On [20080430 02:16], Magdoll ([EMAIL PROTECTED]) wrote: >Also I want an infrastructure that's not too rigid so if in the future I >want to add more apps it's not to hard. Not to belittle Django, but for what I wanted to do with it, it was too restraining. I instead went with

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Peter Otten
blaine wrote: > Still doesn't work. I'm looking into using wx instead... > > This is the full code - does it work for anyone else? Just do a echo > 'line 0 0 10 10' > dev.file Haven't tried it, but I think that the problem is that you are updating the UI from the "readthread". A good example to

new free fiction

2008-04-30 Thread mickey333
http://www.authspot.com/Short-Stories/Gossip.110935 -- http://mail.python.org/mailman/listinfo/python-list

Re: computing with characters

2008-04-30 Thread Diez B. Roggisch
However, join() is really bizarre. The list rather than the separator should be the leading actor. Certainly *not*! This would be the way ruby does it, and IMHO it does not make sense to add join as a string-processing related method/functionality to a general purpose sequence type. And as ot

Re: I messed up my wxPython install (Eclipse Configuration Issue)

2008-04-30 Thread Peter Otten
blaine wrote: > The wxPython group is a bit stale compared to this group, so I'll give > it a shot :) > > (READ: Originally when I started htis post, Python 2.5 at the shell > did not work (identical behavior to eclipse). I'm not sure why, but > it has since worked fine with no problems. Not su

Re: Code/test ratio wrt static vs dynamic typing [was: Re: Python Success stories]

2008-04-30 Thread MRAB
On Apr 30, 10:47 am, [EMAIL PROTECTED] wrote: > > A rather off-topic and perhaps naive question, but isn't a 1:4 > > production/test ratio a bit too much ? Is there a guesstimate of what > > percentage of this test code tests for things that you would get for > > free in a statically typed language

Re: Issue with regular expressions

2008-04-30 Thread Gerard Flanagan
On Apr 29, 3:46 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > I'm fairly new in Python and I haven't used the regular expressions > enough to be able to achieve what I want. > I'd like to select terms in a string, so I can then do a search in my > database. > > query = ' " some words" with an

printing inside and outside of main() module

2008-04-30 Thread korean_dave
This allows me to see output: ---begin of try.py print "Hello World" --end of try.py This DOESN'T though... --begin of try2.py def main(): return "Hello" --end of try2.py Can someone explain why??? -- http://mail.python.org/mailman/listinfo/python-list

Re: printing inside and outside of main() module

2008-04-30 Thread Peter Otten
korean_dave wrote: > This allows me to see output: > > ---begin of try.py > print "Hello World" > --end of try.py > > This DOESN'T though... > > --begin of try2.py > def main(): > return "Hello" main() # add this > --end of try2.py > > Can someone explain why??? Python doesn't call the main(

Re: simple chemistry in python

2008-04-30 Thread Brian Blais
baoilleach wrote: If you are familiar with parsing XML, much of the data you need is stored in the following file: http://bodr.svn.sourceforge.net/viewvc/*checkout*/bodr/trunk/bodr/ elements/elements.xml?revision=34&content-type=text%2Fplain Here's a quick BeautifulSoup script to read it

Re: computing with characters

2008-04-30 Thread Torsten Bronger
Hallöchen! Diez B. Roggisch writes: >> However, join() is really bizarre. The list rather than the >> separator should be the leading actor. > > Certainly *not*! This would be the way ruby does it, and IMHO it > does not make sense to add join as a string-processing related > method/functionalit

Re: best way to host a membership site

2008-04-30 Thread Aaron Watters
On Apr 30, 10:43 am, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED] nomine.org> wrote: > > Werkzeug -http://werkzeug.pocoo.org/ Wow. An initial glance looks great! I need help with pronunciation, though :(. (also, I'm a little disappointed because I made some notes that looked a littl

Re: Colors for Rows

2008-04-30 Thread Victor Subervi
Thank you all. You helped clean up my code. The stupid mistake was in where I set the initial value of the variable z. Victor On Tue, Apr 29, 2008 at 3:20 PM, J. Cliff Dyer <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-29 at 15:39 -0400, D'Arcy J.M. Cain wrote: > > On Tue, 29 Apr 2008 15:03:23 -04

Re: calling variable function name ?

2008-04-30 Thread TkNeo
On Apr 8, 7:51 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 8, 3:52 pm,TkNeo<[EMAIL PROTECTED]> wrote: > > > I don't know the exact terminology in python, but this is something i > > am trying to do > > > i have 3 functions lets say > > FA(param1,param2) > > FB(param1,param2) > > FC(param1

Re: Colors for Rows

2008-04-30 Thread D'Arcy J.M. Cain
On Wed, 30 Apr 2008 10:57:44 -0500 "Victor Subervi" <[EMAIL PROTECTED]> wrote: > Thank you all. You helped clean up my code. The stupid mistake was in where > I set the initial value of the variable z. Really? I thought that it was odd to start in the middle of your colour list but it didn't seem

Custom Classes?

2008-04-30 Thread Victor Subervi
Hi; I have the following code which produces a file every time I need to display an image from MySQL. What garbage! Surely, python is capable of better than this, but the last time I asked for help on it, I got no responses. Is this only possible with custom classes? Please, give me some guidance

Re: Colors for Rows

2008-04-30 Thread Victor Subervi
The problem was that z was not incrementing. It kept getting reset to 3, then incremented to 4 immediately, and reset back to 3. Stupid :/ On Wed, Apr 30, 2008 at 11:01 AM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > On Wed, 30 Apr 2008 10:57:44 -0500 > "Victor Subervi" <[EMAIL PROTECTED]> wrot

Re: calling variable function name ?

2008-04-30 Thread Arnaud Delobelle
TkNeo <[EMAIL PROTECTED]> writes: > > George - Thanks for your reply but what you suggested is not working: > > def FA(param1,param2): > print "FA" + param1 + " " + param2 > def FA(param1,param2): > print "FB" + param1 + " " + param2 > def FA(param1,param2): > print "FC" + param1 + " "

Re: Colors for Rows

2008-04-30 Thread D'Arcy J.M. Cain
On Wed, 30 Apr 2008 11:03:34 -0500 "Victor Subervi" <[EMAIL PROTECTED]> wrote: > The problem was that z was not incrementing. It kept getting reset to 3, > then incremented to 4 immediately, and reset back to 3. Stupid :/ Not in the code you actually posted. As I said earlier, create the script t

  1   2   >