Re: Problem with odbc and Sql Server

2006-05-21 Thread Frank Millman
Frank Millman wrote: > Hi all > > I have found a problem using MS Sql Server connecting via the odbc > module from python-win32. > > Assume a table 't1' with a column 'c1' of type varchar(10). > > >From Python, set c1 to an empty string - > cur.execute("UPDATE t1 SET c1 = ?",['']) > > The resu

Re: Web based application in python

2006-05-21 Thread Ravi Teja
>> I would like to know whether it is possible to develop web based application >> using Python. Any general purpose language may be used for developing web applications. Even your favorite shell language. You should really at least read the python.org main page before asking this question. It po

Re: The ONE TRUE WAY to use tabs (if you must...)

2006-05-21 Thread Edward Elliott
Andy Sy wrote: [snipped 50 lines of previous message] > > Also... remember that the 'ONE TRUE WAY' essentially involves *mixing* > tabs and spaces for indentation with all the objections that that > entails... (although like mentioned above, it should work with Python, > at least in the simple ca

Re: Python source sensitive to PyObject_HEAD layout?

2006-05-21 Thread Petter Haggholm
Boy, do I feel foolish! I hang my head in shame and thank you for your assistance---that solved it. -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic drawing in web page

2006-05-21 Thread Christian Stapfer
Paul Boddie <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > barbaros wrote: >> >> I need to put some dynamic drawings on my web page. More precisely, I >> need to draw a number of geometric figures (circles, rectangles) which >> evolve into a graphics windows according to some law (a

Web based application in python

2006-05-21 Thread Manoj Kumar P
Hi, I would like to know whether it is possible to develop web based application using Python. If yes, what are the challenges or areas I've to concentrate. How would be the performance, handling hits, scalability etc? What are the pros and cons of using python in place of JAVA or J2EE? Thank Y

Re: Python source sensitive to PyObject_HEAD layout?

2006-05-21 Thread Martin v. Löwis
Petter Haggholm wrote: > Any help, thoughts, or advice would be vastly appreciated. After changing PyObject_HEAD, I would run "make distclean". Most likely, some object files were not recompiled and still using the old layout. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-lis

Re: Software Needs Less Idiots

2006-05-21 Thread Jeffrey Schwab
David Steuber wrote: > "PofN" <[EMAIL PROTECTED]> writes: > >> Xah Lee wrote: >>> Software needs philosophers. >> No, software neds less idiots. So please take your medication and >> change profession. > > Perhaps fewer would do. Thank you. I didn't want to be "that guy." -- http://mail.python

Re: performance difference between OSx and Windows

2006-05-21 Thread Brian
Thank you for your answer. I had a feeling that it would be a threading issue, but I wasn't sure. Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: The ONE TRUE WAY to use tabs (if you must...)

2006-05-21 Thread Andy Sy
Andy Sy wrote: > Actually a couple of the responses on this newsgroup > have settled the question for me. I did learn something > new by engaging in this holy war. > > > Tabs need not be evil, but ONLY if they are used in one > particular way: > > If you really must use tabs, use them *ONLY* f

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Gonzalo Monzón
Robert Kern escribió: >Gonzalo Monzón wrote: > > > >>I see there are both libraries linked in my pyrex modules... However, >>when one should expect to have problems with this "dll nightmare", if >>you always provide the right msvcr71.dll bundled within your project -I >>mean, using py2exe by

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Jim Lewis
Thanks. I had done that but it seems I had to remove "install". Now it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Robert Kern
Gonzalo Monzón wrote: > I see there are both libraries linked in my pyrex modules... However, > when one should expect to have problems with this "dll nightmare", if > you always provide the right msvcr71.dll bundled within your project -I > mean, using py2exe by example- ? > > Of course if y

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Gonzalo Monzón
Robert Kern escribió: >Gonzalo Monzón wrote: > > >>sturlamolden escribió: >> >> > > > >>>I don't think this is safe. MinGW links with msvcrt.dll whereas the >>>main Python distribution links with msvcr71.dll (due to Visual C++ >>>2003). It is not safe to mix and blend different C runtime

Re: Software Needs Philosophers

2006-05-21 Thread alex23
As a professionally trained "philosopher" and "programmer", I'm perfectly well aware that the onus is on _me_ to make others respect & appreciate my skills and what they offer. Posting to usenet about how others just don't "get it" is, in fact, not "getting it". Even further, using "religion" as t

Re: performance difference between OSx and Windows

2006-05-21 Thread Avizoa
> Can I ask why that is, and if there is a way to take advantage > of all 4 within python? Sure. All major programming languages handle concurrency in one of two ways: multithreading or parallel processes. In the standard python interpreter, there is the Global Interpreter Lock (GIL for short) tha

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Robert Kern
Gonzalo Monzón wrote: > sturlamolden escribió: >>I don't think this is safe. MinGW links with msvcrt.dll whereas the >>main Python distribution links with msvcr71.dll (due to Visual C++ >>2003). It is not safe to mix and blend different C runtime libraries. >>If you are to build a C extension wit

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Robert Kern
Jim Lewis wrote: >>and change "-lmsvcrt" to "-lmsvcr71". > > But then I get this error: Python was built with version 7.1 of Visual > Studio, and extensions need to be built with the same version of the > compiler, but it isn't installed. > I want to use mingw. You have to tell distutils to use m

Re: Software Needs Philosophers

2006-05-21 Thread jab3
SamFeltus wrote: > Religious Fanaticism is a very strong in the Computer community. But, > is it really a surprise that when a bunch of hairless apes created a > new mental world, they created it with a complicated Quilt of religions > and nationalities, and many became fanatical? > > I am confi

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Robert Kern
sturlamolden wrote: > sturlamolden wrote: > >>I don't think this is safe. MinGW links with msvcrt.dll whereas the >>main Python distribution links with msvcr71.dll (due to Visual C++ >>2003). > > In order to make minGW link with msvcr71.dll, edit the text file > > c:\mingw\lib\gcc\mingw32\3.2.4\

Tk.iconname still there?

2006-05-21 Thread Gary Wessle
Hi I am going through a tutorial on Tkinter http://doctormickey.com/python/pythontutorial_201.html, it referees to Tk.iconname() but I could not locate one after googleing and browsed and searched the Tkinter On-line reference material in the Tkinter reference: a GUI for Python, 84 pp. pdf from

Re: Software Needs Philosophers

2006-05-21 Thread Terry Reedy
"nikie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Xah Lee wrote: > >> Software Needs Philosophers >> >> by Steve Yegge, 2006-04-15. >> >> Software needs philosophers. >> >> This thought has been nagging at me for a year now, and recently it's >> been growing like a tumor. One

Re: Software Needs Less Idiots

2006-05-21 Thread David Steuber
"PofN" <[EMAIL PROTECTED]> writes: > Xah Lee wrote: > > Software needs philosophers. > > No, software neds less idiots. So please take your medication and > change profession. Perhaps fewer would do. -- http://www.david-steuber.com/ 1998 Subaru Impreza Outback Sport 2006 Honda 599 Hornet (CB60

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Gonzalo Monzón
sturlamolden escribió: >Julien Fiore wrote: > > >># step A.3 # >>Install Mingw, the gcc compiler for Windows, available at >>http://www.mingw.org/download.shtml. (we downloaded the file >>MinGW-5.0.2.exe and installed only the "base tool" (this includes >>mingw-runtime 3.9, w32api-3.6, binutils

Re: Software Needs Philosophers

2006-05-21 Thread Mumia W.
M Jared Finder wrote: > SamFeltus wrote: >> [...] >> Software needs philosophers is an interesting point, perhaps the most >> important function of Philosophers is exposing Sacred Cows as just >> Cattle. > > Finally, someone else who sees that Xah's posts consistently expose > valid problems! (T

Re: Python - Web Display Technology

2006-05-21 Thread SamFeltus
As a final thought, seperate from the whole open source/search issue, which has obvious merit, it does seem Flash has many excellent ideas as a language/tool for creating/expressing non written ideas that are lacking in the HTML world. -- http://mail.python.org/mailman/listinfo/python-list

Re: performance difference between OSx and Windows

2006-05-21 Thread Brian
Thanks for the response. I was unaware that the G5 was only using one core. Can I ask why that is, and if there is a way to take advantage of all 4 within python? Thanks, Brian -- http://mail.python.org/mailman/listinfo/python-list

Hola, queres jugar?

2006-05-21 Thread martinnapole
Después de leer todo lo que sigue, me di cuenta que esto es un juego y yo decidí jugar. Sí, el que no arriesga no gana, asique YO JUEGO. Vos? Seguro que TIENE QUE HABER OTROS QUE PIENSAN IGUAL, que tambien se toman esto como un JUEGO, es por eso que acá ya tengo mis 6 sobres listos para mandar, po

Python source sensitive to PyObject_HEAD layout?

2006-05-21 Thread Petter Haggholm
For academic reasons, I'm hacking on the Python source trying to add some new capabilities. At present, I'm making minor changes mostly to familiarise myself with the code and gain awareness of what issues I may encounter, with the result that I encountered a fairly strange one (to me, anyway). As

Re: Python update trouble (2.3 to 2.4): x<

2006-05-21 Thread Gonzalo Monzón
Hi John! John Machin escribió: >On 22/05/2006 5:22 AM, Gonzalo Monzón wrote: > > >>Thank you for all the suggestions! :-) >> >>The C routine is almost -changing data type long for word- a copy of the >>function given by a hardware manufacturer, the same code used in their >>firmware to calc t

Re: Software Needs Philosophers

2006-05-21 Thread nikie
Xah Lee wrote: > Software Needs Philosophers > > by Steve Yegge, 2006-04-15. > > Software needs philosophers. > > This thought has been nagging at me for a year now, and recently it's > been growing like a tumor. One that plenty of folks on the 'net would > love to see kill me. No, we all wish yo

Re: performance difference between OSx and Windows

2006-05-21 Thread Avizoa
Brian wrote: > I have been a Mac and linux guy since 1998 and except for a handful of > times, have not touched a MS box since then. This changes a few days > ago when I needed to get a MS box for another project. This leads me > to my question... > > A while ago, I borrowed a python script from

Re: Python - Web Display Technology

2006-05-21 Thread Ben Finney
"SamFeltus" <[EMAIL PROTECTED]> writes: > I keep trying to understand why people like HTML/JS, I don't think I > am gonna understand. It's fairly simple: HTML, CSS and JavaScript have all been standardised independent of any single corporation, and are freely implementable, resulting in competing

Re: dynamic drawing in web page

2006-05-21 Thread Paul Boddie
barbaros wrote: > > I need to put some dynamic drawings on my web page. More precisely, I > need to draw a number of geometric figures (circles, rectangles) which > evolve into a graphics windows according to some law (a little bit like > the solar system). I need also to have several fields aside

Re: Python - Web Display Technology

2006-05-21 Thread Luis M. González
IMHO, there's nothing more annoying that a website showing me a progression bar, indicating how much time it will get to provide the information I'm looking for... And when the progression bar ends, I have to wait until the flashy graphics and stupid presentation shows me the "go to html site"...

Re: Programming language productivity

2006-05-21 Thread John Bokma
Peter Maas <[EMAIL PROTECTED]> wrote: > John Bokma wrote: >> Also note that Python programmers write more lines/hour which they >> need to finish in the same time as Perl programmers :-D. > > You probably want to say that a Python program tends to have more > lines than an equivalent Perl program

Re: python vs perl lines of code

2006-05-21 Thread John Bokma
"George Sakkis" <[EMAIL PROTECTED]> wrote: > Oh, I think I get it now. Spamvertizing _one_ site is worth your > host's subscription; doing it for _four_ sites at your signature is > perfectly ok though. Do yourself and many others a favour before you post again, educate yourself on Usenet. It mi

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread Carl Banks
Edward Elliott wrote: > Special cases aren't special enough to break the rules. (proposal eliminates > the current special case for comprehensions/generators) It really isn't a special case, though. It might seem like it is, but it's not at all when you remember the rules of equivalence between l

Re: dynamic drawing in web page

2006-05-21 Thread Rhino
"barbaros" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello everybody, > > I need to put some dynamic drawings on my web page. More precisely, I > need to draw a number of geometric figures (circles, rectangles) which > evolve into a graphics windows according to some law (a li

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread Carl Banks
Heiko Wundram wrote: > The following PEP tries to make the case for a slight unification of for > statement and list comprehension syntax. -1 Adds complexity to the language and saves you nothing but an indent level. However, I encourage you to submit this PEP and get a (almost certianly negativ

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-21 Thread Jim Lewis
> and change "-lmsvcrt" to "-lmsvcr71". But then I get this error: Python was built with version 7.1 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed. I want to use mingw. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python - Web Display Technology

2006-05-21 Thread SamFeltus
Hmmm... It is interesting how something is terrible to one person, and great to another, and vice versa. I keep trying to understand why people like HTML/JS, I don't think I am gonna understand. I guess for better or worse, Flash is a very different mindset and approach to the web. Oh well, I l

Re: Python - Web Display Technology

2006-05-21 Thread Edward Elliott
Roel Schroeven wrote: > SamFeltus schreef: >> Here is a visual argument, I would love to see a list of AJAX and SVG >> sites that display excellent graphics. [snip] > > In my humble opinion, those sites are an argument _against_ the use of > Flash on websites. They may look pretty (I don't think

Re: Python - Web Display Technology

2006-05-21 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > Flash also behaves consistently cross-browser, cross/platform -- and > features cannot be disabled by the user. ^^ And that's a good thing? Maybe for Macromedia, not for us. This smells like astroturf. > Flash can load and play

Re: WeakrefValueDictionary of Callables?

2006-05-21 Thread Lloyd Weehuizen
Thanks for that, I had a feeling that was the problem. Is there anyway around this? I'd prefer not to have to assume the method name on the object. This could be solved by passing the object and method name in as two separate parameters to the Bind function. But ideally I'd like to extract thi

performance difference between OSx and Windows

2006-05-21 Thread Brian
I have been a Mac and linux guy since 1998 and except for a handful of times, have not touched a MS box since then. This changes a few days ago when I needed to get a MS box for another project. This leads me to my question... A while ago, I borrowed a python script from someone's blog that show

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Diez B. Roggisch
> My knowledge of Python's iterators is kind of sketchy, so I may have missed > something. The only thing a python iterator really is is something that supports a next()-method and will raise a StopIteration-Exception in case of exhaustion. So - nobody stops you from introducing an object like

Re: Name conflict in class hierarchy

2006-05-21 Thread Scott David Daniels
Jeffrey Barish wrote: > Suppose that there are two classes defined as follows: > > class A(object): > def f1(self): > print 'In A.f1, calling func' > self.func() > > def func(self): > print 'In A.func' > > class B(A): > def func(self): > print 'In B.fu

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Edward Elliott
Roy Smith wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: >> This is why the C++ STL has independent forward and backward iterator >> types. > > Let me see if I can paraphrase the difference between the Python design > philosophy and the C++ design philosophy about most things. Python says, >

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread Edward Elliott
George Sakkis wrote: > Em Dom, 2006-05-21 às 17:11 +0200, Heiko Wundram escreveu: >> for node in tree if node.haschildren(): >> >> >> as syntactic sugar for: >> >> for node in tree: >> if not node.haschildren(): >> continue >> [snip] > > 2) "There should be one and preferably only one way to d

Re: Slicing Issues

2006-05-21 Thread Paul McGuire
"Heiko Wundram" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Am Sonntag 21 Mai 2006 22:52 schrieb BJ Swope: > > district_combo=line[85:3] > > This returns the slice from character 85 to character 3 in the string, read > forwards. Basically, as Python slices are forgiving (becau

Re: Python update trouble (2.3 to 2.4): x<

2006-05-21 Thread John Machin
On 22/05/2006 5:22 AM, Gonzalo Monzón wrote: > Thank you for all the suggestions! :-) > > The C routine is almost -changing data type long for word- a copy of the > function given by a hardware manufacturer, the same code used in their > firmware to calc the checksum of every piece of data sent

Re: Programming language productivity

2006-05-21 Thread Edward Elliott
Peter Maas wrote: > I think that a LOC comparison between a language that enforces line breaks > and another language that enables putting an lots of code in one line > doesn't make much sense. I wonder why comparisons aren't made in terms of > word count. Word count would include literals, consta

Re: Python - Web Display Technology

2006-05-21 Thread Roel Schroeven
SamFeltus schreef: > Here is a visual argument, I would love to see a list of AJAX and SVG > sites that display excellent graphics. > http://bacardimojito.com/main.swf > http://tokyoplastic.com/LF.swf > http://coolbreathpower.com/ > http://www.peterjoel.com/flash8previews/candleFlame.html > http://

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread George Sakkis
Felipe Almeida Lessa wrote: > Em Dom, 2006-05-21 às 11:52 -0700, gangesmaster escreveu: > > > Today you can archive the same effect (but not necessarily with the same > > > performance) with: > > > > > > for node in (x for x in tree if x.haschildren()): > > > > > > > true, but it has differen

Re: Question about Python on Mac

2006-05-21 Thread elventear
James Stroud wrote: > I think fink is not detecting the gmp (GNU multiple precision arithmetic > library) dependency. > > Try: > > % fink install gmp > > Then try building gmpy with /sw/bin/python. I think I didn't explain myself very well. gmp is already installed in my computer; when building gm

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Roy Smith
Edward Elliott <[EMAIL PROTECTED]> wrote: > This is why the C++ STL has independent forward and backward iterator types. Let me see if I can paraphrase the difference between the Python design philosophy and the C++ design philosophy about most things. Python says, "Let's make things simple eno

Re: Slicing Issues

2006-05-21 Thread BJ Swope
On 5/21/06, Heiko Wundram <[EMAIL PROTECTED]> wrote: Am Sonntag 21 Mai 2006 22:52 schrieb BJ Swope:> district_combo=line[85:3]This returns the slice from character 85 to character 3 in the string, readforwards. Basically, as Python slices are forgiving (because the borders are actually "illogic

Re: Python - Web Display Technology

2006-05-21 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > None of you seem to know what you are talking about. That's not a way to make friends. I very well know what I'm talking about. None of the issues I've raised are negated by what you say, so every single one still stands. > Flash also behaves consistently

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Edward Elliott
Heiko Wundram wrote: > But, think of the following: what if the iterator computes the values at > runtime, and you're not iterating over a "predefined" list of some sort? > Do you want the machinery to store the state of the iterator at every > earlier point in time (sometimes this may not even be

dynamic drawing in web page

2006-05-21 Thread barbaros
Hello everybody, I need to put some dynamic drawings on my web page. More precisely, I need to draw a number of geometric figures (circles, rectangles) which evolve into a graphics windows according to some law (a little bit like the solar system). I need also to have several fields aside the wind

Re: Slicing Issues

2006-05-21 Thread Heiko Wundram
Am Sonntag 21 Mai 2006 22:52 schrieb BJ Swope: > district_combo=line[85:3] This returns the slice from character 85 to character 3 in the string, read forwards. Basically, as Python slices are forgiving (because the borders are actually "illogical"), this amounts to nothing, but could also a

Re: escapes in regular expressions

2006-05-21 Thread Heiko Wundram
Am Sonntag 21 Mai 2006 19:49 schrieb James Thiele: > >>> re.match('\d', '7').group() >>> print '\d' \d > >>> re.match('\\d', '7').group() >>> print '\\d' \d '\d' evaluates to \d, because d is not a valid escape sequence. '\n' evaluates to newline, because n is a valid escape sequence. '\\' eva

Slicing Issues

2006-05-21 Thread BJ Swope
Given this set of data (88 characters wide) in a file... 067AARON WAY   3004300252599A  098   067017  129 672 067ABBA CT 30518000882000902A  025  11   0670163227  365 670 067ABBEY HILL RD   3002400010299A  004

Re: getattr for modules not classes

2006-05-21 Thread Heiko Wundram
Am Sonntag 21 Mai 2006 21:52 schrieb Daniel Nogradi: > Is there something analogous to __getattr__ for modules? > > I know how to create a class that has attributes from a list and > nothing else by overloading __getattr__ and making sure that the > accessed attribute appears in my list. Now I woul

Re: Using python for a CAD program

2006-05-21 Thread baalbek
David Cuthbert wrote: > Some kind of transactionality is needed for undo/redo, but this is > usually done in a different (some might say "more efficient", others > might say "hackier") method than how transactions are implemented for > RDBMS (that I've dealt with, anyway). I suspect this can be

Re: proposal: disambiguating type

2006-05-21 Thread Heiko Wundram
Am Sonntag 21 Mai 2006 21:13 schrieb gangesmaster: > i suggest splitting this overloaded meaning into two separate builtins: > * type(name, bases, dict) - a factory for types > * typeof(obj) - returns the type of the object While I personally don't find this proposal to be bad, this is something t

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Heiko Wundram
Am Sonntag 21 Mai 2006 21:43 schrieb Charles D Hixson: > I was reading through old messages in the list and came up against an > idea that I thought might be of some value: > "Wouldn't it be a good idea if one could "rewind" an iterator?" > Not stated in precisely those terms, perhaps, but that's t

Re: newbie: windows xp scripting

2006-05-21 Thread oscartheduck
For completeness' sake, this is the new script I came up with: import os dirfrom = 'C:\\test' dirto = 'C:\\test1\\' makedir = 'mkdir "%s"' % dirto copy_command = 'copy "%s" "%s"' % (dirfrom, dirto) if os.system(copy_command) == 0: print "yay" else: if os.system(makedir) == 0: if

getattr for modules not classes

2006-05-21 Thread Daniel Nogradi
Is there something analogous to __getattr__ for modules? I know how to create a class that has attributes from a list and nothing else by overloading __getattr__ and making sure that the accessed attribute appears in my list. Now I would like to do the same with a module, say x.py, in which I have

Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Charles D Hixson
I was reading through old messages in the list and came up against an idea that I thought might be of some value: "Wouldn't it be a good idea if one could "rewind" an iterator?" Not stated in precisely those terms, perhaps, but that's the way I read it. I appreciate that one could use a sequence r

Re: newbie: windows xp scripting

2006-05-21 Thread oscartheduck
It wasn't, but after seeing your success I discovered what was wrong. My destination directory didn't exist, and for some reason windows wasn't automatically creating it to dump the files in. I could fix this with a nested if statement, but it "feels" like windows should be creating this folder au

Re: Does anybody know how to install PythonMagick?

2006-05-21 Thread piotr maliński
python imaging library is more advanced and up to date :) try using this one. -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: windows xp scripting

2006-05-21 Thread oscartheduck
It wasn't, but after seeing your success I discovered what was wrong. My destination directory didn't exist, and for some reason windows wasn't automatically creating it to dump the files in. I could fix this with a nested if statement, but it "feels" like windows should be creating this folder au

Re: Programming language productivity

2006-05-21 Thread Peter Maas
John Bokma wrote: > Also note that Python programmers write more lines/hour which they need to > finish in the same time as Perl programmers :-D. You probably want to say that a Python program tends to have more lines than an equivalent Perl program. I think that a LOC comparison between a langu

Re: Python update trouble (2.3 to 2.4): x<

2006-05-21 Thread Gonzalo Monzón
Thank you for all the suggestions! :-) The C routine is almost -changing data type long for word- a copy of the function given by a hardware manufacturer, the same code used in their firmware to calc the checksum of every piece of data sent or received, and that data is somewhat special: it doe

Re: Software Needs Philosophers

2006-05-21 Thread Burton Samograd
Pascal Bourguignon <[EMAIL PROTECTED]> writes: > "SamFeltus" <[EMAIL PROTECTED]> writes: >> Software needs philosophers is an interesting point, perhaps the most >> important function of Philosophers is exposing Sacred Cows as just >> Cattle. > > As I see it philosophers have a big problem: nobody

Re: Problem with odbc and Sql Server

2006-05-21 Thread Andrew MacIntyre
Frank Millman wrote: > Assume a table 't1' with a column 'c1' of type varchar(10). > >>From Python, set c1 to an empty string - > cur.execute("UPDATE t1 SET c1 = ?",['']) > > The result is that c1 is actually set to a string of 10 spaces. > > If I execute the command without using parameter

proposal: disambiguating type

2006-05-21 Thread gangesmaster
typing "help(type)" gives the following documentation: >>> help(type) Help on class type in module __builtin__: class type(object) | type(object) -> the object's type | type(name, bases, dict) -> a new type "type" behaves both as a function, that reports the type of an obje

Re: Feature request: sorting a list slice

2006-05-21 Thread Robert Kern
John Machin wrote: > Context? The whole message asked for a new feature. Please tell me what > context I should have supplied. When you reply to a message, please quote part of that message. That's what was meant by context. -- Robert Kern "I have come to believe that the whole world is an enig

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread Felipe Almeida Lessa
Em Dom, 2006-05-21 às 11:52 -0700, gangesmaster escreveu: > > Today you can archive the same effect (but not necessarily with the same > > performance) with: > > > > for node in (x for x in tree if x.haschildren()): > > > > true, but it has different semantic meanings > I know, that's also

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread gangesmaster
> Today you can archive the same effect (but not necessarily with the same > performance) with: > > for node in (x for x in tree if x.haschildren()): > true, but it has different semantic meanings -tomer -- http://mail.python.org/mailman/listinfo/python-list

Re: escapes in regular expressions

2006-05-21 Thread Paul McGuire
"James Thiele" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I was helping a guy at work with regular expressions and found > something I didn't expect: > > >>> re.match('\d', '7').group() > '7' > >>> re.match('\\d', '7').group() > '7' > >>> > > It's not clear to me why these are th

Re: escapes in regular expressions

2006-05-21 Thread Dennis Benzinger
James Thiele schrieb: > I was helping a guy at work with regular expressions and found > something I didn't expect: > > re.match('\d', '7').group() > > '7' '\d' is not recognized as a escape sequence by Python and therefore it is left unchanged in t

Re: Software Needs Philosophers

2006-05-21 Thread Philippe Martin
Xah Lee wrote: > Software Needs Philosophers > > by Steve Yegge, 2006-04-15. > > Software needs philosophers. > > This thought has been nagging at me for a year now, and recently it's > been growing like a tumor. One that plenty of folks on the 'net would > love to see kill me. > > People don'

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread Felipe Almeida Lessa
Em Dom, 2006-05-21 às 17:11 +0200, Heiko Wundram escreveu: > for node in tree if node.haschildren(): > > > as syntactic sugar for: > > for node in tree: > if not node.haschildren(): > continue > Today you can archive the same effect

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread KW
On 2006-05-21, Heiko Wundram wrote: > Hi all! > > The following PEP tries to make the case for a slight unification of for > statement and list comprehension syntax. Sounds great! -- Konrad -- http://mail.python.org/mailman/listinfo/python-list

Re: dict!ident as equivalent of dict["ident"]

2006-05-21 Thread Edward Elliott
Alexander Kozlovsky wrote: > With this suggestion, mapping!identifier > becomes fully equivalent to mapping["identifier"] Penny-wise, pound-foolish. Saves 3 character strokes at the cost of a new special-purpose operator which only works in limited circumstances. To avoid parsing

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread gangesmaster
i wanted to suggest this myself. +1 -tomer -- http://mail.python.org/mailman/listinfo/python-list

escapes in regular expressions

2006-05-21 Thread James Thiele
I was helping a guy at work with regular expressions and found something I didn't expect: >>> re.match('\d', '7').group() '7' >>> re.match('\\d', '7').group() '7' >>> It's not clear to me why these are the same. Could someone please explain? -- http://mail.python.org/mailman/listinfo/python-lis

Re: Software Needs Philosophers

2006-05-21 Thread Tel A.
Xah, I agree with the thrust of your thread here, though I don't think it's anything special: people invest their values in what they invest their time in. To top it off, you're taking an anti-CL viewpoint in a group predominantly focused around CL (despite being named for just lisp). You're fight

Re: Software Needs Philosophers

2006-05-21 Thread Ilias Lazaridis
Mark Shelor wrote: > Xah Lee wrote: > >> Programming languages are religions. For a long while now I've been ... ... > Is there really something new out there? I would argue that software > needs innovation more than it needs philosophers. software needs innovation. innovation needs philosoph

Re: Feature request: sorting a list slice

2006-05-21 Thread Heiko Wundram
Am Sonntag 21 Mai 2006 18:55 schrieb Raymond Hettinger: > If the perf gain is small and the use cases are infrequent, the > addition is likely unwarranted. There is an entire class of feature > requests that are more appropriate as recipes than for inclusion in the > language. The thing is: havi

Re: newbie: windows xp scripting

2006-05-21 Thread Steve Holden
oscartheduck wrote: > I've been having trouble with the following style of script. It's > simple stuff, I know, but it's stumping me: > > import os > > dirfrom = 'C:\\test' > dirto = 'C:\\test1\\' > > copy_command = 'copy "%s" "%s"' % (dirfrom, dirto) > > if os.system(copy_command) == 0: >

Re: Feature request: sorting a list slice

2006-05-21 Thread Raymond Hettinger
Getting a patch ready for checkin (corrected, documented, reviewed, and tested) is only part of the battle. The real challenge of language design is figuring out whether something should be done. Adding optional parameters to a method makes its invocation slower and makes the API harder to learn

Re: Software Needs Philosophers

2006-05-21 Thread Pascal Bourguignon
"SamFeltus" <[EMAIL PROTECTED]> writes: > Software needs philosophers is an interesting point, perhaps the most > important function of Philosophers is exposing Sacred Cows as just > Cattle. As I see it philosophers have a big problem: nobody need them, so they're out of job. That's why we see oc

Re: Software Needs Philosophers

2006-05-21 Thread M Jared Finder
SamFeltus wrote: > Religious Fanaticism is a very strong in the Computer community. But, > is it really a surprise that when a bunch of hairless apes created a > new mental world, they created it with a complicated Quilt of religions > and nationalities, and many became fanatical? > > I am confid

Re: Does anybody know how to install PythonMagick?

2006-05-21 Thread oscartheduck
What distribution are you using? -- http://mail.python.org/mailman/listinfo/python-list

newbie: windows xp scripting

2006-05-21 Thread oscartheduck
I've been having trouble with the following style of script. It's simple stuff, I know, but it's stumping me: import os dirfrom = 'C:\\test' dirto = 'C:\\test1\\' copy_command = 'copy "%s" "%s"' % (dirfrom, dirto) if os.system(copy_command) == 0: print "yay" else: print "boo" What's g

Re: Software Needs Philosophers

2006-05-21 Thread Dražen Gemić
Xah Lee wrote: > Software Needs Philosophers > Welcome to my junk filters DG -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >