Bitwise OR?

2006-03-24 Thread xkenneth
Why is 3500 | -67 equal to 3500 instead of -3567? -- http://mail.python.org/mailman/listinfo/python-list

Re: Strings and % sign fails - Help Please

2006-03-24 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > heh.. It works except I am using psycopg.Binary(somebinarystructure), > and I am not really doing it by hand to just add the extra %, and > psycopg.Binary doesn't do it. I'd imagine it's a bug with psycopg > package. or a bug in your use of Binary. what exactly are you

Re: doctest, unittest, or if __name__='__main__'

2006-03-24 Thread Fredrik Lundh
Marc 'BlackJack' Rintsch wrote: > I see it this way: `unittest` is for testing code and `doctest` is for > testing examples in docstrings. If you put all your tests in the > docstrings there will be much code that's quite irrelevant for documenting > the function/method/class. so put the tests i

RE: pydoc does not like this file

2006-03-24 Thread Joram Agten
I'm not trying to run py2exe I'm trying to generate a html file with documentation (hence pydoc -w) (python -w doesn't even exist) I have a directory whith 4 files: checkvalue.py <-- the actual source with documentation helperfunctions.py <-- some extra functions setup.py<-- set

Re: Strange metaclass behaviour

2006-03-24 Thread Michele Simionato
> After 5 years of Python, I still find it impressive how much > vodoo and mojo one can do here :-) True ;) However, I should point out that I never use this stuff in production code. I have found out that for my typical usages metaclasses are too much: a class decorator would be enough and much

Re: Bitwise OR?

2006-03-24 Thread Diez B. Roggisch
xkenneth schrieb: > Why is 3500 | -67 equal to 3500 instead of -3567? It isn't - its -67. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: overlapping sets

2006-03-24 Thread Michael Spencer
kpp9c wrote: > I have a question... and ... whew ... i am gonna be honest, i haven't > the slightest clue how to even start ... i am not sure if i used up all > my good will here or can take a mulligan.. i love to try to at least > post some lame broken code of my own at first... but like i said, n

Re: Bitwise OR?

2006-03-24 Thread Tim N. van der Leeuw
xkenneth wrote: > Why is 3500 | -67 equal to 3500 instead of -3567? Well that's funny... On my computer, python says it's -67. Java also says it's -67. Haven't yet looked at the actual bits of both values. What Python implementation and what machine do you have? --Tim -- http://mail.python.or

Re: Question about raw string and regex

2006-03-24 Thread jlowery
> classfix.py is not an *example* script. It is (was!) a *tool* script. I see. 2.4.2 includes a tool for modifying 0.9.8 python classes to 1.1 somthing format using a now-defunct regex module. Oh, okay. Very useful, I can see why it would still be included as part of the distribution. I was using

Re: Question about raw string and regex

2006-03-24 Thread jlowery
I understood the comment, just misinterpreted the meaning of the first statement. And speaking of my attitude, it's just as bad as anyone else's here. Double check the membership of the comp.lang.python set... -- http://mail.python.org/mailman/listinfo/python-list

Re: Why "class exceptions" are not deprecated?

2006-03-24 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > The OP points out an ambiguity in the docs, and as usual, > gets told he can't read, etc. How typical. where did anyone tell the OP that he can't read? it's pretty clear that you have trouble reading things without mixing them up with your own preconceptions, but we a

Problem binding to Active Directory

2006-03-24 Thread Rudy Schockaert
I use the following script:from win32com.client import GetObject, Dispatchuser=''password=''default_naming_context = GetObject("LDAP://rootDSE").Get("defaultNamingContext")ad = GetObject("LDAP:").OpenDSObject("LDAP://%s" % default_naming_context, user, password, 1 + 512) If user & password contain

Re: Bitwise OR?

2006-03-24 Thread Tim N. van der Leeuw
Actually, following up to my own reply: 3500 | 67 = 3567. So perhaps that sets your expectations for 3500 | -67. But try -3500 | -67 for fun: it is -3 Bitwise or is no arithmetic and if you want to predict something about the resulting integers, you should know something about how they are st

Re: encoding problems (� and

2006-03-24 Thread Duncan Booth
Peter Otten wrote: >> You can replace ALL of this upshifting and accent removal in one blow >> by using the string translate() method with a suitable table. > > Only if you convert to unicode first or if your data maintains 1 byte > == 1 character, in particular it is not UTF-8. > There's a ni

Re: Multiplying all the values in a dictionary

2006-03-24 Thread Felipe Almeida Lessa
Em Qui, 2006-03-23 às 21:23 -0800, Adam DePrince escreveu: > Wait! It occured to me. Why are we touching the key at all. This is > a dictionary with mutable values. This idea occured to me but I always forget about the [:] trick, so I didn't try it :). > Now, we *know* that all of the values a

About Image Size

2006-03-24 Thread ChengGong
Finally I found that getSize()can be used to show the size of the image. but here I got another problem. these code is used to show the last uploaded picture's size. But when I run the method it says Error Type: AttributeError Error Value: 'str' object has no attribute 'getSize' Could a

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dinko Tenev
Dirk Thierbach wrote: > Dinko Tenev <[EMAIL PROTECTED]> wrote: > >> > I don't see immediately how exactly this is going to work. Unless I'm > >> > very much mistaken, a FSA in the classical sense will accept or reject > >> > only after the whole sequence has been consumed, and this spells > >> > e

Re: About Image Size

2006-03-24 Thread ChengGong
Problem was solved thanks Cheng -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dinko Tenev
[EMAIL PROTECTED] wrote: > Call a wc 'free' if it satisfies the propery that every letter 'a' in > it appears only in the form '*a*', and 'anchored' otherwise. What if > all wc's are free? How does this affect the DFA? Does it minimize > nontrivially? Keep in mind I'm new to DFA theory. There woul

Re: Linear regression in NumPy

2006-03-24 Thread nikie
Robert Kern wrote: > Both functions are described in the full book. Were you just looking at the > sample chapter? No, I've got the full PDF by mail a few days ago, "numpybook.pdf", 261 pages (I hope we're talking about the same thing). I entered "linear_least_squares" and "polyfit" in acrobat's "

Re: encoding problems (é and è)

2006-03-24 Thread Peter Otten
Duncan Booth wrote: > There's a nice little codec from Skip Montaro for removing accents from > latin-1 encoded strings. It also has an error handler so you can convert > from unicode to ascii and strip all the accents as you do so: > > http://orca.mojam.com/~skip/python/latscii.py > import

Re: imap folder scanner

2006-03-24 Thread Sebastjan Trepca
A very simple example... import imaplib m = imap.IMAP4() m.login(username,password) m.select('myfolder') status, data = m.search(None,'(SUBJECT "BIKES")') assert status=='OK', "Error. Message: %s"%data data = data[0] #you get your results in a list and search returns only one result assert data,"N

Re: Bitwise OR?

2006-03-24 Thread Clemens Hepper
To look at the bit-structure i've implemented a little function: def bitstring(number, digits=32): """lsb-->msb""" result = "" for a in xrange(digits): if number & 1: result += '1' else: result += '0' number >>= 1 return result I wonder if there is something lik

Re: encoding problems (é and è)

2006-03-24 Thread John Machin
On 24/03/2006 8:11 PM, Duncan Booth wrote: > Peter Otten wrote: > > >>>You can replace ALL of this upshifting and accent removal in one blow >>>by using the string translate() method with a suitable table. >> >>Only if you convert to unicode first or if your data maintains 1 byte >>== 1 character

Re: New development windows, IronPython or PythonWin

2006-03-24 Thread Dan
>> IronPython is currently nowhere near production quality. I would not >> recommend it. I realise its in beta. But long term, do you think that the win32com, win32gui etc... will have no support because everyone jumps on the Microsoft bandwagon? Aren't the windows support extensions supported pri

Re: Bitwise OR?

2006-03-24 Thread Clemens Hepper
Hello, I've written a little (optimized) method to get a bit-string: def bitstringneg(number, digits=32): """optimized for negative numbers""" result = "" for a in xrange(digits): if number & 1: result += '1' else: result += '0' number >>= 1 return result def bits

Re: Strange metaclass behaviour

2006-03-24 Thread Ziga Seilnacht
Michele Simionato wrote: There is a minor bug in your code: > def thisclass(proc, *args, **kw): >""" Example: >>>> def register(cls): print 'registered' >... >>>> class C: >...thisclass(register) >... >registered >""" ># basic idea stolen from zope.interf

Re: encoding problems (é and è)

2006-03-24 Thread Peter Otten
John Machin wrote: > 0x00d0: ord('D'), # Ð > 0x00f0: ord('o'), # ð > Icelandic capital eth becomes D, OK; but the small letter becomes o!!! I see information flow from Iceland is a bit better than from Armenia :-) > Some of the transformations are a little unfortunate :-( The OP, as you pointed

Re: Strange metaclass behaviour

2006-03-24 Thread Michele Simionato
Well, I would not call it a bug, I would call it to cheat ;) The assert is there I just wanted to prevent accidents, not to *really* ensure that 'thisclass' is called inside a class statement. Do you know of any reliable method to enforce that restriction? Michele Simionato -- http:/

Re: mydate.strftime('%x') and cgi script

2006-03-24 Thread Sibylle Koczian
Marc 'BlackJack' Rintsch schrieb: > In <[EMAIL PROTECTED]>, Sibylle Koczian wrote: > >> >>The web server is on my machine - doesn't it use its regional settings? > > > The settings are per user and stored in environment variables. Apache > clears most of them at start. > > > > `setlocale()`

Re: multiple assignment

2006-03-24 Thread Magnus Lycka
Anand wrote: > Suppose i have a big list and i want to take tke the first one and rest > of the list like car/cdr in lisp. > is there any easy way to do this in python? It seems like overkill to me to make the syntax more complex just to avoid writing a one-line function. def first_rest(seq): ret

Upload and Resize image problem HELP!!!

2006-03-24 Thread ChengGong
I use following Python Script to upload file and image's but I can not specify a folder to store image. can any one help me? And I want to resize all the pictures, What shall I do? Finished thanks Cheng -- http://mail.python.org/mailman/listinfo/python-list

Re: Bitwise OR?

2006-03-24 Thread Tim N. van der Leeuw
I wonder what causes one version to be faster for positive, and the other faster for negative numbers? I can see that the pos-version doesn't make as many iterations as the neg version, but it doesn't pad the length of the result to the requested number of digits and potentially produces more digit

Re: Strange metaclass behaviour

2006-03-24 Thread Michele Simionato
Ziga Seilnacht wrote: > >>> def in_class_statement2(): > ... frame = sys._getframe(1) > ... return '__module__' in frame.f_locals and not \ > ...'__module__' in frame.f_code.co_varnames On second thought, to break this check is less easy than I expected, so maybe it is reliable

Re: raw_input

2006-03-24 Thread Peter Hansen
Tim Williams (gmail) wrote: > The following will accept any subset of "carmel" in upper, lower or > mixed case > > EG Carmel, carmel, Carm, mel etc > > >>> if raw_input ("hello what's your name? ").lower() in 'carmel': > print "Ahh the boss's wife" It's so powerful, it accepts ev

Re: Python has a new Logo

2006-03-24 Thread Josef Möllers
Xah Lee wrote: > Python has a new logo! So does the bakery around the corner! Oh ... and by the way, our butcher now has a new till. 'thought you'd like to know. -- josef punkt moellers bei gmx punkt de -- http://mail.python.org/mailman/listinfo/python-list

RE: Remove integer from float number

2006-03-24 Thread Michael Yanowitz
Sorry about the Top Posting that I did before. It is just the style I am used to using, and I didn't realize that it was different here. I won't do it again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Remove integer from float number

2006-03-24 Thread Peter Hansen
kpp9c wrote: > okay... out of curiousity... how would you then seperate the interger > value from the fractional part do something to one side and then put it > back together... like if you had 8.01 and you want to add to the '8' > part in one way (ordinary decimal) and add to the .01 part modulo >

Re: overlapping sets

2006-03-24 Thread Gerard Flanagan
kpp9c wrote: > I have a question... and ... whew ... i am gonna be honest, i haven't > the slightest clue how to even start ... i am not sure if i used up all > my good will here or can take a mulligan.. i love to try to at least > post some lame broken code of my own at first... but like i said,

Suggestion for Web App

2006-03-24 Thread Harlin Seritt
I want to make a recommendation to a group of internal customers where I work concerning a Python web framework. They are seeking to build a portal that can handle around 5000 total users but probably no more than 100-200 simultaneous users. This is supposed to serve mainly static content - the co

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dirk Thierbach
Dinko Tenev <[EMAIL PROTECTED]> wrote: > Dirk Thierbach wrote: [One cannot escape exponential behaviour] >> But you cannot get rid of this. Consider S = {a, b}, W = {a}. >> Then there are |S|^n result elements for n > 1, and you have to enumerate >> all of them. > Yes, but then, they are in the

Re: Bitwise OR?

2006-03-24 Thread Diez B. Roggisch
Tim N. van der Leeuw wrote: > I also wonder if it wouldn't be faster to put the numbers into a list > and join the list into a string -- did you test with that? It will be faster - the naive string concatenation is quadratic, whereas the list-based approach is linear. Diez -- http://mail.python.

Re: COM callbacks in Python

2006-03-24 Thread Dan
Looked at the makepy, code now looks like this: import win32com.client import win32gui import time import pythoncom finished = 0 defaultNamedNotOptArg=pythoncom.Empty class ADOEvents: def OnRecordsetChangeComplete(self, adReason=defaultNamedNotOptArg, pError=defaultNamedNotOptArg,

Re: Bitwise OR?

2006-03-24 Thread Adam DePrince
On Fri, 2006-03-24 at 12:55 +0100, Clemens Hepper wrote: > Hello, > > I've written a little (optimized) method to get a bit-string: > > def bitstringneg(number, digits=32): > """optimized for negative numbers""" > result = "" > for a in xrange(digits): > if number & 1: > result +=

Caching in memory for Apache

2006-03-24 Thread Simon Johnson
Dear All, I have decided to take the big plunge and drop the Microsoft platform and use Mod_Python and Apache in it's place. I've never used Linux before this project so it's a really big learning curve, but so far it's going well. I've managed to create some simple pages using the basic of Pytho

Re: Multiplying all the values in a dictionary

2006-03-24 Thread Adam DePrince
Droppings from other timing tests; starbucks was kicking me out and I was in a hurry. Cheers - Adam DePrince -- http://mail.python.org/mailman/listinfo/python-list

Re: COM callbacks in Python

2006-03-24 Thread Dan
Ok, seems to fire at least once now, had to implement OnWillChangeRecordset as well. Definitely don't have to implement all the events though. Still not sure why its not acting like it should. Maybe I am looking at the wrong event? I want to know if the database has changed when someone else enters

Re: Caching in memory for Apache

2006-03-24 Thread Harlin Seritt
Pickle (http://www.network-theory.co.uk/docs/pytut/tut_58.html) comes to mind when anyone mentions wanting to save a value, method, object, etc without writing to storage (file or db). Is it possible for you to post some code? There may be an alternative algorithm so you can avoid writing to "memor

What's the best way to learn perl for a python programmer?

2006-03-24 Thread vj
I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl. I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggest

Re: Upload and Resize image problem HELP!!!

2006-03-24 Thread Diez B. Roggisch
ChengGong wrote: > I use following Python Script to upload file and image's but I can not > specify a folder to store image. > can any one help me? And I want to resize all the pictures, What shall > I do? YOu should go for the ZOPE mailing list: http://mail.zope.org/mailman/listinfo/zope Your

Re: path to modules per import statement

2006-03-24 Thread AndyL
[EMAIL PROTECTED] wrote: >>For instance: "import my.path.module" would load module from >>./my/path/module.py? > > > Yeah, just do that. I don't understand the question, it works just like > this today. > I work on rather big set of Python applications: something like 100 .py files divided int

Re: UML from py sources

2006-03-24 Thread Florian Diesch
"Ravi Teja" <[EMAIL PROTECTED]> writes: > Not to interrupt the valuable lesson with Google :-) > Boa Constructor. dia and dia2code Florian -- Es gibt Leute, die von sich behaupten "wenn ich Kaffee trinke, kann ich nicht schlafen!". Bei mir ist das umgekehrt: Wenn ich schlafe, kann ich keine

Re: What's the best way to learn perl for a python programmer?

2006-03-24 Thread Jorge Godoy
"vj" <[EMAIL PROTECTED]> writes: > I've been given a project which requires writing scripts that need to > be run on over 3000 servers. Only about 15% of them have python > installed on them. While all/most of them will have perl. > > I'll try and do as much as possible in pexpect but am sure I'll

image reduction script

2006-03-24 Thread Philippe Martin
Hi, I need to write a script to reduce the resolution/color depth of an image (ex: .jpg) based on a target size. The point is for the target picture to still be "understandable" - yet I target getting down to 5K. Are there libraries out there that could help me start ? Thanks Philippe -- ht

New Python logo in high resolution format

2006-03-24 Thread Brian Quinlan
Is the new Python logo (i.e. http://python.org/images/python-logo.gif) available someone in a high-resolution format? That would be nice to integrate into websites, T-shirts, etc. Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiplying all the values in a dictionary

2006-03-24 Thread JW
As long as you are optimizing, addition is slightly faster than multiplication: $ python2.4 -mtimeit 'h=1;h*=2' 100 loops, best of 3: 0.286 usec per loop $ python2.4 -mtimeit 'h=1;h=h+h' 100 loops, best of 3: 0.23 usec per loop Of course, that's only a 20% decrease, so it might not be wo

Re: path to modules per import statement

2006-03-24 Thread Fuzzyman
AndyL wrote: > [EMAIL PROTECTED] wrote: > >>For instance: "import my.path.module" would load module from > >>./my/path/module.py? > > > > > > Yeah, just do that. I don't understand the question, it works just like > > this today. > > > > I work on rather big set of Python applications: something l

Re: overlapping sets

2006-03-24 Thread Gerard Flanagan
Gerard Flanagan wrote: > kpp9c wrote: > > > I have a question... and ... whew ... i am gonna be honest, i haven't > > the slightest clue how to even start ... i am not sure if i used up all > > my good will here or can take a mulligan.. i love to try to at least > > post some lame broken code of m

Re: Suggestion for Web App

2006-03-24 Thread Fuzzyman
Harlin Seritt wrote: > I want to make a recommendation to a group of internal customers where > I work concerning a Python web framework. They are seeking to build a > portal that can handle around 5000 total users but probably no more > than 100-200 simultaneous users. This is supposed to serve

Re: encoding problems (X and X)

2006-03-24 Thread Walter Dörwald
Duncan Booth wrote: > [...] > Unfortunately, just as I finished writing this I discovered that the > latscii module isn't as robust as I thought, it blows up on consecutive > accented characters. > > :( Replace the error handler with this (untested) and it should work with consecutive accent

Re: Bitwise OR?

2006-03-24 Thread Jean-Paul Calderone
On Fri, 24 Mar 2006 15:40:17 +0100, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >Tim N. van der Leeuw wrote: >> I also wonder if it wouldn't be faster to put the numbers into a list >> and join the list into a string -- did you test with that? > >It will be faster - the naive string concatenatio

Re: path to modules per import statement

2006-03-24 Thread Peter Hansen
AndyL wrote: > [EMAIL PROTECTED] wrote: > I work on rather big set of Python applications: something like 100 .py > files divided into libs and separate sub-applications. > > For now I keep almost everything in one directory but I wish following > structure to be in place: > > app1/ app2

Re: Terminating a subprocess '.exe'

2006-03-24 Thread Ernesto
Fredrik Lundh wrote: > "Ernesto" wrote: > > > I launch a Windows executable and wish to close it from Python. The > > code is below. Normally, my program waits for rib.exe to finish, but > > I'd like to be able to close it from python if possible. (I suppose if > > I was going to do this, I wou

Re: What's the best way to learn perl for a python programmer?

2006-03-24 Thread gene tani
vj wrote: > I've been given a project which requires writing scripts that need to > be run on over 3000 servers. Only about 15% of them have python > installed on them. While all/most of them will have perl. > > I'll try and do as much as possible in pexpect but am sure I'll have do > some signifi

Re: don't understand popen2

2006-03-24 Thread Sion Arrowsmith
Kent Johnson <[EMAIL PROTECTED]> wrote: >Sion Arrowsmith wrote: >> (and please avoid the abuse of raw strings for Windows paths). >Why do you consider that abuse of raw strings? I consider it abuse because it's not what they were invented for. I consider discouraging it to be a good thing in orde

property docstrings

2006-03-24 Thread Darren Dale
I am trying to work with properties, using python 2.4.2. I can't get the docstrings to work, can someone suggest what I'm doing wrong? I think the following script should print "This is the doc string.", but instead it prints: "float(x) -> floating point number Convert a string or number to a flo

Re: Bitwise OR?

2006-03-24 Thread Diez B. Roggisch
> It won't be any faster in CPython 2.4 or newer. This kind of string > concatenation is optimized so as to be linear: > > $ python -m timeit -s "x = ''" "for i in xrange(1000): x += 'x'" > 1000 loops, best of 3: 335 usec per loop > $ python -m timeit -s "x = ''" "for i in xrange(1): x += 'x'

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dirk Thierbach
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Call a wc 'free' if it satisfies the propery that every letter 'a' in > it appears only in the form '*a*', and 'anchored' otherwise. Would '*ab*' be free or anchored? > What if all wc's are free? How does this affect the DFA? I don't know. The impo

Re: image reduction script

2006-03-24 Thread Larry Bates
Philippe Martin wrote: > Hi, > > I need to write a script to reduce the resolution/color depth of an image > (ex: .jpg) based on a target size. > > The point is for the target picture to still be "understandable" - yet I > target getting down to 5K. > > Are there libraries out there that could h

Re: Python has a new Logo

2006-03-24 Thread Joel Hedlund
That's not constructive. I'd like to quote Rich Teer on this subject: ___ /| /| | | ||__|| | Please do | / O O\__ NOT |

What's The Best Editor for python

2006-03-24 Thread PythonStudent
Hi, Can one of you say to me what's the best editor for editing the python programs ( for linux or windows ), and if you can send it to me to the adresse [EMAIL PROTECTED] Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: What's The Best Editor for python

2006-03-24 Thread Fuzzyman
PythonStudent wrote: > Hi, > Can one of you say to me what's the best editor for editing the python > programs ( for linux or windows ), and if you can send it to me to the > adresse [EMAIL PROTECTED] > `SPE `_ :-) Fuzzyman http://www.voidspace.org.uk/python/index.sht

Re: Bitwise OR?

2006-03-24 Thread Jorge Godoy
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Interesting. I wasn't aware of that optimization. It's better not count on it. It's not there for Jython, IronPython, previous versions of Python, etc. It is just there for the new cPython. And the fix is so simple that it isn't worth disregardi

Re: Linear regression in NumPy

2006-03-24 Thread Robert Kern
nikie wrote: > Robert Kern wrote: > >>Both functions are described in the full book. Were you just looking at the >>sample chapter? > > No, I've got the full PDF by mail a few days ago, "numpybook.pdf", 261 > pages (I hope we're talking about the same thing). I entered > "linear_least_squares" an

Experienced UI programmers: help me decide (please ;)

2006-03-24 Thread Wildemar Wildenburger
Ok, so i've whipped up this GUI with wxPython but I realize that it might hinder the sort of thing I wantto do. What do I want to do? Basically its a note taking app that should present little boxes of text to the user. Also the boxes can be interconnected which is signified by arrows between t

Re: What's The Best Editor for python

2006-03-24 Thread Tim Chase
> Can one of you say to me what's the best editor for > editing the python programs ( for linux or windows ), and > if you can send it to me to the adresse Hmmm...it's been almost a week since this topic came up on the list. Good to see the topic is undead :) For plenty of reading, check out t

Re: What's The Best Editor for python

2006-03-24 Thread Jorge Godoy
"PythonStudent" <[EMAIL PROTECTED]> writes: > Can one of you say to me what's the best editor for editing the python > programs ( for linux or windows ), and if you can send it to me to the > adresse [EMAIL PROTECTED] Emacs runs on both. So do Eclipe and a lot of other... What is best? The one

Re: What's The Best Editor for python

2006-03-24 Thread Sebastjan Trepca
http://www.pspad.com/en/It supports Python plugins! :)Sebastjanhttp://www.trepca.si/blog On 24 Mar 2006 08:50:15 -0800, Fuzzyman <[EMAIL PROTECTED]> wrote:> > PythonStudent wrote:> > Hi,> > Can one of you say to me what's the best editor for editing the python > > programs ( for linux or windows ),

Re: __slots__

2006-03-24 Thread Aahz
In article <[EMAIL PROTECTED]>, David Isaac <[EMAIL PROTECTED]> wrote: >"Ziga Seilnacht" <[EMAIL PROTECTED]> wrote: >> >> If you want to restrict attribute asignment, you should use the >> __setattr__ special method, see: >> http://docs.python.org/ref/attribute-access.html > >That "should" is what

Re: Caching in memory for Apache

2006-03-24 Thread Paul Boddie
Simon Johnson wrote: > > I have decided to take the big plunge and drop the Microsoft platform > and use Mod_Python and Apache in it's place. Congratulations! ;-) [...] > One of the questions I have is: How do you cache stuff in memory? Say > I've got a bunch of stuff I need to create from a se

Re: property docstrings

2006-03-24 Thread Ziga Seilnacht
Darren Dale wrote: > I am trying to work with properties, using python 2.4.2. I can't get the > docstrings to work, can someone suggest what I'm doing wrong? I think the > following script should print "This is the doc string.", but instead it > prints: > > "float(x) -> floating point number > > Co

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-24 Thread Dinko Tenev
Dirk Thierbach wrote: [A lot of stuff] > > Now clearer? > > - Dirk Actually, it's getting all the messier, and we seem to be running around in circles. I've already lost track of the point you're trying to make, and it seems that you're missing most of my points. Let's leave it there, and take

Re: Experienced UI programmers: help me decide (please ;)

2006-03-24 Thread Chris Mellon
On 3/24/06, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Ok, so i've whipped up this GUI with wxPython but I realize that it > might hinder the sort of thing I wantto do. What do I want to do? > > Basically its a note taking app that should present little boxes of text > to the user. Also the

Re: What's The Best Editor for python

2006-03-24 Thread tjerk
PythonStudent wrote: > Hi, > Can one of you say to me what's the best editor for editing the python > programs ( for linux or windows ), and if you can send it to me to the > adresse [EMAIL PROTECTED] > > > > Why don´t you try the editor wich comes with Pythoncard. Or Notepad++

Re: What's The Best Editor for python

2006-03-24 Thread Harlin Seritt
Food for thought... I admit it would be best if you could use the same editor for both *nix and Windows -- in that case, I'd say Scite would be best as it is almost identical in both environments. However, my own personal favorites are: Crimson Editor for Windows and Kate for Linux. Yes, I know...

Re: Suggestion for Web App

2006-03-24 Thread Harlin Seritt
"Why not just use static HTML for the static content ?" Makes sense... now, what about for having the portal capabilities (users log in, save profiles, etc)... what would be best for that? I really don't think though that a CMS is necessary. Does anyone know of a Python forum package similar to ph

Re: What's The Best Editor for python

2006-03-24 Thread flamesrock
I agree, Kate is a great linux editor! On windows, I'd have to say notepad2- kate for windows -- http://mail.python.org/mailman/listinfo/python-list

Re: What's The Best Editor for python

2006-03-24 Thread Wildemar Wildenburger
just to bloat this thread some more: Am I the only one using jEdit? (really, I never see it mentioned anywhere ...) wildemar -- http://mail.python.org/mailman/listinfo/python-list

Help: Creating condensed expressions

2006-03-24 Thread David Hirschfield
Here's the problem: Given a list of item names like: apple1 apple2 apple3_SD formA formB formC kla_MM kla_MB kca_MM which is a subset of a much larger list of items, is there an efficient algorithm to create condensed forms that match those items, and only those items? Such as: apple[12] apple3

Re: What's The Best Editor for python

2006-03-24 Thread jlowery
Been using PyDev plugin for Eclipse for a week now... works pretty good, and integrates well with PyLint. Has some context-sensitive help, but not much. I wonder if writing a script to convert Python HTML docs to Javadoc format would help? H maybe I'll ask. -- http://mail.python.org/mail

Re: What's The Best Editor for python

2006-03-24 Thread Harlin Seritt
Was actually going to throw in jEdit for the category of what's good on both platforms... For someone who despises Java, I actually like it. :-) Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problems (é and è)

2006-03-24 Thread John Machin
On 24/03/2006 11:44 PM, Peter Otten wrote: > John Machin wrote: > > >>0x00d0: ord('D'), # Ð >>0x00f0: ord('o'), # ð >>Icelandic capital eth becomes D, OK; but the small letter becomes o!!! > > > I see information flow from Iceland is a bit better than from Armenia :-) No information flow neede

Re: New Python logo in high resolution format

2006-03-24 Thread Robert Hicks
How about we all get tatoos? : ) Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: What's The Best Editor for python

2006-03-24 Thread Azolex
Wildemar Wildenburger wrote: > just to bloat this thread some more: > > Am I the only one using jEdit? I've yet to find better for developing in jython -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiplying sequences with floats

2006-03-24 Thread Andrew Koenig
"Christoph Zwerschke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Anyway this would be an argument only against the variant of typecasting a > float with a fractional part. But what about the other variant which > raises an error if there is a fractional part, but works if the

Re: New development windows, IronPython or PythonWin

2006-03-24 Thread Bruno Desthuilliers
Dan a écrit : >>>IronPython is currently nowhere near production quality. I would not >>>recommend it. > > I realise its in beta. But long term, do you think that the win32com, > win32gui etc... will have no support because everyone jumps on the > Microsoft bandwagon? Aren't the windows support e

Re: What's The Best Editor for python

2006-03-24 Thread Ian Parker
In message <[EMAIL PROTECTED]>, flamesrock <[EMAIL PROTECTED]> writes >I agree, Kate is a great linux editor! > >On windows, I'd have to say notepad2- kate for windows > Well, Notepad might be a bare-bones. I enjoy using UltraEdit, though not UEStudio (the IDE version). You can include a "wordf

Re: Help: Creating condensed expressions

2006-03-24 Thread bearophileHUGS
This is a first try, is something like this enough for you? data = """apple1 apple2 apple3_SD formA formB formC kla_MM kla_MB kca_MM""".split() headtails = {} for word in data: head = word[:-1] if head in headtails: headtails[head].append(word[-1]) else: headtails[hea

Re: Help: Creating condensed expressions

2006-03-24 Thread Bruno Desthuilliers
David Hirschfield a écrit : > Here's the problem: Given a list of item names like: > > apple1 > apple2 > apple3_SD > formA > formB > formC > kla_MM > kla_MB > kca_MM > > which is a subset of a much larger list of items, > is there an efficient algorithm to create condensed forms that match > tho

Re: Help: Creating condensed expressions

2006-03-24 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : > David Hirschfield a écrit : > >> Here's the problem: (snip) >> >> is there an efficient algorithm to create condensed forms that match >> those items, Sorry, answered to fast... Well, at least you have a way to test the algo !-) -- http://mail.python.org/mailm

  1   2   >