Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread D'Arcy J.M. Cain
On Wed, 12 Dec 2012 17:44:24 +1100 Chris Angelico wrote: > On Wed, Dec 12, 2012 at 5:34 PM, Steven D'Aprano > wrote: > > and you consider this "not productive, not worth my time". Code > > review with you must be *all* sorts of fun. > > He never asked for code review :) I think by posting it he

The Prototype Master

2012-12-12 Thread Bart Thate
*PROTOTYPE MASTER* they call me the prototype master over here. I dive into the unkown and get some code working in a problem domain i dont know. As fast as possible i need to write code that 1) is running 2) does something in that domain This all so i can learn from all that went wrong. so i can

Error .. Please Help

2012-12-12 Thread inshu chauhan
In this code : import cv g = open("PointCloudmitClass.txt", "w") image = cv.LoadImageM("Z:/modules/intensity_01.tif", cv.CV_LOAD_IMAGE_UNCHANGED) print image for y in xrange(0,image.height): for x in xrange(0,image.width): color = image[y,x] if color == (0.0,0.0,0.0):

Re: Error .. Please Help

2012-12-12 Thread Chris Angelico
On Thu, Dec 13, 2012 at 2:00 AM, inshu chauhan wrote: > In this code : > > import cv > if color == (0.0,255.0,0.0): > classification = 1 > ... > elif color == (255.0, 0.0, 255.0): > classification = 7 > > print >> g, x , y , color

Re: forking and avoiding zombies!

2012-12-12 Thread Nobody
On Tue, 11 Dec 2012 13:25:36 +, andrea crotti wrote: > But actually why do I need to move away from the current directory of the > parent process? It's not required, it's just "best practice". Often, the current directory is simply whichever directory it happened to inherit from the shell wh

Re: Error .. Please Help

2012-12-12 Thread Dave Angel
On 12/12/2012 10:00 AM, inshu chauhan wrote: > In this code : > > import cv > g = open("PointCloudmitClass.txt", "w") > image = cv.LoadImageM("Z:/modules/intensity_01.tif", > cv.CV_LOAD_IMAGE_UNCHANGED) > print image > for y in xrange(0,image.height): > for x in xrange(0,image.width): >

Re: Error .. Please Help

2012-12-12 Thread Ulrich Eckhardt
Am 12.12.2012 16:00, schrieb inshu chauhan: color = image[y,x] if color == (0.0,0.0,0.0): continue else : if color == (0.0,255.0,0.0): classification = 1 elif color == (128.0, 0.0, 255.0): classifi

Re: problem with usbtmc-communication

2012-12-12 Thread Jean Dubois
On 12 dec, 01:49, Jerry Hill wrote: > On Tue, Dec 11, 2012 at 1:58 AM, Jean Dubois wrote: > > > I found examples in theusbtmckernel driver documentation (the > > examples there are given in C): > >http://www.home.agilent.com/upload/cmc_upload/All/usbtmc.htm?&cc=BE&l... > > Thanks for that link.  

Hollow square program

2012-12-12 Thread siimnurges
Hey, I need to write a program that prints out a square, which is empty on the inside. So far, I've made a program that outputs a square, which is full on the inside. P.S. Between every asterisk there needs to be a space(" ") Here's my code: print("Rows: ") rows = int(input()) for i in range(row

Re: Hollow square program

2012-12-12 Thread Chris Angelico
On Thu, Dec 13, 2012 at 3:48 AM, wrote: > Hey, I need to write a program that prints out a square, which is empty on > the inside. So far, I've made a program that outputs a square, which is full > on the inside. > P.S. Between every asterisk there needs to be a space(" ") > Here's my code: > >

Re: Hollow square program

2012-12-12 Thread Mitya Sirenef
On 12/12/2012 11:48 AM, siimnur...@gmail.com wrote: Hey, I need to write a program that prints out a square, which is empty on the inside. So far, I've made a program that outputs a square, which is full on the inside. > P.S. Between every asterisk there needs to be a space(" ") > Here's my cod

Re: Hollow square program

2012-12-12 Thread siimnurges
Well, I did some modifications and got a hollow square, but the columns aren't perfectly aligned with the rows (at least if input is 5. Thanks for the help :) rows = int(input()) s1="* "*rows s2="*"+(rows-2)*" "+"*" print(s1) for s in range(rows-2): print(s2) print(s1) -- http://mail.python.

Re: Hollow square program

2012-12-12 Thread siimnurges
Well, I did some modifications, but the columns aren't perfectly aligned with the rows. rows = int(input()) s1="* "*rows s2="*"+(rows-2)*" "+"*" print(s1) for s in range(rows-2): print(s2) print(s1) -- http://mail.python.org/mailman/listinfo/python-list

Re: JSON logging ?

2012-12-12 Thread Chris Rebert
On Dec 11, 2012 7:33 AM, "Bart Thate" wrote: > pickle uses eval still ? or is is considered safe now ? i was told not to use eval() stuff on data. I don't believe pickle uses eval() per se, but per the red warning box in its docs, it's still not safe when given untrusted input. IIRC, among other

Re: Hollow square program

2012-12-12 Thread Ian Kelly
On Wed, Dec 12, 2012 at 10:22 AM, wrote: > Well, I did some modifications and got a hollow square, but the columns > aren't perfectly aligned with the rows (at least if input is 5. Thanks for > the help :) > > rows = int(input()) > s1="* "*rows > s2="*"+(rows-2)*" "+"*" > print(s1) > for s in r

Re: Hollow square program

2012-12-12 Thread Peter Otten
siimnur...@gmail.com wrote: > Well, I did some modifications and got a hollow square, but the columns > aren't perfectly aligned with the rows (at least if input is 5. Thanks for > the help :) > > rows = int(input()) > s1="* "*rows > s2="*"+(rows-2)*" "+"*" > print(s1) > for s in range(rows-2): >

How to import module whose filename starts number

2012-12-12 Thread Yong Hu
I have a few scripts whose file names start with numbers. For example, 01_step1.py, 02_step2.py I tried to import them in another script by "import 01_step1" or "from 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" Is there anyway to import those files? The file name must

samba 4 release

2012-12-12 Thread peter
Hellou. Samba4 first release, with python interface for the internals api, and a implementation of the DC in python :). Viva la python -- http://mail.python.org/mailman/listinfo/python-list

Re: Hollow square program

2012-12-12 Thread siimnurges
Thanks, got it now :) -- http://mail.python.org/mailman/listinfo/python-list

Re: samba 4 release

2012-12-12 Thread peter
On 12/12/2012 02:38 PM, peter wrote: Hellou. Samba4 first release, with python interface for the internals api, and a implementation of the DC in python :). Viva la python I forgot to put the link of the good news https://www.samba.org/samba/history/samba-4.0.0.html -- http://mail.p

Re: How to import module whose filename starts number

2012-12-12 Thread Dave Angel
On 12/12/2012 12:42 PM, Yong Hu wrote: > I have a few scripts whose file names start with numbers. For example, > 01_step1.py, 02_step2.py > > I tried to import them in another script by "import 01_step1" or "from > 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" > > Is ther

Re: How to import module whose filename starts number

2012-12-12 Thread Peter Otten
Yong Hu wrote: > I have a few scripts whose file names start with numbers. For example, > 01_step1.py, 02_step2.py > > I tried to import them in another script by "import 01_step1" or "from > 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" > > Is there anyway to import thos

Re: How to import module whose filename starts number

2012-12-12 Thread Benjamin Kaplan
On Dec 12, 2012 9:47 AM, "Yong Hu" wrote: > > I have a few scripts whose file names start with numbers. For example, 01_step1.py, 02_step2.py > > I tried to import them in another script by "import 01_step1" or "from 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" > > Is ther

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Dave Cinege
On Wednesday 12 December 2012 05:25:11 D'Arcy J.M. Cain wrote: As a 16yr OSS vet I know that for every 1 person that that actually creates something there will always be 2000 people to bitch about it. My skin isn't thin, I just don't give a shit to listen to anyone one that doesn't get it. The

Python parser problem

2012-12-12 Thread RCU
Hello. I would like to report a parser bug manifesting on Python 2.5, 2.7 (but not on 2.2) and 3.3. Please see the attached script. Basically this bug appeared after applying PythonTidy on a valid script. More exactly, when running: python -c "import iCam_GIT5_5"

Re: JSON logging ?

2012-12-12 Thread Bart Thate
Thanks for your reply Chris, good to be updated on the pickle stuff, too bad it is still not safe for use. But hee i prefer JSON above pickle anyways so ;] As to using the logging package to send JSON dict over, the logging stuff should be able to be converted to handle that. Just 2 things that n

Re: JSON logging ?

2012-12-12 Thread Bart Thate
Ha ! spoke too soon. Was reading this: http://docs.python.org/2/howto/logging-cookbook.htm which explains it all ;] Place to be is the LogRecordStreamHandler ;] Something to play with, first trying out to get a communication channel running o

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Dave Cinege
On Tuesday 11 December 2012 01:41:38 Ian Kelly wrote: > I have a few critiques on the code. First, you might want to use > __getattribute__ instead of __getattr__. Otherwise you'll end up File "/home/dcinege/src/thesaurus/thesaurus.py", line 84, in __getattribute__ return self.__getitem_

Re: Python parser problem

2012-12-12 Thread Dave Angel
On 12/12/2012 02:10 PM, RCU wrote: > Hello. > I would like to report a parser bug manifesting on Python 2.5, 2.7 > (but not on 2.2) and 3.3. > Please see the attached script. > Basically this bug appeared after applying PythonTidy on a valid > script. > > More exactly, when runnin

Preventing tread collisions

2012-12-12 Thread Wanderer
I have a program that has a main GUI and a camera. In the main GUI, you can manipulate the images taken by the camera. You can also use the menu to check the camera's settings. Images are taken by the camera in a separate thread, so the long exposures don't block the GUI. I block conflicts betwe

Re: Python parser problem

2012-12-12 Thread Jerry Hill
On Wed, Dec 12, 2012 at 2:10 PM, RCU wrote: > With this occasion I would like to ask also what are the limits of the > Python 2.x and 3.x parser. Where can I find what are the limits on the > size/lines of the parsed script? The Python Language Reference is probably what you're looking for: h

Re: Preventing tread collisions

2012-12-12 Thread Dave Angel
On 12/12/2012 03:11 PM, Wanderer wrote: > I have a program that has a main GUI and a camera. In the main GUI, you can > manipulate the images taken by the camera. You can also use the menu to check > the camera's settings. Images are taken by the camera in a separate thread, > so the long exposu

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Ian Kelly
On Wed, Dec 12, 2012 at 12:20 PM, Dave Cinege wrote: > On Tuesday 11 December 2012 01:41:38 Ian Kelly wrote: > >> I have a few critiques on the code. First, you might want to use >> __getattribute__ instead of __getattr__. Otherwise you'll end up > > File "/home/dcinege/src/thesaurus/thesaurus

Re: Preventing tread collisions

2012-12-12 Thread MRAB
On 2012-12-12 20:11, Wanderer wrote: I have a program that has a main GUI and a camera. In the main GUI, you can manipulate the images taken by the camera. You can also use the menu to check the camera's settings. Images are taken by the camera in a separate thread, so the long exposures don't

Re: Preventing tread collisions

2012-12-12 Thread Ian Kelly
On Wed, Dec 12, 2012 at 1:53 PM, MRAB wrote: > You could try a non-blocking semaphore: > > def __init__(self): > self.cameraActive = Semaphore() Why a Semaphore and not just a plain old Lock? -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing tread collisions

2012-12-12 Thread MRAB
On 2012-12-12 20:58, Ian Kelly wrote: On Wed, Dec 12, 2012 at 1:53 PM, MRAB wrote: You could try a non-blocking semaphore: def __init__(self): self.cameraActive = Semaphore() Why a Semaphore and not just a plain old Lock? Good point. I probably thought of a semaphore because the OP men

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Dave Cinege
On Wednesday 12 December 2012 15:42:36 Ian Kelly wrote: > def __getattribute__(self, name): > if name.startswith('__') and name.endswith('__'): > return super(Thesaurus, self).__getattribute__(name) > return self.__getitem__(name) Ian, Tested, and works as you advertised. Isn't

Using regexes versus "in" membership test?

2012-12-12 Thread Victor Hooi
Hi, I have a script that trawls through log files looking for certain error conditions. These are identified via certain keywords (all different) in those lines I then process those lines using regex groups to extract certain fields. Currently, I'm using a for loop to iterate through the file,

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Ian Kelly
On Wed, Dec 12, 2012 at 3:20 PM, Dave Cinege wrote: > On Wednesday 12 December 2012 15:42:36 Ian Kelly wrote: > >> def __getattribute__(self, name): >> if name.startswith('__') and name.endswith('__'): >> return super(Thesaurus, self).__getattribute__(name) >> return self.__getitem

Help with Python/ArcPy

2012-12-12 Thread Michelle Couden
Does anyone know of a website or forum where there is help for ArcPY (Python) programmers? ESRI's (GIS) resource center Forums are very busy and my questions go days without an answer. Any suggestions would be great. Thanks!! Michelle Couden TPP-T GIS Cartographer Certified GIS Analyst (512)

Re: samba 4 release

2012-12-12 Thread Mark Lawrence
On 12/12/2012 17:39, peter wrote: On 12/12/2012 02:38 PM, peter wrote: Hellou. Samba4 first release, with python interface for the internals api, and a implementation of the DC in python :). Viva la python I forgot to put the link of the good news https://www.samba.org/samba/history/s

Re: Help with Python/ArcPy

2012-12-12 Thread Xavier Ho
You can always try http://stackoverflow.com/search?q=ArcPY, or post your question there. Cheers, Xav On 13 December 2012 08:07, Michelle Couden wrote: > Does anyone know of a website or forum where there is help for ArcPY > (Python) programmers? ESRI’s (GIS) resource center Forums are very b

Re: Hollow square program

2012-12-12 Thread Mark Lawrence
On 12/12/2012 17:52, siimnur...@gmail.com wrote: Thanks, got it now :) Please quote something in context for future readers. Roughly translated THE ONLY GOOD GOOGLE USER IS A DEAD GOOGLE USER -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Mark Lawrence
On 12/12/2012 18:13, Dave Cinege wrote: On Wednesday 12 December 2012 05:25:11 D'Arcy J.M. Cain wrote: As a 16yr OSS vet I know that for every 1 person that that actually creates something there will always be 2000 people to bitch about it. My skin isn't thin, I just don't give a shit to listen

Re: Hollow square program

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 23:47:20 +, Mark Lawrence wrote: > THE ONLY GOOD GOOGLE USER IS A DEAD GOOGLE USER > > I say, that's a bit much. That crosses a line from a friendly contempt for ignorant Gmail users to something rather nasty. Preemptive apology or not, I don't think that is acceptable

Re: Python parser problem

2012-12-12 Thread Terry Reedy
On 12/12/2012 2:10 PM, RCU wrote: I would like to report a parser bug manifesting on Python 2.5, 2.7 (but not on 2.2) and 3.3. You are not the first to erroneously attribute a problem to Python itself. But seriously, the interpreter itself is so thoroughly tested on a daily basis that yo

Re: samba 4 release

2012-12-12 Thread Michael Torrie
On 12/12/2012 04:40 PM, Mark Lawrence wrote: > Awesome!!! But what the is it??? Are you serious? You honestly don't know what one of the oldest, most widely used piece of open source software it and what it does? Samba is at least as well-known and important as Apache, if not more so. You

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 23:56:24 +, Mark Lawrence wrote: > Please don't place responses like this. The Python community prides > itself on tolerance. If you don't wish to follow that recommendation > please go to an alternative site. Well, I must say, I think that you've just won an award for M

Re: samba 4 release

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 23:40:47 +, Mark Lawrence wrote: > On 12/12/2012 17:39, peter wrote: >> On 12/12/2012 02:38 PM, peter wrote: >>> Hellou. >>> >>>Samba4 first release, with python interface for the internals api, >>> and a implementation of the DC in python :). >>> >>> Viva la python

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 17:20:53 -0500, Dave Cinege wrote: > Isn't super() depreciated? Heavens no. super() is the recommended way to do inheritance, and the *only* way to correctly do multiple inheritance[1]. What makes you think that it has been deprecated? [...] > To me for i in range(len(l))

Re: samba 4 release

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 17:18:43 -0700, Michael Torrie wrote: > Now if we could just get an Exchange replacement that actually doesn't > suck... But but but... if it didn't contain sufficient levels of suckage, it would hardly be a replacement for Exchange, would it?!?!? :-P -- Steven -- http:

Re: Help with Python/ArcPy

2012-12-12 Thread George Silva
even better gis.stackexchange.com On Wed, Dec 12, 2012 at 9:42 PM, Xavier Ho wrote: > You can always try http://stackoverflow.com/search?q=ArcPY, or post your > question there. > > Cheers, > Xav > > > > On 13 December 2012 08:07, Michelle Couden wrote: > >> Does anyone know of a website or for

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 14:35:41 -0800, Victor Hooi wrote: > Hi, > > I have a script that trawls through log files looking for certain error > conditions. These are identified via certain keywords (all different) in > those lines > > I then process those lines using regex groups to extract certain f

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Chris Angelico
On Thu, Dec 13, 2012 at 11:30 AM, Steven D'Aprano wrote: > On Wed, 12 Dec 2012 17:20:53 -0500, Dave Cinege wrote: >> To me for i in range(len(l)) seems like simpler, faster, tighter code >> for this now. > > * the version with enumerate makes the intent more clear: since we > care about looping

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Dave Cinege
On Wednesday 12 December 2012 20:14:08 Chris Angelico wrote: Ok enough already, I'll use the frigging thing! Be happy I'm at least still not coding for python 1.5. > To add to this: Using enumerate gives the possibility (don't know if > any current interpreter takes advantage or not, but a futur

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Terry Reedy
On 12/12/2012 7:30 PM, Steven D'Aprano wrote: On Wed, 12 Dec 2012 17:20:53 -0500, Dave Cinege wrote: Isn't super() depreciated? Heavens no. super() is the recommended way to do inheritance, and the *only* way to correctly do multiple inheritance[1]. Indeed. Rather than super() being depreca

ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes - v20121212

2012-12-12 Thread Dave Cinege
Version 20121212 #!/usr/bin/env python """ thesaurus.py 2012-12-12 Copyright (c) 2012 Dave Cinege Licence: PSF Licence, Copyright notice may not be altered. Thesaurus: A different way to call a dictionary. Thesaurus is a new a dictionary subclass which allows calling keys as if

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread Dave Cinege
On Monday 10 December 2012 23:08:24 Jason Friedman wrote: > 2) Posting your code at ActiveState.com. If someone wants to please do. I'm back to being completely overloaded with normal work now. The v20121212 release based on the last few days comments is as far as I will go with this now. Dave

Re: samba 4 release

2012-12-12 Thread Terry Reedy
On 12/12/2012 7:18 PM, Steven D'Aprano wrote: On Wed, 12 Dec 2012 23:40:47 +, Mark Lawrence wrote: On 12/12/2012 17:39, peter wrote: On 12/12/2012 02:38 PM, peter wrote: Hellou. Samba4 first release, with python interface for the internals api, and a implementation of the DC in pytho

Re: samba 4 release

2012-12-12 Thread rusi
On Dec 13, 5:18 am, Michael Torrie wrote: > On 12/12/2012 04:40 PM, Mark Lawrence wrote: > > > Awesome!!!  But what the is it??? > > Are you serious?  You honestly don't know what one of the oldest, most > widely used piece of open source software it and what it does?  Samba is > at least as

OOP noob question: Mixin properties

2012-12-12 Thread Micky Hulse
Dear Python Santa gurus, ;D I have this Django mixin: ...which is used to override render_to_response() so I can output a JSON response (the above code is pretty much straight

Re: why does dead code costs time?

2012-12-12 Thread Ramchandra Apte
On Sunday, 9 December 2012 22:17:09 UTC+5:30, Mark Lawrence wrote: > On 09/12/2012 14:11, Ramchandra Apte wrote: > > > > > > peehole haha > > > > > Double spaced crap from you again not so haha. > > -- > > Cheers. > > Mark Lawrence. haha. What does "Cheers" mean? -- http://mail.python.or

Re: why does dead code costs time?

2012-12-12 Thread Steven D'Aprano
On Wed, 12 Dec 2012 21:23:47 -0800, Ramchandra Apte wrote: >> Cheers. >> >> Mark Lawrence. > > haha. What does "Cheers" mean? It is an exclamation expressing good wishes. In particular, good wishes before drinking. Think of it as a variation on: "Good health to you" "Best wishes" "Sincerest r

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Victor Hooi
Hi, That was actually *one* regex expression...lol. And yes, it probably is a bit convoluted. Thanks for the tip about using VERBOSE - I'll use that, and comment my regex - that's a useful tip. Are there any other general pointers you might give for that regex? The lines I'm trying to match l

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Chris Angelico
On Thu, Dec 13, 2012 at 5:10 PM, Victor Hooi wrote: > Are there any other general pointers you might give for that regex? The lines > I'm trying to match look something like this: > > 07:40:05.793627975 [Info ] [SOME_MODULE] [SOME_FUNCTION] > [SOME_OTHER_FLAG] [RequestTag=0 ErrorCode=3 Erro

Re: why does dead code costs time?

2012-12-12 Thread rusi
On Dec 13, 11:01 am, Steven D'Aprano wrote: > On Wed, 12 Dec 2012 21:23:47 -0800, Ramchandra Apte wrote: > >> Cheers. > > >> Mark Lawrence. > > > haha. What does "Cheers" mean? > > It is an exclamation expressing good wishes. In particular, good wishes > before drinking. Think of it as a variation

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Victor Hooi
Heya, See my original first post =): > Would I be substantially better off using a list of strings and using "in" > against each line, then using a second pass of regex only on the matched > lines? Based on what Steven said, and what I know about the logs in question, it's definitely better

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Chris Angelico
On Thu, Dec 13, 2012 at 5:35 PM, Victor Hooi wrote: > Heya, > > See my original first post =): > Oops! Mea culpa. Yes, you did say that. And then definitely, if it's a one-keyword search for each and then the regex to parse, that would be much more efficient than using the regex to pick lines. S

Re: why does dead code costs time?

2012-12-12 Thread Cameron Simpson
On 12Dec2012 22:27, rusi wrote: | On Dec 13, 11:01 am, Steven D'Aprano wrote: | > On Wed, 12 Dec 2012 21:23:47 -0800, Ramchandra Apte wrote: | > >> Cheers. | > >> Mark Lawrence. | > | > > haha. What does "Cheers" mean? | > | > It is an exclamation expressing good wishes. In particular, good wishe

Re: why does dead code costs time?

2012-12-12 Thread rusi
On Dec 13, 11:51 am, Cameron Simpson wrote: > It looked good-natured, she thought;  Still it had very long claws and a > great many teeth, so she felt it ought to be treated with respect. heh! If only we could respect without such coercion(s) -- http://mail.python.org/mailman/listinfo/python-li

Re: why does dead code costs time?

2012-12-12 Thread Chris Angelico
On Thu, Dec 13, 2012 at 5:59 PM, rusi wrote: > On Dec 13, 11:51 am, Cameron Simpson wrote: >> It looked good-natured, she thought; Still it had very long claws and a >> great many teeth, so she felt it ought to be treated with respect. > > heh! > > If only we could respect without such coercion(

Re: MySQLdb compare lower

2012-12-12 Thread Cameron Simpson
On 12Dec2012 02:03, Dennis Lee Bieber wrote: | According to the old "MySQL Language Reference" | """ | By default, string comparisons are not case sensitive and will use the | current character set (ISO-8859-1 Latin1 by default, which also works | excellently for English). | """ I'm flabbe

Problem with calling function from dll

2012-12-12 Thread deepblu
I have problem with using function from dll. import ctypes b = ctypes.windll.LoadLibrary("kernel32") a = "" b.GetComputerNameA(a,20) But I got exception: Traceback (most recent call last): File "", line 1, in b.GetComputerNameA(a,20) WindowsError: exception: access violation reading 0