Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Νίκος
Στις 4/7/2013 8:44 πμ, ο/η ru...@yahoo.com έγραψε: On 07/03/2013 09:07 PM, rusi wrote: [...] I got into it because I felt Chris had done more service to Nikos and the list than others and then was being misrepresented. I don't know why you think I misrepresented him. I questioned the

Re: Default scope of variables

2013-07-04 Thread Peter Otten
Steven D'Aprano wrote: Well, if I ever have more than 63,000,000 variables[1] in a function, I'll keep that in mind. Until then, I'm pretty sure you can trivially avoid name clashes with globals that you wish to avoid clashing with. [1] Based on empirical evidence that Python supports names

Re: Default scope of variables

2013-07-04 Thread Ian Kelly
On Wed, Jul 3, 2013 at 11:32 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Python lets you do that across but not within functions. But Javascript/ECMAScript/whatever doesn't give you that. A var declaration makes it function-local, no matter where the declaration is. That's

Important features for editors

2013-07-04 Thread cutems93
I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a good editor should have? Keyboard shortcuts? Extensions? Thanks! Min --

Re: Default scope of variables

2013-07-04 Thread Dave Angel
On 07/04/2013 01:32 AM, Steven D'Aprano wrote: SNIP Well, if I ever have more than 63,000,000 variables[1] in a function, I'll keep that in mind. SNIP [1] Based on empirical evidence that Python supports names with length at least up to one million characters long, and assuming

Re: Important features for editors

2013-07-04 Thread Νίκος
Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a good editor should have? Keyboard

Access Violation Error while using Python Ctypes

2013-07-04 Thread HighBeliever
I used the following code to import the functions of a dll in my Python code. from ctypes import * hunspell=CDLL('C:\Nhunspell\Hunspellx64.dll') hunspell.HunspellInit.restype = POINTER(c_int) hunspell.HunspellInit.argtypes = (c_char_p, c_char_p)

Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread feedthetroll
Am Mittwoch, 3. Juli 2013 19:00:50 UTC+2 schrieb rusi: On Wednesday, July 3, 2013 7:42:19 PM UTC+5:30, feedth...@gmx.de wrote: Any questions? YES! Who is that hiding behind 'FeedTheTroll' ? Oh, it's just yattt (yet another troll trolling troll) lurching around to find amazing threads

Re: Important features for editors

2013-07-04 Thread Dave Angel
On 07/04/2013 03:59 AM, Νίκος wrote: Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Original exception was: [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Traceback (most recent

Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread feedthetroll
Am Mittwoch, 3. Juli 2013 19:01:23 UTC+2 schrieb ru...@yahoo.com: On 07/03/2013 08:12 AM, feedthetr...@gmx.de wrote: Am Mittwoch, 3. Juli 2013 12:00:14 UTC+2 schrieb Νίκος: Στις 3/7/2013 12:45 μμ, ο/η Chris Angelico έγραψε: ] You have betrayed the trust of all your customers. ... I just

Re: Important features for editors

2013-07-04 Thread Dave Angel
On 07/04/2013 03:32 AM, cutems93 wrote: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a good editor should have? Keyboard

Re: Important features for editors

2013-07-04 Thread Νίκος
Στις 4/7/2013 11:34 πμ, ο/η Dave Angel έγραψε: On 07/04/2013 03:59 AM, Νίκος wrote: Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Dave Angel
On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Original exception was: [Thu Jul 04 11:35:14 2013] [error] [client

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 12:59 μμ, ο/η Dave Angel έγραψε: On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Original exception was:

Re: Important features for editors

2013-07-04 Thread Chris Angelico
On Thu, Jul 4, 2013 at 7:14 PM, Νίκος ni...@superhost.gr wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it without buying it. Considering that there are plenty of free text editors around, I don't see any reason to

Fwd: Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Νίκος
Στις 3/7/2013 8:23 μμ, ο/η Chris Angelico έγραψε: What are the file permissions (file modes) on all your home directories? Do you know what they mean? root@nikos [~]# ls -al /home total 88 drwx--x--x 22 root root 4096 Jul 3 20:03 ./ drwxr-xr-x 22 root root 4096 Jun 12 01:21

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Ulrich Eckhardt
Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you didn't change. ;) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte [Thu Jul 04 11:35:14 2013] [error] [client

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Dave Angel
On 07/04/2013 06:03 AM, Νίκος wrote: Στις 4/7/2013 12:59 μμ, ο/η Dave Angel έγραψε: On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client

Fwd: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Αρχικό μήνυμα Θέμα: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte Ημερομηνία: Thu, 04 Jul 2013 06:29:25 -0400 Από: Dave Angel da...@davea.name Προς: python-list@python.org Ομάδες συζήτησης: comp.lang.python Αναφορές:

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you didn't change. ;) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Chris Angelico
On Thu, Jul 4, 2013 at 8:38 PM, Νίκος ni...@superhost.gr wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? What character is 0xb6 anyways? It isn't. It's a byte. Bytes are not characters. http://www.joelonsoftware.com/articles/Unicode.html ChrisA

Re: Important features for editors

2013-07-04 Thread Robert Kern
On 2013-07-04 10:14, Νίκος wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it without buying it. Please do not use this forum to make such offers. -- Robert Kern I have come to believe that the whole world is an

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread MRAB
On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you didn't change. ;) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in

Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Antoon Pardon
Op 04-07-13 01:40, Joshua Landau schreef: On 3 July 2013 11:01, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: This is not an attack of character. Level of skill/competence is not in general seen as a character trait. I disagree. I'm not sure how to argue this, rather than point out that

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 1:54 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 8:38 PM, � ni...@superhost.gr wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? What character is 0xb6 anyways? It isn't. It's a byte. Bytes are not characters.

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε: On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you didn't change. ;)

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread MRAB
On 04/07/2013 12:29, Νίκος wrote: Στις 4/7/2013 1:54 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 8:38 PM, � ni...@superhost.gr wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? What character is 0xb6 anyways? It isn't. It's a byte.

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread MRAB
On 04/07/2013 12:36, Νίκος wrote: Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε: On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing nothing Well, undo the nothing that you

Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Antoon Pardon
Op 03-07-13 19:11, ru...@yahoo.com schreef: On 07/03/2013 03:21 AM, Antoon Pardon wrote: Op 03-07-13 02:30, ru...@yahoo.com schreef: If your going to point out something negative about someone then do so politely. Ask yourself if you were pointing out incompetence to your boss (or anyone

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 2:52 μμ, ο/η MRAB έγραψε: On 04/07/2013 12:29, Νίκος wrote: Στις 4/7/2013 1:54 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 8:38 PM, � ni...@superhost.gr wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? What character

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Chris Angelico
On Thu, Jul 4, 2013 at 9:52 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 04/07/2013 12:29, Νίκος wrote: Στις 4/7/2013 1:54 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 8:38 PM, � ni...@superhost.gr wrote: So you are also suggesting that what gesthostbyaddr() returns is not

Re: Default scope of variables

2013-07-04 Thread Lele Gaifax
Dave Angel da...@davea.name writes: Well, the number wouldn't be 63,000,000. Rather it'd be 63**100 Uhm, if we are talking about Py2, then you should not count all the combinations starting with a digit, while under Py3 the number explodes, as this is valid code: à = 1 à 1 :-) back to

Re: Coping with cyclic imports

2013-07-04 Thread kanchan . n . mahajan
On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: Hallöchen! I have a rather fat module that represents a document parser -- inline elements, block elements, and the like. Now I want to split it into many modules to make everything more manageable. But at the moment I

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: On 04/07/2013 12:36, Νίκος wrote: Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε: On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to have this error without changing

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος
Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: Also, try printing out ascii(os.environ['REMOTE_ADDR']). '108.162.229.97' is the result of: print( ascii(os.environ['REMOTE_ADDR']) ) Seems perfectly valid. and also have a PTR record, so that leaved us clueless about the internal server error. --

Google earth

2013-07-04 Thread dave poreh
Folks, Hi, I am an IDL users and i have started to check out some pythons abilities, and turns out it is really cool. I just wondering if there is a Google earth module that we could import out lat-lon-(data) based on python codes. I have this web site (https://code.google.com/p/kdm-idl/)

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Ulrich Eckhardt
Am 04.07.2013 12:38, schrieb Νίκος: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: Why cant it decode the starting byte? what starting byte is that? It's the 0xb6 but it's expecting the starting byte of a UTF-8 sequence. Please do some research on

Re: Important features for editors

2013-07-04 Thread Tim Chase
On 2013-07-04 05:02, Dave Angel wrote: [snip an excellent list of things to look for in an editor] Also, - the ability to perform changes in bulk, especially across files. Often, this is done with the ability to record/playback macros, though some editors have multiple insertion/edit

Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-04 Thread Aseem Bansal
I want to start GUI development using Tkinter in Python 2.7.5. I have been searching all over google but couldn't find any IDE that has drag-and-drop feature for Python GUI development. Tried to ask on stackoverflow

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος Γκρ33κ
Στις 4/7/2013 4:07 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 12:38, schrieb Νίκος: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: Why cant it decode the starting byte? what starting byte is that? It's the 0xb6 but it's expecting the starting byte

Re: Important features for editors

2013-07-04 Thread Steve Simmons
Νίκος ni...@superhost.gr wrote: Στις 4/7/2013 11:34 πμ, ο/η Dave Angel έγραψε: On 07/04/2013 03:59 AM, Νίκος wrote: Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread MRAB
On 04/07/2013 13:52, Νίκος wrote: Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: Also, try printing out ascii(os.environ['REMOTE_ADDR']). '108.162.229.97' is the result of: print( ascii(os.environ['REMOTE_ADDR']) ) Seems perfectly valid. and also have a PTR record, so that leaved us clueless about

Re: Coping with cyclic imports

2013-07-04 Thread Dave Angel
On 07/04/2013 08:48 AM, kanchan.n.maha...@gmail.com wrote: On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: Hallöchen! I have a rather fat module that represents a document parser -- inline elements, block elements, and the like. Now I want to split it into many modules to

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread MRAB
On 04/07/2013 13:47, Νίκος wrote: Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: On 04/07/2013 12:36, Νίκος wrote: Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε: On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013 10:37, schrieb Νίκος: I just started to

Re: Important features for editors

2013-07-04 Thread Νίκος Γκρ33κ
Στις 4/7/2013 4:33 μμ, ο/η Steve Simmons έγραψε: Νίκος ni...@superhost.gr wrote: Στις 4/7/2013 11:34 πμ, ο/η Dave Angel έγραψε: On 07/04/2013 03:59 AM, Νίκος wrote: Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own

Re: Important features for editors

2013-07-04 Thread feedthetroll
Am Donnerstag, 4. Juli 2013 15:36:02 UTC+2 schrieb Νίκος Γκρ33κ: Στις 4/7/2013 4:33 μμ, ο/η Steve Simmons έγραψε: Νίκος ni...@superhost.gr wrote: Στις 4/7/2013 11:34 πμ, ο/η Dave Angel έγραψε: On 07/04/2013 03:59 AM, Νίκος wrote: ... Download Sublime Text v3

Re: Important features for editors

2013-07-04 Thread rusi
On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: Boy oh boy! You really are a slow learner Nicos. You have just offered to commit a crime and to include dozens of others in that crime ON A PUBLIC FORUM. Please think before you post. For the record Steve, let me say, I

Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?]

2013-07-04 Thread Wayne Werner
On Wed, 3 Jul 2013, Dennis Lee Bieber wrote: Consider that the Powershell default is to /prevent/ execution of script files unless some security settings have been changed; even local script files need to be signed to be executed. Protip: No they don't - wrap it in a cmd/bat file and

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος Γκρ33κ
Στις 4/7/2013 4:34 μμ, ο/η MRAB έγραψε: On 04/07/2013 13:47, Νίκος wrote: Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: On 04/07/2013 12:36, Νίκος wrote: Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε: On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η Ulrich Eckhardt έγραψε: Am 04.07.2013

Re: Important features for editors

2013-07-04 Thread MRAB
On 04/07/2013 14:22, Tim Chase wrote: On 2013-07-04 05:02, Dave Angel wrote: [snip an excellent list of things to look for in an editor] Also, - the ability to perform changes in bulk, especially across files. Often, this is done with the ability to record/playback macros, though some

Re: Important features for editors

2013-07-04 Thread William Ray Wing
On Jul 4, 2013, at 9:22 AM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-07-04 05:02, Dave Angel wrote: [snip an excellent list of things to look for in an editor] Also, - the ability to perform changes in bulk, especially across files. Often, this is done with the ability to

Fwd: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος Γκρ33κ
Αρχικό μήνυμα Θέμα: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte Ημερομηνία: Thu, 04 Jul 2013 14:34:42 +0100 Από: MRAB pyt...@mrabarnett.plus.com Απάντηση: python-list@python.org Προς: python-list@python.org Ομάδες

Re: Coping with cyclic imports

2013-07-04 Thread Oscar Benjamin
On 4 July 2013 13:48, kanchan.n.maha...@gmail.com wrote: On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: [snip] If you do import foo inside bar and import bar inside foo, it will work fine. By the time anything actually runs, both modules will be fully loaded and will

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread MRAB
On 04/07/2013 14:38, Νίκος Γκρ33κ wrote: Στις 4/7/2013 4:34 μμ, ο/η MRAB έγραψε: On 04/07/2013 13:47, Νίκος wrote: Στις 4/7/2013 3:07 μμ, ο/η MRAB έγραψε: On 04/07/2013 12:36, Νίκος wrote: Στις 4/7/2013 2:06 μμ, ο/η MRAB έγραψε: On 04/07/2013 11:38, Νίκος wrote: Στις 4/7/2013 12:50 μμ, ο/η

Re: Coping with cyclic imports

2013-07-04 Thread kanchan . n . mahajan
On Thursday, July 4, 2013 5:03:20 PM UTC+2, Oscar Benjamin wrote: On 4 July 2013 13:48, kanchan.n.maha...@gmail.com wrote: On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: [snip] If you do import foo inside bar and import bar inside foo, it will work fine. By

Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-04 Thread memilanuk
On 07/04/2013 06:23 AM, Aseem Bansal wrote: I want to start GUI development using Tkinter in Python 2.7.5. I have been searching all over google but couldn't find any IDE that has drag-and-drop feature for Python GUI development. For Tkinter, no luck. The general consensus always seems to

Re: Important features for editors

2013-07-04 Thread Steve Simmons
rusi rustompm...@gmail.com wrote: On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: Boy oh boy! You really are a slow learner Nicos. You have just offered to commit a crime and to include dozens of others in that crime ON A PUBLIC FORUM. Please think before you post. For

Re: Default scope of variables

2013-07-04 Thread Wayne Werner
On Thu, 4 Jul 2013, Steven D'Aprano wrote: [1] Based on empirical evidence that Python supports names with length at least up to one million characters long, and assuming that each character can be an ASCII letter, digit or underscore. The specification *does* state unlimited length:

Re: Important features for editors

2013-07-04 Thread Steven D'Aprano
On Thu, 04 Jul 2013 12:01:26 +0100, Robert Kern wrote: On 2013-07-04 10:14, Νίκος wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it without buying it. Please do not use this forum to make such offers. Thank you

Re: Important features for editors

2013-07-04 Thread Steven D'Aprano
On Thu, 04 Jul 2013 07:02:26 -0700, rusi wrote: On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: Boy oh boy! You really are a slow learner Nicos. You have just offered to commit a crime and to include dozens of others in that crime ON A PUBLIC FORUM. Please think before you

Re: First attempt at a Python prog (Chess)

2013-07-04 Thread Chris Hinsley
On 2013-02-13 23:25:09 +, Chris Hinsley said: New to Python, which I really like BTW. First serious prog. Hope you like it. I know it needs a 'can't move if your King would be put into check' test. But the weighted value of the King piece does a surprising emergent job. New version

Re: Default scope of variables

2013-07-04 Thread Steven D'Aprano
On Thu, 04 Jul 2013 03:06:25 -0400, Dave Angel wrote: On 07/04/2013 01:32 AM, Steven D'Aprano wrote: SNIP Well, if I ever have more than 63,000,000 variables[1] in a function, I'll keep that in mind. SNIP [1] Based on empirical evidence that Python supports names with length

Re: Important features for editors

2013-07-04 Thread rurpy
On 07/04/2013 08:24 AM, MRAB wrote: On 04/07/2013 14:22, Tim Chase wrote: On 2013-07-04 05:02, Dave Angel wrote: [snip an excellent list of things to look for in an editor] It's 2013, yet Unicode support is merely a nice-to-have? I agree that this is pretty important. Even if you don't

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Νίκος Γκρ33κ
Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε: What do you mean I don't know how to catch the exception with OSError? You've tried except socket.gaierror and except socket.herror, well just write except OSError instead! try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except

RE: Decorator help

2013-07-04 Thread Joseph L. Casale
Well, technically it's func.func_closure[0].cell_contents.__name__ but of course you cannot know that for the general case. Hah, I admit I lacked perseverance in looking at this in PyCharms debugger as I missed that. Much appreciated! jlc --

Re: Important features for editors

2013-07-04 Thread Steve Simmons
To Rurpy and cutems93, My apologies too. I reacted before I thought about creating a new thread. To your question: One thing that I don't use daily but find very useful to have in an editor is 'Hex View' (or better yet a 'Hex Editor'). Whilst it has been 'dissed' recently on this list, I

Re: Default scope of variables

2013-07-04 Thread Steven D'Aprano
On Thu, 04 Jul 2013 15:47:57 +1000, Chris Angelico wrote: On Thu, Jul 4, 2013 at 3:32 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Accidental shadowing can be a problem, but I've never heard of anyone saying that they were *forced* to shadow a global they needed access to.

Re: Default scope of variables

2013-07-04 Thread Rotwang
Sorry to be OT, but this is sending my pedantry glands haywire: On 04/07/2013 08:06, Dave Angel wrote: On 07/04/2013 01:32 AM, Steven D'Aprano wrote: SNIP Well, if I ever have more than 63,000,000 variables[1] in a function, I'll keep that in mind. SNIP [1] Based on

Re: Default scope of variables

2013-07-04 Thread Chris Angelico
On Fri, Jul 5, 2013 at 2:38 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 04 Jul 2013 15:47:57 +1000, Chris Angelico wrote: Here's one example of shadowing that comes from a C++ project at work. I have a class that represents a database transaction (constructing it

Illegal suggestions on python list

2013-07-04 Thread Rustom Mody
On Thu, Jul 4, 2013 at 9:16 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 04 Jul 2013 07:02:26 -0700, rusi wrote: On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: Boy oh boy! You really are a slow learner Nicos. You have just offered to commit

How is this evaluated

2013-07-04 Thread Arturo B
I'm making this exercise: (Python 3.3) Write a function translate() that will translate a text into rövarspråket (Swedish for robber's language). That is, double every consonant and place an occurrence of o in between. For example, translate(this is fun) should return the string tothohisos

Convert SOAP response (ArrayOfInt) to Python list

2013-07-04 Thread robert . winkler
Thanks to the OSA library, which works for SOAP requests with Python 3.x, I can now use SOAP services at http://www.chemspider.com. The results structure is GetAsyncSearchResultResult intint/int intint/int /GetAsyncSearchResultResult The result is a list of

Re: How is this evaluated

2013-07-04 Thread Antoon Pardon
Op 04-07-13 19:20, Arturo B schreef: I'm making this exercise: (Python 3.3) Write a function translate() that will translate a text into rövarspråket (Swedish for robber's language). That is, double every consonant and place an occurrence of o in between. For example, translate(this is fun)

Re: How is this evaluated

2013-07-04 Thread newspost2012
Am Donnerstag, 4. Juli 2013 19:20:43 UTC+2 schrieb Arturo B: ... So I want to question: How is the if 'h' in consonants else 'h' for 'h' in s part evaluated? (step by step please :P ) Although new to python I think I can solve this (if no one contradicts, I can guess that I understood

Re: Illegal suggestions on python list

2013-07-04 Thread feedthetroll
Am Donnerstag, 4. Juli 2013 19:10:07 UTC+2 schrieb rusi: On Thu, Jul 4, 2013 at 9:16 PM, Steven D'Aprano steve+comp@pearwood.info wrote: On Thu, 04 Jul 2013 07:02:26 -0700, rusi wrote: ... Note that you are not objecting to the crime Which crime is that? Presumably you mean an actual

Re: How is this evaluated

2013-07-04 Thread Jussi Piitulainen
Arturo B writes: I'm making this exercise: (Python 3.3) Write a function translate() that will translate a text into rövarspråket (Swedish for robber's language). That is, double every consonant and place an occurrence of o in between. For example, translate(this is fun) should return the

Re: Default scope of variables

2013-07-04 Thread Peter Otten
Rotwang wrote: Sorry to be OT, but this is sending my pedantry glands haywire: We are mostly pedants, too -- so this is well-deserved... On 04/07/2013 08:06, Dave Angel wrote: On 07/04/2013 01:32 AM, Steven D'Aprano wrote: SNIP Well, if I ever have more than 63,000,000

Re: Important features for editors

2013-07-04 Thread Grant Edwards
On 2013-07-04, ?? ni...@superhost.gr wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it without buying it. A new low. Now he's offering to help people steal others' work. -- Grant --

Re: Important features for editors

2013-07-04 Thread Ferrous Cranus
Στις 4/7/2013 9:40 μμ, ο/η Grant Edwards έγραψε: On 2013-07-04, ?? ni...@superhost.gr wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it without buying it. A new low. Now he's offering to help people steal

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Ferrous Cranus
Στις 4/7/2013 11:08 μμ, ο/η Dennis Lee Bieber έγραψε: On Thu, 04 Jul 2013 13:38:09 +0300, ? ni...@superhost.gr declaimed the following: What character is 0xb6 anyways? It depends on the encoding... In EBCDIC it's unassigned. It's a paragraph mark in ISO-Latin-1 (ISO-8859-1).

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Lele Gaifax
Ferrous Cranus ni...@superhost.gr writes: try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except: host = Reverse DNS Failed Is there a way to write the above so i cna print the error return when it fails? Try something like try: host =

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Michael Torrie
On 07/04/2013 02:25 PM, Ferrous Cranus wrote: try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except: host = Reverse DNS Failed Is there a way to write the above so i cna print the error return when it fails? Do you know what IP address causes the failure?

Re: Important features for editors

2013-07-04 Thread Tim Chase
On 2013-07-04 15:24, MRAB wrote: On 04/07/2013 14:22, Tim Chase wrote: Other nice-to-haves include - Unicode support (including various encodings) It's 2013, yet Unicode support is merely a nice-to-have? Yeah, while I use Vim and it's got support, most of what I do interacts with

Re: Important features for editors

2013-07-04 Thread Chris Angelico
On Fri, Jul 5, 2013 at 4:52 AM, Ferrous Cranus ni...@superhost.gr wrote: Στις 4/7/2013 9:40 μμ, ο/η Grant Edwards έγραψε: On 2013-07-04, ?? ni...@superhost.gr wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use it

Re: Important features for editors

2013-07-04 Thread Jason Swails
On Thu, Jul 4, 2013 at 2:52 PM, Ferrous Cranus ni...@superhost.gr wrote: Στις 4/7/2013 9:40 μμ, ο/η Grant Edwards έγραψε: On 2013-07-04, ?? ni...@superhost.gr wrote: If you guys want to use it i can send you a patch for it. I know its illegal thing to say but it will help you use

Re: Coping with cyclic imports

2013-07-04 Thread Dave Angel
On 07/04/2013 11:11 AM, kanchan.n.maha...@gmail.com wrote: On Thursday, July 4, 2013 5:03:20 PM UTC+2, Oscar Benjamin wrote: On 4 July 2013 13:48, kanchan.n.maha...@gmail.com wrote: On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: [snip] If you do import foo inside

Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?]

2013-07-04 Thread Andrew Berg
On 2013.07.04 09:08, Wayne Werner wrote: powershell -ExecutionPolicy Bypass -File ... \o/ Microsoft security at it again! (reminds me a bit of just pushing Cancel to log into windows 98, I think it was) From an MSDN page linked in one of the answers: Now, why is PowerShell.exe

Re: Illegal suggestions on python list

2013-07-04 Thread Chris Angelico
On Fri, Jul 5, 2013 at 3:10 AM, Rustom Mody rustompm...@gmail.com wrote: On Thu, Jul 4, 2013 at 9:16 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Which crime is that? Presumably you mean an actual criminal felony, not a mere civil offence. Under which jurisdiction? If

Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?]

2013-07-04 Thread Chris Angelico
On Fri, Jul 5, 2013 at 8:12 AM, Andrew Berg robotsondr...@gmail.com wrote: On 2013.07.04 09:08, Wayne Werner wrote: powershell -ExecutionPolicy Bypass -File ... \o/ Microsoft security at it again! (reminds me a bit of just pushing Cancel to log into windows 98, I think it was) From an

Re: Default scope of variables

2013-07-04 Thread Joshua Landau
On 4 July 2013 17:54, Rotwang sg...@hotmail.co.uk wrote: 53*(63**100 - 1)//62 Or about 10**10**6.255 (so about 1.80M digits long). For the unicode side (Python 3, in other words) and reusing your math (ya better hope it's right!), you are talking: 97812*((97812+2020)**100 -

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Nobody
On Thu, 04 Jul 2013 13:38:09 +0300, Νίκος wrote: So you are also suggesting that what gesthostbyaddr() returns is not utf-8 encoded too? The gethostbyaddr() OS function returns a byte string with no specified encoding. Python 3 will doubtless try to decode that to a character string using

Re: Important features for editors

2013-07-04 Thread Joshua Landau
On 4 July 2013 08:32, cutems93 ms2...@cornell.edu wrote: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a good editor should

Re: Decorator help

2013-07-04 Thread Joshua Landau
On 4 July 2013 06:39, Peter Otten __pete...@web.de wrote: Joshua Landau wrote: On 3 July 2013 23:19, Joshua Landau joshua.landau...@gmail.com wrote: If you don't want to do that, you'd need to use introspection of a remarkably hacky sort. If you want that, well, it'll take a mo. After some

Re: Important features for editors

2013-07-04 Thread Dave Angel
On 07/04/2013 08:38 PM, Joshua Landau wrote: On 4 July 2013 08:32, cutems93 ms2...@cornell.edu wrote: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor.

Re: Illegal suggestions on python list

2013-07-04 Thread alex23
On 5/07/2013 4:18 AM, feedthetr...@gmx.de wrote: Oh, sorry, we forgot, that the US legal system is the only one applicable to the internt (and of course to the whole world). Given that Australian citizens (at least) have been extradited to the US for piracy crimes that weren't commited on US

Re: Default scope of variables

2013-07-04 Thread Steven D'Aprano
On Thu, 04 Jul 2013 17:54:20 +0100, Rotwang wrote: [...] Anyway, none of the calculations that has been given takes into account the fact that names can be /less/ than one million characters long. Not in *my* code they don't!!! *wink* The actual number of non-empty strings of length at

Re: Coping with cyclic imports

2013-07-04 Thread Cameron Simpson
On 04Jul2013 16:03, Oscar Benjamin oscar.j.benja...@gmail.com wrote: | On 4 July 2013 13:48, kanchan.n.maha...@gmail.com wrote: | On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: | http://stackoverflow.com/questions/744373/circular-or-cyclic-imports-in-python | | Is there

Re: First attempt at a Python prog (Chess)

2013-07-04 Thread Joshua Landau
Just a minor suggestion: def display_board(board): print ' a b c d e f g h' print '+---+---+---+---+---+---+---+---+' for row in range(8): for col in range(8): piece = board[row * 8 + col] if piece_type[piece] == WHITE: print '|

Re: How is this evaluated

2013-07-04 Thread Steven D'Aprano
On Thu, 04 Jul 2013 10:20:43 -0700, Arturo B wrote: I'm making this exercise: (Python 3.3) Write a function translate() that will translate a text into rövarspråket (Swedish for robber's language). That is, double every consonant and place an occurrence of o in between. For example,

  1   2   >