Re: Random passwords generation (Python vs Perl) =)

2007-01-31 Thread Gabriel Genellina
En Wed, 31 Jan 2007 01:08:28 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > raw_input can do the job of print > while 1: raw_input(__import__('os').urandom(6).encode('base64')) > > And can anyone explain why this is so? while 1: input(__import__('os').urandom(6).encode('base64'))

Re: Unicode error handler

2007-01-31 Thread Gabriel Genellina
En Wed, 31 Jan 2007 01:21:49 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > I don't understand what %r and r are and where they are from. The man > 3 printf page doesn't have %r formatting. Perhaps you should look into the Python docs instead? -- Gabriel Genellina -- http://mail.p

Can't install Turbogears (with pysqlite) on Windows

2007-01-31 Thread Thomas
Hi there! Installing TurboGears out-of-the-box (egg-based) on Windows doesn't work because I can't compile the extensions needed for the required pysqlite (also egg- based): Installed c:\programme\python24\lib\site-packages\turbogears-1.0.1- py2.4.egg Processing dependencies for TurboGears[standa

Re: Random passwords generation (Python vs Perl) =)

2007-01-31 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > And can anyone explain why this is so? while 1: input(__import__('os').urandom(6).encode('base64')) > ... > BgiWdv// > > Traceback (most recent call last): > File "", line 1, in > File "", line 0 > > ^ > SyntaxError: unexpected EOF

Re: Resizing widgets in text windows

2007-01-31 Thread Eric Brunel
On Tue, 30 Jan 2007 23:13:07 +0100, <[EMAIL PROTECTED]> wrote: > I'm using a text widget to hold a set of plots, one plot per line, > such that the scrolling capability of the text widget can be taken > advantage of to display only a subset of the plots at any given time. > In the analyses my progr

Re: thread and processes with python/GTK

2007-01-31 Thread awalter1
HI, I launch my application by 'python script.py' I've already add a sys.stdout.flush with no effect. if the idle_add is an alternative to thread, where to get details about its use (no reference in http://www.pygtk.org/docs/pygtk/ index.html, but very brief information in GTK+ documentation) In

Re: Find and replace in a file with regular expression

2007-01-31 Thread Wolfgang Grafen
Just in case you didn't think about it there is a plain replace method for strings How to quick-search this method with 'dir' >>> dir("") ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__',

Retrieve keywords a internet domain name

2007-01-31 Thread Andy Wu
Hi All, I've been working on a domain parking project where we need to analyze a domain name, say "bookhotel", and get keywords(book, hotel) out of it, then use these keywords to do some search. There are two ways to do this as far as I can see, longest match and quickest match. Longest match: bo

Re: Unicode error handler

2007-01-31 Thread Walter Dörwald
Martin v. Löwis wrote: > Walter Dörwald schrieb: >> You might try the following: >> >> # -*- coding: iso-8859-1 -*- >> >> import unicodedata, codecs >> >> def transliterate(exc): >> if not isinstance(exc, UnicodeEncodeError): >> raise TypeError("don'ty know how to handle %r" % r)

Re: parent-child object design question

2007-01-31 Thread Ben Finney
"Steven D'Aprano" <[EMAIL PROTECTED]> writes: > > def _accumulate_properties(self, properties): > > self.properties = [] > > Probably better to put that in the __init__ method, otherwise if > somebody runs instance._accumulate_properties(...) again, it will > have the side-effe

Re: data design

2007-01-31 Thread skam
On Jan 30, 8:06 pm, "Paddy" <[EMAIL PROTECTED]> wrote: > > Google for YAML and JSON formats too > YAML and JSON are good when used as data-interchange format, not as configuration files. These formats are too complex for non-programmers, so they will ask aid for every editing ;) I suggest ini-lik

Re: BYU Physics Prof Finds Thermate in WTC Physical Samples, Building Collapses an Inside Job

2007-01-31 Thread bryan rasmussen
I think he meant that the body of Thermate was found among WTC physical samples, the conclusion is that Thermate was responsible for collapsing the WTC. The further conclusion is that Thermate is or was in possession of time travel technology, he has obviously recently gone back in time to attack t

Re: Retrieve keywords a internet domain name

2007-01-31 Thread Létező
> Also, does anyone know where I can find a decent dictionary that I can > use to verify if a word is a valid English word? Debian packages such as openoffice, ispell, aspell may contain a word list. You can search google for +english +"word list" or something similar. Viktor -- http://mail.pyt

Re: Web File System

2007-01-31 Thread Toby A Inkster
anthony.cutrone wrote: > Files and folders have to be in an SQL database, mounted in ext3-like > system. File would be identified by a single ID, and links with names > should be connected on these IDs. Take a look at FUSE. Also, have you considered subversion? -- Toby A Inkster BSc (Hons) A

Re: data design

2007-01-31 Thread Imbaud Pierre
James Stroud a écrit : > Szabolcs Nagy wrote: > >>> Hurray for yaml! A perfect fit for my need! And a swell tool! >>> Thanks a lot! >> >> >> >> i warn you against yaml I feel both thanful, and sorry, for your warning. And not convinced yet, but Ill be cautious. >> it looks nice, but the underlying

Help needed on config files

2007-01-31 Thread jvdb
Hi there, I am quite new on python programming and need some help on solving my problem.. I have to make a (python) program which deletes files from directories. I don't think deleting, etc. is the problem. The problem is that the directories where i have to delete them are 'dynamic'/ subject to

Re: Help me understand this

2007-01-31 Thread Christophe
James Stroud a écrit : > Beej wrote: > (2).__add__(1) > > Nice. I would have never thought to put parentheses around an integer to > get at its attributes. > > James You can also do it like that : >>> 2 .__add__(1) 3 -- http://mail.python.org/mailman/listinfo/python-list

Re: data design

2007-01-31 Thread BJörn Lindqvist
On 1/31/07, James Stroud <[EMAIL PROTECTED]> wrote: > [copy_files] > files_dir1 = this.file that.file > path_dir1 = /some/path > > files_dir2 = the_other.file yet_another.file > path_dir2 = /some/other/path > > In yaml, it might look thus. > > copy_files : > - files : [this.file, that.file] >

Re: Executing Javascript, then reading value

2007-01-31 Thread skip
Melih> In fact what you're describing is exactly what I needed. I ended Melih> up finding a way to execute the javascript using Rhino and then Melih> capturing the result. Not exactly what I wanted to do, but once I Melih> found it out, it works. There is an embeddable C implement

Re: data design

2007-01-31 Thread James Stroud
BJörn Lindqvist wrote: > On 1/31/07, James Stroud <[EMAIL PROTECTED]> wrote: >> [copy_files] >> files_dir1 = this.file that.file >> path_dir1 = /some/path >> >> files_dir2 = the_other.file yet_another.file >> path_dir2 = /some/other/path >> >> In yaml, it might look thus. >> >> copy_files : >>

another newbie question: why should you use "*args" ?

2007-01-31 Thread stef
why should I use *args, as in my ignorance, making use of a list (or tupple) works just as well, and is more flexible in it's calling. So the simple conclusion might be: never use "*args", or am I overlooking something ? # method 1 def execute (self, *args): for i in range ( len(args)

Regex with ASCII and non-ASCII chars

2007-01-31 Thread TOXiC
Hello everybody. How I can do a regex match in a string with ascii and non ascii chars for example: regex = re.compile(r"(ÿÿ‹ð…öÂty)", re.IGNORECASE) match = regex.search("ÿÿ‹ð…öÂty") if match: result = match.group() print result else: result = "No match fou

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Diez B. Roggisch
stef wrote: > > why should I use *args, > as in my ignorance, > making use of a list (or tupple) works just as well, > and is more flexible in it's calling. > So the simple conclusion might be: never use "*args", > or am I overlooking something ? Yup. For example decorators, that wrap functions.

Re: BYU Physics Prof Finds Thermate in WTC Physical Samples, Building Collapses an Inside Job

2007-01-31 Thread John McCallum
On Tue, 30 Jan 2007 19:48:45 -0600, soutjhyDin wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> http://portland.indymedia.org/en/2006/06/341238.shtml >> >> BYU Physics Prof Finds Thermate in WTC Physical Samples, Building >> Collapses an Inside Job > > [...] > > The Iro

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Bruno Desthuilliers
stef a écrit : > > why should I use *args, > as in my ignorance, > making use of a list (or tupple) works just as well, > and is more flexible in it's calling. Err... How so ? > So the simple conclusion might be: never use "*args", > or am I overlooking something ? Try writing generic higher or

Re: Sorting a List of Lists

2007-01-31 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I can't seem to get this nailed down and I thought I'd toss it out > there as, by gosh, its got to be something simple I'm missing. > > I have two different database tables of events that use different > schemas. I am using python to collate these records for displa

marshal.loads ValueError

2007-01-31 Thread abcd
I have the following code which is sent over the wire as a string... from time import time class Foo: def go(self): print "Time:", time() I get this code and store it as, "data" data = receivePythonSource() Then I try... exec marshal.loads(data) in my_module.__dict__ However I ge

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Dustan
On Jan 31, 5:41 am, stef <[EMAIL PROTECTED]> wrote: > why should I use *args, > as in my ignorance, > making use of a list (or tupple) works just as well, > and is more flexible in it's calling. Others have mentioned the instances in which it's actually useful - for catch-all arguments. But you al

'First class' Relationships

2007-01-31 Thread bearophileHUGS
Currently reading an article, "First Class Relationships in an Object- oriented Language", by Gavin Bierman and Alisdair Wren: http://homepages.inf.ed.ac.uk/wadler/fool/program/final/4/4_Paper.pdf Found in the "Lambda the Ultimate" blog: http://lambda-the-ultimate.org/node/2013 Maybe it can be do

Re: error messages containing unicode

2007-01-31 Thread Jim
Thanks Steve, I appreciate your patience. On Jan 31, 1:39 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > If the built-in isn't Unicode aware, subclassing it won't magically make > it so :-) Oh, I agree. If I have a string mesg that is unicode-not-ascii and I say try: raise Exception mes

Re: Help needed on config files

2007-01-31 Thread Rob Wolfe
jvdb wrote: > Hi there, > > I am quite new on python programming and need some help on solving my > problem.. > > I have to make a (python) program which deletes files from > directories. I don't think deleting, etc. is the problem. The problem > is that the directories where i have to delete them

Re: marshal.loads ValueError

2007-01-31 Thread Benjamin Niemann
Hello, abcd wrote: > I have the following code which is sent over the wire as a string... > > from time import time > class Foo: > def go(self): > print "Time:", time() > > > I get this code and store it as, "data" > > data = receivePythonSource() > > Then I try... > > exec mars

Re: marshal.loads ValueError

2007-01-31 Thread abcd
On Jan 31, 8:02 am, Benjamin Niemann <[EMAIL PROTECTED]> wrote: > marshal is used to (de)serialize python objects from/to strings. > marshal.loads() tries to deserialize an encoded string back into a python > object - which does not make sense here. > What you probably want is: > > exec data in my_

Re: Help needed on config files

2007-01-31 Thread Daniele Varrazzo
On Jan 31, 11:04 am, "jvdb" <[EMAIL PROTECTED]> wrote: > Hi there, > > I am quite new on python programming and need some help on solving my > problem.. > > I have to make a (python) program which deletes files from > directories. I don't think deleting, etc. is the problem. The problem > is that t

Re: Regex with ASCII and non-ASCII chars

2007-01-31 Thread Peter Otten
TOXiC wrote: > How I can do a regex match in a string with ascii and non ascii chars > for example: > > regex = re.compile(r"(ÿÿ?ð?öÂty)", re.IGNORECASE) > match = regex.search("ÿÿ?ð?öÂty") > if match: > result = match.group() > print result > else: > resul

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread stef
It's bad practice to use built-ins like 'list' as a regular variable name. ok, but it was just an example (in practice, I always use very long names ;-) # calling method 1: execute (S[0], S[4] ) # calling method 2: execute ( ( S[0], S[4] ) ) Let's take a look at those side-by-sid

Re: Help needed on config files

2007-01-31 Thread jvdb
Yes! That does the trick, thanks, both of you! -- http://mail.python.org/mailman/listinfo/python-list

"Correct" db adapter

2007-01-31 Thread king kikapu
Hi to all, i have started a month ago to seriously studying Python. I am now looking at the databases stuff and i want the opinion of more experienced Python programmers (than me) at the following : I see that there are a lot of databases adapters on the net, some following the DB-API 2.0 and som

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Eugene Antimirov
stef wrote: > # method 2 > def chunk_plot(self, list): > for i in range ( len(list) ): > do something And one note more. Just to be more pythonic you shouldn't use form range(len(blabla)). Instead use: for i in list: blabla... -- Sincerely, Eugene Antimirov

Re: Synchronous shutil.copyfile()

2007-01-31 Thread Hugo Ferreira
I'm banging my head over this one... sometimes it just works... *argh* Here's a snip of my problem: import win32com.client import shutil import time engine = win32com.client.Dispatch("DAO.DBEngine.36") table = 'STUFFTODELETE' dstFilename = 'in.mdb' workingfile = 'work.mdb' shutil.copyfile(dstF

Re: Can't install Turbogears (with pysqlite) on Windows

2007-01-31 Thread Thomas
The solution can be found here: http://groups.google.com/group/turbogears/browse_thread/thread/2dc72464a48fde94 -- http://mail.python.org/mailman/listinfo/python-list

Re: Help needed on config files

2007-01-31 Thread Larry Bates
jvdb wrote: > Hi there, > > I am quite new on python programming and need some help on solving my > problem.. > > I have to make a (python) program which deletes files from > directories. I don't think deleting, etc. is the problem. The problem > is that the directories where i have to delete the

Re: Conditional expressions - PEP 308

2007-01-31 Thread Colin J. Williams
Paddy wrote: > On Jan 30, 9:51 pm, "Colin J. Williams" <[EMAIL PROTECTED]> wrote: >> It would be helpful if the rules of the game were spelled out more clearly. >> >> The conditional expression is defined as X if C else Y. >> We don't know the precedence of the "if" operator. From the little test

Re: Regex with ASCII and non-ASCII chars

2007-01-31 Thread TOXiC
Thx it work perfectly. If I want to query a file stream? file = open(fileName, "r") text = file.read() file.close() regex = re.compile(u"(ÿÿ‹ð…öÂ)", re.IGNORECASE) match = regex.search(text) if (match): result = match.group() print result WritePatch

Re: "Correct" db adapter

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

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread stef
Eugene Antimirov wrote: > stef wrote: > >> # method 2 >> def chunk_plot(self, list): >> for i in range ( len(list) ): >> do something > > > And one note more. Just to be more pythonic you shouldn't use form > range(len(blabla)). Instead use: > > for i in list: > b

Re: "Correct" db adapter

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

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Jeffrey Froman
stef wrote: >> And one note more. Just to be more pythonic you shouldn't use form >> range(len(blabla)). Instead use: >> >> for i in list: >> blabla... >> >> > I would love that, > but please tell me how (I need an integer counter for something else too): for index, item in enumerate(args):

Re: Help needed on config files

2007-01-31 Thread jvdb
Ok, with all your help and very useful hints, i managed to solve it! thanks! Now my program loops through the config file, and deletes the files older than 7 days with a specified extension. Here's my program: #this project removes old log files import os, time from ConfigParser import ConfigParse

subway

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

Re: Regex with ASCII and non-ASCII chars

2007-01-31 Thread Peter Otten
TOXiC wrote: > Thx it work perfectly. > If I want to query a file stream? > > file = open(fileName, "r") > text = file.read() > file.close() Convert the bytes read from the file to unicode. For that you have to know the encoding, e. g. file_encoding = "utf-8" # replace with th

Re: error messages containing unicode

2007-01-31 Thread Jim
Oops, there is a typo in what I wrote above. Sorry. On Jan 31, 7:57 am, "Jim" <[EMAIL PROTECTED]> wrote: > Oh, I agree. If I have a string mesg that is unicode-not-ascii and I > say > try: > raise Exception mesg > except Exception, err: > print "Trouble"+mesg > then I have proble

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, stef wrote: > Eugene Antimirov wrote: > >> And one note more. Just to be more pythonic you shouldn't use form >> range(len(blabla)). Instead use: >> >> for i in list: >> blabla... >> >> > I would love that, > but please tell me how (I need an integer counter for someth

Python tools to manipulate JARs ?

2007-01-31 Thread Andy Dingley
I run build processes for a Java shop using Python (and some Ant). Would anyone care to suggest favoured tools for manipulating the innards of JARs? Or do I just treat them as plain zipfiles and get stuck right in there? Mainly I'm trying to query lists of classes and their embedded versions and

Re: another newbie question: why should you use "*args" ?

2007-01-31 Thread stef
I would love that, but please tell me how (I need an integer counter for something else too): def chunk_plot(*args): if len(args) == 1: list = args[0] else: list = args color = ['g','r','b','y','m'] plot ( list[0], color[0]) hold (True) for i in range

Any python scripts to do parallel downloading?

2007-01-31 Thread Frank Potter
I want to find a multithreaded downloading lib in python, can someone recommend one for me, please? Thanks~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditional expressions - PEP 308

2007-01-31 Thread Steven Bethard
Colin J. Williams wrote: > It would be helpful if the rules of the game were spelled out more clearly. > > The conditional expression is defined as X if C else Y. > We don't know the precedence of the "if" operator. From the little test > below, it seem to have a lower precedence than "or". > >

Re: Regex with ASCII and non-ASCII chars

2007-01-31 Thread TOXiC
It wont work with utf-8,iso or ascii... -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Jean-Paul Calderone
On 31 Jan 2007 08:23:57 -0800, Frank Potter <[EMAIL PROTECTED]> wrote: >I want to find a multithreaded downloading lib in python, >can someone recommend one for me, please? >Thanks~ There are no threads, but perhaps http://jcalderone.livejournal.com/24285.html would be interesting to you. Jean-Pa

Re: subway

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

Re: Regex with ASCII and non-ASCII chars

2007-01-31 Thread TOXiC
On 31 Gen, 17:30, "TOXiC" <[EMAIL PROTECTED]> wrote: > It wont work with utf-8,iso or ascii... I think the best way is to search hex value in the file stream but I tryed (in the regex) \hxx but it don't work... -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode error handler

2007-01-31 Thread Walter Dörwald
[EMAIL PROTECTED] wrote: > On Jan 30, 11:28 pm, Walter Dörwald <[EMAIL PROTECTED]> wrote: > >> codecs.register_error("transliterate", transliterate) >> >>Walter > > Really, really slick solution. > Though, why was it [:1], not [0]? ;-) No particular reason, unicodedata.normalize("NFD", ...)

Re: Conditional expressions - PEP 308

2007-01-31 Thread Ziga Seilnacht
Colin J. Williams wrote: > It would be helpful if the rules of the game were spelled out more clearly. > > The conditional expression is defined as X if C else Y. > We don't know the precedence of the "if" operator. From the little test > below, it seem to have a lower precedence than "or". The r

Re: "Correct" db adapter

2007-01-31 Thread king kikapu
Thanks for the replies. I think i do not need something like ORM, but just a db-module that i can "work" the database with it. I just want to know if pyodbc is the "correct" solution to do so or if it is another db-module that is more usefull for this job. -- http://mail.python.org/mailman/listi

What is the dummy statement that do nothing in Python?

2007-01-31 Thread Dongsheng Ruan
I remember that in python there is some kind of dummy statement that just holds space and does nothing. I want it to hold the place after a something like if a>b: do nothing I can't just leave the space blank after if statement because there will be error message. Does anybody know what to ins

Python module for the IPod shuffle ...

2007-01-31 Thread Analog Kid
Hi all: Im looking for a python module thatll let me do simple reads/writes from and to an iPod shuffle similar to iTunes ... I read about the gPod module ... but Im not sure whether it will work in Windows ... Any help is greatly appreciated. Thanks in advance ... -Ajay -- http://mail.python.o

Re: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Jean-Paul Calderone
On Wed, 31 Jan 2007 11:49:53 -0500, Dongsheng Ruan <[EMAIL PROTECTED]> wrote: >I remember that in python there is some kind of dummy statement that just >holds space and does nothing. > >I want it to hold the place after a something like if a>b: do nothing > >I can't just leave the space blank afte

Re: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Analog Kid
hey dongsheng: not too sure what you are looking for ... but i guess a simple "pass" statement should do it ... if a > b: pass hth, -ajay On 1/31/07, Dongsheng Ruan <[EMAIL PROTECTED]> wrote: I remember that in python there is some kind of dummy statement that just holds space and does noth

Re: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Stew Pid
On Wed, 31 Jan 2007 11:49:53 -0500, Dongsheng Ruan wrote: > I remember that in python there is some kind of dummy statement that just > holds space and does nothing. > > I want it to hold the place after a something like if a>b: do nothing > > I can't just leave the space blank after if stateme

RE: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Carroll, Barry
> -Original Message- > From: Dongsheng Ruan [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 31, 2007 8:50 AM > To: python-list@python.org > Subject: What is the dummy statement that do nothing in Python? > > I remember that in python there is some kind of dummy statement that just >

Re: subway

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

Re: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Tim Daneliuk
Dongsheng Ruan wrote: > I remember that in python there is some kind of dummy statement that just > holds space and does nothing. > > I want it to hold the place after a something like if a>b: do nothing > > I can't just leave the space blank after if statement because there will be > error mes

Python **kwargs ?

2007-01-31 Thread johnny
What is **kwargs mean in python? When you put double **, does it mean passing by reference? For example: def redirect_to(request, url, **kwargs): -- http://mail.python.org/mailman/listinfo/python-list

where has Stani's Py Editor gone?

2007-01-31 Thread John Pote
Hi everyone, Been trying to get the latest version of Stani's Python Editor the last few days. But I cannot get any response out of 'pythonide.stani.be'. Anyone know what's happened? Ta much, John Pote -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the dummy statement that do nothing in Python?

2007-01-31 Thread Dongsheng Ruan
Yes, that's just what I want. Thanks! - Original Message - From: Analog Kid To: Dongsheng Ruan Cc: python-list@python.org Sent: Wednesday, January 31, 2007 12:04 PM Subject: Re: What is the dummy statement that do nothing in Python? hey dongsheng: not too sure what yo

how to make a python windows service know it's own identity

2007-01-31 Thread Chris Curvey
Hi all, I have used the win32com libraries to set up a service called MyService under Windows. So far, so good. Now I need to run multiple copies of the service on the same machine. I also have that working. For monitoring and logging, I'd like each instance of the service to know it's own iden

Re: "Correct" db adapter

2007-01-31 Thread Bruno Desthuilliers
king kikapu a écrit : > Thanks for the replies. > > I think i do not need something like ORM, but just a db-module that i > can "work" the database with it. FWIW, SQLAlchemy is not an ORM, but an higher-level API for SQL integration. The ORM part is an optional feature built on top of this API.

Re: how to "free" an object/var ?

2007-01-31 Thread Paddy
On Jan 31, 7:34 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 30 Jan 2007 23:22:52 -0800, Paddy wrote: > >> As far as I know there is no way to force the deletion of an object > >> even if it is in use. This is a Good Thing. > > >> -- > >> Steven D'Aprano > > > The folowing will make the

Re: Python **kwargs ?

2007-01-31 Thread Bruno Desthuilliers
johnny a écrit : > What is **kwargs mean in python? When you put double **, does it mean > passing by reference? Nope. Python as support for both positional (*args) and named (**kwargs) varargs. > For example: > def redirect_to(request, url, **kwargs): means that redirect_to expect a positiona

Re: how to "free" an object/var ?

2007-01-31 Thread Aahz
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: >Steven D'Aprano wrote: >> On Tue, 30 Jan 2007 15:48:37 -0800, James Stroud wrote: >> >> >>>Stef Mientki wrote: >>> If I create a large array of data or class, how do I destroy it (when not needed anymore) ? > >If

Re: DCOP memory leak?

2007-01-31 Thread [EMAIL PROTECTED]
On 31 jan, 01:03, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > > I'm writing a python script for Amarok, I communicate with Amarok > > using DCOP. > > Now, I have to call DCOP very often and I noticed that every time I > > make a DCOP call my program keeps growin

Re: subway

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

Re: where has Stani's Py Editor gone?

2007-01-31 Thread Stargaming
John Pote schrieb: > Hi everyone, > > Been trying to get the latest version of Stani's Python Editor the last few > days. But I cannot get any response out of 'pythonide.stani.be'. Anyone know > what's happened? > > Ta much, > > John Pote > > http://developer.berlios.de/project/showfiles.p

Re: Sorting a List of Lists

2007-01-31 Thread Paddy
On Jan 31, 12:35 pm, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > > I can't seem to get this nailed down and I thought I'd toss it out > > there as, by gosh, its got to be something simple I'm missing. > > > I have two different database tables of events that use different > > sche

Re: "Correct" db adapter

2007-01-31 Thread Diez B. Roggisch
king kikapu wrote: > Thanks for the replies. > > I think i do not need something like ORM, but just a db-module that i > can "work" the database with it. > I just want to know if pyodbc is the "correct" solution to do so or if > it is another db-module that is more > usefull for this job. I thin

RE: Python tools to manipulate JARs ?

2007-01-31 Thread Sells, Fred
I have not tried this, but... Assuming jython is out of the question You might want to try a simple java command line program you could run from popen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andy Dingley Sent: Wednesday, January 31, 2007 11:11 AM

Re: subway

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

Re: Python tools to manipulate JARs ?

2007-01-31 Thread Laszlo Nagy
Andy Dingley írta: > I run build processes for a Java shop using Python (and some Ant). > > Would anyone care to suggest favoured tools for manipulating the > innards of JARs? Or do I just treat them as plain zipfiles and get > stuck right in there? > > Mainly I'm trying to query lists of classes a

Re: DCOP memory leak?

2007-01-31 Thread David Boddie
On Jan 31, 6:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > The code I posted is not my actual program and was only to demonstrate > my problem. The complete program I'm writing uses QT and so the loop > is replaced by a Timer event. > I tried out the suggestion. I had already tried the d

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Michele Simionato
On Jan 31, 5:23 pm, "Frank Potter" <[EMAIL PROTECTED]> wrote: > I want to find a multithreaded downloading lib in python, > can someone recommend one for me, please? > Thanks~ Why do you want to use threads for that? Twisted is the obvious solution for your problem, but you may use any asynchronou

Re: subway

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

Re: how to "free" an object/var ?

2007-01-31 Thread Terry Reedy
"John Nagle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |If your data structure has no backlinks, it will go away | as soon as the last reference to it disappears. |In Python, garbage collection is mostly a backup to | the reference counting system. These both are true o

Re: emulate a serial port in windows (create a virtual 'com' port)

2007-01-31 Thread Bas-i
On Jan 30, 7:34 am, Pom <[EMAIL PROTECTED]> wrote: > how can I emulate a serial port in windows? Google for ComEmulDrv3 This may do what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Carl J. Van Arsdall
Michele Simionato wrote: > On Jan 31, 5:23 pm, "Frank Potter" <[EMAIL PROTECTED]> wrote: > >> I want to find a multithreaded downloading lib in python, >> can someone recommend one for me, please? >> Thanks~ >> > > Why do you want to use threads for that? Twisted is the > obvious solution f

Re: Sorting a List of Lists

2007-01-31 Thread Bruno Desthuilliers
Paddy a écrit : > On Jan 31, 12:35 pm, Bruno Desthuilliers >Also, using comparison functions is usually not the most efficient way >>to do such a sort. In your case, I'd go for a good old >>Decorate/sort/undecorate (AKA schwarzian transform): >> >>events = [evt for date, evt in >> sorted(

Re: DCOP memory leak?

2007-01-31 Thread [EMAIL PROTECTED]
On 31 jan, 19:51, "David Boddie" <[EMAIL PROTECTED]> wrote: > On Jan 31, 6:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > The code I posted is not my actual program and was only to demonstrate > > my problem. The complete program I'm writing uses QT and so the loop > > is replaced by a

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Carl Banks
Michele Simionato wrote: > On Jan 31, 5:23 pm, "Frank Potter" <[EMAIL PROTECTED]> wrote: > > I want to find a multithreaded downloading lib in python, > > can someone recommend one for me, please? > > Thanks~ > > Why do you want to use threads for that? Twisted is the > obvious solution for your pr

Re: Python **kwargs ?

2007-01-31 Thread Szabolcs Nagy
johnny wrote: > What is **kwargs mean in python? When you put double **, does it mean > passing by reference? here's a little example: >>> def f(a, *args, **kw): ... print 'a:',a ... print 'args:',args ... print 'kw:',kw ... >>> f(1,2,3,x=4) a: 1 args: (2, 3) kw: {'x': 4} >>> f(a=1,

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Jean-Paul Calderone
On 31 Jan 2007 12:24:21 -0800, Carl Banks <[EMAIL PROTECTED]> wrote: >Michele Simionato wrote: >> On Jan 31, 5:23 pm, "Frank Potter" <[EMAIL PROTECTED]> wrote: >> > I want to find a multithreaded downloading lib in python, >> > can someone recommend one for me, please? >> > Thanks~ >> >> Why do you

Re: Python 2.5 Tkinter not configured

2007-01-31 Thread Jim
Diez B. Roggisch wrote: > Jim schrieb: >> I compiled Python 2.5 from python.org and I get an error message when I >> try to import the Tkinter module. Python reports that there is no such >> module. It says my Python isn't configured for Tkinter. How do I >> configure it? I'm using GCC 4.1.1 to co

  1   2   >