Re: Default scope of variables

2013-07-03 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 nam

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

2013-07-03 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 morali

Re: Default scope of variables

2013-07-03 Thread Steven D'Aprano
On Thu, 04 Jul 2013 05:30:03 +0100, Joshua Landau wrote: > That said, I'm not too convinced. Personally, the proper way to do what > you are talking about is creating a new closure. Like: > > for i in range(100): > with new_scope(): > for i in range(100): > func(i) > f

Re: Default scope of variables

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 3:32 PM, Steven D'Aprano 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. > Just pick a different name. Here's one example of shadowing that comes from a C++ project at

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

2013-07-03 Thread rurpy
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 morality of his accepting access to Nikos' server and th

Re: Decorator help

2013-07-03 Thread Peter Otten
Joshua Landau wrote: > On 3 July 2013 23:19, Joshua Landau 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 effort I'm pretty confident that the hacky way is impossible. Well, technical

Re: Default scope of variables

2013-07-03 Thread Steven D'Aprano
On Thu, 04 Jul 2013 14:07:55 +1000, Chris Angelico wrote: > On Thu, Jul 4, 2013 at 1:27 PM, Steven D'Aprano > wrote: >> With respect to the Huffman coding of declarations, Javascript gets it >> backwards. Locals ought to be more common, but they require more >> typing. Locals are safer, better, m

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread Joshua Landau
On 4 July 2013 05:47, alex23 wrote: > On 4/07/2013 2:12 PM, Joshua Landau wrote: >> >> On 4 July 2013 04:52, Maciej Dziardziel wrote: >>> >>> def foo(*args, bar=1, **kwargs): >>> pass > > >> Try "foo(1)" and it will fail -- "bar" needs to be given as a keyword. > > > No it won't, because it

Re: Default scope of variables

2013-07-03 Thread Joshua Landau
On 4 July 2013 05:36, Chris Angelico wrote: > On Thu, Jul 4, 2013 at 2:30 PM, Joshua Landau > wrote: >> That said, I'm not too convinced. Personally, the proper way to do >> what you are talking about is creating a new closure. Like: >> >> for i in range(100): >> with new_scope(): >>

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread alex23
On 4/07/2013 2:12 PM, Joshua Landau wrote: On 4 July 2013 04:52, Maciej Dziardziel wrote: def foo(*args, bar=1, **kwargs): pass Try "foo(1)" and it will fail -- "bar" needs to be given as a keyword. No it won't, because it is supplied with a default. You may be confusing it with the r

Re: Default scope of variables

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 2:30 PM, Joshua Landau wrote: > That said, I'm not too convinced. Personally, the proper way to do > what you are talking about is creating a new closure. Like: > > for i in range(100): > with new_scope(): > for i in range(100): > func(i) > func(i

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread Maciej Dziardziel
On Thursday, July 4, 2013 5:05:23 AM UTC+1, alex23 wrote: > It was an explicit syntax change for Python3. You can read about the > reasoning behind it here: > > http://www.python.org/dev/peps/pep-3102/ Thanks, that was helpful. Maciej Dziardziel -- http://mail.python.org/mailman/listinfo/python

Re: Default scope of variables

2013-07-03 Thread Joshua Landau
On 4 July 2013 05:07, Chris Angelico wrote: > On Thu, Jul 4, 2013 at 1:27 PM, Steven D'Aprano > wrote: >> With respect to the Huffman coding of declarations, Javascript gets it >> backwards. Locals ought to be more common, but they require more typing. >> Locals are safer, better, more desirable

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread Joshua Landau
On 4 July 2013 04:52, Maciej Dziardziel wrote: > Out of curiosity: Does anyone know why the code below is valid in python3, > but not python2: > > def foo(*args, bar=1, **kwargs): > pass Python 3 gained syntax for keyword-only arguments. Try "foo(1)" and it will fail -- "bar" needs to be gi

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 1:52 PM, Maciej Dziardziel wrote: > Out of curiosity: Does anyone know why the code below is valid in python3, > but not python2: > > def foo(*args, bar=1, **kwargs): > pass Keyword-only arguments are (IIRC) a Py3-only feature. There are lots of features that don't wor

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread alex23
On 4/07/2013 1:52 PM, Maciej Dziardziel wrote: Out of curiosity: Does anyone know why the code below is valid in python3, but not python2: def foo(*args, bar=1, **kwargs): pass It was an explicit syntax change for Python3. You can read about the reasoning behind it here: http://www.pyth

Re: Default scope of variables

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 1:27 PM, Steven D'Aprano wrote: > With respect to the Huffman coding of declarations, Javascript gets it > backwards. Locals ought to be more common, but they require more typing. > Locals are safer, better, more desirable than globals, and so it should > be easier to use lo

Why this code works in python3, but not python 2:

2013-07-03 Thread Maciej Dziardziel
Out of curiosity: Does anyone know why the code below is valid in python3, but not python2: def foo(*args, bar=1, **kwargs): pass -- Maciej Dziardziel -- http://mail.python.org/mailman/listinfo/python-list

Default scope of variables

2013-07-03 Thread Steven D'Aprano
Recently, there was a thread where people discussed variable declarations, with a couple people stating that they wished that Python required you to declare local variables, instead of globals. I'm sure they have their (foolish, pathetic) *wink* reasons for this, but I thought I'd explain why I

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

2013-07-03 Thread rusi
On Thursday, July 4, 2013 6:38:31 AM UTC+5:30, Oscar Benjamin wrote: > And also, let's end this and all the related discussions about > trolling and how to deal with trolls. I can see how some are annoyed > by Νίκος and his posts but I for one am *much more* concerned/bothered > by the surrounding

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

2013-07-03 Thread Steven D'Aprano
On Wed, 03 Jul 2013 12:18:58 -0700, rurpy wrote: > On 07/03/2013 12:08 PM, rusi wrote: >> On Wednesday, July 3, 2013 10:31:23 PM UTC+5:30, ru...@yahoo.com wrote: >>> Are the existence of laws against beating people up negated because >>> you told them in advance? Or negated because they "deserve"

Re: Regular expression negative look-ahead

2013-07-03 Thread Jason Friedman
Huh, did not realize that endswith takes a list. I'll remember that in the future. This need is actually for http://schemaspy.sourceforge.net/, which allows one to include only tables/views that match a pattern. Either there is a bug in Schemaspy's code or Java's implementation of regular expres

Re: Regular expression negative look-ahead

2013-07-03 Thread Jason Friedman
> Huh, did not realize that endswith takes a list. I'll remember that in > the future. > > This need is actually for http://schemaspy.sourceforge.net/, which allows > one to include only tables/views that match a pattern. > > Either there is a bug in Schemaspy's code or Java's implementation of >

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

2013-07-03 Thread rurpy
On 07/03/2013 05:12 PM, Joshua Landau wrote: > On 3 July 2013 02:21, wrote: >[...] >> The reality is that few of the people at whom such statements >> are aimed will make such fine distinction. If you use negatively >> judgemental statements against other posters, a significant >> number of them

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread alex23
On 4/07/2013 10:59 AM, Ben Finney wrote: Ian Kelly writes: import __hello__ Different between Python 2 and Python 3 — try it in both! Is it meant to imply that Py2 is weary while Py3 is still enthusiastic, or is that just my personal take? :) -- http://mail.python.org/mailman/listinfo/pyth

Re: Whatever happened to the Effbot? [was Re: python adds an etc]

2013-07-03 Thread Skip Montanaro
Last I knew, Fredrik was working for Google. According to his LinkedIn profile he's a Google employee in Zurich, apparently doing YouTube stuff (assuming his profile is up-to-date). Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread alex23
On 4/07/2013 2:50 AM, Νίκος wrote: I dont understand you. I explicitly state via cmd to have the .html files opened with Chrome instead of IE. Tried it with the way you said and evben with "open with.." but all that fails. some seriosu damaged must have happened and assoc are refusing to change.

Whatever happened to the Effbot? [was Re: python adds an etc]

2013-07-03 Thread alex23
On 4/07/2013 3:08 AM, ru...@yahoo.com wrote: Effbot was around when I first started reading c.l.p Does anyone know if Fredrik Lundh is still an active Python user? His site hasn't been updated for 3-4+ years now (there's an index error on the articles page of effbot.org). Has he pulled a Pilgri

IPv6 deployment by ISPs (was: Bug reports)

2013-07-03 Thread Ben Finney
Chris Angelico writes: > Yeah, and yet so many ISPs simply don't support it [IPv6] (only one of > the Australian ISPs I've worked with does - Internode). Internode was the first in Australia, yes. Telstra supports IPv6, but only for enterprise/government customers. Wikipedia has a list of IPv6

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

2013-07-03 Thread Oscar Benjamin
On 4 July 2013 01:53, Ben Finney wrote: > rusi writes: > >> As a good Christian I believe that Chris tried more than anyone else >> on this list to help Nikos before talking recourse to another gem of >> biblical wisdom: > >> He that spareth his rod hateth his son: but he that loveth him >> chast

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread Ben Finney
Ian Kelly writes: > from __future__ import barry_as_FLUFL Only works in Python 3 (raises a SyntaxError in Python 2). > import __hello__ Different between Python 2 and Python 3 — try it in both! -- \ “I spent all my money on a FAX machine. Now I can only FAX | `\

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

2013-07-03 Thread Ben Finney
rusi writes: > As a good Christian I believe that Chris tried more than anyone else > on this list to help Nikos before talking recourse to another gem of > biblical wisdom: > He that spareth his rod hateth his son: but he that loveth him > chasteneth him betimes. Good Christian morality entail

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

2013-07-03 Thread Joshua Landau
On 3 July 2013 11:01, Antoon Pardon wrote: > Op 02-07-13 15:40, Joshua Landau schreef: >> On 2 July 2013 13:01, Antoon Pardon wrote: >>> >> >> There is not ever a place on this list where you will need to call >> someone incompetent. You can explain to someone that they do not >> understand what

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

2013-07-03 Thread Ian Kelly
On Wed, Jul 3, 2013 at 4:11 PM, Dennis Lee Bieber wrote: > On 03 Jul 2013 13:19:26 GMT, Steven D'Aprano > declaimed the following: > >>On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote: >> >>> Goodness, I doubt if you'll find anyone who can seriously make a case >>> that the Windows command pr

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

2013-07-03 Thread Joshua Landau
On 3 July 2013 02:21, wrote: > On 07/02/2013 05:18 PM, Joshua Landau wrote: >> On 2 July 2013 23:34, Ben Finney wrote: >>[...] >>> Needless to say, I disagree with your position. There is no place for >>> baseless insults in this community; but when the behaviour of someone in >>> this community

Re: Importing modules into IronPython

2013-07-03 Thread Benjamin Kaplan
On Wed, Jul 3, 2013 at 3:05 PM, HighBeliever wrote: > Hi, I have to shift a Python 2.7 program to run in Windows. Doing that has > forced me to use IronPython because my program is dependent on a .dll file > that uses .NET framework. > > I moved all my code to Iron Python and modified it to work

Re: socket data sending problem

2013-07-03 Thread MRAB
On 03/07/2013 23:38, ollietemple...@aol.com wrote: im trying to do a simple socket test program for a school project using the socket module, but im having difficulty in sending data between the client and host program. so far all tutorials and examples have used something along the lines of:

Re: socket data sending problem

2013-07-03 Thread Irmen de Jong
On 4-7-2013 0:38, ollietemple...@aol.com wrote: > it all works fine, except for when i try to use: > > s.send("hello") > > to send data between the client and server, i just get this error message: > > >>> > Traceback (most recent call last): > File "C:/Users/Ollie/Documents/code/cha

RE: Decorator help

2013-07-03 Thread Joseph L. Casale
>> 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 effort I'm pretty confident that the hacky way is impossible. Hah, I fired it in PyCharm's debugger and spent a wack time myself, thanks for the c

Re: Decorator help

2013-07-03 Thread Joshua Landau
On 3 July 2013 23:19, Joshua Landau 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 effort I'm pretty confident that the hacky way is impossible. -- http://mail.python.org/mailman/listinfo/py

socket data sending problem

2013-07-03 Thread ollietempleman
im trying to do a simple socket test program for a school project using the socket module, but im having difficulty in sending data between the client and host program. so far all tutorials and examples have used something along the lines of: s = socket.socket(socket.AF_INET, socket.SOCK_STRE

Re: Decorator help

2013-07-03 Thread Joshua Landau
On 3 July 2013 23:09, Joseph L. Casale wrote: > I have a set of methods which take args that I decorate twice, > > def wrapped(func): > def wrap(*args, **kwargs): > try: > val = func(*args, **kwargs) > # some work > except BaseException as error: >

Importing modules into IronPython

2013-07-03 Thread HighBeliever
Hi, I have to shift a Python 2.7 program to run in Windows. Doing that has forced me to use IronPython because my program is dependent on a .dll file that uses .NET framework. I moved all my code to Iron Python and modified it to work with the dll. But I cant import PyQt4 module into the proje

Decorator help

2013-07-03 Thread Joseph L. Casale
I have a set of methods which take args that I decorate twice, def wrapped(func): def wrap(*args, **kwargs): try: val = func(*args, **kwargs) # some work except BaseException as error: log.exception(error) return [] return wra

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Grant Edwards
On 2013-07-03, Roy Smith wrote: > In article , > Grant Edwards wrote: > >> On 2013-07-03, Roy Smith wrote: >> > In article , >> > Chris Angelico wrote: >> > >> >> Of course, it's possible for there to be dark corners. But if you're >> >> working with those, you know it full well. The dark cor

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Roy Smith
In article , Grant Edwards wrote: > On 2013-07-03, Roy Smith wrote: > > In article , > > Chris Angelico wrote: > > > >> Of course, it's possible for there to be dark corners. But if you're > >> working with those, you know it full well. The dark corners of Python > >> might be in some of its

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Grant Edwards
On 2013-07-03, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> Of course, it's possible for there to be dark corners. But if you're >> working with those, you know it full well. The dark corners of Python >> might be in some of its more obscure modules, or maybe in IPv6 >> handling,

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

2013-07-03 Thread rurpy
On 07/03/2013 12:08 PM, rusi wrote: > On Wednesday, July 3, 2013 10:31:23 PM UTC+5:30, ru...@yahoo.com wrote: >> Are the existence of laws against beating people up negated because >> you told them in advance? Or negated because they "deserve" the >> beating? > > One of the fundamental purpose of

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

2013-07-03 Thread Steven D'Aprano
On Wed, 03 Jul 2013 11:08:11 -0700, rusi wrote: > And when Nikos moves up from petty criminal status to responsible > citizen, "Petty criminal status"? /headdesk -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Read active tab URL from a browser with Python ?

2013-07-03 Thread goldtech
snip > > Another option might be to use Python in conjuction with AutoIt: > > > > http://www.pha.com.au/kb/index.php/Using_AutoIT_with_Python > > http://www.autoitscript.com/forum/topic/115293-how-to-get-firefox-current-page-address/ This is powerful, and seems like I can call Autoit from Pyt

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

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 10:31:23 PM UTC+5:30, ru...@yahoo.com wrote: > > > Are the existence of laws against beating people up > negated because you told them in advance? Or negated > because they "deserve" the beating? One of the fundamental purpose of laws is to legalize what you call 'bea

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

2013-07-03 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

Re: Python list code of conduct

2013-07-03 Thread Steven D'Aprano
On Wed, 03 Jul 2013 10:10:17 -0400, Roy Smith wrote: > In article , > Terry Reedy wrote: > >> 6. If you make an informed post to the tracker backed up by at least >> opinion, at least one tracker responder be in a better mode when >> responding. > > What I generally do is summarize the problem

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread Steven D'Aprano
On Wed, 03 Jul 2013 10:15:22 -0600, Ian Kelly wrote: > And in Jython there's: > > from __future__ import GIL Nice one! I didn't know about that! -- Steven -- http://mail.python.org/mailman/listinfo/python-list

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

2013-07-03 Thread Νίκος
Στις 3/7/2013 7:42 μμ, ο/η Steve Simmons έγραψε: On 03/07/2013 16:44, Chris Angelico wrote: On Thu, Jul 4, 2013 at 1:36 AM, � wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account for someone if i feel like trusting him and copy my python

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

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 3:07 AM, Νίκος wrote: > Στις 3/7/2013 7:53 μμ, ο/η 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

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

2013-07-03 Thread rurpy
On 07/02/2013 07:24 PM, Steven D'Aprano wrote: >[...] > On the other hand, I've certainly learned a lot in my newbie days from > being told off quite harshly by some of the Python community alphas, like > the Effbot Fredrik Lundh, and Alex Martelli. It hurts to be told you're > an idiot by one o

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

2013-07-03 Thread rurpy
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 else where impoliteness >> could have rea

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

2013-07-03 Thread Νίκος
Στις 3/7/2013 7:53 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 2:47 AM, Νίκος wrote: Στις 3/7/2013 6:44 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 1:36 AM, � wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account fo

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

2013-07-03 Thread Steve Simmons
On 03/07/2013 16:44, Chris Angelico wrote: On Thu, Jul 4, 2013 at 1:36 AM, Νίκος wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account for someone if i feel like trusting him and copy my python file to his homr dir to take alook from within.

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

2013-07-03 Thread rurpy
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 received a call form on of my customers aski

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

2013-07-03 Thread 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' ? Well thanks anyways :-) I was thinking of doing that but could not find my oxygen mask needed to wade into the steaming pile of ... -- http://mail.python.or

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread Νίκος
Στις 3/7/2013 7:36 μμ, ο/η Benjamin Kaplan έγραψε: On Jul 3, 2013 8:27 AM, "Νίκος" mailto:ni...@superhost.gr>> wrote: > > Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: > >> goldtech mailto:leeg...@operamail.com>> wrote: >>> >>> >>> I just changed the file extension of the script file fro

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

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 2:47 AM, Νίκος wrote: > Στις 3/7/2013 6:44 μμ, ο/η Chris Angelico έγραψε: >> >> On Thu, Jul 4, 2013 at 1:36 AM, � wrote: >>> >>> I will *not* give away my root pass to anyone for any reason but i will >>> open >>> a norla user account for someone if i feel like trusting

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

2013-07-03 Thread Νίκος
Στις 3/7/2013 6:44 μμ, ο/η Chris Angelico έγραψε: On Thu, Jul 4, 2013 at 1:36 AM, � wrote: I will *not* give away my root pass to anyone for any reason but i will open a norla user account for someone if i feel like trusting him and copy my python file to his homr dir to take alook from wit

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread Benjamin Kaplan
On Jul 3, 2013 8:27 AM, "Νίκος" wrote: > > Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: > >> goldtech wrote: >>> >>> >>> I just changed the file extension of the script file from .py to .pyw >>> and it uses pythonw.exe. I didn't read it anywhere, just intuited it >>> and tried it. Python has so

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread Ian Kelly
On Wed, Jul 3, 2013 at 10:14 AM, Ian Kelly wrote: > On Wed, Jul 3, 2013 at 8:03 AM, Ian Foote wrote: >> On 03/07/13 14:29, Steven D'Aprano wrote: >>> >>> Most people are familiar with: >>> >>> import this >>> >>> >>> and sometimes even with: >>> >>> from __future__ import braces >>> >>> >>> But I

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread Ian Kelly
On Wed, Jul 3, 2013 at 8:03 AM, Ian Foote wrote: > On 03/07/13 14:29, Steven D'Aprano wrote: >> >> Most people are familiar with: >> >> import this >> >> >> and sometimes even with: >> >> from __future__ import braces >> >> >> But I'm aware of at least three more. Anyone care to give them? >> >> >

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

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 1:36 AM, Νίκος wrote: > I will *not* give away my root pass to anyone for any reason but i will open > a norla user account for someone if i feel like trusting him and copy my > python file to his homr dir to take alook from within. Well... well... baby steps. That's someth

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

2013-07-03 Thread Νίκος
Στις 3/7/2013 5:44 μμ, ο/η Chris Angelico έγραψε: On Wed, Jul 3, 2013 at 8:00 PM, � wrote: 3/7/2013 12:45 ��, �/� Chris Angelico ��: ] You have betrayed the trust of all your customers. Which seemed to be accepted on this list without a problem. If my boss gave a random stran

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

2013-07-03 Thread Steve Simmons
On 03/07/2013 15:12, 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 received a call form on of my customers asking me to explain your mail ...

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread Νίκος
Στις 3/7/2013 6:43 πμ, ο/η Tim Roberts έγραψε: goldtech wrote: I just changed the file extension of the script file from .py to .pyw and it uses pythonw.exe. I didn't read it anywhere, just intuited it and tried it. Python has some very smart people working the language... While your stateme

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 12:23 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> On Thu, Jul 4, 2013 at 12:03 AM, Roy Smith wrote: >> > In article , >> > Chris Angelico wrote: >> > >> >> Of course, it's possible for there to be dark corners. But if you're >> >> working with those

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

2013-07-03 Thread Chris Angelico
On Wed, Jul 3, 2013 at 8:00 PM, Νίκος wrote: > Στις 3/7/2013 12:45 μμ, ο/η Chris Angelico έγραψε: > >>> ] You have betrayed the trust of all your customers. >>> >>> Which seemed to be accepted on this list without a problem. >> >> >> If my boss gave a random stranger from a mailing list the root >

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

2013-07-03 Thread Chris Angelico
On Wed, Jul 3, 2013 at 8:04 PM, Antoon Pardon wrote: >> If my boss gave a random stranger from a mailing list the root >> password to one of our servers, I would say to his face that he had >> betrayed his (our) customers' trust. I would say it with strong >> emphasis and a raised tone, too, and n

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Roy Smith
In article , Chris Angelico wrote: > On Thu, Jul 4, 2013 at 12:03 AM, Roy Smith wrote: > > In article , > > Chris Angelico wrote: > > > >> Of course, it's possible for there to be dark corners. But if you're > >> working with those, you know it full well. The dark corners of Python > >> might

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 12:03 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> Of course, it's possible for there to be dark corners. But if you're >> working with those, you know it full well. The dark corners of Python >> might be in some of its more obscure modules, or maybe in

Re: Python list code of conduct

2013-07-03 Thread Steve Simmons
On 03/07/2013 12:50, rusi wrote: On Wednesday, July 3, 2013 6:09:35 AM UTC+5:30, Ben Finney wrote: Dennis Lee Bieber writes: So who would enforce any rules? Ideally, this community is healthy enough for us to enforce the code of conduct of our host, through social convention among us all. T

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

2013-07-03 Thread feedthetroll
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 received a call form on of my customers asking me to explain your > mail ... > Of course i should have give you the

Re: Python list code of conduct

2013-07-03 Thread Roy Smith
In article , Terry Reedy wrote: > 6. If you make an informed post to the tracker backed up by at least > opinion, at least one tracker responder be in a better mode when responding. What I generally do is summarize the problem in the tracker, but also include a link to the google groups archi

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread Chris Angelico
On Wed, Jul 3, 2013 at 10:55 PM, rusi wrote: > On Wednesday, July 3, 2013 5:52:12 PM UTC+5:30, Steven D'Aprano wrote: >> I'm running a box with Debian squeeze, and I just ran: >> sudo aptitude install jython >> which ended up installing Python 2.5: > > BTW trying to install jython out here gave me

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread Chris Angelico
On Thu, Jul 4, 2013 at 12:03 AM, Ian Foote wrote: > import antigravity Having checked its docstring, I am now left wondering what I can do with the Munroe geohashing algorithm and if there's any way I could use that at work somehow. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug reports [was Re: Python list code of conduct]

2013-07-03 Thread Roy Smith
In article , Chris Angelico wrote: > Of course, it's possible for there to be dark corners. But if you're > working with those, you know it full well. The dark corners of Python > might be in some of its more obscure modules, or maybe in IPv6 > handling, The sad thing about this statement is th

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread Ian Foote
On 03/07/13 14:29, Steven D'Aprano wrote: Most people are familiar with: import this and sometimes even with: from __future__ import braces But I'm aware of at least three more. Anyone care to give them? import antigravity Regards, Ian F -- http://mail.python.org/mailman/listinfo/pytho

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

2013-07-03 Thread Chris Angelico
On Wed, Jul 3, 2013 at 10:50 PM, Tim Chase wrote: > On 2013-07-03 09:51, Tim Golden wrote: >> We can certainly agree on this. I can't count the number of emails >> I've deleted as too hot-headed in response to dismissive comments >> about Windows as a platform. Some of them, at least, appear to be

Re: python.exe crash if opencv tries to access busy webcam

2013-07-03 Thread Tim Golden
On 03/07/2013 14:25, ifelset...@gmail.com wrote: > Hello, > > > I have a while loop taking images every 5 minutes from webcam. > Unfortunately, if the camera is busy, python.exe crashes and there is > no exception to catch. Is there a way to check if camera is busy to > avoid the crash? If pytho

[SPOILERS] Python easter eggs

2013-07-03 Thread Steven D'Aprano
Most people are familiar with: import this and sometimes even with: from __future__ import braces But I'm aware of at least three more. Anyone care to give them? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

python.exe crash if opencv tries to access busy webcam

2013-07-03 Thread ifelsetrue
Hello, I have a while loop taking images every 5 minutes from webcam. Unfortunately, if the camera is busy, python.exe crashes and there is no exception to catch. Is there a way to check if camera is busy to avoid the crash? Thanks! from cv2 import * while True: time.sleep(4) cam =

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

2013-07-03 Thread Jeff Schwab
On 2013-07-03 13:19:26 +, Steven D'Aprano said: On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote: Goodness, I doubt if you'll find anyone who can seriously make a case that the Windows command prompt is all it might be. I'm not a Powershell user myself but people speak highly of it.

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

2013-07-03 Thread Steven D'Aprano
On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote: > Goodness, I doubt if you'll find anyone who can seriously make a case > that the Windows command prompt is all it might be. I'm not a Powershell > user myself but people speak highly of it. I understand that Powershell is aimed more for batc

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

2013-07-03 Thread Tim Golden
On 03/07/2013 13:50, Tim Chase wrote: > On 2013-07-03 09:51, Tim Golden wrote: >> We can certainly agree on this. I can't count the number of emails >> I've deleted as too hot-headed in response to dismissive comments >> about Windows as a platform. Some of them, at least, appear to be >> from peop

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 5:52:12 PM UTC+5:30, Steven D'Aprano wrote: > I'm running a box with Debian squeeze, and I just ran: > sudo aptitude install jython > which ended up installing Python 2.5: BTW trying to install jython out here gave me this list (which does not seem to have this dependenc

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread Steven D'Aprano
On Wed, 03 Jul 2013 07:43:46 -0500, Skip Montanaro wrote: >> Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on >> Debian squeeze? > > Might Jython use some Python modules/packages unmodified? Does sys.path > in Jython refer to the CPython tree? Apparently not: >>> sys.path

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

2013-07-03 Thread Tim Chase
On 2013-07-03 09:51, Tim Golden wrote: > We can certainly agree on this. I can't count the number of emails > I've deleted as too hot-headed in response to dismissive comments > about Windows as a platform. Some of them, at least, appear to be > from people who last actually used Windows back in th

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread Skip Montanaro
> Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on > Debian squeeze? Might Jython use some Python modules/packages unmodified? Does sys.path in Jython refer to the CPython tree? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 5:52:12 PM UTC+5:30, Steven D'Aprano wrote: > Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on > Debian squeeze? Not exactly answering your question... The debian dependencies can be fairly 'conservative' which means all kinds of stuff is pulled in

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

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 3:15:15 PM UTC+5:30, Chris Angelico wrote: > If my boss gave a random stranger from a mailing list the root > password to one of our servers, I would say to his face that he had > betrayed his (our) customers' trust. I would say it with strong > emphasis and a raised tone

Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread Steven D'Aprano
I'm running a box with Debian squeeze, and I just ran: sudo aptitude install jython which ended up installing Python 2.5: [...] Linking and byte-compiling packages for runtime python2.5... Setting up python2.5 (2.5.5-11) ... Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on

Re: Python list code of conduct

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 6:09:35 AM UTC+5:30, Ben Finney wrote: > Dennis Lee Bieber writes: > > > So who would enforce any rules? > > Ideally, this community is healthy enough for us to enforce the code of > conduct of our host, through social convention among us all. Thanks Ben for that. Lets

Re: Python - forking an external process?

2013-07-03 Thread Antoon Pardon
Op 03-07-13 05:47, Victor Hooi schreef: > Hi, > > I have a Python script where I want to run fork and run an external command > (or set of commands). > > For example, after doing , I then want to run ssh to a host, handover > control back to the user, and have my script terminate. > > Or I might

  1   2   >