Re: Possible problem in compiler/transformer.py of Python2.4...

2006-08-31 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > What is surprising is I checkd the entire py2.4 distribution and I > can't see a symbol.py (or a module with symbol defined) where > transformer.py could import the symbol module form. All I can see > is: > ./lib/python2.4/compiler/symbols.py > in the same direc

Re: all ip addresses of machines in the local network

2006-08-31 Thread Amit Khemka
> in my program so far, multiple threads (255 threads in total) spawned > at once with each one of them trying to call socket.gethostbyaddr(ip) > function. i.e. if exception thrown, no machine found. i used .join() to > wait for the threads to terminate. it's fully working however the > problem is

How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Dermot Doran
Hello All,   I'm very new to using win32com!  I just want to send an email message via Outlook.  However, I keep getting an annoying message box (generated by Outlook) indicating that my program could be a virus.  Does anybody know how to get around this?  Here is the sample code I'm using: from w

Re: Possible problem in compiler/transformer.py of Python2.4...

2006-08-31 Thread Duncan Booth
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >> What is surprising is I checkd the entire py2.4 distribution and I >> can't see a symbol.py (or a module with symbol defined) where >> transformer.py could import the symbol module form. All I can see >> is: >> ./lib/python2.4/compiler

Re: how can i change the text delimiter

2006-08-31 Thread sonald
Hi, I am using Python version python-2.4.1 and along with this there are other installables like: 1. fastcsv-1.0.1.win32-py2.4.exe 2. psyco-1.4.win32-py2.4.exe 3. scite-1.63-setup.exe We are freshers here, joined new... and are now into handling this module which validates the data files, which ar

Re: Allowing ref counting to close file items bad style?

2006-08-31 Thread [EMAIL PROTECTED]
Paul Rubin wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > I disagree strongly with this assertion. It's not as efficient overall > > as other GC implementations, but it's not a case of "less efficient to > > do the same task". Reference counting buys you deterministic GC in the > >

Re: GC and security

2006-08-31 Thread Fredrik Lundh
Les Schaffer wrote: > i am working on a python application that uses encryption as part of its > security features. so then at some point someone has to enter a > passphrase into the system and passed into a decryption functions (we > are using gpg via subprocess). > > so i am curious. so long as

Re: GC and security

2006-08-31 Thread Fredrik Lundh
Fredrik Lundh wrote: > a time (if that's possible; if not, you may need to write a custom > extension that builds a command string in a C-level buffer, runs the > command, and then overwrites the buffer before returning). on the other hand, subprocess seems to support the buffer interface, so

RE: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Tim Golden
[Dermot Doran] | I'm very new to using win32com! I just want to send an email | message via Outlook. However, I keep getting an annoying | message box (generated by Outlook) indicating that my program | could be a virus. Does anybody know how to get around this? As far as I've ever been a

Re: GC and security

2006-08-31 Thread Tim N. van der Leeuw
Fredrik Lundh wrote: > Les Schaffer wrote: > > > i am working on a python application that uses encryption as part of its > > security features. so then at some point someone has to enter a > > passphrase into the system and passed into a decryption functions (we > > are using gpg via subprocess).

urllib2 ftp mirror

2006-08-31 Thread Tonino
Hi, I need to be able to mirror a remote ftp site recursivly, but my access to the internet is through a http proxy server. >From my search I can see that ftpmirror.py uses ftplib and ftplib does not support proxy servers, you need to use urllib2. Does anyone know of a simple way to get this don

Re: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Dermot Doran
Hi Tim,   looks like I might be back to the drawing board :-(  Thanks for letting me know what your experiences have been.   I'm kind of surprised that it works this way since the ns.logon() allows me to access the Outlook address book without any problems.  Without the logon I get another warning

Re: Allowing ref counting to close file items bad style?

2006-08-31 Thread BJörn Lindqvist
On 8/30/06, Dan <[EMAIL PROTECTED]> wrote: > Is this discouraged?: > > for line in open(filename): > In theory, it is. In practice, that is the way Python code is written because it more natural and to the point. Not just for hacked together scripts, lots of third party modules incl

RE: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Tim Golden
[Dermot Doran] | looks like I might be back to the drawing board :-( Thanks | for letting me know what your experiences have been. Just to elaborate slightly on that experience, if all I want to do is to send an email (ie not look up addresses on Contacts or do any fancy Outlook-related thing)

Any relational database design tool written in Python

2006-08-31 Thread metaperl
Hello, I am wondering if I overlooked such a tool at freshmeat, sf.net, and cheeseshop and google. I prefer Python, so that I can patch and upgrade it. Which also means I prefer opensource over commercial. I am hoping for something that can create database deltas. I am sort of divided over the

Re: how can i change the text delimiter

2006-08-31 Thread Fredrik Lundh
sonald wrote: > Python version python-2.4.1 and along with this there are other > installables like: > 1. fastcsv-1.0.1.win32-py2.4.exe I get zero hits for that file on google. are you sure that's not an in-house tool ? asking comp.lang.python for help on internal tools isn't exactly optimal.

Re: how can i change the text delimiter

2006-08-31 Thread Amit Khemka
On 31 Aug 2006 00:25:38 -0700, sonald <[EMAIL PROTECTED]> wrote: > Hi, > I am using > Python version python-2.4.1 and along with this there are other > installables > like: > 1. fastcsv-1.0.1.win32-py2.4.exe > 2. psyco-1.4.win32-py2.4.exe > 3. scite-1.63-setup.exe > > We are freshers here, joined n

Re: csv module strangeness.

2006-08-31 Thread Fredrik Lundh
tobiah wrote: >> you may be misreading the docs; the Dialect has no values at all, and >> must be subclassed (and the subclass must provide settings). > > The docs clearly state what the defaults are, but they are not > in the code. It seems so clumsy to have to specify every one > of these,

Broadcast server

2006-08-31 Thread swell
I would like to write a server with the low level API of python ( socket+select and/or socket+thread ) that allow me to register client and update them every X seconds ( could be the time, the temperature, a stock quote, a message , ... ). How to write the server that keep hot connections with cli

Need Python for Linux (Suse 10.1)

2006-08-31 Thread Dick Moores
I've got a friend interested in trying out Python. I sent him to http://www.python.org/download/linux/ but he's uncertain as to what to download. He's rather get a new download than use what was on his Suse disk. His box is an x86. Any chance Python 2.4.3 compressed source tarball would be suita

Re: Coding style and else statements

2006-08-31 Thread Pete Forman
Ben Finney <[EMAIL PROTECTED]> writes: > Why not ensure that there is one return point from the function, so > the reader doesn't have to remind themselves to look for hidden > return points? There will always be more potential return points in languages that support exceptions. -- Pete Forma

Re: Python for Windows

2006-08-31 Thread mistral
Larry Bates писал(а): > mistral wrote: > > hg писал(а): > >> Grant Edwards wrote: > Will the msi installer modify registry or other system files? > Does it possible install Python not touching registry and > system files? > >> You can make your own installer to install Python, an

Re: Python for Windows

2006-08-31 Thread mistral
Larry Bates писал(а): > mistral wrote: > > hg писал(а): > >> Grant Edwards wrote: > Will the msi installer modify registry or other system files? > Does it possible install Python not touching registry and > system files? > >> You can make your own installer to install Python, an

Re: how can i change the text delimiter

2006-08-31 Thread John Machin
sonald wrote: > Hi, > I am using > Python version python-2.4.1 and along with this there are other > installables > like: > 1. fastcsv-1.0.1.win32-py2.4.exe Well, you certainly didn't get that from the object-craft website -- just go and look at their download page http://www.object-craft.com.au/p

Re: Need Python for Linux (Suse 10.1)

2006-08-31 Thread Fredrik Lundh
Dick Moores wrote: > I've got a friend interested in trying out Python. I sent him to > http://www.python.org/download/linux/ but he's uncertain as to what to > download. He's rather get a new download than use what was on his Suse > disk. His box is an x86. > > Any chance Python 2.4.3 compres

Re: How ahead are you guys in the (Python) real world?

2006-08-31 Thread stdazi
Ray wrote: > Since I haven't used Python at work, I am using Python 2.5 right now. > However I wonder, how fast are you guys moving from version to version > at work? As an illustration my ex-company just moved to Java 5, which > was released around... what, 2-3 years ago? (While I am running Java

wxNotebook color change

2006-08-31 Thread mardif
Hi ! this is my problem: I've a wxNotebook object, which contains 2 Panels. On up, there is TAB section, I have 2 tabs. I want to color the TAB section with ( for example ) red color. I've tried with SetBackgroundColour() for wxNotebook object and for 2 panel inside, but it doesn't works. why??

Re: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Giles Brown
Tim Golden wrote: > [Dermot Doran] > > | I'm very new to using win32com! I just want to send an email > | message via Outlook. However, I keep getting an annoying > | message box (generated by Outlook) indicating that my program > | could be a virus. Does anybody know how to get around this? >

Using eval with substitutions

2006-08-31 Thread abhishek
>>> a,b=3,4 >>> x="a+b" >>> eval(x) 7 >>> y="x+a" Now I want to evaluate y by substituting for the evaluated value of x. eval(y) will try to add "a+b" to 3 and return an error. I could do this, >>> eval(y.replace("x",str(eval(x 10 but this becomes unwieldy if I have >>> w="y*b" and so on, bec

Re: Using eval with substitutions

2006-08-31 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: a,b=3,4 x="a+b" eval(x) > 7 y="x+a" > > Now I want to evaluate y by substituting for the evaluated value of x. > eval(y) will try to add "a+b" to 3 and return an error. I could do > this, eval(y.replace("x",str(eval(x > 10 > > but this become

Re: Broadcast server

2006-08-31 Thread Matt Hammond
On Thu, 31 Aug 2006 10:14:15 +0100, <[EMAIL PROTECTED]> wrote: > I would like to write a server with the low level API of python ( > socket+select and/or socket+thread ) that allow me to register client > and update them every X seconds ( could be the time, the temperature, a > stock quote, a mess

Re: Syntax suggestion.

2006-08-31 Thread Roberto Bonvallet
samir wrote: > Being a fond of Python, I had this idea: Why not making Python a Unix > shell? [...] > So, why not making the use of parentheses when a function is one lined > optional to have commands like this: [...] > Then, why not making the comma optional too when executing such > instructions:

Re: Broadcast server

2006-08-31 Thread swell
Hi Matt , It sounds very interesting and i will definitely take a deeper look but i was more considering something simpler as a learning exercise more that finding a package that should already do what i want to achieve. I want to find the basic guidelines to write that kind of client/server arch

Re: wxNotebook color change

2006-08-31 Thread Rob Wolfe
mardif wrote: > Hi ! > > this is my problem: > > I've a wxNotebook object, which contains 2 Panels. > On up, there is TAB section, I have 2 tabs. > I want to color the TAB section with ( for example ) red color. > > I've tried with SetBackgroundColour() for wxNotebook object and for 2 > panel insi

Re: Using eval with substitutions

2006-08-31 Thread abhishek
Fredrik Lundh wrote: > (I'm afraid I don't really understand the point of your examples; what > is it you're really trying to do here ?) A function is passed a bunch of string expressions like, x = "a+b" y= "x*a" z= "x+y" where a and b are assumed to have been assigned values in the local namesp

Re: wxNotebook color change

2006-08-31 Thread mardif
No no!!! Your example is OK, great! but is not my problem: If you set: frame.SetBackgroundColour(wx.RED) On unix, you can see that label "form1" and "form2" are grey, and others elements are red. But on Windows, on the same line of "form1" and "form2", the color is not red, but grey as labels.

Re: [ANN] ratfun-2.3 Polynomials and Rational Functions

2006-08-31 Thread Ludovic Aubry
On Sat, Aug 19, 2006 at 11:33:19AM -0500, Raymond L. Buvel wrote: > The ratfun module provides classes for defining polynomial and rational > function (ratio of two polynomials) objects. These objects can be used > in arithmetic expressions and evaluated at a particular point. > > Home page: http

Tkinter listbox question

2006-08-31 Thread vedran_dekovic
Hi, I need help about Tkinter listbox widget.I want,when somebody click on any item(file) in Listbox,then in new Label widget text must be selected item from server. my program (wrong example): import ftputil import Tkinter root=Tkinter.Tk() ftp=ftputil.FTPHost('some imaginary server') def Labe

Re: Using eval with substitutions

2006-08-31 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Fredrik Lundh wrote: >> (I'm afraid I don't really understand the point of your examples; what >> is it you're really trying to do here ?) > > A function is passed a bunch of string expressions like, > x = "a+b" > y= "x*a" > z= "x+y" > > where a and b are assumed to h

Re: a question about my script

2006-08-31 Thread alper soyler
Hi,I changed the script as you wrote below:from ftplib import FTP def handleDownload(block):     file.write(block)     print ".", ftp = FTP('ftp.genome.jp')  print ftp.login()  directory = 'pub/kegg/genomes'ftp.cwd(directory)k=0for direct in ftp.nlst():    curdir = '%s/%s' % (directory, direct)   

Re: a question about my script

2006-08-31 Thread Fredrik Lundh
"alper soyler" wrote: > directory = 'pub/kegg/genomes' > ftp.cwd(directory) > ftplib.error_perm: 550 pub/kegg/genomes/aae: No such file or directory > However, in ftp.genome.jp/pub/kegg/genomes/ site, there is 'aae' directory. > What can be the reason? try doing the cwd in pieces: for d i

Re: Using eval with substitutions

2006-08-31 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > So as you say, I could do: > x=eval(x), y=eval(y), z=eval(z) and finally eval("z+y+x") but the > problem is that the initial strings are in no particular order, so I > don't know the sequence in which to perform the first 3 evaluations. I > was wondering if there was a s

Re: a question about my script

2006-08-31 Thread alper soyler
Hi,I changed the script as you wrote below:from ftplib import FTP def handleDownload(block):     file.write(block)     print ".", ftp = FTP('ftp.genome.jp')  print ftp.login()  directory = 'pub/kegg/genomes'ftp.cwd(directory)k=0for direct in ftp.nlst():    curdir = '%s/%s' % (directory, direct)   

simultaneous copy to multiple media

2006-08-31 Thread lannsjo
I need a program that simultaneously can copy a single file (1 GB) from my pc to multiple USB-harddrives. I have searched the internet and only found one program that does this on http://mastermind.com.pl/multicopy/ but this link doesnt work anymore somebody that can help me, is there any oth

Re: Segmentation Fault

2006-08-31 Thread John Savage
"pycraze" <[EMAIL PROTECTED]> writes: >I would like to ask a question. How do one handle the exception due to >Segmentation fault due to Python ? Our bit operations and arithmetic >manipulations are written in C and to some of our testcases we >experiance Segmentation fault from the python librari

Re: Coding style and else statements

2006-08-31 Thread Ben Finney
Pete Forman <[EMAIL PROTECTED]> writes: > Ben Finney <[EMAIL PROTECTED]> writes: > > > Why not ensure that there is one return point from the function, > > so the reader doesn't have to remind themselves to look for hidden > > return points? > > There will always be more potential return points in

Re: wxNotebook color change

2006-08-31 Thread Rob Wolfe
mardif wrote: > If you set: > > frame.SetBackgroundColour(wx.RED) > > On unix, you can see that label "form1" and "form2" are grey, and > others elements are red. > But on Windows, on the same line of "form1" and "form2", the color is > not red, but grey as labels. > > I want to color this space

Problem when try to run a Python embedding documentation example

2006-08-31 Thread baitelli
Hi where's "python24.lib" ? I'm trying to test the example given at Python documentation: 5.1 Very High Level Embedding I'm using Microsoft Visual C++ 6.0 and got the error: LINK : fatal error LNK1104: cannot open file "python24.lib" baitelli,r. __

Re: Problem when try to run a Python embedding documentation example

2006-08-31 Thread Fredrik Lundh
"baitelli" wrote: > where's "python24.lib" ? if you're using a standard python.org install, it's under c:\python24\libs\python24.lib -- http://mail.python.org/mailman/listinfo/python-list

Re: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Dermot Doran
Hi Giles,   Yep, the admin can override this.  I've been doing some of my own hunting around and it would appear that you can: - Resolve this if you have admin rights. - Use Outlook Redemption http://www.dimastr.com/redemption/ - Use Extended MAPI - Install ClickYes http://www.contextmagic.com/ - H

Re: Python-list Digest, Vol 35, Issue 501

2006-08-31 Thread alper soyler
Trying to split the directories gave me the same error message with the previous one?Alper- Original Message From: [EMAIL PROTECTED]To: python-list@python.orgSent: Thursday, August 31, 2006 4:40:03 PMSubject: Python-list Digest, Vol 35, Issue 501Send Python-list mailing list submissions to 

Re: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Dermot Doran
Thanks Tim!   We have smtp bolted to the floor :-(  On 31/08/06, Tim Golden <[EMAIL PROTECTED]> wrote: [Dermot Doran]| looks like I might be back to the drawing board :-(  Thanks| for letting me know what your experiences have been. Just to elaborate slightly on that experience, if all I wantto do

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Jaroslaw Zabiello
[EMAIL PROTECTED] wrote: > + SqlObject allows working with the DB tables without > using SQL itself. Rails has ActiveRecord ORM, which IMO has nicer and simpler syntax than SQLObject. Rails has migrations, TB - not (Migrations is versioning system for evolving database schema) > + Likely to be f

Re: Large LCD/Plasma TV Output

2006-08-31 Thread [EMAIL PROTECTED]
> If you want to try some fancy effects (alpha blending, 3D transitions), > have a look at PyOpenGL, or another OpenGL based library. There are > lots of links on pygame.org. I'm not looking for anything fancy. I guess my main concern is that I've never really done any programming for fancy telev

Re: How ahead are you guys in the (Python) real world?

2006-08-31 Thread skip
Jack> I came away from the thread with the opposite conclusion for Jack> similar reasons. People would use a 2.3.6 if their OS upgraded it Jack> for them but those are the same people who won't upgrade to 2.4.x Jack> because it involves testing. 2.3.5 isn't broken for them or the

Re: Any relational database design tool written in Python

2006-08-31 Thread skip
metaperl> I am hoping for something that can create database deltas. What is a database delta? I know about SELECT, CREATE, INSERT, UPDATE, joins, normalization, etc, but have never heard this term before. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous copy to multiple media

2006-08-31 Thread Tim Chase
> I need a program that simultaneously can copy a single file (1 > GB) from my pc to multiple USB-harddrives. Sounds like a pretty simple simple python script: --- #!/bin/env python def spew(source_file_name, output_file_names,

Re: all ip addresses of machines in the local network

2006-08-31 Thread Gabriel Genellina
At Wednesday 30/8/2006 21:54, damacy wrote: in my program so far, multiple threads (255 threads in total) spawned at once with each one of them trying to call socket.gethostbyaddr(ip) function. i.e. if exception thrown, no machine found. i used .join() to wait for the threads to terminate. it's

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Jorge Godoy
"Jaroslaw Zabiello" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > >> + SqlObject allows working with the DB tables without >> using SQL itself. > > Rails has ActiveRecord ORM, which IMO has nicer and simpler > syntax than SQLObject. Rails has migrations, TB - not (Migrations is > versio

Timeline for Python?

2006-08-31 Thread Sebastian Bassi
Hello all, I am working on a Python book, since it could be completed in about a year (writing time + edition + publishing) or more, I would like to know what version to target since I don't want to release a book that will be outdated just after is printed. I use 2.4 for everyday work but most we

genetic algorithms package for python ?

2006-08-31 Thread Xiao Jianfeng
Hi all, I am looking for a genetic algorithms package for Python. I have googled the web before posting and found some links. The link of pygene(http://www.freenet.org.nz/python/pygene) cannot be opened. I also tried the recipe on ASPN, but it is too simple for my application, and the ga mode

Re: genetic algorithms package for python ?

2006-08-31 Thread Gary Herron
Xiao Jianfeng wrote: > Hi all, > > I am looking for a genetic algorithms package for Python. > > I have googled the web before posting and found some links. The link of > pygene(http://www.freenet.org.nz/python/pygene) cannot be opened. > > I also tried the recipe on ASPN, but it is too simple fo

Re: a question about my script

2006-08-31 Thread Gabriel G
At Thursday 31/8/2006 10:01, alper soyler wrote: I changed the script as you wrote below: directory = 'pub/kegg/genomes' Sorry, in the original comment I said "change it to be an absolute path" but didn't write it well. This line should read: directory = '/pub/kegg/genomes' Gabriel Gene

Re: Any relational database design tool written in Python

2006-08-31 Thread Tim Chase
> metaperl> I am hoping for something that can create database deltas. > > What is a database delta? I know about SELECT, CREATE, INSERT, UPDATE, > joins, normalization, etc, but have never heard this term before. There are two types of database deltas that I know of: metadata deltas (ch

Re: Timeline for Python?

2006-08-31 Thread Ben Sizer
Sebastian Bassi wrote: > So, if the book is published in October 2007, should feature Python 3 > or Python 2.5? > I did read http://www.python.org/dev/peps/pep-3000/ but I still not > sure about timeline. I get the impression that Python 3 will not be around Any Time Soon and certainly not in just

Re: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Grant Edwards
On 2006-08-31, Tim Golden <[EMAIL PROTECTED]> wrote: > [Dermot Doran] > >| I'm very new to using win32com! I just want to send an email >| message via Outlook. However, I keep getting an annoying >| message box (generated by Outlook) indicating that my program >| could be a virus. Does anybod

Re: GC and security

2006-08-31 Thread Les Schaffer
Paul Rubin wrote: > GC simply releases the memory for other uses in the application. It > doesn't necessarily zero the memory. release is followed by some probability of eventual overwrite; check. > > Just what attack are you trying to protect against, if swap space is > less of a problem t

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Adam Jones
Jaroslaw Zabiello wrote: > [EMAIL PROTECTED] wrote: > > > + SqlObject allows working with the DB tables without > > using SQL itself. > > Rails has ActiveRecord ORM, which IMO has nicer and simpler > syntax than SQLObject. Rails has migrations, TB - not (Migrations is > versioning system for evolv

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Christophe
Jaroslaw Zabiello a écrit : > Python is maybe faster, but with YARM (which is not stable yet) Ruby > will be about 10x faster. YARM is full virtual machine like Java. Google doesn't find YARM and so, YARM does not exist. Care to provide an URL or something? -- http://mail.python.org/mailman/list

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop
Paul Boddie wrote: > > fuzzylollipop wrote: > > > uh, no, Python predates Ruby by a good bit > > > Rails might be "older" than Turbogears but it still JUST went 1.0 > > > officially. > > > It can't be called "mature' by any defintition. > > Version numbers are a fairly useless general metric of pr

Re: GC and security

2006-08-31 Thread Les Schaffer
Tim Peters wrote: > Purely accidental -- nothing guaranteed -- details can (& do) change > across releases. Read obmalloc.c for a tour of the accidents du jour. cool. thanks for the pointer! > Not true, so be glad to forget it. forget what??? ;-) > A curious possibility: if you do a debug

Re: GC and security

2006-08-31 Thread Les Schaffer
Fredrik Lundh wrote: > Fredrik Lundh wrote: > >> a time (if that's possible; if not, you may need to write a custom >> extension that builds a command string in a C-level buffer, runs the >> command, and then overwrites the buffer before returning). myself, i enjoy building C extensions, but woul

Searching a string and extract all occurancies of a substring

2006-08-31 Thread Nico Grubert
Hi there, in a text with no carriage returns I need to look for all occurancies of this string: ... The ... can contain different values. I need to extract the string between and . Example text: This is a test. A test. /www/mydoc1 And I need to extraxt /www/mydoc1 and /www/mydoc2 from thi

Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
Hey Folks, Some import questions that a search didn't turn up for me. 1. Will "from somemodule import onething" take as long to start up as import somemodule? 2. Is there anyway I can get at onething more quickly? 3. If I put an import statement hidden away in some function, will Python only do t

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Lawrence Oluyede
Christophe <[EMAIL PROTECTED]> wrote: > Google doesn't find YARM and so, YARM does not exist. Care to provide an > URL or something? it's YARV - http://www.atdot.net/yarv/ -- Lawrence - http://www.oluyede.org/blog "Nothing is more dangerous than an idea if it's the only one you have" - E. A. Ch

Re: sys.argv[0] doesn't always contain the full path of running script.

2006-08-31 Thread Joel Hedlund
>> How can I find where exactly the current python script is running? > > Doesnt __file__ attribute of each module contain the full filepath of > the module? > Yes indeed! But the path to the module will not be the same as the path to the script if you are currently in an imported module. Cons

Re: Duck typing alows true polymorfisim

2006-08-31 Thread Tor Iver Wilhelmsen
The Ghost In The Machine <[EMAIL PROTECTED]> writes: > Also, one language is very conspicuous by its absence: C#. He does not date any of the updates, so it's unclear how recently it has been updated (a lot of the web is stale, like a rotting tree in a forest.) > AmigaBasic -- Microsoft-sponsore

HTTPS Login

2006-08-31 Thread Tom Grove
I am trying to login to a secure website and I am having some difficulty understanding the process. Here is what I have with my limited knowledge of the subject: ##Start Code## #!/usr/bin/env python

Re: sys.argv[0] doesn't always contain the full path of running script.

2006-08-31 Thread Joel Hedlund
> Running "python test.py" now prints /path/to/my_module.py, not > /path/to/my_script.py. That should have been "python my_script.py". Sorry for the slip-up. Cheers! /Joel -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching a string and extract all occurancies of a substring

2006-08-31 Thread Gabriel Genellina
At Thursday 31/8/2006 12:44, Nico Grubert wrote: in a text with no carriage returns I need to look for all occurancies of this string: ... Try Beautiful Soup, or if your input is simple enough, the re module. Gabriel Genellina Softlab SRL

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop
Ray wrote: > fuzzylollipop wrote: > > uh, no, Python predates Ruby by a good bit > > Rails might be "older" than Turbogears but it still JUST went 1.0 > > officially. > > It can't be called "mature' by any defintition. > > But at least in most developers' perception ... nobody is talking about p

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Paul Boddie
fuzzylollipop wrote: > Paul Boddie wrote: > > > fuzzylollipop wrote: > > > > uh, no, Python predates Ruby by a good bit > > > > Rails might be "older" than Turbogears but it still JUST went 1.0 > > > > officially. > > > > It can't be called "mature' by any defintition. > > > > Version numbers are a

How to Interpret Hotshot Stats

2006-08-31 Thread Gregory Piñero
Would someone mind giving me a quick explanation on what this is telling me? How much is 201 CPU seconds? Watching the clock the run seems to take 7 seconds all the way from clicking on the batch file to run my hotshot script. Does that mean most of that time was in loading the interpreter? Am

Re: Searching a string and extract all occurancies of a substring

2006-08-31 Thread Nico Grubert
> Try Beautiful Soup, or if your input is simple enough, the re module. Hi Gabriel, I first tried "HTMLParser" and wrote this short script: from HTMLParser import HTMLParser from htmlentitydefs import entitydefs class MyDocParser(HTMLParser): def __init__(self): self.paths = []

Re: genetic algorithms package for python ?

2006-08-31 Thread Thomas Samson
Xiao Jianfeng <[EMAIL PROTECTED]> writes: > Hi all, > > I am looking for a genetic algorithms package for Python. > > I have googled the web before posting and found some links. The link > of pygene(http://www.freenet.org.nz/python/pygene) cannot be opened. Strange, works for me... > > I also t

How to include and use a .NET DLL and namespace.

2006-08-31 Thread Caolan
Hello,   I am in need of importing in a .NET namespace from a built DLL. How do I get Python to pickup and recognise the namespace and classes in the DLL?   Thanks,   Caolan O'Domhnaill-- http://mail.python.org/mailman/listinfo/python-list

Re: Searching a string and extract all occurancies of a substring

2006-08-31 Thread Nico Grubert
> This works as long as there are no other Tags in the content > that I parse. Got it. I forgot to handle the 'attrs' parameter in handle_starttag(). Changed it to: def handle_starttag(self, tag, attrs): if tag == 'parameter': if attrs == [('key', 'infobox_path')]:

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Fredrik Lundh
Gregory Piñero wrote: > 1. Will "from somemodule import onething" take as long to start up as > import somemodule? yes; "from x import y" does an ordinary import of "x" under the hood. > 2. Is there anyway I can get at onething more quickly? not really, unless you're willing/able to refactor th

Re: get a line of text from a socket...

2006-08-31 Thread KraftDiner
Sybren Stuvel wrote: > KraftDiner enlightened us with: > > What makes asyncore.loop exit? > > Why ask questions about something you're unable to use, when I've > given you something that does work? > Who said it didn't work? > Sybren > -- > The problem with the world is stupidity. Not saying ther

RE: Questoin about outlook calendar

2006-08-31 Thread Gallagher, Tim F (NE)
"Gallagher, Tim (NE)" wrote : > import win32com.client > import time > import datetime > > outlook = win32com.client.Dispatch("Outlook.Application") > namespace = outlook.GetNamespace("MAPI") > appointments = namespace.GetDefaultFolder(9).Items > > #print appointments.count > x = 4 # This is a n

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Jaroslaw Zabiello
On Thu, 31 Aug 2006 11:42:47 -0300, Jorge Godoy wrote: > TG supports SQL Alchemy as well. With SQL Alchemy I believe you'll have a > better experience than with Rails' ORM. I would not be so sure. I have tried to work with SQL Alchemy (using Pylons) and I have been disappointed. :( It's syntax f

Re: Searching a string and extract all occurancies of a substring

2006-08-31 Thread Fredrik Lundh
Nico Grubert wrote: > in a text with no carriage returns I need to look for all occurancies of > this string: > > ... > > The ... can contain different values. I need to extract the string > between and . is this XML, or just something that looks a little like XML ? -- http://mail.python

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Jaroslaw Zabiello
On 31 Aug 2006 08:24:29 -0700, Adam Jones wrote: > In moving to SQLAlchemy it would pick up not only a migration system but > also a much more flexible abstraction system due to the use of a Data > Mapper pattern instead of the Active Record pattern. What is the advantage of Data Mapper? I canno

Subclassing Tkinter Buttons

2006-08-31 Thread Bob Greschke
I don't use classes much (mainly because I'm stupid), but I'd like to make a subclass of the regular Tkinter Button widget that simply adds spaces to the passed "text=" when the program is running on Windows (Linux, Solaris, Mac add a little space between the button text and the right and left e

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > several seconds? sounds bad. what does the following script print on > your machine? > > import time, subprocess, sys > > t0 = time.time() > for i in range(10): > subprocess.call([sys.executable, "-c", "pas

Re: simultaneous copy to multiple media

2006-08-31 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > I need a program that simultaneously can copy a single file (1 GB) from > my pc to multiple USB-harddrives. Why not just use: copy c:\file.ext u:\file.exe in one shell and in another copy c:\file.ext v:\file.exe where u: and v: are the USB drives? There is usually not

Re: M$ windows python libs installed in arbitrary directories forcustomized python distributions

2006-08-31 Thread Georg Brandl
alf wrote: > Robert Kern wrote: >> alf wrote: >> >>> Fredrik Lundh wrote: >>> http://www.catb.org/~esr/faqs/smart-questions.html#writewell >>> >>> >>> and means? >> >> >> It's his signature. >> > > The sig is delimited by '-- \n' Yes, and Earth is a disk. Georg -- http://ma

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Fredrik Lundh
Gregory Piñero wrote: >> several seconds? sounds bad. what does the following script print on >> your machine? >> >> import time, subprocess, sys >> >> t0 = time.time() >> for i in range(10): >> subprocess.call([sys.executable, "-c", "pass"]) >> print

Re: How to avoid a warning message box when sending email via Outlook

2006-08-31 Thread Steve M
> [Dermot Doran] > > | I'm very new to using win32com! I just want to send an email > | message via Outlook. However, I keep getting an annoying > | message box (generated by Outlook) indicating that my program > | could be a virus. Does anybody know how to get around this? The users in our of

Re: Need Python for Linux (Suse 10.1)

2006-08-31 Thread James Oakley
On Thursday 31 August 2006 6:16 am, Dick Moores wrote: > I've got a friend interested in trying out Python. I sent him to > http://www.python.org/download/linux/ but he's uncertain as to what to > download. He's rather get a new download than use what was on his Suse > disk. His box is an x86. >

  1   2   >