Re: Help wanted with md2 hash algorithm

2006-01-09 Thread Paul Rubin
Paul Rubin writes: > Hmm, did the test cases work for the RFC 1319 reference code? What > about OpenSSL? I just checked OpenSSL and all the test values it computes match the RFC. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help wanted with md2 hash algorithm

2006-01-09 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Already done before my first posting. But the problem was there. I > studied the C sources of MD2 of that package, too. But all test cases > with more than 16 bytes failed. Hmm, did the test cases work for the RFC 1319 reference code? What about OpenSSL? I thought whe

Re: Help wanted with md2 hash algorithm

2006-01-09 Thread wjb131
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I thought I had build a proper implementation in Python. The error you > > mention can be avoided by studying the C implementation in RFC 1319. > > BUT: Some of the test vectors failed. That's my problem ;-( > > And therefore I asked for help. > >

Re: Implementing Tuples with Named Items

2006-01-09 Thread Fredrik Lundh
Bryan wrote: > in the python cookbook 2nd edition, section 6.7 (page 250-251), there a > problem > for implementing tuples with named items. i'm having trouble understanding > how > one of commands work and hope someone here can explain what exactly is going > on. > without copying all the c

Re: another docs problem - imp

2006-01-09 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Turns out that you have to do > >>> imp.find_module("mymod", ["./subdir"]) > > I saw not a hint of this in the docs. In fact > they seem to say that the first (unworking) > form *should* work. from the find_module documentation: find_module( name[, path])

Implementing Tuples with Named Items

2006-01-09 Thread Bryan
in the python cookbook 2nd edition, section 6.7 (page 250-251), there a problem for implementing tuples with named items. i'm having trouble understanding how one of commands work and hope someone here can explain what exactly is going on. without copying all the code here, here is the gist

Re: Maximum List size (item number) limit?

2006-01-09 Thread Robert Kern
Kriston-Vizi Janos wrote: > Dear Members, > > Is there any possibility to use more than 999 items in a list? Yes. Of course. > Cannot > append more than 999 items. Post the code that's failing for you and the error message it generates. And please read http://www.catb.org/~esr/faqs/smart-que

Maximum List size (item number) limit?

2006-01-09 Thread Kriston-Vizi Janos
Dear Members, Is there any possibility to use more than 999 items in a list? Cannot append more than 999 items. The same problem with 'array' type. Is it a result of a default setting maybe? Versions: Python 2.4.1 (No.1, Sep 13 2005, 00:39:20) [GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on

Re: Unicode Question

2006-01-09 Thread David Pratt
Hi Max. Many thanks for helping to realize where I was missing the point and making this clearer. Regards, David Max Erickson wrote: > The encoding argument to unicode() is used to specify the encoding of the > string that you want to translate into unicode. The interpreter stores > unicode as

Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Bengt Richter
On Mon, 09 Jan 2006 07:40:18 -, "Donn Cave" <[EMAIL PROTECTED]> wrote: >Quoth [EMAIL PROTECTED]: >| Fredrik Lundh wrote: >| ...snip... >| > afaik, the Python Language Reference never defines the word "reference". >| > It carefully defines words like "object" and "value", though, and terms >li

Re: Do you have real-world use cases for map's None fill-in feature?

2006-01-09 Thread Bengt Richter
On 7 Jan 2006 23:19:41 -0800, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote: >I am evaluating a request for an alternate version of itertools.izip() >that has a None fill-in feature like the built-in map function: > map(None, 'abc', '12345') # demonstrate map's None fill-in feature >[('a',

Re: Getting the start / end of string in regex through match objects

2006-01-09 Thread ankit
Thanks frederik, :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode Question

2006-01-09 Thread David Pratt
Hi Erik. Thank you for your reply. The advice I has helped clarify this for me. Regards, David Erik Max Francis wrote: > David Pratt wrote: > > >>This is not working for me. Can someone explain why. Many thanks. > > > Because '\xbe' isn't UTF-8 for the character you want, '\xc2\xbe' is, as

Re: Unicode Question

2006-01-09 Thread David Pratt
Hi Martin. Many thanks for your reply. What I am reall after, the following accomplishes. > > If you are looking for "at the same time", perhaps this is also > interesting: > > py> unicode('\xbe', 'windows-1252').encode('utf-8') > '\xc2\xbe' > Your answer really helped quite a bit to clarify t

Re: another docs problem - imp

2006-01-09 Thread rurpy
Tony Meyer wrote: > [EMAIL PROTECTED] > > > Another Python docs problem... > > > > I was trying to use imp.find_module(). > > [...] > > I saw not a hint of this in the docs. In fact > > they seem to say that the first (unworking) > > form *should* work. Bye bye about two > > hours altogether...

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: ... > On the available evidence that seems completely untrue. Alex, as I know > from personal experience, has no problems accepting the material rewards > of a lifetime spent developing expertise, but that doesn't make him > elitist. I guess what DOES ma

Re: another docs problem - imp

2006-01-09 Thread Tony Meyer
[EMAIL PROTECTED] > Another Python docs problem... > > I was trying to use imp.find_module(). > [...] > I saw not a hint of this in the docs. In fact > they seem to say that the first (unworking) > form *should* work. Bye bye about two > hours altogether... > > I thought I would post this and ho

Re: Help wanted with md2 hash algorithm

2006-01-09 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I thought I had build a proper implementation in Python. The error you > mention can be avoided by studying the C implementation in RFC 1319. > BUT: Some of the test vectors failed. That's my problem ;-( > And therefore I asked for help. You might check PyCrypt against

another docs problem - imp

2006-01-09 Thread rurpy
Another Python docs problem... I was trying to use imp.find_module(). >>> imp.find_module("mymod", "./subdir") ImportError: No frozen submodule named ./subdir.mymod subdir/mymod.py definately exists, has reasonable permissions, etc. After a lot of reading and re-reading the docs, trying various

Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread rurpy
"Donn Cave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Quoth [EMAIL PROTECTED]: > | Fredrik Lundh wrote: > | ...snip... > | > afaik, the Python Language Reference never defines the word "reference". > | > It carefully defines words like "object" and "value", though, and terms >

Re: itertools.izip brokeness

2006-01-09 Thread Bengt Richter
On 9 Jan 2006 08:19:21 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2006-01-05, Bengt Richter schreef <[EMAIL PROTECTED]>: >> On 5 Jan 2006 15:48:26 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: [...] >> But you can fix that (only test is what you see ;-) : > >Maybe, but not with this version

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Cappy2112
I haven't used itertools yet, so I don't know their capabilities. I have used map twice recently with None as the first argument. This was also the first time I've used map, and was dissapointed when I found out about the truncation. The lists map was iterating over in my case were of unequal len

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread rurpy
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > Duncan Booth wrote: > > One example of padding out iterators (although I didn't use map's fill-in > > to implement it) is turning a single column of items into a multi-column > > table with the items laid out across the rows first. The last row may

Re: Unicode Question

2006-01-09 Thread Max Erickson
The encoding argument to unicode() is used to specify the encoding of the string that you want to translate into unicode. The interpreter stores unicode as unicode, it isn't encoded... >>> unicode('\xbe','cp1252') u'\xbe' >>> unicode('\xbe','cp1252').encode('utf-8') '\xc2\xbe' >>> max -- ht

Unicode Question

2006-01-09 Thread David Pratt
Hi. I am working through some tutorials on unicode and am hoping that someone can help explain this for me. I am on mac platform using python 2.4.1 at the moment. I am experimenting with unicode with the 3/4 symbol. I want to prepare strings for db storage that come from normal Windows machin

Re: - Requesting Comments for Process Definition and Presentation

2006-01-09 Thread Gerard Flanagan
Ilias Lazaridis wrote: > Ilias Lazaridis wrote: > > > > I would like to ask for feedback on the Process Definition and > > Presentation. > > >> > > Your feedback is _very_ important to me. > > > >...The prices for our services start at 250,- €. There is a spiritual issue here which I don't thin

Re: Unicode Question

2006-01-09 Thread Martin v. Löwis
David Pratt wrote: > I want to prepare strings for db storage that come from normal Windows > machine (cp1252) so my understanding is to unicode and encode to utf-8 > and to store properly. That also depends on the database. The database must accept UTF-8-encoded strings, and must not modify them

Re: Why keep identity-based equality comparison?

2006-01-09 Thread Mike Meyer
[EMAIL PROTECTED] writes: > My question is, what reasons are left for leaving the current default > equality operator for Py3K, not counting backwards-compatibility? > (assume that you have idset and iddict, so explicitness' cost is only > two characters, in Guido's example) Yes. Searching for ite

Re: Unicode Question

2006-01-09 Thread Erik Max Francis
David Pratt wrote: > This is not working for me. Can someone explain why. Many thanks. Because '\xbe' isn't UTF-8 for the character you want, '\xc2\xbe' is, as you just showed yourself in the code snippet. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, US

Re: how to test for a dependency

2006-01-09 Thread Steven Bethard
Darren Dale wrote: > I would like to test that latex is installed on a windows, mac or linux > machine. What is the best way to do this? This should work: > > if os.system('latex -v'): > print 'please install latex' > > but I dont actually want the latex version information to print to screen

Re: thread hangs when using subprocess only in specific circumstances

2006-01-09 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 09 Jan 2006 22:59:45 +0100, Toon Verstraelen > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > --- main.py --- > > > > import my_thread > > > Are you sure it is hanging? I'd expec

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread [EMAIL PROTECTED]
Is it possible for users to just authenticate in another browser first? i.e. If I authenticate from browswer X.does EVERY web transaction from SAME hostname have access **after**? How about just from same user? same browswer? same process? Chris Steve Holden wrote: > [EMAIL PROTECTED] wrote:

Re: Spelling mistakes!

2006-01-09 Thread Steve Holden
KraftDiner wrote: > I've spent hours trying to find a bug that was a simple spelling > mistake. > > in an init method I declare a variable self.someLongName > > later in a different method of the class I use > self.sumLongName > Now I really meant self.someLongName. > In fact I don't want a vari

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Gene > > Thanks for links but I'm not sure what to do with them! The links were > about testing > frameworks. I just want to write a script to grab stuff from a remote > site (kinda like automatic ftp). > > Perhaps those tests you were referring to have code to do wha

Re: Spelling mistakes!

2006-01-09 Thread bb
[EMAIL PROTECTED] wrote: > > Terry> But not faster than use a dict server! Why not just use (e.g.) > Terry> kdict? > > >> Maybe because not everybody has it? > > Sybren> Lame excuse. If you don't have something but you do want to > use Sybren> it, you get it. > > I don't t

Re: testing units in a specific order?

2006-01-09 Thread Mike Meyer
Tim Peters <[EMAIL PROTECTED]> writes: > They're run in alphabetical order, sorting on the test methods' names. > For that reason some people name test methods like 'test_001', > 'test_002', ..., although unit tests really "shouldn't" case which > order they get run in. This seems sort of hard to

Re: Help with dynamic attributes.

2006-01-09 Thread Mike Meyer
"Mr.Rech" <[EMAIL PROTECTED]> writes: > Hi all, > I was writing a simple class when I get a strange error message that I > can't > understand. Hopefully someone could help me here. > > My class's init method takes a list of lists as input argument and I'd > like to create > several attributes each

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Steve Holden
Anton Vredegoor wrote: [...] > But frankly indeed, I just don't even like to participate to events > that claim to be open for all but don't even acknowledge that the > barriers are extremely high compared to some participants budgets. Your > hype about it being cheap has a very chilling effect on

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Steve Holden
Anton Vredegoor wrote: > Alex Martelli wrote: > > >>I just don't understand, always assuming you're in the Netherlands, how >>attending Europython in Belgium (as opposed to Pycon in the US) could >>have cost hundreds of euros. Conference registration is free to >>speakers, bicycling NL->BE not c

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-09 Thread Tino Lange
R. Bernstein wrote: Hi! To summarize, I think most of us readers here like your changes or at least didn't shout loud enough against it ;-) As I also would like to have a more powerful and gdb-like debugging facility in out-of-the-box python, I think it would be the best strategy to make a conso

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-09 Thread Fernando Perez
R. Bernstein wrote: > Fernando Perez <[EMAIL PROTECTED]> suggests: >> You may want to try out ipython (the current release candidate from >> http://ipython.scipy.org/dist/testing/, which has many improvements on this >> front). The %pdb magic will trigger automatic activation of pdb at any >> unc

Re: CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread [EMAIL PROTECTED]
Yes, I checked it. It was really "Scripts and Executables" not None -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread [EMAIL PROTECTED]
Thanks yes, it is. I have checked everything already, but still couldn't get it working on server2003 -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-09 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Terry> But not faster than use a dict server! Why not just use (e.g.) > Terry> kdict? > > >> Maybe because not everybody has it? > > Sybren> Lame excuse. If you don't have something but you do want to use > Sybren> it, you get it. > > I don't think

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread Stuart Turner
[EMAIL PROTECTED] wrote: > How make a Python script > > 1. login > 2. type password & > 3. download file > > all from a **remote web site**? > > I'm not comfortable with *MY* software handling the password part. > > It just seems like trouble if users must tell *my* software their > password.

RE: Calling foreign functions from Python? ctypes?

2006-01-09 Thread Delaney, Timothy (Tim)
Thomas Heller wrote: > As the author, I would be happy to see ctypes included with the > standard Python build. I'm sure you know the magical incantation to get that to happen ... 1. Propose it on python-dev. 2. Commit to maintain it in the python core (or alternatively, propose to use the Elem

Re: Help wanted with md2 hash algorithm

2006-01-09 Thread wjb131
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I want to understand it, and -- therefor ;-) -- I want to implement it > > in pure Pyhton. > > OK. It should be pretty easy to implement. You should find the > official rfc at ietf.org. I remember there was some minor erratum in > the original v

Re: How to create a script that list itself ?

2006-01-09 Thread [EMAIL PROTECTED]
import sys path = os.path.dirname(sys.argv[0]) print "Path:%s" % (path) ## If you ran this as a script, This would print the location of where the script itself is running. Hope it helps! Rob -- http://mail.pyt

Testing MySQLdb connection object

2006-01-09 Thread Bernard Lebel
Hello, First, this is my first post on this list! A little about myself: I'm the lead technical director in a 3D animation studio, in Montreal. A lot of the Python code I write is to be used in an application that embeds Python, that is, Softimage|XSI. Right now I'm re-writing the render farm soft

Why keep identity-based equality comparison?

2006-01-09 Thread spam . noam
Hello, Guido has decided, in python-dev, that in Py3K the id-based order comparisons will be dropped. This means that, for example, "{} < []" will raise a TypeError instead of the current behaviour, which is returning a value which is, really, id({}) < id([]). He also said that default equality c

Re: Failing unittest Test cases

2006-01-09 Thread Eric
On 9 January 2006, Scott David Daniels wrote: > There has been a bit of discussion about a way of providing test cases > in a test suite that _should_ work but don't. One of the rules has been > the test suite should be runnable and silent at every checkin. Recently > there was a checkin of a te

Re: Unicode & Pythonwin / win32 / console?

2006-01-09 Thread Martin v. Löwis
Robert wrote: > I'm using Pythonwin and py2.3 (py2.4). I did not come clear with this: > I want to use win32-fuctions like win32ui.MessageBox, > listctrl.InsertItem . to get unicode strings on the screen - best > results according to the platform/language settings (mainly XP Home, > W2K, ...).

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread [EMAIL PROTECTED]
Gene Thanks for links but I'm not sure what to do with them! The links were about testing frameworks. I just want to write a script to grab stuff from a remote site (kinda like automatic ftp). Perhaps those tests you were referring to have code to do what I'm looking for?\ chris -- http://ma

Re: - Requesting Comments for Process Definition and Presentation

2006-01-09 Thread Ilias Lazaridis
Gene Tani wrote: > Xavier Morel wrote: > >>Ilias Lazaridis wrote: >> >>>b) to retrieve feedback subjecting the Process Definition itself >>>(content of diagramms, clarity, terminology etc.) >>> >> >>This is a lie, and you know it. > > I've said it before, i'll say it again; medical insurance prem

Re: PYTHONDOCS

2006-01-09 Thread Florian Diesch
J. D. Leach <[EMAIL PROTECTED]> wrote: > Peter Otten wrote: > >> >> You are getting no match rather than the wrong one. Have you verified that >> a subdirectory >> >> /usr/share/doc/python-2.4/html/lib >> >> exists on your system? If not, the documentation may not be properly >> installed. > > I

Re: PIL.Image.frombuffer/string ... who do data using?

2006-01-09 Thread ivan.dm
Peter Hansen ha scritto: > ivan.dm wrote: > >> I'm writing a wrapper for tif file that parse its and return the data >> image in this way below : >> >> self.fp.seek(StripOffsets) >> data = self.fp.read(StripByteCounts) >> return data > > ... > >> after we

thread hangs when using subprocess only in specific circumstances

2006-01-09 Thread Toon Verstraelen
Hi, I recently had a thread problem and I could reduce it to a very short example that shows the problem. I hope it has its origin in my misunderstanding of how python threads work. Here it is: --- my_thread.py --- import threading from subprocess import Popen, PIPE, STDOUT class MyThread(threa

Re: how to test for a dependency

2006-01-09 Thread Darren Dale
Sybren Stuvel wrote: > Darren Dale enlightened us with: >> I would like to test that latex is installed on a windows, mac or linux >> machine. What is the best way to do this? This should work: >> >> if os.system('latex -v'): >> print 'please install latex' > > The downside is that you can on

Re: how to test for a dependency

2006-01-09 Thread Darren Dale
Dennis Benzinger wrote: > Darren Dale schrieb: >> Hello, >> >> I would like to test that latex is installed on a windows, mac or linux >> machine. What is the best way to do this? This should work: >> >> if os.system('latex -v'): >> print 'please install latex' >> >> but I dont actually wan

Re: Building Pywin32 source code?

2006-01-09 Thread sam
Trent: Thanks for the reply. I tried again today and everthing worked. I did find a type in my CVSROOT string,and corrected it. Thanks for the examples posted in the included link. Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

Re: how to test for a dependency

2006-01-09 Thread Sybren Stuvel
Darren Dale enlightened us with: > I would like to test that latex is installed on a windows, mac or linux > machine. What is the best way to do this? This should work: > > if os.system('latex -v'): > print 'please install latex' The downside is that you can only use this to test by executing.

Re: how to test for a dependency

2006-01-09 Thread Dennis Benzinger
Darren Dale schrieb: > Hello, > > I would like to test that latex is installed on a windows, mac or linux > machine. What is the best way to do this? This should work: > > if os.system('latex -v'): > print 'please install latex' > > but I dont actually want the latex version information to p

how to test for a dependency

2006-01-09 Thread Darren Dale
Hello, I would like to test that latex is installed on a windows, mac or linux machine. What is the best way to do this? This should work: if os.system('latex -v'): print 'please install latex' but I dont actually want the latex version information to print to screen. I tried redirecting sys

Unicode & Pythonwin / win32 / console?

2006-01-09 Thread Robert
Hello, I'm using Pythonwin and py2.3 (py2.4). I did not come clear with this: I want to use win32-fuctions like win32ui.MessageBox, listctrl.InsertItem . to get unicode strings on the screen - best results according to the platform/language settings (mainly XP Home, W2K, ...). Also unicode s

Help with dbm TypeError

2006-01-09 Thread ryan k
I am writing a web application for mod_python that catalogs my home (book) library. For now, I am using the Python dbm module to store string representations of mod_python's req.form (using the mod_python.publisher handler) using unique IDs as keys. In the .db file, there is a key 'next' that holds

Help with dbm TypeError

2006-01-09 Thread [EMAIL PROTECTED]
I am writing a web application for mod_python that catalogs my home (book) library. For now, I am using the Python dbm module to store string representations of mod_python's req.form (using the mod_python.publisher handler) using unique IDs as keys. In the .db file, there is a key 'next' that holds

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Raymond Hettinger
> Alternately, the need can be met with existing tools by pre-padding the > iterator with enough extra values to fill any holes: > > it = chain(iterable, repeat('', group_size-1)) > result = izip_longest(*[it]*group_size) Typo: That should be izip() instead of izip_longest() -- http://m

Re: Problema con le RE....

2006-01-09 Thread Alessandro
Thanks for the reply it's ok!!! The language? I selected the wrong newsgroup in my newsreader!!!...sorry... Thanks... Alessandro... -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the slickest way to transpose a square list of lists (tuple of tuples)?

2006-01-09 Thread gene tani
Gerard Brunick wrote: > My way is ugly. These has to be a better way. > > Thanks, > Gerard transpose funcitons/methods: http://numeric.scipy.org/ http://numpy.sourceforge.net/numdoc/numdoc.pdf -- http://mail.python.org/mailman/listinfo/python-list

Re: email modules and attachments that aren't there

2006-01-09 Thread Gerard Flanagan
Russell Bungay wrote: > Hello all, > > I have written a short function, based on a recipe in the Python > Cookbook, that sends an e-mail. The function takes arguments that > define who the e-mail is to, from, the subject, the body and an optional > list of attachments. > > The function works also

Re: How to create a script that list itself ?

2006-01-09 Thread Szabolcs Nagy
> But is there a way / a variable that contains the current file in > memory ? yes: import __main__ you can do: import inspect import __main__ print inspect.getsource(__main__) or simply: print open(__file__).read() nsz -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a script that list itself ?

2006-01-09 Thread Grant Edwards
On 2006-01-09, Patrick Allaire <[EMAIL PROTECTED]> wrote: > How to create a script that list itself ? This is probably about as close as you're going to get: import sys pring open(sys.argv[0],'r').read() And that isn't 100% reliable. > I would like to know, where is the script's code is

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread gene tani
[EMAIL PROTECTED] wrote: > How make a Python script > > 1. login > 2. type password & > 3. download file > > all from a **remote web site**? > > I'm not comfortable with *MY* software handling the password part. > > It just seems like trouble if users must tell *my* software their > password. > >

Re: How to create a script that list itself ?

2006-01-09 Thread Dave Hansen
On 9 Jan 2006 10:09:19 -0800 in comp.lang.python, "Patrick Allaire" <[EMAIL PROTECTED]> wrote: >How to create a script that list itself ? Stealing from the old C chestnut: s="s=%c%s%c;print s%%(34,s,34)";print s%(34,s,34) > >I would like to know, where is the script's code is stored once we >

Re: Problema con le RE....

2006-01-09 Thread Xavier Morel
Alessandro wrote: > Problema con le RE > Ho questa stringa "3 HOURS, 22 MINUTES, and 28 SECONDS" e la devo > 'dividere' nelle sue tre parti "3 HOURS", "22 MINUTES", "28 SECONDS". > La cosa mi viene molto con le RE...(inutile la premessa che sono molto > alle prime armi con RE e Python) > Qesi

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread gene tani
[EMAIL PROTECTED] wrote: > How make a Python script > > 1. login > 2. type password & > 3. download file > > all from a **remote web site**? > > I'm not comfortable with *MY* software handling the password part. > > It just seems like trouble if users must tell *my* software their > password. > >

Re: Newline at EOF Removal

2006-01-09 Thread Mike Meyer
"Alex N" <[EMAIL PROTECTED]> writes: > Peter gave me a good clue here > w.write(f.read().rstrip('\n') + '\n') > However the 2nd \n puts that empty line at the end of the file so I No, it doesn't. Well, maybe it doesn't, depending on how your applications treats newlines. Normally, a newline termin

build_opener

2006-01-09 Thread Steve Young
Hello, I had a question about urllib2's build_opener() statement. I am trying to just get the html from any webpage as a string but I need everything on the page to be the same as what it'd be if I would browse to that page (and at the very least, all the href's). This is my code: url =

Problema con le RE....

2006-01-09 Thread Alessandro
Problema con le RE Ho questa stringa "3 HOURS, 22 MINUTES, and 28 SECONDS" e la devo 'dividere' nelle sue tre parti "3 HOURS", "22 MINUTES", "28 SECONDS". La cosa mi viene molto con le RE...(inutile la premessa che sono molto alle prime armi con RE e Python) Qesito perchè se eseguo questo cod

filling out forms online with python

2006-01-09 Thread Steve Young
Hi, I was wondering if there's a way to fill out forms online using python. Say for example if you wanted to make a search on some search engine without having to actually open a browser or something like that. Thanks. -Steve   Yahoo! DSL Something to write home about. Just $16.99/mo. or

Re: modifying DLL string table programatically (Was: Win32 Binary-only for 2.3.x?)

2006-01-09 Thread Thomas Heller
Trent Mick <[EMAIL PROTECTED]> writes: > [Thomas Heller wrote] >> py2exe also does something like this in the copy of pythonXY.dll that it >> creates, to avoid the resulting exe pulling in sys.path entries from the >> registry. > > Do you have a quick pointer to the code that does this? I wasn't e

modifying DLL string table programatically (Was: Win32 Binary-only for 2.3.x?)

2006-01-09 Thread Trent Mick
[Thomas Heller wrote] > py2exe also does something like this in the copy of pythonXY.dll that it > creates, to avoid the resulting exe pulling in sys.path entries from the > registry. Do you have a quick pointer to the code that does this? I wasn't easily able to automate doing this with COM code

How to create a script that list itself ?

2006-01-09 Thread Patrick Allaire
How to create a script that list itself ? I would like to know, where is the script's code is stored once we start it. I know I can achieve that, using files : print file('myscript.py','rb').read() But is there a way / a variable that contains the current file in memory ? Thanks. Xaqc -- htt

Re: Calling foreign functions from Python? ctypes?

2006-01-09 Thread Ziga Seilnacht
Paul Watson wrote: . . . > I need to call GetVersionInfo() and handle VERSIONINFO information. I > thought that distutils might have something, but I do not see it yet. > Any suggestions? This information is provided with sys.getwindowsversion(). -- http://mail.python.org/mailman/listinfo/pyth

Re: Win32 Binary-only for 2.3.x?

2006-01-09 Thread Thomas Heller
Trent Mick <[EMAIL PROTECTED]> writes: > [Fuzzyman wrote] >> Out of interest, doesn't the Python binary use the registry (and >> environment variables) for building sys.path ? > > Yes, good point... > >> >> Won't you still have conflicting path issues if you use an alternative >> binary with an e

Problem compiling Postgresql-7.3.4 + Python

2006-01-09 Thread Johan Barelds
Hi All, I am trying to compile Postgresql-7.3.4 with the following flags: ../configure --prefix=$(E4LDIR) --with-pgport=5433 --with-python --with-includes=$(E4LDIR)/include/python2.3-e4l --with-libra ries=$(E4LDIR)/lib/python2.3-e4l && \ $(MAKE) This gives me the following compilation e

Re: Building Pywin32 source code?

2006-01-09 Thread Trent Mick
[sam wrote] > Has anyone been able to access the source code for Pywin32 at > sourceforge? I have been able to use TortouseCVS to access other CVS > projects,but with the Pywin32 cvs site, I can not log in. Note that I had the same issue trying to "cvs login" to buildbot's CVS (also on sf.net) the

How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread [EMAIL PROTECTED]
How make a Python script 1. login 2. type password & 3. download file all from a **remote web site**? I'm not comfortable with *MY* software handling the password part. It just seems like trouble if users must tell *my* software their password. Is there a wise way to solve this or avoid this c

Failing unittest Test cases

2006-01-09 Thread Scott David Daniels
There has been a bit of discussion about a way of providing test cases in a test suite that _should_ work but don't. One of the rules has been the test suite should be runnable and silent at every checkin. Recently there was a checkin of a test that _should_ work but doesn't. The discussion got

Re: Win32 Binary-only for 2.3.x?

2006-01-09 Thread Trent Mick
[Fuzzyman wrote] > Out of interest, doesn't the Python binary use the registry (and > environment variables) for building sys.path ? Yes, good point... > > Won't you still have conflicting path issues if you use an alternative > binary with an existing 'normal' install ? ...but it is possible t

Re: Help with dynamic attributes.

2006-01-09 Thread Bruno Desthuilliers
Mr.Rech a écrit : (snip) > > My class's init method takes a list of lists as input argument and I'd > like to create > several attributes each one referencing one item of the passed list. > > Easy-of-use arguments > has led me to call these attributes as x0, x1, x2 and so on. This is a very wro

Re: Calling foreign functions from Python? ctypes?

2006-01-09 Thread Ziga Seilnacht
Sorry, the previous post is wrong. I mixed the function names. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt calling an external app?

2006-01-09 Thread gregarican
Paul Boddie wrote: > What does os.startfile do when invoked with the URL? My impression was > that the startfile function - available only on Windows - doesn't wait > for the command to finish, but I don't run Windows and can't test this. > Any feedback would be appreciated, though, since it's par

Re: Calling foreign functions from Python? ctypes?

2006-01-09 Thread Paul Watson
Neil Hodgson wrote: > Paul Watson: > >> I cannot find any way to get to GetVersionInfo in VBScript (cscript). > > > Set objFSO = CreateObject("Scripting.FileSystemObject") > Wscript.Echo objFSO.GetFileVersion("c:\bin\SciLexer.dll") Many thanks. Just what I needed. (Short of ctypes.) Thank yo

Re: config errors on Freebsd and python 2.3

2006-01-09 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Safeer Tabassum wrote: >> why you are not installing it from ports? > The port distribution doesn't build to support Tkinter. Looks like they changed that recently - because it used to build it by default. Tkinter is now installed by x11-toolkits/

Re: PyQt calling an external app?

2006-01-09 Thread Paul Boddie
gregarican wrote: > [os.system using the start command on Windows] > When I use this the PyQt app freezes up and only when I forcefully > close it does the browser window pop up. What does os.startfile do when invoked with the URL? My impression was that the startfile function - available only o

Re: Spelling mistakes!

2006-01-09 Thread Sybren Stuvel
Xavier Morel enlightened us with: > 1- The unit test will obviously fail in this case, telling you in > which code unit the issue is Given the assumption the same mistake hasn't been made in the test as well. Sybren -- The problem with the world is stupidity. Not saying there should be a capital

PyQt calling an external app?

2006-01-09 Thread gregarican
What's the easiest and cleanest way of having PyQt bring up an external application? In this case I am looking to launch Internet Explorer and bring up a specific URL. I don't care about tracking the IE process' activity and don't want PyQt to wait until the browser is closed. I tried the following

email modules and attachments that aren't there

2006-01-09 Thread Russell Bungay
Hello all, I have written a short function, based on a recipe in the Python Cookbook, that sends an e-mail. The function takes arguments that define who the e-mail is to, from, the subject, the body and an optional list of attachments. The function works also perfectly, bar one slight problem

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Hans Nowak
Anton Vredegoor wrote: > Now going back to my claim that elitism is bad, I think you are the > perfect proof of my point. You live in luxurious (with respect to > community, education and financial aspects of being a computer scientist > or programmer) conditions and can just not understand why so

  1   2   3   >