Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Dave Angel
On 12/05/2014 09:48 PM, Aahan Krish wrote: Hello Ned, I didn't notice that he was using tabs more than as needed for indentation. Guess I trusted the wrong guy. :P Anyway, it's one more thing to keep in mind. G! Several times now you have started a new thread to comment on an existing one

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Ned Batchelder
On 12/5/14 10:04 PM, Michael Torrie wrote: On 12/05/2014 07:31 PM, Ned Batchelder wrote: This is a perfect example! The code (with tabs as >--- and leading spaces as .) is: >---if (!list_empty(pending)) >--->---ret = list_first_entry(pending, struct async_entry, >--->-

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Michael Torrie
On 12/05/2014 07:31 PM, Ned Batchelder wrote: > This is a perfect example! The code (with tabs as >--- and leading > spaces as .) is: > > >---if (!list_empty(pending)) > >--->---ret = list_first_entry(pending, struct async_entry, > >--->--->--->---...domain_

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Aahan Krish
Hello Ned, I didn't notice that he was using tabs more than as needed for indentation. Guess I trusted the wrong guy. :P Anyway, it's one more thing to keep in mind. G! -- Aahan Krish -- https://mail.python.org/mailman/listinfo/python-list

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Ned Batchelder
On 12/5/14 8:50 PM, Aahan Krish wrote: Hello Ned, I thought that the use of tabs and spaces in the manner I suggested is pretty common. Linux Kernel follows the same technique, for example: https://github.com/torvalds/linux/blob/master/kernel/async.c#L100 This is a perfect example! The code

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Aahan Krish
Hello Ned, I thought that the use of tabs and spaces in the manner I suggested is pretty common. Linux Kernel follows the same technique, for example: https://github.com/torvalds/linux/blob/master/kernel/async.c#L100 Of course, I understand the gist of what you are saying—if people don't understa

Re: Do you like the current design of python.org?

2014-12-05 Thread Ian Kelly
On Fri, Dec 5, 2014 at 3:43 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > It requires Javascript or else basic functionality fails. In what way does basic functionality fail? I just tried loading the page with Javascript disabled and it seemed fine. > With Javascript, > bas

Re: Do you like the current design of python.org?

2014-12-05 Thread Ian Kelly
On Fri, Dec 5, 2014 at 4:30 AM, Fetchinson . wrote: > > The formatting of long text essays get completely mangled towards the > > bottom > > of the page, e.g.: > > > > https://www.python.org/download/releases/2.2/descrintro > > It doesn't look mangled to me (firefox 22). That's quite old at this

Re: jitpy - Library to embed PyPy into CPython

2014-12-05 Thread Terry Reedy
On 12/5/2014 2:54 PM, Mark Lawrence wrote: For those who haven't heard thought this might be of interest https://github.com/fijal/jitpy So the old cpython module psyco which became the pypy jit is back as jitpy. Nice. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-l

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Cameron Simpson
On 06Dec2014 09:29, Steven D'Aprano wrote: Cameron Simpson wrote: I have spent too much time reading files indented with TABs by people using a different tabwidth to my own, and thus looking aweful on my screen. The original author didn't choose to make it awful, but their tabs rendered in my

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Ian Kelly
On Fri, Dec 5, 2014 at 11:49 AM, Aahan Krish wrote: > > Hello Ian, > > So, wrt Q2, what you are saying is, the following would cause issues in Python 3? > > int f(int x, > ..int y) { > --->return g(x, > --->.y); > } > > Where: > > ---> for tabs (used for indentation

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Steven D'Aprano
Cameron Simpson wrote: > I have spent too much time reading files indented > with TABs by people using a different tabwidth to my own, and thus looking > aweful on my screen. The original author didn't choose to make it awful, > but their tabs rendered in my tab scheme look awful. And doubtless vi

Re: Python, C++ interaction

2014-12-05 Thread wesleiramos2
Em quinta-feira, 4 de dezembro de 2014 07h51min14s UTC-2, Sturla Molden escreveu: > Dan Stromberg wrote: > > > 1) writing in Cython+CPython (as opposed to wrapping C++ with Cython) > > That is an option, but it locks the code to Cython and CPython forever. C > and C++ are at least semi-portabl

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Ned Batchelder
On 12/5/14 1:49 PM, Aahan Krish wrote: Hello Ian, So, wrt Q2, what you are saying is, the following would cause issues in Python 3? int f(int x, ..int y) { --->return g(x, --->.y); } Where: ---> for tabs (used for indentation) for spaces (used for ali

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Ned Batchelder
On 12/5/14 12:40 PM, Aahan Krish wrote: I have two general questions regarding Python that I couldn't find any good answers for. This is not the often-asked Tabs vs Spaces question, so kindly read it in whole. *Q1.* This is not to debate the decision, but I really wanted to know the reason why P

Re: Not Able to Log in on XNAT server through PyXNAT

2014-12-05 Thread suyash . d . b
On Friday, December 5, 2014 2:41:54 AM UTC-5, dieter wrote: > suyash@gmail.com writes: > > > Hello All, > > > > I have installed pyxnat on my mac. With pyxnat i am trying to access XNAT > > server in our university. As mentioned on the tutorial i tried both ways, > > neither is working. Foll

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Cameron Simpson
On 05Dec2014 17:40, Aahan Krish wrote: *Q1.* This is not to debate the decision, but I really wanted to know the reason why PEP 8 chose to go with spaces instead of tabs. I read that tabs were initially preferred over spaces (esp. Mr. Rossum)? What caused the decision that spaces are better? E

jitpy - Library to embed PyPy into CPython

2014-12-05 Thread Mark Lawrence
For those who haven't heard thought this might be of interest https://github.com/fijal/jitpy -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Chris Angelico
On Sat, Dec 6, 2014 at 4:40 AM, Aahan Krish wrote: > I have two general questions regarding Python that I couldn't find any good > answers for. This is not the often-asked Tabs vs Spaces question, so kindly > read it in whole. > > Q1. This is not to debate the decision, but I really wanted to know

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread sohcahtoa82
On Friday, December 5, 2014 9:47:10 AM UTC-8, Aahan Krish wrote: > I have two general questions regarding Python that I couldn't find any good > answers for. This is not the often-asked Tabs vs Spaces question, so kindly > read it in whole. > > Q1. This is not to debate the decision, but I reall

Re: time.monotonic() roll over

2014-12-05 Thread Marko Rauhamaa
Ian Kelly : > On Thu, Dec 4, 2014 at 3:44 PM, Marko Rauhamaa wrote: >> So, what's the semantics of time.sleep(), select.select() et al wrt >> process or machine suspension? > > Rather than continue to speculate, I just tested this. The test, of course, can only have one useful result... > So it

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Aahan Krish
Hello Ian, So, wrt Q2, what you are saying is, the following would cause issues in Python 3? int f(int x, ..int y) { --->return g(x, --->.y); } Where: ---> for tabs (used for indentation) for spaces (used for alignment) Best Aahan -- https://mail.python.o

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Ian Kelly
On Fri, Dec 5, 2014 at 10:40 AM, Aahan Krish wrote: > Q2. PEP 8 also reads, "Python 3 disallows mixing the use of tabs and spaces for indentation." > > So, if I am using tabs for indentation and spaces for alignment, is it still considered "mixing the use of tabs and spaces" in Python 3? (Please s

Re: concat string and dict in print statement

2014-12-05 Thread Ian Kelly
On Fri, Dec 5, 2014 at 10:31 AM, wrote: > > Hi Guys, > > I am trying to combine string and dict in the print statement, however getting an error. Would someone let me know what will be correct way to do that. > > stats={'lname': 'shah', 'fname': 'gaurang'} > a=test > > print "%s %(fname)s %(lname)

Re: concat string and dict in print statement

2014-12-05 Thread Peter Otten
gaurangns...@gmail.com wrote: > I am trying to combine string and dict in the print statement, however > getting an error. Would someone let me know what will be correct way to do > that. > > stats={'lname': 'shah', 'fname': 'gaurang'} > a=test > > print "%s %(fname)s %(lname)s" %(a,stats) > >

Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Aahan Krish
I have two general questions regarding Python that I couldn't find any good answers for. This is not the often-asked Tabs vs Spaces question, so kindly read it in whole. *Q1.* This is not to debate the decision, but I really wanted to know the reason why PEP 8 chose to go with spaces instead of ta

concat string and dict in print statement

2014-12-05 Thread gaurangnshah
Hi Guys, I am trying to combine string and dict in the print statement, however getting an error. Would someone let me know what will be correct way to do that. stats={'lname': 'shah', 'fname': 'gaurang'} a=test print "%s %(fname)s %(lname)s" %(a,stats) Following is the error I am getting Tr

Re: time.monotonic() roll over

2014-12-05 Thread Ian Kelly
On Thu, Dec 4, 2014 at 3:44 PM, Marko Rauhamaa wrote: > > Ian Kelly : > > > It's not clear to me whether those cases are relevant to the rollover > > concern anyway. I wouldn't be shocked if the GetTickCount() function > > simply stopped increasing while the system is suspended, since after > > al

ANN: 'tsshbatch' Server Automation Tool Version 1.204 Released

2014-12-05 Thread Tim Daneliuk
'tsshbatch' Version 1.204 is now released and available for download at: http://www.tundraware.com/Software/tsshbatch This is a major update with many bug fixes and improvements. Existing users will want to update sooner rather than later. The last public release was 1.177. --

Re: Do you like the current design of python.org?

2014-12-05 Thread William Ray Wing
> On Dec 5, 2014, at 5:43 AM, Steven D'Aprano > wrote: > > Peter Otten wrote: > >> Did you ever hit the "Socialize" button? Are you eager to see the latest >> tweets when you are reading a PEP? Do you run away screaming from a page >> where nothing moves without you hitting a button? Do you ap

Re: The binding operator, and what gets bound to what

2014-12-05 Thread Ned Batchelder
On 12/5/14 7:34 AM, Steven D'Aprano wrote: Ned Batchelder wrote: On 12/5/14 4:53 AM, Steven D'Aprano wrote: Oh, I learned something new: strictly speaking, this is implementation- dependent and not guaranteed to work in the future! def func(): global math import math I don't thi

Re: The binding operator, and what gets bound to what

2014-12-05 Thread Chris Angelico
On Fri, Dec 5, 2014 at 11:34 PM, Steven D'Aprano wrote: >> I don't think this is implementation-dependent. > > The docs say that it is: > > https://docs.python.org/3/reference/simple_stmts.html#the-global-statement > > Names listed in a global statement MUST NOT [emphasis added] be > defin

Re: The binding operator, and what gets bound to what (was: About Modifying Globals)

2014-12-05 Thread Chris Angelico
On Fri, Dec 5, 2014 at 11:26 PM, Steven D'Aprano wrote: > Chris Angelico wrote: > >>> def func(): >>> global math >>> import math >> >> When would you actually *want* this, though? Given that 'import' >> already caches, there's not much point caching globally, and the idea >> that a functi

Re: The binding operator, and what gets bound to what

2014-12-05 Thread Steven D'Aprano
Ned Batchelder wrote: > On 12/5/14 4:53 AM, Steven D'Aprano wrote: >> Oh, I learned something new: strictly speaking, this is implementation- >> dependent and not guaranteed to work in the future! >> >> def func(): >> global math >> import math > > I don't think this is implementation-d

Re: The binding operator, and what gets bound to what (was: About Modifying Globals)

2014-12-05 Thread Steven D'Aprano
Chris Angelico wrote: > On Fri, Dec 5, 2014 at 8:53 PM, Steven D'Aprano > wrote: >> Oh, I learned something new: strictly speaking, this is implementation- >> dependent and not guaranteed to work in the future! >> >> def func(): >> global math >> import math > > When would you actually *

Re: The binding operator, and what gets bound to what

2014-12-05 Thread Ned Batchelder
On 12/5/14 4:53 AM, Steven D'Aprano wrote: Oh, I learned something new: strictly speaking, this is implementation- dependent and not guaranteed to work in the future! def func(): global math import math I don't think this is implementation-dependent. The import statement is an assi

Re: Do you like the current design of python.org?

2014-12-05 Thread Fetchinson .
>> Did you ever hit the "Socialize" button? No, but it doesn't bother me. >> Are you eager to see the latest >> tweets when you are reading a PEP? No, but it doesn't bother me either. You can easily block twitter related things by a number of ways, firewalls, /etc/hosts, etc. >> Do you run away

How to display a database table on my widget using tkinter

2014-12-05 Thread brice DORA
Hi i created a widget that i connected my sql server database. my goal is to put and display data into my database from my widget. i can put data into my database table but my problem is how to display these data on my widget like a table...thanks you at all -- https://mail.python.org/mailman/l

Re: Do you like the current design of python.org?

2014-12-05 Thread Steven D'Aprano
Peter Otten wrote: > Did you ever hit the "Socialize" button? Are you eager to see the latest > tweets when you are reading a PEP? Do you run away screaming from a page > where nothing moves without you hitting a button? Do you appreciate the > choice between ten or so links to the documentation?

Re: time.monotonic() roll over

2014-12-05 Thread Steven D'Aprano
Lele Gaifax wrote: > Steven D'Aprano writes: > >> The most conservative approach is to assume that while you're suspended, >> *everything else* is suspended too, so when you resume you still have to >> sleep for the full N seconds. > > That's an intriguing interpretation of what sleep() should

Re: The binding operator, and what gets bound to what (was: About Modifying Globals)

2014-12-05 Thread Chris Angelico
On Fri, Dec 5, 2014 at 8:53 PM, Steven D'Aprano wrote: > Oh, I learned something new: strictly speaking, this is implementation- > dependent and not guaranteed to work in the future! > > def func(): > global math > import math When would you actually *want* this, though? Given that 'impor

Re: The binding operator, and what gets bound to what (was: About Modifying Globals)

2014-12-05 Thread Steven D'Aprano
Ben Finney wrote: > Steven D'Aprano writes: > >> LJ wrote: >> >> > def gt(l): >> >a["1"] = a["1"] | set([l]) >> >> The difference between this example and your second one: >> >> > def gt2(l): >> >b=b+l >> >> >> is that the second is a "binding operation" and the first is not. > > I disa

Re: time.monotonic() roll over

2014-12-05 Thread Akira Li
Dave Angel writes: ...many words about sleep()... > Since the OS has no way of knowing whether the thing being waited for > is a thread, another process, a human being, a network operation, or > the end of the world, the interpretation of sleep needs to be the most > conservative one. There are

Re: Where is win32service

2014-12-05 Thread med . arriouach
Le dimanche 2 janvier 2011 18:58:53 UTC, Alex Willmer a écrit : > On Sunday, January 2, 2011 6:40:45 PM UTC, catalinf...@gmail.com wrote: > > I install Python 2.7 on Windows XP. > > I try use : > > > > import win32service > > import win32serviceutil > > > > But I got that error : > > > > ImportE