Re: Py-dea: Streamline string literals now!

2011-12-27 Thread Chris Angelico
On Wed, Dec 28, 2011 at 4:34 PM, Rick Johnson wrote: > I am also thinking that ANY quote char is a bad choice for string > literal delimiters. Why? Well because it is often necessary to embed > single or double quotes into a string literal. Postgres allows dollar-delimited strings, which get arou

user login session for stand alone PyQt

2011-12-27 Thread Panupat Chongstitwattana
For my current project I'm making PyQt GUI to be used inside Maya. One of my requirement is that users need to first login with username and password. After authenticating the account, I'm not sure how I can store the session. I tried Cookie.Simplecookie but I guess it doesn't wok because the GUI

Re: Regular expressions

2011-12-27 Thread rusi
On Dec 27, 10:01 am, Fredrik Tolf wrote: > On Mon, 26 Dec 2011, mauricel...@acm.org wrote: > > I've tried > > > re.sub('@\S\s[1-9]:[A-N]:[0-9]', '@\S\s', '@HWI-ST115:568:B08LLABXX: > > 1:1105:6465:151103 1:N:0:') > > > but it does not seems to work. > > Indeed, for several reasons. First of all, y

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Chris Angelico
On Wed, Dec 28, 2011 at 5:25 PM, Steven D'Aprano wrote: > On Wed, 28 Dec 2011 15:06:37 +1100, Chris Angelico wrote: > >> ... suppose you have a huge >> set/frozenset using tuples as the keys, and one of your operations is to >> shorten all keys by removing their first elements. Current Python >> r

Re: Python education survey

2011-12-27 Thread Steven D'Aprano
On Tue, 27 Dec 2011 18:42:05 -0800, Rick Johnson wrote: > On Dec 27, 8:21 pm, Tim Chase wrote: > >> I'm glad you're open to learning more about English as "used to" is >> perfectly acceptable according to the World English Dictionary[1] [...] >> May you be found better for learning and come to g

Re: Py-dea: Streamline string literals now!

2011-12-27 Thread Steven D'Aprano
On Tue, 27 Dec 2011 21:34:19 -0800, Rick Johnson wrote: > Now. If anyone can look at that mess and not admit it is a disaster, > well then... It isn't a disaster. A disaster is when people die, lose their houses, get tossed out into the street to starve, radioactive contamination everywhere, fl

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Steven D'Aprano
On Wed, 28 Dec 2011 15:06:37 +1100, Chris Angelico wrote: > On Wed, Dec 28, 2011 at 10:10 AM, Steven D'Aprano > wrote: >> Your original use-case, where you want to change the type of tail from >> a list to something else, is simply solved by one extra line of code: >> >> head, *tail = sequence >>

google form filling

2011-12-27 Thread angle 9
google form filling http://gsonlinejobs.yolasite.com/ -- http://mail.python.org/mailman/listinfo/python-list

google form filling

2011-12-27 Thread angle 9
google form filling http://gsonlinejobs.yolasite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python education survey

2011-12-27 Thread rusi
On Dec 27, 11:26 pm, Andrew Berg wrote: > On 12/27/2011 11:59 AM, K Richard Pixley wrote:> You'd do better to encourage > eclipse, but setting that up isn't > > trivial either. > > IIRC, all I had to do to set up PyDev was copy a URL to Eclipse's > "Install New Software" wizard, and have Eclipse

Re: Py-dea: Streamline string literals now!

2011-12-27 Thread Rick Johnson
On Dec 27, 9:49 pm, Rick Johnson wrote: > The fact is...even with the multi-line issue solved, we still have two > forms of literal delimiters that encompass two characters resulting in > *four* possible legal combinations of the exact same string! I don't > know about you guys, but i am not a bi

Re: Py-dea: Streamline string literals now!

2011-12-27 Thread Rick Johnson
On Dec 27, 10:17 pm, Chris Angelico wrote: > On Wed, Dec 28, 2011 at 2:49 PM, Rick Johnson > > wrote: > > My proposal is to introduce a single delimiter for string literals. A > > new string literal that is just as good at spanning single lines as it > > is spanning multiple lines. A new literal

Re: RSA and Cryptography in PYTHON

2011-12-27 Thread Paul Rubin
8 Dihedral writes: >> How about the nontrivial decoding part ? > I am getting lousy in the news group in my writing? > I mean the non-trivial decoding of the key decomposition. I still don't have the slightest idea what you are asking for. -- http://mail.python.org/mailman/listinfo/python-l

Re: Py-dea: Streamline string literals now!

2011-12-27 Thread Steven D'Aprano
On Tue, 27 Dec 2011 19:49:12 -0800, Rick Johnson wrote: > I believe that with the ubiquitous-ness of syntax highlight, string > literals only need one delimiter. In the old days (before syntax > highlight was invented) i could understand how a programmer "might" miss > a single (or even a triple!

Re: Py-dea: Streamline string literals now!

2011-12-27 Thread Chris Angelico
On Wed, Dec 28, 2011 at 2:49 PM, Rick Johnson wrote: > My proposal is to introduce a single delimiter for string literals. A > new string literal that is just as good at spanning single lines as it > is spanning multiple lines. A new literal that uses widely known > markup tag syntax instead of cr

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Chris Angelico
On Wed, Dec 28, 2011 at 10:10 AM, Steven D'Aprano wrote: > Your original use-case, where you want to change the type of tail from a > list to something else, is simply solved by one extra line of code: > > head, *tail = sequence > tail = tuple(tail) That achieves the goal of having tail as a diff

Re: Python education survey

2011-12-27 Thread Chris Angelico
On Wed, Dec 28, 2011 at 1:42 PM, Rick Johnson wrote: > I don't care what ANY dictionary says. Much less a "world" dictionary. > I don't validate or invalidate a word based on some phony baloney > group of pseudo intellectuals who decided one to day that writing a > dictionary "might be cool". Fin

Py-dea: Streamline string literals now!

2011-12-27 Thread Rick Johnson
Hello folks, In a recent thread i stumbled upon an epiphany of sorts concerning Python string literals, with implications that trickle down to all forms of string literals used in general programming, since, for the most part, the syntax is virtually the same! For all our lives we have been excep

Re: Which libraries for Python 2.5.2

2011-12-27 Thread Dave Angel
On 12/27/2011 10:31 PM, W. eWatson wrote: On 12/27/2011 6:27 PM, Ian Kelly wrote: http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71 (or just find it on another Windows XP PC) and copy it into C:\Windows\System32. Don't forget to run regsvr32 to register it. HTH, Ian You are very likel

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
On 12/27/2011 6:27 PM, Ian Kelly wrote: On Tue, Dec 27, 2011 at 6:21 PM, W. eWatson wrote: Well, it found several problems. These DLLs MSVCP1 EFSADU MSJAVA. I'm guessing MSVCP1 is a typo for MSVCP71? If that is missing then that is probably the culprit. That DLL is the C runtime library. I

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 8:21 pm, Tim Chase wrote: > I'm glad you're open to learning more about English as "used to" > is perfectly acceptable according to the World English Dictionary[1] > [...] > May you be found better for learning and come to give others the > benefit of the doubt. I don't care what ANY

Online Data Entry Jobs Without Investment http://ponlinejobs.yolasite.com/

2011-12-27 Thread prabhakaran k
Online Data Entry Jobs Without Investment http://ponlinejobs.yolasite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Which libraries for Python 2.5.2

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 6:21 PM, W. eWatson wrote: > Well, it found several problems. These DLLs > MSVCP1 > EFSADU > MSJAVA. I'm guessing MSVCP1 is a typo for MSVCP71? If that is missing then that is probably the culprit. That DLL is the C runtime library. It is supposed to be shipped with app

Re: Python education survey

2011-12-27 Thread Tim Chase
On 12/27/11 19:56, Rick Johnson wrote: On Dec 27, 3:44 pm, Eelco wrote: Despite the fact that you mis-attributed that quote to me, im going to be a little bit offended in the name of its actual author anyway. Thats a lot of words to waste on your linguistic preferences. Personally, I reserve th

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 7:21 pm, 8 Dihedral wrote: > There are Dr.Python, Pycrust and  Notepadplus to support writing python > programs. I really like Pycrust. It's written in Python, it's code base is structured in a professional manner (IDLE you should be jealous!), and it works well. However, it is de

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 3:44 pm, Eelco wrote: > Despite the fact that you mis-attributed that quote to me, im going to > be a little bit offended in the name of its actual author anyway. > Thats a lot of words to waste on your linguistic preferences. > Personally, I reserve the right to botch my non-native la

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Rick Johnson
On Dec 27, 5:10 pm, Steven D'Aprano wrote: > On Sun, 25 Dec 2011 07:47:20 -0800, Eelco wrote: > Your original use-case, where you want to change the type of tail from a > list to something else, is simply solved by one extra line of code: > > head, *tail = sequence > tail = tuple(tail) i wonder i

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
On 12/27/2011 2:58 PM, Ian Kelly wrote: On Tue, Dec 27, 2011 at 2:35 PM, W. eWatson wrote: I replaced numpy and matplotlib, and added scipy. I still get errors, but perhaps because the install order is now wrong. It was numpy matplotlib Does anyone know the right order? The order (numpy, sci

Re: Python education survey

2011-12-27 Thread 88888 Dihedral
There are Dr.Python, Pycrust and Notepadplus to support writing python programs. IDLE is OK, but if a program failed inside IDLE, then I might have to kill the old IDLE and restart IDLE again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Rick Johnson
On Dec 27, 3:38 pm, Terry Reedy wrote: > On 12/27/2011 1:04 PM, Rick Johnson wrote: > > > But this brings up a very important topic. Why do we even need triple > > quote string literals to span multiple lines? Good question, and one i > > have never really mused on until now. > > I have, and the r

Re: RSA and Cryptography in PYTHON

2011-12-27 Thread 88888 Dihedral
8 Dihedral於 2011年12月26日星期一UTC+8上午3時58分28秒寫道: > Long integer is really excellent in Python. > > Encoding RSA 2048bits in a simple and elegant way in Python > is almost trivial. > > How about the nontrivial decoding part ? I am getting lousy in the news group in my writing? I mean the non-

Re: Slices when extending python with C++

2011-12-27 Thread Ian Kelly
2011/12/27 : > Hallo, > I have kind of special question when extening python with C++ > implemented modules. > > I try to implement a class, behaving also like an array. And I need > to implement slice-getters. I implemented PySequenceMethods.sq_slice > to get "simple" slices like: > > myobj[x:y]

[no subject]

2011-12-27 Thread rozelak
Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get "simple" slices like: myobj[x:y] It works perfectly, without prob

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Steven D'Aprano
On Sun, 25 Dec 2011 07:47:20 -0800, Eelco wrote: > Explicit and implicit are not well-defined terms, We can at least agree on that. > but I would say that > at the moment the signal is implicit, in the sense that one cannot see > what is going on by considering the rhs in isolation. That is a

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Steven D'Aprano
On Mon, 26 Dec 2011 13:51:50 -0800, Eelco wrote: [...] >> If your point is that parens are used more often than >> packing/unpacking, that's almost certainly true, since function calls >> (including method invocations) are so prevalent in pretty much any >> code. But what does that prove? > > That

Slices when extending python with C++

2011-12-27 Thread rozelak
Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get "simple" slices like: myobj[x:y] It works perfectly, without p

Slices when extending python with C++

2011-12-27 Thread rozelak
Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get "simple" slices like: myobj[x:y] It works perfectly, without p

Re: Which libraries for Python 2.5.2

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 2:35 PM, W. eWatson wrote: > I replaced numpy and matplotlib, and added scipy. I still get errors, but > perhaps because the install order is now wrong. It was > numpy > matplotlib > > Does anyone know the right order? The order (numpy, scipy, matplotlib) reflects the depe

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Steven D'Aprano
On Mon, 26 Dec 2011 13:41:34 -0800, Eelco wrote: > On Dec 25, 6:05 pm, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> On Sun, 25 Dec 2011 07:38:17 -0800, Eelco wrote: [...] >> > How is 'head, *tail = sequence' or semantically entirely >> > equivalently, 'head, tail::list = sequence'

Re: Python education survey

2011-12-27 Thread Andrew Berg
On 12/27/2011 4:04 PM, K Richard Pixley wrote: You still need to match versions of PyDev to versions of Eclipse to versions of operating system to versions of other eclipse plugins. I spent a few days trying to get it together once and came to the conclusion that it was a much bigger effort than

Re: confused about __new__

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 3:19 PM, K Richard Pixley wrote: > Are you trying to demonstrate that I haven't prevented you from > instantiating Foo?  If so, then I will cede that point.  I certainly don't > know enough about python internals just now to even claim to be capable of > protecting a class

Re: Type object returned by the re.compile function

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 2:56 PM, candide wrote: > The Python 2.7 official documentation here: > > http://docs.python.org/library/re.html#re.compile > > doesn't specify the type object returned by the re.compiled function. > According to the documentation, re.compile returns a "regular expression >

Re: Type object returned by the re.compile function

2011-12-27 Thread Jerry Hill
On Tue, Dec 27, 2011 at 4:56 PM, candide wrote: import re reo = re.compile('') reo.__class__ > Traceback (most recent call last): >  File "", line 1, in > AttributeError: __class__ I'm not going to comment on what type is returned from the various functions in the re module,

Re: Python education survey

2011-12-27 Thread Eelco
On Dec 27, 9:04 pm, Rick Johnson wrote: > On Dec 27, 1:45 pm, Eelco wrote: > > > On Dec 27, 6:53 pm, Lie Ryan wrote: > > > On 12/27/2011 10:41 PM, Eelco wrote: > > > Before using VIM, I used to use gedit > > Eelco, please don't get offended, but can you (and everyone else) stop > using silly ver

Re: confused about __new__

2011-12-27 Thread K Richard Pixley
On 12/27/11 12:34 , Ian Kelly wrote: On Tue, Dec 27, 2011 at 1:31 PM, K Richard Pixley wrote: On 12/27/11 10:28 , Ian Kelly wrote: On Tue, Dec 27, 2011 at 10:41 AM, K Richard Pixleywrote: The conceptual leap for me was in recognizing that a class is just an object. The best way, (imo,

Re: Python education survey

2011-12-27 Thread K Richard Pixley
On 12/27/11 10:26 , Andrew Berg wrote: On 12/27/2011 11:59 AM, K Richard Pixley wrote: You'd do better to encourage eclipse, but setting that up isn't trivial either. IIRC, all I had to do to set up PyDev was copy a URL to Eclipse's "Install New Software" wizard, and have Eclipse download and i

Type object returned by the re.compile function

2011-12-27 Thread candide
The Python 2.7 official documentation here: http://docs.python.org/library/re.html#re.compile doesn't specify the type object returned by the re.compiled function. According to the documentation, re.compile returns a "regular expression object". A regular expression object seems to be an ins

Re: Daemon management

2011-12-27 Thread Fredrik Tolf
On Tue, 27 Dec 2011, Miki Tebeka wrote: What was the term you used to search? Since http://pypi.python.org/pypi/ingress/0.1.1 seems to fit your description. Not quite, though. It (AFAICT, at least) only provides the REPL part, with no way to construct a more program-friendly interface. --

Re: Daemon management

2011-12-27 Thread Fredrik Tolf
On Wed, 28 Dec 2011, Lie Ryan wrote: On 12/27/2011 12:43 PM, Fredrik Tolf wrote: [...] This is possible through the use of a debugger. I've never used it, but I heard good thing of winpdb which has remote debugging. (http://winpdb.org/) Thanks, but not as long as the debugger freezes the pr

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
I realized that I had a working copy of the app on another XP PC, so I looked at what I had installed for Python. It was not what I had posted the first time. There must have been some shift after the July 16, 2008 date. One lib that was missing was scipy. I just collected the three libs I sa

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
On 12/27/2011 10:36 AM, Christian Heimes wrote: Am 27.12.2011 17:03, schrieb W. eWatson: from matplotlib._path import affine_transform ImportError: DLL load failed: The specified module could not be found. You are missing one or more DLLs that is required to load the _path.pyd module. Yo

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Terry Reedy
On 12/27/2011 1:04 PM, Rick Johnson wrote: But this brings up a very important topic. Why do we even need triple quote string literals to span multiple lines? Good question, and one i have never really mused on until now. I have, and the reason I thought of is that people, including me, too o

Re: Python education survey

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 2:13 PM, Lie Ryan wrote: > In any case, removing IDLE without a much better replacement is pretty much > out of the question. If people installed Python in vanilla Windows install, > they would only have Notepad to edit their code. No no, Wordpad is much better for editing

Re: PDF 508 Compliance with Python?

2011-12-27 Thread Terry Reedy
On 12/27/2011 11:35 AM, Yanovsky, Boris, VHACIN wrote: Hello, I am new to Python and I hope my question makes sense. We are trying to make PDFs 508 Compliant, meaning that the objects within them have to be tagged. The problem is that we have hundreds, and potentially thousands of PDFs, since th

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Lie Ryan
On 12/28/2011 05:04 AM, Rick Johnson wrote: -- Note: superfluous indention removed for clarity! -- On Dec 27, 8:53 am, Dennis Lee Bieber wrote: You can get by without the backslash in this situation too, by using triple quoting: I would not do that because: 1. Because Python already has TWO

Re: Python education survey

2011-12-27 Thread Lie Ryan
On 12/28/2011 05:11 AM, Rick Johnson wrote: On Dec 27, 11:50 am, Lie Ryan wrote: In case you haven't realised it, it is pretty much impossible for a large open source project to "die"; even if Guido decided to remove IDLE from the standard library I don't remember stating that Python would di

Re: Python education survey

2011-12-27 Thread K Richard Pixley
On 12/27/11 10:21 , Rick Johnson wrote: On Dec 27, 11:59 am, K Richard Pixley wrote: The problem is that IDLE is hard to set up. (I've never managed it and I'm a well seasoned veteran). Can you qualify that statement? Do you mean "difficult to set up on certain OS's"? Because for windows th

Re: confused about __new__

2011-12-27 Thread K Richard Pixley
On 12/27/11 10:28 , Ian Kelly wrote: On Tue, Dec 27, 2011 at 10:41 AM, K Richard Pixley wrote: The conceptual leap for me was in recognizing that a class is just an object. The best way, (imo, so far), to create a singleton in python is to use the class itself as the singleton rather than ever

Re: confused about __new__

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 1:31 PM, K Richard Pixley wrote: > On 12/27/11 10:28 , Ian Kelly wrote: >> >> On Tue, Dec 27, 2011 at 10:41 AM, K Richard Pixley  wrote: >>> >>> The conceptual leap for me was in recognizing that a class is just an >>> object.  The best way, (imo, so far), to create a singl

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
... I'm suspicious of this line, and maybe even the app program. There may have been a change to the code that required the later two versions of numpy and matplotlib. In fact, I'm using the later version here, so I'll see if I can back up to the first Python app they produced. from pylab impor

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 1:45 pm, Eelco wrote: > On Dec 27, 6:53 pm, Lie Ryan wrote: > > On 12/27/2011 10:41 PM, Eelco wrote: > > Before using VIM, I used to use gedit Eelco, please don't get offended, but can you (and everyone else) stop using silly verbage like "used to", "use to", "suppose to", "hard" whe

Re: Python education survey

2011-12-27 Thread Eelco
On Dec 27, 6:53 pm, Lie Ryan wrote: > On 12/27/2011 10:41 PM, Eelco wrote: > > > > > *Your suggestion of VIM is especially objectionable. Though I am sure > > it is a great tool to you, the subject here is beginner education. > > Just because it is a good tool for you, does not make it a good tool

Re: Daemon management

2011-12-27 Thread Miki Tebeka
What was the term you used to search? Since http://pypi.python.org/pypi/ingress/0.1.1 seems to fit your description. -- http://mail.python.org/mailman/listinfo/python-list

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
On 12/27/2011 8:42 AM, Lie Ryan wrote: On 12/28/2011 03:03 AM, W. eWatson wrote: Here's the traceback. The traceback seems to imply that matplotlib is not being installed properly. Have you tried uninstalling then reinstalling matplotlib? I just did, and the results are this: ==

Re: Which libraries for Python 2.5.2

2011-12-27 Thread Christian Heimes
Am 27.12.2011 17:03, schrieb W. eWatson: > from matplotlib._path import affine_transform > ImportError: DLL load failed: The specified module could not be found. You are missing one or more DLLs that is required to load the _path.pyd module. You can use http://www.dependencywalker.com/ to tra

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 11:59 am, K Richard Pixley wrote: > The problem is that IDLE is hard to set up.  (I've never managed it and > I'm a well seasoned veteran). Can you qualify that statement? Do you mean "difficult to set up on certain OS's"? Because for windows there is no difficulty. > And [IDLE is] p

Re: confused about __new__

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 10:41 AM, K Richard Pixley wrote: > The conceptual leap for me was in recognizing that a class is just an > object.  The best way, (imo, so far), to create a singleton in python is to > use the class itself as the singleton rather than ever instantiating it. >  With a littl

Re: Python education survey

2011-12-27 Thread Andrew Berg
On 12/27/2011 11:59 AM, K Richard Pixley wrote: You'd do better to encourage eclipse, but setting that up isn't trivial either. IIRC, all I had to do to set up PyDev was copy a URL to Eclipse's "Install New Software" wizard, and have Eclipse download and install it. Extra steps are needed if a

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 11:50 am, Lie Ryan wrote: > In case you haven't realised it, it is pretty > much impossible for a large open source project to "die"; even if Guido > decided to remove IDLE from the standard library I don't remember stating that Python would die if IDLE was removed (not sure if you mis

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
On 12/27/2011 8:53 AM, Ian Kelly wrote: On Tue, Dec 27, 2011 at 9:03 AM, W. eWatson wrote: File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line 34, in from matplotlib._path import affine_transform ImportError: DLL load failed: The specified module could not be found. Do

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Rick Johnson
-- Note: superfluous indention removed for clarity! -- On Dec 27, 8:53 am, Dennis Lee Bieber wrote: > You can get by without the backslash in this situation too, by using > triple quoting: I would not do that because: 1. Because Python already has TWO string literal delimiters (' and ") 2. Becau

Re: confused about __new__

2011-12-27 Thread Fredrik Tolf
On Tue, 27 Dec 2011, Ian Kelly wrote: On Mon, Dec 26, 2011 at 10:48 PM, Fredrik Tolf wrote: I'm also a bit confused about __new__. I'd very much appreciate it if someone could explain the following aspects of it:  * The manual () says   that __n

Re: Python education survey

2011-12-27 Thread K Richard Pixley
On 12/19/11 19:51 , Raymond Hettinger wrote: Do you use IDLE when teaching Python? If not, what is the tool of choice? If your goal is to quickly get new users up and running in Python, what IDE or editor do you recommend? I would: a) let the students pick their own editor. b) encourage ema

Re: Python education survey

2011-12-27 Thread Lie Ryan
On 12/27/2011 10:41 PM, Eelco wrote: *Your suggestion of VIM is especially objectionable. Though I am sure it is a great tool to you, the subject here is beginner education. Just because it is a good tool for you, does not make it a good tool for a beginner. Before using VIM, I used to use ged

Re: Python education survey

2011-12-27 Thread Lie Ryan
On 12/28/2011 03:37 AM, Rick Johnson wrote: My logic is this: """ Including an IDE in the stdlib may have been a bad idea (although i understand and support Guido's original vision for IDLE). But since we do have it, we need to either MAINTAIN the package or REMOVE it. We cannot just stick our

Re: Python education survey

2011-12-27 Thread 88888 Dihedral
-- http://mail.python.org/mailman/listinfo/python-list

Re: Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
On 12/27/2011 8:42 AM, Lie Ryan wrote: On 12/28/2011 03:03 AM, W. eWatson wrote: Here's the traceback. The traceback seems to imply that matplotlib is not being installed properly. Have you tried uninstalling then reinstalling matplotlib? I believe I have, but I'll give it another go. -- htt

Re: confused about __new__

2011-12-27 Thread K Richard Pixley
On 12/26/11 21:48 , Fredrik Tolf wrote: On Mon, 26 Dec 2011, K. Richard Pixley wrote: I don't understand. Can anyone explain? I'm also a bit confused about __new__. I'd very much appreciate it if someone could explain the following aspects of it: * The manual (

Re: Daemon management

2011-12-27 Thread Lie Ryan
On 12/27/2011 12:43 PM, Fredrik Tolf wrote: Dear list, Lately, I've had a personal itch to scratch, in that I run a couple of Python programs as daemons, and sometimes want to inspect or alter them in ad-hoc ways, or other times need to do things to them that are less ad-hoc in nature, but never

Re: Errors installing mod_python with apache

2011-12-27 Thread Mark Seger
I did try yum and got this: [root@rhel53 tmp]# yum install mod_python Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Parsing package install arguments No package mod_python available. Nothing to do after further

Re: Errors installing mod_python with apache

2011-12-27 Thread Rami Chowdhury
On Tue, Dec 27, 2011 at 13:32, Mark Seger wrote: > I've tried this on both RHEL5.5 and RHEL 6.0, using the default apache that > comes with the environment and itself isn't configured with mod_python. > > The first thing I noticed when mod_python wouldn't install was that apsx > wasn't installed e

Re: Which libraries for Python 2.5.2

2011-12-27 Thread Ian Kelly
On Tue, Dec 27, 2011 at 9:03 AM, W. eWatson wrote: >  File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line 34, in > >    from matplotlib._path import affine_transform > ImportError: DLL load failed: The specified module could not be found. Do you not have the file C:\Python25\lib\

Re: Which libraries for Python 2.5.2

2011-12-27 Thread Lie Ryan
On 12/28/2011 03:03 AM, W. eWatson wrote: Here's the traceback. The traceback seems to imply that matplotlib is not being installed properly. Have you tried uninstalling then reinstalling matplotlib? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python education survey

2011-12-27 Thread Rick Johnson
On Dec 27, 12:14 am, Carl Smith wrote: > Do people seriously use IDLE? I thought it was just there for > scratchers, like turtle. I know for a fact that many folks use IDLE, even some rather "well known" folks around here. The fact is, more people use IDLE than admit to using IDLE. Of course, out

PDF 508 Compliance with Python?

2011-12-27 Thread Yanovsky, Boris, VHACIN
Hello, I am new to Python and I hope my question makes sense. We are trying to make PDFs 508 Compliant, meaning that the objects within them have to be tagged. The problem is that we have hundreds, and potentially thousands of PDFs, since they are automated reports that we create on a regular b

Which libraries for Python 2.5.2

2011-12-27 Thread W. eWatson
I'm trying to restore Python 2.5.2 on an old XP PC for a particular application from 4-5 years ago that uses it . According to the latest manual on it, the following should be installed. python-2.5.2.msi PIL-1.1.6.win32-py2.5.exe numpy-1.1.0-win32-superpack-python2.5.exe matplotlib-0.98.1.win32

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Charles Hixson
That was it! Thanks. On 12/26/2011 02:44 PM, Chris Angelico wrote: On Tue, Dec 27, 2011 at 9:23 AM, Charles Hixson wrote: This doesn't cause a crash, but rather incorrect results. You may need to be a bit clearer. What line of code (or what expression)? What did you expect to see,

Errors installing mod_python with apache

2011-12-27 Thread Mark Seger
I've tried this on both RHEL5.5 and RHEL 6.0, using the default apache that comes with the environment and itself isn't configured with mod_python. The first thing I noticed when mod_python wouldn't install was that apsx wasn't installed either. After a lot of pain, I discovered httpd-devel provi

Re: Python education survey

2011-12-27 Thread Eelco
On Dec 27, 6:59 am, Carl Smith wrote: > On Dec 20, 10:58 am, Andrea Crotti wrote: > > > > > > > > > > > On 12/20/2011 03:51 AM, Raymond Hettinger wrote: > > > > Do you use IDLE when teaching Python? > > > If not, what is the tool of choice? > > > > Students may not be experienced with the command

Re: Plot seems weird

2011-12-27 Thread Lie Ryan
On 12/27/2011 06:14 AM, Yigit Turgut wrote: On Dec 26, 8:58 pm, Lie Ryan wrote: On 12/27/2011 04:08 AM, Yigit Turgut wrote: not your fault, I made a mistake when copy-pasteing the code, here's the fixed code: from itertools import izip_longest def to_square(data): sq_data = [[], []]

Re: python logging module:a quick question

2011-12-27 Thread Lie Ryan
On 12/27/2011 05:26 PM, Littlefield, Tyler wrote: Hello all: I have a basic server I am working on, and wanted some input with an error I'm getting. I am initializing the logger like so: if __name__ == "__main__": observer = log.PythonLoggingObserver() observer.start() logging.basicConfig(filenam

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-27 Thread Eelco
On Dec 27, 1:52 am, Chris Angelico wrote: > On Tue, Dec 27, 2011 at 10:44 AM, Eelco wrote: > > extended collection unpacking, as in 'head,*tail=sequence', is quite a > > rare construct indeed, and here I very strongly feel a more explicit > > syntax is preferrable. > > You may be right, but... >