Re: String Identity Test

2005-11-02 Thread Thomas Moore
Hi: > Were you planning to write code that relied on id(x) being different > for different but identical strings x or do you just try to understand > what's going on? > Just try to understand what's going on. Thanks All. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's website does a great disservice to the language

2005-11-02 Thread James Stroud
On Tuesday 01 November 2005 09:45, CppNewB wrote: > First comment; "I hope the language is designed better than the site." The website is beautiful. I just looked. Its the logo that is a little off-putting. It makes a pretty bad first impression. Compare it to java's. Even the php logo looks bet

Re: wxPython: updating style of StaticText from event generated by button

2005-11-02 Thread KvS
> I would suggest you to take a look to the wxPython "custom" buttons; you can > find them in the demo, under "Custom Controls" ==> "GenericButtons". There > you will find "old style" buttons, that can be simple buttons or toggle > buttons (with "up" and "down" states). I have XP, and they look li

Need help testing HTTP based copy commands

2005-11-02 Thread Wilfred Nilsen
We have developed some Python scripts that are similar in functionality to common UNIX commands for working with files. The commands operate directly with one or several web-servers. We are new to Python programming and would therefore appreciate some feedback on the Python scripts. The docume

Importing Modules

2005-11-02 Thread Walter Brunswick
What is the best way to import all modules in a directory (and possibly a subdirectory/subdirectories), possibly including conditionals, such as regexes? -- http://mail.python.org/mailman/listinfo/python-list

Re: Rich __repr__

2005-11-02 Thread Erik Max Francis
Ben Finney wrote: > Well that just begs the question: what's a good way (or a Right Way, > if that exists) to write a __str__ for a complex class? Whatever is most useful for the programmer during debugging. > An idempotent __repr__ output seem to be the ideal, but as you say, > there are many

expanding dictionary to function arguments

2005-11-02 Thread Noah
I have a dictionary that I would like to expand to satisfy a function's agument list. I can used the ** syntax to pass a dictionary, but this only works if each key in the dictionary matches an argument. I cannot pass a dictionary that has more keys than the function has arguments. # Example 1 - T

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-02 Thread Peter Hansen
Mike Meyer wrote: > Xah Leh is incompetent, but > apparently well-intentioned. In your view is that ("well-intentioned") an established fact at this point? I was still waiting for conclusive evidence. So far the evidence appears rather strongly in favour of a verdict of true trollism, which

Re: Flat file, Python accessible database?

2005-11-02 Thread Peter Hansen
Karlo Lozovina wrote: > [EMAIL PROTECTED] (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) wrote in > news:[EMAIL PROTECTED]: > >>If you need it to be SQL-like, SQLite seems to be the right thing. > > Tried that one, but had some problems setting things up. On the other > hand, BerkeleyDB + Pybsddb work

Re: callback for ctypes

2005-11-02 Thread Peter Hansen
David Wahler wrote: > Also, I can't find any references for this "QImage Camera". Could you > post some additional information? Trying "Qimaging" instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Modules

2005-11-02 Thread Peter Hansen
Walter Brunswick wrote: > What is the best way to import all modules in a directory > (and possibly a subdirectory/subdirectories), possibly including > conditionals, such as regexes? The "best" was, as always, depends on what your use case is. Why do you want to do this? What will you do wi

Re: expanding dictionary to function arguments

2005-11-02 Thread Bruno Desthuilliers
Noah a écrit : > I have a dictionary that I would like to expand to satisfy a > function's agument list. I can used the ** syntax to pass a dictionary, > but > this only works if each key in the dictionary matches an argument. > I cannot pass a dictionary that has more keys than the function has >

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-02 Thread [EMAIL PROTECTED]
Something I don't quite understand, if people think it is troll, just ignore it. What I see is that people are feeding it by commenting about either him or his post. I saw a number of threads ended up that way(like the rather long one about Microsoft). And if anyone wants to take the responsibibli

Re: Scanning a file

2005-11-02 Thread Steven D'Aprano
David Rasmussen wrote: > Lasse Vågsæther Karlsen wrote: > >> David Rasmussen wrote: >> >> >>> If you must know, the above one-liner actually counts the number of >>> frames in an MPEG2 file. I want to know this number for a number of >>> files for various reasons. I don't want it to take forev

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Nevermind my previous reply: I've been fixing up the code and > understand it. I'm at a nifty 80 lines where I am at now rather than > 209 lines in the previous version! The changes are immense! > > The only problem I have is whenever player two goes, it says the cell

python CGI,sybase and environ variables

2005-11-02 Thread eight02645999
hi i am writing a CGI to process some database transactions using the Sybase module. so in my CGI script, i have: ... import Sybase import cgitb; cgitb.enable(display=1 , logdir="/tmp/weblog.txt") ... ... the problem is , everytime i have ImportError: No module named Sybase flagged out. at first

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Greetings! I am trying to make a multiplayer (no AI, 2 person) game of >tic tac toe in Python. So far it has been pretty simple. My only >concern is with the win checking to see if a person has won. At first >it looked like it was wor

Re: Problems with emulation of numeric types and coercion rules

2005-11-02 Thread ziga . seilnacht
Never mind, I forgot that class inheritance tree is a tree. Resulting type of adding Broken and Working from previous example would also depend on the order of operands. Ziga -- http://mail.python.org/mailman/listinfo/python-list

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread ale . of . ginger
The code's indentation was fine - I forgot to declare cell in player two's section and not just in player one. The code (including the win check, for once!) is working. The last obstacle is my tie checker; it doesn't seem to like what I have: if ((gameboard[0:9] is 'X' or 'O') and (win == 0)):

Re: Rename files with numbers

2005-11-02 Thread Dudu Figueiredo
I wrote a simpler script based in Micah Elliott's help, it's to add the band name to mp3 files imported with iTunes: import glob, os def renamer_itunes(songdir, band): """ Rename mp3 files imported from itunes, transformation: Song Name.mp3 --> Artists - Song Name.mp3 """ os.c

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-02 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Xah Leh is incompetent, but >> apparently well-intentioned. > In your view is that ("well-intentioned") an established fact at this > point? I was still waiting for conclusive evidence. No, it's not an established fact, which is why

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: > The code's indentation was fine - I forgot to declare cell in player > two's section and not just in player one. > > The code (including the win check, for once!) is working. The last > obstacle is my tie checker; it doesn't seem to like what I have: > > if ((gameboard

Re: Flat file, Python accessible database?

2005-11-02 Thread alex23
Karlo Lozovina wrote: > I've been Googling around for _small_, flat file (no server processes), > SQL-like database which can be easily access from Python. Although it doesn't support SQL queries, Metakit (http://www.equi4.com/metakit/python.html) is a very lightweight and easy to use db with a ni

Re: Pickling and unpickling inherited attributes

2005-11-02 Thread Alex
> > > OK, but do be aware that slots was intended solely as a > memory-conservation measure where large numbers of objects are being > created. You are therefore subverting its true intent by using it to > limit the assignment of extra attributes (and there has been much recent > discussion on thi

Re: python CGI,sybase and environ variables

2005-11-02 Thread eight02645999
i have solved the problem. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing empties

2005-11-02 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: ... > >>>the canonical idiom when you need such distinction is: > >>> > >>>_not_there = object() ... > >> What's your preferred idiom when you're dealing with storable objects? > > > >What's a "storable object"? You mean, something that can be pickled, or > >p

Re: Object-Relational Mapping API for Python

2005-11-02 Thread Kent Johnson
Aquarius wrote: > I explored Java's Hibernate a bit and I was intrigued by how you can > map entity objects to database tables, preserving all the relations and > constraits. I am interested if there is something like this for Python > - I noticed some APIs in the "Cheeseshop", but most of them wer

dictionary that have functions with arguments

2005-11-02 Thread s99999999s2003
hi i have a dictionary defined as execfunc = { 'key1' : func1 } to call func1, i simply have to write execfunc[key1] . but if i have several arguments to func1 , like execfunc = { 'key1' : func1(**args) } how can i execute func1 with variable args? using eval or exec? thanks -- http://mail.

Re: dictionary that have functions with arguments

2005-11-02 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > hi > i have a dictionary defined as > > execfunc = { 'key1' : func1 } > > to call func1, i simply have to write execfunc[key1] . No, you ALSO have to write ( ) [[parentheses]] after that. MENTIONING a function doesn't call it, it's the parentheses that do it. > bu

Re: dictionary that have functions with arguments

2005-11-02 Thread Ron Adam
[EMAIL PROTECTED] wrote: > hi > i have a dictionary defined as > > execfunc = { 'key1' : func1 } > > to call func1, i simply have to write execfunc[key1] . > but if i have several arguments to func1 , like > > execfunc = { 'key1' : func1(**args) } > > how can i execute func1 with variable ar

Re: Importing Modules

2005-11-02 Thread Walter Brunswick
The purpose is rather irrelevant. The modules could be used for an assortment of tasks. By conditionals I mean if the name of a module contains a substring, such as "asdf" (i.e. "asdf" in module) or matches a pattern of some sort, for example, all modules which match the regex "module[\d]+\.py"

Re: Importing Modules

2005-11-02 Thread Sam Pointon
On the second point, a combination of sys.path, os.listdir and __import__ should do what you're after, although sifting through the whole of sys.path and subfolders from Python, rather than the interpreter itself, could be slow. (And it'll be redundant as well - __import__ will have do the same th

Re: looking for a good python module for MS SQL server

2005-11-02 Thread Frank Millman
Peter Decker wrote: > On 11/1/05, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > > Things didn't change, as last update to adodbapi was long time ago... I > > had no problems with stored procedures accessed using cursor's execute() > > method (i.e. execute('exec sp_someproc, param')), but I never trie

Re: dictionary that have functions with arguments

2005-11-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: > hi > i have a dictionary defined as > > execfunc = { 'key1' : func1 } > > to call func1, i simply have to write execfunc[key1] . > but if i have several arguments to func1 , like > > execfunc = { 'key1' : func1(**args) } > > how can i execute func1 with variable args? >

Re: dictionary that have functions with arguments

2005-11-02 Thread Neal Norwitz
Ron Adam wrote: > > Eval or exec aren't needed. Normally you would just do... > > execfunc['key1'](**args) > > If your arguments are stored ahead of time with your function... > > Committed revision 41366. > > You could then do... > > func, args = execfunc['key1'] > func(**args)

Running autogenerated code in another python instance

2005-11-02 Thread Paul Cochrane
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to what I really should do. I've had a look through Programming Python and the Python Cookbook, which hav

Re: Importing Modules

2005-11-02 Thread Devan L
Sam Pointon wrote: > On the second point, a combination of sys.path, os.listdir and > __import__ should do what you're after, although sifting through the > whole of sys.path and subfolders from Python, rather than the > interpreter itself, could be slow. (And it'll be redundant as well - > __imp

Re: dictionary that have functions with arguments

2005-11-02 Thread Leif K-Brooks
Alex Martelli wrote: > execfunc = { 'key1' : (func1, ()), > 'key2' : (func2, args) } > > now, something like: > > f, a = execfunc[k] > f(**a) > > will work for either key. Shouldn't func1's args be a dictionary, not a tuple? -- http://mail.python.org/mailman/listinfo/pytho

Re: Running autogenerated code in another python instance

2005-11-02 Thread Bengt Richter
On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> wrote: >Hi all, > >I've got an application that I'm writing that autogenerates python code >which I then execute with exec(). I know that this is not the best way to >run things, and I'm not 100% sure as to what I really

Re: Running autogenerated code in another python instance

2005-11-02 Thread Do Re Mi chel La Si Do
Hi! I did not understand anything with your chatterer message. But, perhaps, the code below will help you. @-salutations Michel Claveau def runcode(srcode): import sys,traceback sret=True try: ccod=compile(srcode, 'Paul-code', 'exec') flagcompile=True except: print

Re: Running autogenerated code in another python instance

2005-11-02 Thread Do Re Mi chel La Si Do
With good spaces : def runcode(srcode): import sys,traceback sret=True try: ccod=compile(srcode, 'Paul-code', 'exec') flagcompile=True except: print "compilo-error" flagcompile=False if flagcompile==True: try: exec(ccod

With & marcos via import hooking? (Was Re: Scanning a file)

2005-11-02 Thread Bengt Richter
On Tue, 01 Nov 2005 07:14:57 -0600, Paul Watson <[EMAIL PROTECTED]> wrote: >Paul Rubin wrote: >> [EMAIL PROTECTED] (John J. Lee) writes: >> >>>Closing off this particular one would make it harder to get benefit of >>>non-C implementations of Python, so it has been judged "not worth it". >>>I thin

Re: dictionary that have functions with arguments

2005-11-02 Thread Ron Adam
Neal Norwitz wrote: > Ron Adam wrote: > >>Eval or exec aren't needed. Normally you would just do... >> >>execfunc['key1'](**args) >> >>If your arguments are stored ahead of time with your function... >> >>Committed revision 41366. Committed revision 41366 ? >>You could then do... >>

Burrows-Wheeler (BWT) Algorithm in Python

2005-11-02 Thread DENG
Hi, all I've used Python Bz2 module for times and want to kown something about Burrows-Wheeler (BWT) algorithm, the Bz2 module is wrriten in C, is there a version in Python too? BWT http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/abstracts/src-rr-124.html Python Bz2 module http://labix.org

Re: Flat file, Python accessible database?

2005-11-02 Thread Roman Suzi
On Tue, 1 Nov 2005, Karlo Lozovina wrote: > [EMAIL PROTECTED] (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) wrote in > news:[EMAIL PROTECTED]: > >> If you need it to be SQL-like, SQLite seems to be the right thing. > > Tried that one, but had some problems setting things up. That is strange. SQLite + P

Re: Python and DevTrack?

2005-11-02 Thread Simon Brunning
On 1 Nov 2005 10:57:29 -0800, warpcat <[EMAIL PROTECTED]> wrote: > I'm a python nubie, so be gental. I've been setting up functionality > by managing my Perforce clientspec with python (since it seems all of > P4's commands are avaliable at the prompt), and I'd love to get access > to DevTrack in

Re: Problem with py2exe

2005-11-02 Thread DDany
Hi Miki, I solved this first problem, thank you! I was convinced to done things you suggested me, but... it wasn't!!! I changed the access type of MSVCR71.dll and all went ok! Thank you once again for your interest, bye! P.S Thank you for your final note too, next time I'll make a better subject!

Re: Python's website does a great disservice to the language

2005-11-02 Thread Ed Singleton
I think I'm going to back you up a little bit here. You've gone about this in a bit of a half-assed way (and pissed off a fair few people in the process) but you are right that the site needs a redesign. It uses tables for layout with inline styles and font tags and doesn't really use CSS. It ha

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-02 Thread Svenn Are Bjerkem
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Something I don't quite understand, if people think it is troll, just > ignore it. What I see is that people are feeding it by commenting about > either him or his post. I saw a number of threads ended up that > way(like the rather long o

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > The only problem I have is whenever player two goes, it says the cell > is filled. But the code: > > if gameboard[cell] not in 'OX': >gameboard[cell] = 'X' >else: >print "This cell is already filled." >turnnu

Attributes of builtin/extension objects

2005-11-02 Thread George Sakkis
Hi all, I have a few questions on object introspection of builtins and extension modules. Here's an example: >>> from datetime import date >>> d=date(2003,1,23) >>> d.__dict__ Traceback (most recent call last): File "", line 1, in ? AttributeError: 'datetime.date' object has no attribute '__dic

Re: hello, I want to change n bytes of a binary file

2005-11-02 Thread could ildg
Thanks to Fredrik Lundh,It works~On 11/2/05, Fredrik Lundh <[EMAIL PROTECTED] > wrote:"could ildg" wrote:> > so how can I do the binary stuff? >> 8-bit strings contain bytes.>> > I want a encrypt function like below:> > def encrypt(filename,n):>> f = open(filename,"rb+")>> > a=f.read (n)>> b = encr

Re: Python's website does a great disservice to the language

2005-11-02 Thread Ben Sizer
CppNewB wrote: > But the logos look like they were done in Paint and maybe a > readable default font is in order. I can't believe you think the font there is unreadable. It's left to the browser default, which is usually set to a simple serif font, which in turn is presumably the default because t

Python and Lotus Notes

2005-11-02 Thread Grzegorz Ślusarek
Hello everyone. I have to get data from Lotus Notes and i curious is it possible doing it with Python. I heard that Lotus Notes using COM, so the Python does so maybe it can be done? Anyone have any experiences doing that? Ane help will by apreciated Gregor -- http://mail.python.org/mailman/lis

how to check for unix password

2005-11-02 Thread eight02645999
hi i created a login page that authenticate the user and his/her password to the unix ssystem. what modules can i used to compare the unix password with what the user typed in the cgi form? the password is encrypted (shadowed) so i need to decrypt it first before comparing to what the user typed. o

Re: how to check for unix password

2005-11-02 Thread [EMAIL PROTECTED]
complicated issue. There is lots of authentication sub system that may be in use(PAM, LDAP, Kerberos, /etc/shadow etc.). Each has a different way. If it is linux, I think you should shoot for PAM, for other unix system I have no idea. /etc/passwd is a one way hash, you need the user submit the plai

Re: looking for a good python module for MS SQL server

2005-11-02 Thread Jarek Zgoda
Peter Decker napisał(a): >>Things didn't change, as last update to adodbapi was long time ago... I >>had no problems with stored procedures accessed using cursor's execute() >>method (i.e. execute('exec sp_someproc, param')), but I never tried to >>get any results, just call sp and commit or rollb

Re: tachometer diagram

2005-11-02 Thread F. GEIGER
Could it be http://xoomer.virgilio.it/infinity77/eng/freeware.html#speedmeter you are looking for? HTH Franz GEIGER "Andreas Kaiser" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hello, > > I'am searching for a python solution for display a tachometer diagram. > I prefe

About the Python Expert

2005-11-02 Thread [EMAIL PROTECTED]
Hey, i didnt say i need an expert. wel i did... anyways, i m just saying that Fan is not a good python programmer, he doesnt know enough python to help those who have joined his group, i know its askin a lot, and i m not askin for a private tutor, just someone(s), to pop into the group, see the

How can I setup proxy of urllib2 properly

2005-11-02 Thread [EMAIL PROTECTED]
I got some source code form python's help document. the below: proxy_handler = urllib2.ProxyHandler({'http': 'http://www.example.com:3128/'}) proxy_auth_handler = urllib2.HTTPBasicAuthHandler() proxy_auth_handler.add_password('realm', 'host', 'username', 'password')

SOCKS proxy in Python?

2005-11-02 Thread starmaven
I'm looking for a way to implement socket connections through a SOCKS (4/5) proxy in Python. I don't want to use Twisted or anything complicated - just a simple replacement for the socket library. The only thing I could find was for Python 1.0.1, and I couldn't get that to compile. Apparently it's

Re: tachometer diagram

2005-11-02 Thread Andreas Kaiser
Hi Franz, you're right! Andrea (the developer of these widgets) sends me this link about the wxPython ML. Thanks. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: hello, I want to change n bytes of a binary file

2005-11-02 Thread Ganesan Rajagopal
> "Fredrik" == Fredrik Lundh <[EMAIL PROTECTED]> writes: > if you want to XOR the bytes, you can do something like: > import array > b = array.array("B", a) > for i in range(len(b)): > b[i] = b[i] ^ 255 > b = b.tostring() > or > b = "".join([chr(ord(c) ^ 255) for

Web automation with twill

2005-11-02 Thread qwweeeit
Hi all, this post is a kind of continuation of my "Expanding Python as a macro language" Among the replies [EMAIL PROTECTED] directed me to: http://www.idyll.org/~t/www-tools/twill.html (a python tool with a language to script "web commands") I applied twill to a problem I had solved "by hand" cl

Re: About the Python Expert

2005-11-02 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > Hey, i didnt say i need an expert. wel i did... anyways, i m just > saying that Fan is not a good python programmer, he doesnt know enough > python to help those who have joined his group, i know its askin a > lot, and i m not askin for a private tutor, just someone(s)

Re: Using Python to add thumbnails to Explorer

2005-11-02 Thread c d saunter
John J. Lee ([EMAIL PROTECTED]) wrote: : "Roger Upole" <[EMAIL PROTECTED]> writes: : Or, if not, then you can do it with module ctypes. : http://starship.python.net/crew/theller/ctypes/ : There's an O'Reilly book called something like "win32 shell : programming" that covers this stuff. : John

Re: Flat file, Python accessible database?

2005-11-02 Thread Ganesan Rajagopal
> "Peter" == Peter Hansen <[EMAIL PROTECTED]> writes: > Karlo Lozovina wrote: >> [EMAIL PROTECTED] (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) wrote >> in news:[EMAIL PROTECTED]: >> >>> If you need it to be SQL-like, SQLite seems to be the right thing. >> Tried that one, but had some problems set

Re: Python's website does a great disservice to the language

2005-11-02 Thread Björn Lindström
"Ben Sizer" <[EMAIL PROTECTED]> writes: > I can't believe you think the font there is unreadable. It's left to > the browser default, which is usually set to a simple serif font, > which in turn is presumably the default because the majority of all > books, magazines, and newspapers in existence u

Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Tor Erik S�nvisen
Hi I need a time and space efficient way of storing up to 6 million bits. Time efficency is more important then space efficency as I'm going to do searches through the bit-set. regards tores -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread [EMAIL PROTECTED]
C ? Tor Erik Sønvisen wrote: > Hi > > I need a time and space efficient way of storing up to 6 million bits. Time > efficency is more important then space efficency as I'm going to do searches > through the bit-set. > > regards tores -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Modules

2005-11-02 Thread Peter Hansen
Walter Brunswick wrote: > The purpose is rather irrelevant. The purpose of something is not only relevant but essential when someone asks for the "best" way to do it. For example, without knowing anything of your purpose, I could simply say that writing a module with a series of import stateme

* TypeError - Need help passings args

2005-11-02 Thread Ernesto
My program is below. I'm trying to use two Windows ".exe" files with my command line python interface. I get user input, then call "launchWithoutConsole". This was working OK until I introduced the 'args' part. Now I get the following error everytime I call "launchWithoutConsole": return

Py2Exe produced "binary" shows terminal screen on execution

2005-11-02 Thread Thomas W
I've produced a "binary" version of a python-script using Py2Exe and when run on WinXP it shows a terminal window for a brief moment then the window disappears. How can I avoid this? I want the script to run without being visible at all. Thanks in advance, Thomas -- http://mail.python.org/mailma

computer programming

2005-11-02 Thread server . prime
hello all! if u dont mind, please visit and register in my site www.javaholics.tk for java programming discussions all other programming languages and discussions are welcome! its a gr8 site and a growing community the only advantage is that its got more features as its based on SMF(Simple Machine

Re: About the Python Expert

2005-11-02 Thread Grant Edwards
On 2005-11-02, blahman ([EMAIL PROTECTED]) <> wrote: > Hey, i didnt say i need an expert. wel i did... anyways, i m just > saying that Fan is not a good python programmer, he doesnt know enough > python to help those who have joined his group, They should have "joined a group" that _does_ conta

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Paul Rubin
"Tor Erik Sønvisen" <[EMAIL PROTECTED]> writes: > I need a time and space efficient way of storing up to 6 million bits. Time > efficency is more important then space efficency as I'm going to do searches > through the bit-set. Umm, what kind of searches do you want to do? For speed you want to

Re: dictionary that have functions with arguments

2005-11-02 Thread Alex Martelli
Leif K-Brooks <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > execfunc = { 'key1' : (func1, ()), > > 'key2' : (func2, args) } > > > > now, something like: > > > > f, a = execfunc[k] > > f(**a) > > > > will work for either key. > > Shouldn't func1's args be a dictiona

Re: WTF?

2005-11-02 Thread Alan Kennedy
[James Stroud] > Why do my posts get held for suspcious headers You're probably trying to post through the python-list email address, which has had SPAM problems in the past, because the email address has been used by spammers as a forged from address, meaning the bounces would go to everyone,

Re: Flat file, Python accessible database?

2005-11-02 Thread Steve Holden
Peter Hansen wrote: > Karlo Lozovina wrote: > >>[EMAIL PROTECTED] (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) wrote in >>news:[EMAIL PROTECTED]: >> >> >>>If you need it to be SQL-like, SQLite seems to be the right thing. >> >>Tried that one, but had some problems setting things up. On the other >>ha

Re: Python's website does a great disservice to the language

2005-11-02 Thread beza1e1
Things, which can be done better are: - seperate content and layout (no table design, no font tags, ...) - blue links on blue background are nearly as ugly as visited-purple links on blue background - he frontpage is overloaded. Ok this is worth a discussion: poweruser vs. marketing -- http://ma

Re: how to check for unix password

2005-11-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: > i created a login page that authenticate the user and his/her password > to the unix ssystem. what modules can i used to compare the unix > password with what the user typed in the cgi form? the password is > encrypted (shadowed) so i need to > decrypt it first before co

Re: Windows - Need to process quotes in string...

2005-11-02 Thread Ernesto
Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: 'super' to only be used for diamond inheritance problems?

2005-11-02 Thread Colin J. Williams
Giovanni Bajo wrote: > Alex Hunsley wrote: > > >>I've seen a few discussion about the use of 'super' in Python, >>including the opinion that 'super' should only be used to solve >>inheritance diamond problem. (And that a constructor that wants to >>call the superclass methods should just call the

Fredericksburg, VA ZPUG Meeting: November 9, 7:30-9:00 PM

2005-11-02 Thread Benji York
Please join us November 9, 7:30-9:00 PM, for the sixth meeting of the Fredericksburg, VA Zope and Python User Group ("ZPUG"). Squid and Zope! Using Zope for newspaper publishing! The dangers of object oriented inheritance! Free food! * Andrew Sawyers will discuss using the open source cache

Re: expanding dictionary to function arguments

2005-11-02 Thread Noah
Bruno Desthuilliers a écrit : > Noah a écrit : > If you have control over the API functions declarations, makes them so: > def my_api_func(arg1='', arg2='whatever', **kwargs): >code_here Unfortunately I cannot change the API functions. I should have mentioned that. Yours, Noah -- http://ma

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > Six megabytes is pretty much nothing on a modern computer. I'd store > the things as a string of "0" and "1", and then use .find (or maybe > the in keyword) for doing the searches. > > This doesn't work very well if you're going to mutate the string, > thou

Re: Spambayes modifications with web services

2005-11-02 Thread benmorganpowell
Thank you for the flippant remarks. Let's just say that I found them to be unproductive. I would like to point out the process was not designed to be automatic and I don't believe made such a statement. I should clarify that my desire was to list each domain that was contained in a spam email, so

Re: Web automation with twill

2005-11-02 Thread Grig Gheorghiu
You might want to post your question to the twill mailing list. Info about the list is available at Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Mike Meyer
"Tor Erik Sønvisen" <[EMAIL PROTECTED]> writes: > I need a time and space efficient way of storing up to 6 million bits. Time > efficency is more important then space efficency as I'm going to do searches > through the bit-set. Six megabytes is pretty much nothing on a modern computer. I'd store

Re: Python's website does a great disservice to the language

2005-11-02 Thread Ben Sizer
Björn Lindström wrote: > Actually it does set some fonts ("avantgarde" and > "lucidasomethignorother") as first choices. I guess you, like me, and > probably most people in here, doesn't have those installed. As far as I can tell, those fonts are only set for 'pre' and 'h' tags. -- Ben Sizer -

Re: * TypeError - Need help passings args

2005-11-02 Thread Juho Schultz
Ernesto wrote: > My program is below. I'm trying to use two Windows ".exe" files with > my command line python interface. I get user input, then call > "launchWithoutConsole". This was working OK until I introduced the > 'args' part. Now I get the following error everytime I call > "launchWitho

Re: Py2Exe produced "binary" shows terminal screen on execution

2005-11-02 Thread Peter Hansen
Thomas W wrote: > I've produced a "binary" version of a python-script using Py2Exe and > when run on WinXP it shows a terminal window for a brief moment then > the window disappears. How can I avoid this? I want the script to run > without being visible at all. You probably used the "console" opti

Re: Python and Lotus Notes

2005-11-02 Thread Graham Fawcett
Grzegorz Slusarek wrote: > Hello everyone. I have to get data from Lotus Notes and i curious is it > possible doing it with Python. I heard that Lotus Notes using COM, so > the Python does so maybe it can be done? Anyone have any experiences > doing that? > Ane help will by apreciated Yes, it's p

Re: MoinMoin - Can't create new pages

2005-11-02 Thread Kolossi
ferg, did you get any more replies on this, or figure it out somehow? I've got exactly the same problem with IIS5, W2K and Moin 1.3.5 - works fine except gives 404 for non-existent pages. -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Alex Martelli
Paul Rubin wrote: ... > You can use re.search on array.array byte vectors. I don't know how > the speed compares with string.find. Pretty well, though of course one should measure on representative cases for one's specific application needs: Helen:~ alex$ python -mt

where to download md5.py?

2005-11-02 Thread Bell, Kevin
I've been looking around, but haven't found a place to download the md5.py module. I need it to run the dupinator.py Anyone know where to find it? Kev -- http://mail.python.org/mailman/listinfo/python-list

File renaming recipe (was: Rename files with numbers)

2005-11-02 Thread Micah Elliott
On Nov 01, Dudu Figueiredo wrote: > I wrote a simpler script based in Micah Elliott's help... I expanded my code from this thread to be a Cookbook recipe. It has no specificity for MP3 renaming, but is generic to files with shell-unfriendly names. It should usable as-posted if anyone needs to cl

Re: where to download md5.py?

2005-11-02 Thread Stefan Näwe
Bell, Kevin wrote: > I've been looking around, but haven't found a place to download the > md5.py module. I need it to run the dupinator.py > > Anyone know where to find it? Google knows... Stefan -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Attributes of builtin/extension objects

2005-11-02 Thread Steven Bethard
George Sakkis wrote: > - Where do the attributes of a datetime.date instance live if it has > neither a __dict__ nor __slots__ ? > - How does dir() determine them ? py> from datetime import date py> d = date(2003,1,23) py> dir(date) == dir(d) True py> for attr_name in ['day', 'month', 'year']: ...

Re: python CGI,sybase and environ variables

2005-11-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: > hi > i am writing a CGI to process some database transactions using the > Sybase module. > so in my CGI script, i have: > > ... > import Sybase > import cgitb; cgitb.enable(display=1 , logdir="/tmp/weblog.txt") > ... > ... > > the problem is , everytime i have ImportErr

  1   2   3   >