Re: I hate you all

2013-04-05 Thread Ethan Furman
On 04/05/2013 10:36 PM, Timothy Madden wrote: 8-character tab stops should be the default. Debating that is I believe another topic, and compatibility with python2 should be enough to make that debate unnecessary. Python 3 broke a lot of things. Pull on your big-boy underwear and deal with

Re: I hate you all

2013-04-05 Thread Michael Torrie
On 04/05/2013 11:28 PM, Benjamin Kaplan wrote: > http://www.xkcd.com/1172/ How did I ever miss this before? That is truly awesome. -- http://mail.python.org/mailman/listinfo/python-list

Re: I hate you all

2013-04-05 Thread Steven D'Aprano
On Fri, 05 Apr 2013 23:59:18 -0600, Michael Torrie wrote: > On 04/05/2013 11:53 PM, Ian Kelly wrote: >>> The new rules may look flexible at first sight, but the net effect >>> they have is they push me to use non-default tab size (which is not >>> good), >> >> What makes that not good? There is

Re: I hate you all

2013-04-05 Thread Michael Torrie
On 04/05/2013 11:53 PM, Ian Kelly wrote: >> The new rules may look flexible at first sight, but the net effect they have >> is they push me to use non-default tab size (which is not good), > > What makes that not good? There is no law anywhere that says tabs are > 8 characters. That's just an ar

Re: I hate you all

2013-04-05 Thread Michael Torrie
On 04/05/2013 11:36 PM, Timothy Madden wrote: > I guess a discussion like this thread is the price to be paid for > relying solely on white space to delimit code blocks, like the python > syntax does. I've always been taught that in Python using tabs, particularly in the way that you use them (w

Re: I hate you all

2013-04-05 Thread Ian Kelly
On Fri, Apr 5, 2013 at 11:07 PM, Timothy Madden wrote: > Changing the tab size from this default is what makes the code incompatible, > not the tabs themselves. So the solution is simple: do not change tab size > from the default. So in other words, everybody must be forced to use 8-character tab

Library to work with SSH public keys

2013-04-05 Thread Darren Spruell
I'd like to work with user submitted/uploaded SSH public keys from Python. I'm trying to solve what I'd thought might be a simple need: given a user's OpenSSH formatted _public_ key (RSA, or DSA, or whatever), how do you obtain information about it such as: key type (e.g. ssh-rsa, etc.); bit length

Re: I hate you all

2013-04-05 Thread Chris Angelico
On Sat, Apr 6, 2013 at 4:36 PM, Timothy Madden wrote: > I guess a discussion like this thread is the price to be paid for relying > solely on white space to delimit code blocks, like the python syntax does. Absolutely. Bring on Python 5000, where all such stupidities are abolished and we can argu

Re: I hate you all

2013-04-05 Thread Timothy Madden
On 06.04.2013 06:53, Ian Kelly wrote: On Fri, Apr 5, 2013 at 6:22 PM, wrote: The correct tab stop positions have always been at 8 character columns apart. The "ambiguity" was introduced by editors that do not follow the default value set in hardware like printers or used by consoles and termi

Re: I hate you all

2013-04-05 Thread Benjamin Kaplan
On Fri, Apr 5, 2013 at 10:07 PM, Timothy Madden wrote: > > On 06.04.2013 03:35, Chris Angelico wrote: >> >> On Sat, Apr 6, 2013 at 11:22 AM, wrote: >>> >>> On Saturday, April 6, 2013 1:42:15 AM UTC+3, Ian wrote: >>> [...] The "def" line has four spaces. The "for" line then has a hard

Re: I hate you all

2013-04-05 Thread terminatorul
On Saturday, April 6, 2013 7:28:55 AM UTC+3, Dylan Evans wrote: > On Sat, Apr 6, 2013 at 7:41 AM, wrote: > > Hello > > > I just tried python 3.3 with some simple script meant for unit test. > > How can python authors be so arrogant to impose their tabs and spaces options > on me ? It should

Re: I hate you all

2013-04-05 Thread Timothy Madden
On 06.04.2013 03:35, Chris Angelico wrote: On Sat, Apr 6, 2013 at 11:22 AM, wrote: On Saturday, April 6, 2013 1:42:15 AM UTC+3, Ian wrote: [...] The "def" line has four spaces. The "for" line then has a hard tab. This is ambiguous. If the hard tab is assumed to have a width of four spaces,

Re: I hate you all

2013-04-05 Thread Dylan Evans
On Sat, Apr 6, 2013 at 7:41 AM, wrote: > Hello > > I just tried python 3.3 with some simple script meant for unit test. > > How can python authors be so arrogant to impose their tabs and spaces > options on me ? It should be my choice if I want to use tabs or not ! > > Don't like it? Use ruby.

Re: I hate you all

2013-04-05 Thread Ian Kelly
On Fri, Apr 5, 2013 at 6:22 PM, wrote: > The correct tab stop positions have always been at 8 character columns apart. > The "ambiguity" was introduced by editors that do not follow the default > value set in hardware like printers or used by consoles and terminal > emulators. 8 characters is

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread Dave Angel
On 04/05/2013 10:49 PM, Chris Angelico wrote: On Sat, Apr 6, 2013 at 1:37 PM, Steven D'Aprano wrote: Did you mean "constructor" rather than C T O R ? Perhaps your voice-to- text software (if you are using such) misheard you. Side point: "ctor" is a common abbreviation for "constructor". Chri

mock django cache

2013-04-05 Thread usmani . kashif9957
In my settings.py , I have specified my cache as : CACHES = { 'default': { .. } } In my views.py, I have import requests from django.core.cache import cache, get_cache def aview(): #check cache if not get_cache('default').get('key'): #make request and save in

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Dave Angel
On 04/05/2013 05:41 PM, Tom P wrote: On 04/05/2013 01:54 PM, Dave Angel wrote: On 04/05/2013 07:02 AM, Tom P wrote: First, here's a sample test program: import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyRequestHandler(BaseHTTPRequestHandler, object): def do

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread Chris Angelico
On Sat, Apr 6, 2013 at 1:37 PM, Steven D'Aprano wrote: > Did you mean "constructor" rather than C T O R ? Perhaps your voice-to- > text software (if you are using such) misheard you. Side point: "ctor" is a common abbreviation for "constructor". ChrisA -- http://mail.python.org/mailman/listinfo

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread Steven D'Aprano
On Fri, 05 Apr 2013 18:18:51 -0600, Littlefield, Tyler wrote: > On 4/5/2013 2:30 PM, Steven D'Aprano wrote: >> On Fri, 05 Apr 2013 12:59:04 -0600, Littlefield, Tyler wrote: >> >>> Hello all: >>> I've been using Python for a while now, but I have one larger problem. >>> I come from a c++ background

Re: I hate you all

2013-04-05 Thread Steven D'Aprano
On Fri, 05 Apr 2013 17:22:19 -0700, terminatorul wrote: > On Saturday, April 6, 2013 1:42:15 AM UTC+3, Ian wrote: [...] >> The "def" line has four spaces. The "for" line then has a hard tab. >> This is ambiguous. If the hard tab is assumed to have a width of four >> spaces, then they are at the

Re: im.py: a python communications tool

2013-04-05 Thread Andrew Berg
On 2013.04.05 20:07, Roy Smith wrote: > I know this is off-topic, but I encourage people to NOT invent their own > licenses. Perhaps he meant this existing license: http://www.wtfpl.net/about/ -- CPython 3.3.0 | Windows NT 6.2.9200 / FreeBSD 9.1 -- http://mail.python.org/mailman/listinfo/python-

Re: im.py: a python communications tool

2013-04-05 Thread Mark Janssen
On Fri, Apr 5, 2013 at 6:07 PM, Roy Smith wrote: > In article > , > Jake D wrote: > >> What is the licence? >> --It's released under a special FOSS licence. Here it is: >> You can do whatever you want with this program. > > I know this is off-topic, but I encourage people to NOT invent thei

Re: im.py: a python communications tool

2013-04-05 Thread Roy Smith
In article , Jake D wrote: > What is the licence? > --It's released under a special FOSS licence. Here it is: > You can do whatever you want with this program. I know this is off-topic, but I encourage people to NOT invent their own licenses. Take your pick of any of the well-known (Ber

Re: im.py: a python communications tool

2013-04-05 Thread Demian Brecht
Thanks for sharing some of your work with the community. However... Speaking to the sharing aspect: Why would you post a block of code in an email? If you're looking for people to contribute, it would likely be a much better idea to post it on github (which was built for collaborative work). As f

Re: I hate you all

2013-04-05 Thread Andrew Berg
On 2013.04.05 19:22, terminato...@gmail.com wrote: > And now python forces me out of using any tab characters at all. I believe I > should still have a choice, python should at lest give an option to set tab > size, if the default of 8 is ambiguous now. Python (at least Python 3) has no concept o

xlwt 0.7.5 released!

2013-04-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 0.7.5. This release contains the following: - Fixes a bug that could cause a corrupt SST in .xls files written by a wide-unicode Python build. - A ValueError is now raised immediately if an attempt is made to set column width to other than

Re: I hate you all

2013-04-05 Thread Chris Angelico
On Sat, Apr 6, 2013 at 11:22 AM, wrote: > On Saturday, April 6, 2013 1:42:15 AM UTC+3, Ian wrote: > [...] >> The "def" line has four spaces. The "for" line then has a hard tab. >> This is ambiguous. If the hard tab is assumed to have a width of four >> spaces, then they are at the same indentat

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread Chris Angelico
On Sat, Apr 6, 2013 at 5:59 AM, Littlefield, Tyler wrote: > I come from a c++ background; though it doesn't help in catching runtime > errors, being able to compile a program helps catch a lot of syntax errors. Syntax errors you'll still catch just by attempting to load up the module in any way:

Re: I hate you all

2013-04-05 Thread terminatorul
On Saturday, April 6, 2013 1:42:15 AM UTC+3, Ian wrote: [...] > The "def" line has four spaces. The "for" line then has a hard tab. > This is ambiguous. If the hard tab is assumed to have a width of four > spaces, then they are at the same indentation level. If it is assumed > to have a width of

im.py: a python communications tool

2013-04-05 Thread Jake D
Hey Usenetites! I have a horrible Python program to allow two people to chat with each other. It has horribly any functionality, but it is meant for the public to work on, not necessarily me. Anyways, here's a quick FAQ. What does this do that IRC can't? What does this do that AIM can't? --It a

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread Littlefield, Tyler
On 4/5/2013 2:30 PM, Steven D'Aprano wrote: On Fri, 05 Apr 2013 12:59:04 -0600, Littlefield, Tyler wrote: Hello all: I've been using Python for a while now, but I have one larger problem. I come from a c++ background; though it doesn't help in catching runtime errors, being able to compile a pr

Re: os.system() with imbeded quotes on centos

2013-04-05 Thread Cameron Simpson
On 05Apr2013 16:36, Chris Rebert wrote: | No need for third-party code, just use the std lib: | http://docs.python.org/2/library/pipes.html#pipes.quote | http://docs.python.org/3/library/shlex.html#shlex.quote Ah, handy. I must say its quote quoting is kind of verbose, though. | (But yeah, best

Re: os.system() with imbeded quotes on centos

2013-04-05 Thread Chris Rebert
On Fri, Apr 5, 2013 at 3:00 PM, Cameron Simpson wrote: > On 01Apr2013 20:26, John Gordon wrote: > | In <0c9717ca-52dd-49ce-8102-e14328838...@googlegroups.com> cev...@gmail.com > writes: > | > someip = '192.168.01.01' > | > var1 = 'lynx -dump http://' + someip + > '/cgi-bin/.log&.submit=+++G

Re: I hate you all

2013-04-05 Thread Ian Kelly
On Fri, Apr 5, 2013 at 4:42 PM, Ian Kelly wrote: > Python 2 resolved this ambiguity by assuming that a hard tab was > simply equivalent to four or eight spaces (I don't remember which). In fact, neither is correct. Per the docs: ...tabs are replaced (from left to right) by one to eight spac

can anyone help me in developing a simple webpage in jinja2

2013-04-05 Thread Satabdi Mukherjee
i am a rookie in python and i am trying to develop a simple webpage using jinja2. can anyone please help me how to do that i am trying in this way but showing invalid syntax error My Webpage {% for item in navigation %} {{ item.caption }} {% endfor %} My W

Re: I hate you all

2013-04-05 Thread Isaac To
You underestimated the arrogance of Python. Python 3 tab doesn't map to 4 spaces. It doesn't map to any number of spaces. Tabs and spaces are completely unrelated. If you have a function having the first indentation level with 4 (or any number of) spaces, the next line starting not with 4 space

Re: I hate you all

2013-04-05 Thread Ian Kelly
On Fri, Apr 5, 2013 at 4:04 PM, wrote: > They say so, but python does not work that way. This is a simple script: > > from unittest import TestCase > > class SvnExternalCmdTests(TestCase) : > def test_parse_svn_external(self) : > for sample_external in sample_svn_externals : >

Re: I hate you all

2013-04-05 Thread Andrew Berg
On 2013.04.05 17:04, terminato...@gmail.com wrote: > Line 5 is the only line in the file that starts at col 9 (after a tab). Being > the only line in the file with that indent level, how can it be inconsistent ? The first indent level is done with spaces on the second line (for def) and then with

xlrd 0.9.1 released!

2013-04-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.1: http://pypi.python.org/pypi/xlrd/0.9.1 This release includes the following changes: - A tonne of bugs when used with Python 3 were fixed thanks to John Machin. - Extra byte data in hyperlink records now records a warning rather than

Re: os.system() with imbeded quotes on centos

2013-04-05 Thread Cameron Simpson
On 01Apr2013 20:26, John Gordon wrote: | In <0c9717ca-52dd-49ce-8102-e14328838...@googlegroups.com> cev...@gmail.com writes: | > someip = '192.168.01.01' | > var1 = 'lynx -dump http://' + someip + '/cgi-bin/.log&.submit=+++Go%21+++ > junk' | | '&' is a special character in shell commands.

Re: I hate you all

2013-04-05 Thread terminatorul
On Saturday, April 6, 2013 12:55:29 AM UTC+3, John Gordon wrote: > In <64d4fb7c-6a75-4b5f-b5c8-06a4b2b5d...@googlegroups.com> > terminato...@gmail.com writes: > > > How can python authors be so arrogant to impose their tabs and spaces > > options on me ? It should be my choice if I want to use ta

Re: I hate you all

2013-04-05 Thread John Gordon
In <64d4fb7c-6a75-4b5f-b5c8-06a4b2b5d...@googlegroups.com> terminato...@gmail.com writes: > How can python authors be so arrogant to impose their tabs and spaces > options on me ? It should be my choice if I want to use tabs or not ! You are free to use tabs, but you must be consistent. You can

Re: I hate you all

2013-04-05 Thread Chris Angelico
On Sat, Apr 6, 2013 at 8:41 AM, wrote: > Hello > > I just tried python 3.3 with some simple script meant for unit test. > > How can python authors be so arrogant to impose their tabs and spaces options > on me ? It should be my choice if I want to use tabs or not ! It is. As long as you're cons

I hate you all

2013-04-05 Thread terminatorul
Hello I just tried python 3.3 with some simple script meant for unit test. How can python authors be so arrogant to impose their tabs and spaces options on me ? It should be my choice if I want to use tabs or not ! I know people have all goten into this frenzy of using either tabs, either spac

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Tom P
On 04/05/2013 01:54 PM, Dave Angel wrote: On 04/05/2013 07:02 AM, Tom P wrote: First, here's a sample test program: import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyRequestHandler(BaseHTTPRequestHandler, object): def do_GET(self): top_self = super(

Re: Python log parser

2013-04-05 Thread darnold
i know literally nothing about syslogs, but a google search for "python syslog parser" shows that some people have had success using the pyparsing module: http://www.j-schmitz.net/blog/how-to-parse-a-syslog-logfile-in-python https://gist.github.com/leandrosilva/3651640 hth, Don -- http://mail.py

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread Steven D'Aprano
On Fri, 05 Apr 2013 12:59:04 -0600, Littlefield, Tyler wrote: > Hello all: > I've been using Python for a while now, but I have one larger problem. I > come from a c++ background; though it doesn't help in catching runtime > errors, being able to compile a program helps catch a lot of syntax > err

Re: is operator versus id() function

2013-04-05 Thread Tim Delaney
On 6 April 2013 03:40, candide wrote: > Le vendredi 5 avril 2013 16:53:55 UTC+2, Arnaud Delobelle a écrit : > > > > > > You've fallen victim to the fact that CPython is very quick to collect > > > > garbage. > > > OK, I get it but it's a fairly unexpected behavior. > Thanks for the demonstrative

Re: a couple of questions: pickling objects and strict types

2013-04-05 Thread John Gordon
In "Littlefield, Tyler" writes: > Hello all: > I've been using Python for a while now, but I have one larger problem. > I come from a c++ background; though it doesn't help in catching runtime > errors, being able to compile a program helps catch a lot of syntax > errors. I know about pycheck

a couple of questions: pickling objects and strict types

2013-04-05 Thread Littlefield, Tyler
Hello all: I've been using Python for a while now, but I have one larger problem. I come from a c++ background; though it doesn't help in catching runtime errors, being able to compile a program helps catch a lot of syntax errors. I know about pychecker, which is somewhat useful. Do people have

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread Ian Kelly
On Fri, Apr 5, 2013 at 12:13 PM, John Ladasky wrote: > On Friday, April 5, 2013 10:32:21 AM UTC-7, Ian wrote: > >> That doesn't seem to follow from your original post. Because Numpy is >> a C extension, its performance would not be improved by psyco at all. > > What about the fact that Numpy acco

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread Devin Jeanpierre
On Fri, Apr 5, 2013 at 4:34 AM, John Ladasky wrote: > On Thursday, April 4, 2013 7:39:16 PM UTC-7, MRAB wrote: >> Have you looked at Cython? Not quite the same, but still... > > I'm already using Numpy, compiled with what is supposed to be a fast LAPACK. > I don't think I want to attempt to impr

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread John Ladasky
On Friday, April 5, 2013 10:32:21 AM UTC-7, Ian wrote: > That doesn't seem to follow from your original post. Because Numpy is > a C extension, its performance would not be improved by psyco at all. What about the fact that Numpy accommodates Python's dynamic typing? You can pass arrays of int

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread Ian Kelly
On Fri, Apr 5, 2013 at 2:39 AM, John Ladasky wrote: >> 2) Rewrite some key portions in C, possibly using Cython (as MRAB suggested). > > And as I replied to MRAB, my limiting code is within Numpy. I've taken care > to look for ways that I might have been using Numpy itself inefficiently (and >

Re: is operator versus id() function

2013-04-05 Thread candide
Le vendredi 5 avril 2013 16:53:55 UTC+2, Arnaud Delobelle a écrit : > > You've fallen victim to the fact that CPython is very quick to collect > > garbage. OK, I get it but it's a fairly unexpected behavior. Thanks for the demonstrative snippet of code and the instructive answer. -- http

Re: Trying to understand working with dicts

2013-04-05 Thread Dylan Evans
On Fri, Apr 5, 2013 at 10:34 PM, inshu chauhan wrote: > Hello everyone, > > Here in my part of the code where cc is a dictionary. I want to understand > what actually cc.iterkeys() and cc[k] actually doing. > I am already reading > http://docs.python.org/2/library/stdtypes.html#dict.items > and ht

Re: Typing letters slowly using sys

2013-04-05 Thread inq1ltd
On Friday, April 05, 2013 08:10:53 AM Matt wrote: > On Friday, April 5, 2013 10:04:49 AM UTC-4, Matt wrote: > > I am using sys to give the effect that I am typing letters slowly. > > Basically what I want to have happen is have it show "Loading.." > > with the word loading appearing instantly a

Re: Trying to understand working with dicts

2013-04-05 Thread Peter Pearson
On Fri, 5 Apr 2013 18:04:03 +0530, inshu chauhan wrote: > --089e0111cf5068b65204d99c4d46 > Content-Type: text/plain; charset=ISO-8859-1 [snip] > Here in my part of the code where cc is a dictionary. I want to understand > what actually cc.iterkeys() and cc[k] actually doing. > I am already reading

xlutils 1.6.0 released!

2013-04-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 1.6.0: http://pypi.python.org/pypi/xlutils/1.6.0 This release features shiny new Sphinx-based documentation: http://pythonhosted.org/xlutils/ It also has some changes that make xlutils compatible with the upcoming xlrd 0.9.1 release. D

Re: Run python script with ./

2013-04-05 Thread Dylan Evans
On Sat, Apr 6, 2013 at 1:04 AM, LubanWorks wrote: > > > > My question is: > > Why when I use #!/home/luban/Linux/Python/2.7.3/bin/python at the > beginning of myscript.py, *./*myscript.py can work, > > but if I use the wrapper #!/home/luban/bin/python in my python script, use > *./* to run the s

Re: Typing letters slowly using sys

2013-04-05 Thread John Gordon
In Matt writes: > Sorry guys, I may have not been clear. The part I pasted does work, but > I cannot figure out how to get that to print after the word "Loading". So > it will instantly print "Loading", and then the "..." will appear > slowly Have you tried: sys.stdout.write('Load

Re: Typing letters slowly using sys

2013-04-05 Thread Matt
On Friday, April 5, 2013 10:04:49 AM UTC-4, Matt wrote: > I am using sys to give the effect that I am typing letters slowly. Basically > what I want to have happen is have it show "Loading.." with the word > loading appearing instantly and then the periods appearing slowly, as most > loading

Run python script with ./

2013-04-05 Thread LubanWorks
Hi all, I installed two python 2.7.3 into my home directory one is for Linux: /home/luban/*Linux*/Python/2.7.3 another is for Solaris: /home/luban/*SunOS*/Python/2.7.3 then I create a wrapper named "python" in /home/luban/bin to call the different python when I am wo

Re: Typing letters slowly using sys

2013-04-05 Thread Grant Edwards
On 2013-04-05, mattgrav...@gmail.com wrote: > dots = ('') > for x in dots: > sys.stdout.write(x) > sys.stdout.flush() > time.sleep(0.2) That works just fine for me using Python 2.4, 2.6, 2.7 and 3.2. -- Grant Edwards grant.b.edwardsYow! Is it 19

Re: is operator versus id() function

2013-04-05 Thread Arnaud Delobelle
On 5 April 2013 14:49, Candide Dandide wrote: > Until now, I was quite sure that the is operator acts the same as the id > builtin function, or, to be more formal, that o1 is o2 to be exactly > equivalent to id(o1) == id(o2). This equivalence is reported in many books, > for instance Martelli's

Re: Typing letters slowly using sys

2013-04-05 Thread Mitya Sirenef
On 04/05/2013 10:04 AM, mattgrav...@gmail.com wrote: I am using sys to give the effect that I am typing letters slowly. Basically what I want to have happen is have it show "Loading.." with the word loading appearing instantly and then the periods appearing slowly, as most loading screens d

Re: Typing letters slowly using sys

2013-04-05 Thread John Gordon
In <44fa9565-c6cd-4a46-ad28-97417b403...@googlegroups.com> mattgrav...@gmail.com writes: > dots = ('') > for x in dots: > sys.stdout.write(x) > sys.stdout.flush() > time.sleep(0.2) > > I cannot for the life of me figure out how to get the

Re: How do I tell if I'm running under IDLE?

2013-04-05 Thread Tim Chase
On 2013-04-05 13:37, Steven D'Aprano wrote: > On Fri, 05 Apr 2013 07:04:35 -0400, Dave Angel wrote: > > > On 04/05/2013 05:30 AM, Steven D'Aprano wrote: > >> (Apologies in advance if you get multiple copies of this. My > >> Usenet connection seems to be having a conniption fit at the > >> moment.)

Typing letters slowly using sys

2013-04-05 Thread mattgraves7
I am using sys to give the effect that I am typing letters slowly. Basically what I want to have happen is have it show "Loading.." with the word loading appearing instantly and then the periods appearing slowly, as most loading screens do. This is what I have. dots = ('') for

is operator versus id() function

2013-04-05 Thread Candide Dandide
Until now, I was quite sure that the is operator acts the same as the id builtin function, or, to be more formal, that o1 is o2 to be exactly equivalent to id(o1) == id(o2). This equivalence is reported in many books, for instance Martelli's Python in a Nutshell. But with the following code, I'

Re: Python log parser

2013-04-05 Thread Nac Temha
On Fri, Apr 5, 2013 at 4:31 PM, Grant Edwards wrote: > On 2013-04-05, rh wrote: > > On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha > wrote: > > > >> Hi, I'm working to parse log files. But I need to help this matter. I > >> want to parse syslog(wihch program is running, timestamp,host,etc) of > >>

Re: Python log parser

2013-04-05 Thread Grant Edwards
On 2013-04-05, Dave Angel wrote: > On 04/05/2013 07:20 AM, Nac Temha wrote: >> I could not do using syslog module. > What could you not do using syslog? Parse syslog files, presumably -- that's what he asked about. > What did you try, and what exception did it throw? I'm rather at a loss as t

Re: Passing soap response to python script

2013-04-05 Thread Ombongi Moraa Fe
Hi Burak, Thanks a lot. I've been working with suds in this project and I am amazed at how much little code I am using compared to my original php scripts; from your answer, I realized my major headache was not assigning the value of client.last_received method call to another object. With this

Re: How do I tell if I'm running under IDLE?

2013-04-05 Thread Steven D'Aprano
On Fri, 05 Apr 2013 07:04:35 -0400, Dave Angel wrote: > On 04/05/2013 05:30 AM, Steven D'Aprano wrote: >> (Apologies in advance if you get multiple copies of this. My Usenet >> connection seems to be having a conniption fit at the moment.) >> >> I'm looking for an official way to tell what interpr

Re: Python log parser

2013-04-05 Thread Grant Edwards
On 2013-04-05, rh wrote: > On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha wrote: > >> Hi, I'm working to parse log files. But I need to help this matter. I >> want to parse syslog(wihch program is running, timestamp,host,etc) of >> system I could not find any module of python for this. Or do you hav

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Tom P
On 04/05/2013 01:54 PM, Dave Angel wrote: On 04/05/2013 07:02 AM, Tom P wrote: First, here's a sample test program: import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyRequestHandler(BaseHTTPRequestHandler, object): def do_GET(self): top_self = super(

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Tom P
On 04/05/2013 02:27 PM, Dylan Evans wrote: On 05/04/2013 9:09 PM, "Tom P" wrote: First, here's a sample test program: import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyRequestHandler(BaseHTTPRequestHandler, object): def do_GET(self): top_self = su

Re: Getting USB volume serial number from inserted device on OSX

2013-04-05 Thread Sven
On 5 April 2013 06:20, Tim Roberts wrote: > John Nagle wrote: > > > > That would be useful to have as a portable function for all USB > >devices. Serial port devices are particularly annoying, because their > >port number is somewhat random when there's more than one, and changes > >on hot-pl

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread Ian Foote
On 05/04/13 03:29, John Ladasky wrote: I'm revisiting a project that I haven't touched in over a year. It was written in Python 2.6, and executed on 32-bit Ubuntu 10.10. I experienced a 20% performance increase when I used Psyco, because I had a computationally-intensive routine which occupi

Re: Fwd: Re: distutils without a compiler

2013-04-05 Thread Colin J. Williams
On 04/04/2013 9:30 PM, Colin J. Williams wrote: Original Message Subject: Re: distutils without a compiler Date: Tue, 02 Apr 2013 16:26:59 -0700 From: Ned Deily To: pyth

Trying to understand working with dicts

2013-04-05 Thread inshu chauhan
Hello everyone, Here in my part of the code where cc is a dictionary. I want to understand what actually cc.iterkeys() and cc[k] actually doing. I am already reading http://docs.python.org/2/library/stdtypes.html#dict.items and http://www.tutorialspoint.com/python/python_dictionary.htm but still n

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Dylan Evans
On 05/04/2013 9:09 PM, "Tom P" wrote: > > First, here's a sample test program: > > import sys > from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler > > class MyRequestHandler(BaseHTTPRequestHandler, object): > def do_GET(self): > top_self = super(MyRequestHandler, self) # tr

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread ptb
Have you looked into numba? I haven't checked to see if it's python 3 compatible. -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing soap response to python script

2013-04-05 Thread Burak Arslan
Hello, On 04/05/13 12:52, Ombongi Moraa Fe wrote: Hello Group, I am newbie to python and getting my way around. However, my first project that introduced me to the language deals with SOAP requests. Before going any further, there's a project called "suds" which implements a soap client. If

Re: Python log parser

2013-04-05 Thread Dave Angel
On 04/05/2013 07:20 AM, Nac Temha wrote: I could not do using syslog module. Please don't top-post. It messes up the history order entirely. What could you not do using syslog? What did you try, and what exception did it throw? Show your code, and either say precisely in what way it didn

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Dave Angel
On 04/05/2013 07:02 AM, Tom P wrote: First, here's a sample test program: import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyRequestHandler(BaseHTTPRequestHandler, object): def do_GET(self): top_self = super(MyRequestHandler, self) # try to access MyW

Re: Python log parser

2013-04-05 Thread Nac Temha
I could not do using syslog module. On Fri, Apr 5, 2013 at 4:00 AM, rh wrote: > pydoc syslog > > That intenough? > > On Fri, 5 Apr 2013 02:17:55 +0300 > Nac Temha wrote: > > > Hi, I'm working to parse log files. But I need to help this matter. I > > want to parse syslog(wihch program is runnin

HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Tom P
First, here's a sample test program: import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyRequestHandler(BaseHTTPRequestHandler, object): def do_GET(self): top_self = super(MyRequestHandler, self) # try to access MyWebServer instance self.send_re

Re: How do I tell if I'm running under IDLE?

2013-04-05 Thread Dave Angel
On 04/05/2013 05:30 AM, Steven D'Aprano wrote: (Apologies in advance if you get multiple copies of this. My Usenet connection seems to be having a conniption fit at the moment.) I'm looking for an official way to tell what interpreter (if any) is running, or at least a not-too-horrible unofficia

How do I tell if I'm running under IDLE?

2013-04-05 Thread Steven D'Aprano
(Apologies in advance if you get multiple copies of this. My Usenet connection seems to be having a conniption fit at the moment.) I'm looking for an official way to tell what interpreter (if any) is running, or at least a not-too-horrible unofficial way. Googling comes up with a number of hacks

Passing soap response to python script

2013-04-05 Thread Ombongi Moraa Fe
Hello Group, I am newbie to python and getting my way around. However, my first project that introduced me to the language deals with SOAP requests. The server I communicate with basically sends me 2 soap responses; One with a requestIdentifier which I should use to query the delivery status of t

test - please ignore

2013-04-05 Thread Steven D'Aprano
Sorry for the noise. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread Chris Angelico
On Fri, Apr 5, 2013 at 7:39 PM, John Ladasky wrote: > On Friday, April 5, 2013 1:27:40 AM UTC-7, Chris Angelico wrote: >> 1) Can you optimize your algorithms? Three days of processing is... a LOT. > > Neural network training. Yes, it takes a long time. Still, it's not the > most tedious code I

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread John Ladasky
On Friday, April 5, 2013 1:27:40 AM UTC-7, Chris Angelico wrote: > 1) Can you optimize your algorithms? Three days of processing is... a LOT. Neural network training. Yes, it takes a long time. Still, it's not the most tedious code I run. I also do molecular-dynamics simulations with GROMACS,

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread John Ladasky
On Thursday, April 4, 2013 7:39:16 PM UTC-7, MRAB wrote: > Have you looked at Cython? Not quite the same, but still... I'm already using Numpy, compiled with what is supposed to be a fast LAPACK. I don't think I want to attempt to improve on all the work that has gone into Numpy. -- http://ma

Re: JIT compilers for Python, what is the latest news?

2013-04-05 Thread Chris Angelico
On Fri, Apr 5, 2013 at 1:29 PM, John Ladasky wrote: > I'm revisiting a project that I haven't touched in over a year. It was > written in Python 2.6, and executed on 32-bit Ubuntu 10.10. I experienced a > 20% performance increase when I used Psyco, because I had a > computationally-intensive

Re: docs.python.org source

2013-04-05 Thread ஆமாச்சு
On Friday 05 April 2013 10:48 AM, Ned Deily wrote: > You can also get the up-to-date source of the documentation set for each > Python release branch from the Mercurial source repositories. I was able to that. Thanks for all the responses. -- http://mail.python.org/mailman/listinfo/python-list