Re: Python simple web development

2009-06-26 Thread laplacia...@gmail.com
On Jun 27, 2:25 am, "laplacia...@gmail.com" wrote: > > As Thomas suggests, maybe have a look at Werkzeug ... Typo: s/Thomas/Petr/ -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: Aahz wrote: In article , =?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote: Anyway, I'm *not* trying to discourage you, just explain some of the roadblocks to acceptance that likely are why it hasn't already happened. If you're serious about pushing this through, you have two op

Re: looking for a book on python

2009-06-26 Thread laplacia...@gmail.com
On Jun 26, 8:48 pm, Randy Foiles wrote: > Hello and thank you for taking your time to read this. >         I was interested in learning about python.  In the long ago past I did > learn some programing but I have not used any of it for years.  I do > remember some basics however so the book does n

Re: It's ...

2009-06-26 Thread Gabriel Genellina
En Thu, 25 Jun 2009 14:07:19 -0300, Angus Rodgers escribió: On Thu, 25 Jun 2009 17:56:47 +0100, I burbled incoherently: [...] does the new feature, by which a file becomes iterable, operate by some kind of coercion of a file object to a list object, via something like x.readlines()? Sorry

Re: Python simple web development

2009-06-26 Thread laplacia...@gmail.com
On Jun 26, 6:08 pm, Thomas Allen wrote: > On Jun 25, 3:29 am, Private Private wrote: > > > > Can you suggest anything ? > > I don't think anything's lighter than web.py. > > http://webpy.org/ > My impression is that webpy is intended for experienced users who might otherwise just write all their

Re: ElementTree.XML(string XML) and ElementTree.fromstring(string XML) not working

2009-06-26 Thread Stefan Behnel
Kee Nethery wrote: > On Jun 25, 2009, at 11:39 PM, Stefan Behnel wrote: >> parsing a >> document from a string does not have its own function, because it is >> trivial to write >> >> tree = parse(BytesIO(some_byte_string)) > > :-) Trivial for someone familiar with the language. For a newbie li

Re: No trees in the stdlib?

2009-06-26 Thread Stefan Behnel
João Valverde wrote: > I wouldn't consider anything other than C for such a module on > efficiency alone, unless it was a prototype of course. But I have little > knowledge about the Python C API. Cython is your true friend, if only for rapid prototyping. http://cython.org/ Stefan -- http://mai

Re: Replacing a built-in method of a module object instance

2009-06-26 Thread Peter Otten
David Hirschfield wrote: > I have a need to replace one of the built-in methods of an arbitrary > instance of a module in some python code I'm writing. > > Specifically, I want to replace the __getattribute__() method of the > module I'm handed with my own __getattribute__() method which will do

Re: Beginning with Python; the right choice?

2009-06-26 Thread Che M
On Jun 26, 10:22 pm, "sato.ph...@gmail.com" wrote: > Hi, > > As you can imagine, I am new, both to this group and to Python.  I > have read various posts on the best book to buy or online tutorial to > read and have started to go through them.  I was wondering, as someone > with virtually no progr

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
Aahz wrote: In article , =?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). The particular algorithm to achieve this is a secondary issue. It's a BST fo

Re: Beginning with Python; the right choice?

2009-06-26 Thread Chris Rebert
On Fri, Jun 26, 2009 at 10:39 PM, Terry Reedy wrote: > sato.ph...@gmail.com wrote: >> >> Hi, >> >> As you can imagine, I am new, both to this group and to Python.  I >> have read various posts on the best book to buy or online tutorial to >> read and have started to go through them.  I was wonderin

Re: Beginning with Python; the right choice?

2009-06-26 Thread Terry Reedy
sato.ph...@gmail.com wrote: Hi, As you can imagine, I am new, both to this group and to Python. I have read various posts on the best book to buy or online tutorial to read and have started to go through them. I was wondering, as someone with virtually no programming experience (I am a photogr

Re: Dictionary self lookup

2009-06-26 Thread Gabriel Genellina
En Wed, 24 Jun 2009 23:42:03 -0300, Carl Banks escribió: On Jun 24, 2:39 am, Norberto Lopes wrote: What do you think of dictionaries having a self lookup in their declaration? Be able to do this: a = {"foo" : "foo1", "bar" : a["foo"]} # or with another syntax instead of: a = { "foo" : "

Re: No trees in the stdlib?

2009-06-26 Thread CTO
On Jun 26, 1:29 am, Tom Reed wrote: > Whynotrees in the standard library, if not as a built in? I searched > the archive but couldn't find a relevant discussion. Seems like a > glaring omission considering the batteries included philosophy, > particularly balanced binary search trees.Nointerest,no

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: greg wrote: João Valverde wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). Careful here -- you can't get away from the need for hashability just by using a tree. Ev

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
greg wrote: João Valverde wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). Careful here -- you can't get away from the need for hashability just by using a tree. Even if you don't need t

Re: ctypes list library

2009-06-26 Thread Gabriel Genellina
En Thu, 25 Jun 2009 06:15:57 -0300, luca72 escribió: Hello but find_library find only the lib. but if i need to load from a list of lib how i have to do. My proble is that i have 5 lib (a,b,c,d,e), if i load the a i get lib b not found, if for first i load the b and than the a i get the same er

postgreSQL python bindings - which one?

2009-06-26 Thread Horace Blegg
Hi, I'm having a hard time deciding which set of PGSQL python bindings to go with. I don't know much about SQL to begin with, so the collage of packages of somewhat daunting. I'm starting a pet project in order to teach my self more, but I want to avoid getting off on the wrong foot and picking a p

Re: Beginning with Python; the right choice?

2009-06-26 Thread Mensanator
On Jun 26, 9:22�pm, "sato.ph...@gmail.com" wrote: > Hi, > > As you can imagine, I am new, both to this group and to Python. �I > have read various posts on the best book to buy or online tutorial to > read and have started to go through them. �I was wondering, as someone > with virtually no progra

Re: Beginning with Python; the right choice?

2009-06-26 Thread Amos Anderson
In learning most programming languages, in my experience anyway, it's easy to get overwhelmed and want to give up. Python is easy enough that you should be able to pick it to a point that it will be useful to you while still learning the more advanced features. Python generally teaches good program

Beginning with Python; the right choice?

2009-06-26 Thread sato.ph...@gmail.com
Hi, As you can imagine, I am new, both to this group and to Python. I have read various posts on the best book to buy or online tutorial to read and have started to go through them. I was wondering, as someone with virtually no programming experience (I am a photographer by trade), is Python the

Re: looking for a book on python

2009-06-26 Thread Aahz
In article , Randy Foiles wrote: > > I do realize that everyone is different but I would like to see some >suggestions and maybe reasons why you think it is good. I have looked >for/searched and found a few different books but as my means are a bit >limited right now I don't really want

Re: change the first character of the line to uppercase in a text file

2009-06-26 Thread powah
On Jun 26, 4:51 pm, Chris Rebert wrote: > On Fri, Jun 26, 2009 at 12:43 PM, powah wrote: > > How to change the first character of the line to uppercase in a text > > file? > > e.g. > > input is: > > abc xyz > > Bd ef > > gH ij > > > output should be: > > Abc xyz > > Bd ef > > GH ij > > We're not i

Re: No trees in the stdlib?

2009-06-26 Thread greg
João Valverde wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). Careful here -- you can't get away from the need for hashability just by using a tree. Even if you don't need to actually ha

Re: looking for a book on python

2009-06-26 Thread Horace Blegg
Hello, http://diveintopython.org/ - might be a good place to start. There are also a bunch of free programming books (some related to python, some not) to be found here: http://www.e-booksdirectory.com/programming.php#python - How good these books may or may not be is up to you to find out. Also,

Re: alternative to JoinableQueue's please

2009-06-26 Thread Filipe Fernandes
Raymond Hettinger wrote: > [Filipe Fernandes] >> The reasons for using JoinableQueue I think are obvious. I want to >> block the main processing using queue.join() until the tasks that have >> been placed on the queue have been finished by the worker processes. >> >> I can't be the only one exper

looking for a book on python

2009-06-26 Thread Randy Foiles
Hello and thank you for taking your time to read this. I was interested in learning about python. In the long ago past I did learn some programing but I have not used any of it for years. I do remember some basics however so the book does not have to be for a total beginner. (C, C++, BASIC,

Replacing a built-in method of a module object instance

2009-06-26 Thread David Hirschfield
I have a need to replace one of the built-in methods of an arbitrary instance of a module in some python code I'm writing. Specifically, I want to replace the __getattribute__() method of the module I'm handed with my own __getattribute__() method which will do some special work on the attribu

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
2009/6/27 Piet van Oostrum : >> Sebastian Pająk (SP) wrote: > >>SP> Maybe this picture will tell you more: >>SP> http://files.getdropbox.com/u/1211593/tkinter.png > >>SP> The original script: >>SP> http://files.getdropbox.com/u/1211593/test1.py > >>SP> May someone can confirm this osx behaviou

Re: MultiValueDict?

2009-06-26 Thread John Machin
On Jun 27, 2:09 am, BarakatX2 wrote: > png)>, , > ]}> There is nothing in this schema to suggest that any object has a .name attribute . > >     for f in files['rqFiles']: >         print f.name > > This gives me an "'str' object has no attribute 'name'" error. I don't > know if there is a spec

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Piet van Oostrum
> Sebastian Pająk (SP) wrote: >SP> Maybe this picture will tell you more: >SP> http://files.getdropbox.com/u/1211593/tkinter.png >SP> The original script: >SP> http://files.getdropbox.com/u/1211593/test1.py >SP> May someone can confirm this osx behaviour? Yes, I get the same. But it is a p

Re: No trees in the stdlib?

2009-06-26 Thread Raymond Hettinger
[João Valverde] > What's lacking is an associative array that preserves ordering, doesn't > require a hash function and has fast insertions and deletions in > O(log(n)). FWIW, Py3.1 has an OrderedDict() that preserves insertion order. It has O(1) lookup, deletion, insertion, and popping; and O(n)

Re: No trees in the stdlib?

2009-06-26 Thread Raymond Hettinger
[Tom Reed] > Why no trees in the standard library, if not as a built in? The sqlite3 module is built on a binary-tree structure. It can be used with persistent data or kept in-memory. The gdbm module has similar flexibility (see the F mode). FWIW, there are some ASPN implementing various types of

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Martin v. Löwis
> And I do not see any f3 anywhere except in the doc ref I copy/duped and > in this file. That surely is a bug in your email program - get a better one. Take a look at http://mail.python.org/pipermail/python-list/2009-June/717666.html which displays correctly - maybe you can find a web browser

Re: Python simple web development

2009-06-26 Thread Petr Messner
What about Werkzeug? I like its simplicity (well, basically everything I need are WSGI request/response objects :) + some templating library). Petr 2009/6/25 Private Private : > Hi, > > I am looking for a python library which will allow me to do a simple > web development. I need to use > some f

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-26 Thread Michael Torrie
Robert Kern wrote: > In the former case, you can claim that decimal floating point is more > accurate > *for those problems*. But as soon as you have a division operation, decimal > floating point has the same accuracy problems as binary floating point. True. Poor choice of words on my part.

Re: Dynamic method invocation

2009-06-26 Thread jythonuser
Actually let me add that in jython I don't need to always use MyShell. It may be ok to wrapper it with some Jython class which then delegates to MyShell. So something like shell = MyJythonShell() shell.grep (grep_args) So MyJythonShell is defined in Jython which calls MyShell. Am wondering how

Re: Dynamic method invocation

2009-06-26 Thread jythonuser
Sorry for being a little vague. The last part of your response seems like what I would need. So here are more details on what I am trying to do. I have an extensible command shell in java where commmand providers plug in to supply new commands. I have a java class called MyShell which has execC

Re: Python simple web development

2009-06-26 Thread Thomas Allen
On Jun 25, 3:29 am, Private Private wrote: > Hi, > > I am looking for a python library which will allow me to do a simple > web development. I need to use > some forms (but nice looking :-) ), creating images based on input > from those forms, etc. I have read a bit about Django and TurboGears > b

Re: Python simple web development

2009-06-26 Thread Daniel Fetchinson
>> What I've read about Django, Turbogears is that they are powerful >> enough to create big web-based portals, applications, etc. >> I need just simple forms without any sophisticated functionality. >> So again: why I am wrong ? > > Just because something is powerful doesn't mean you can't do simp

Re: Python simple web development

2009-06-26 Thread Charles Yeomans
Or you could try my approach and write your own web app. Charles Yeomans -- http://mail.python.org/mailman/listinfo/python-list

Re: alternative to JoinableQueue's please

2009-06-26 Thread Raymond Hettinger
[Filipe Fernandes] > The reasons for using JoinableQueue I think are obvious.  I want to > block the main processing using queue.join() until the tasks that have > been placed on the queue have been finished by the worker processes. > > I can't be the only one experiencing this (besides Brian)... a

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Scott David Daniels
norseman wrote: Scott David Daniels wrote: norseman wrote: ... A note here: In reading the original posting I get ... then an e with a goatee Here's something to try in any future circumstances: Good thought, good idea, useful tool. BUT - compare your output to what I *see*.

Re: change the first character of the line to uppercase in a text file

2009-06-26 Thread Scott David Daniels
powah wrote: How to change the first character of the line to uppercase in a text file? Here is an English hint on the above: The "How ... file" above is a noun phrase, and is not a sentence, never mind a question. Putting a question mark after the noun phrase does not make that phrase a qu

Re: change the first character of the line to uppercase in a text file

2009-06-26 Thread Tim Chase
powah wrote: How to change the first character of the line to uppercase in a text file? e.g. input is: abc xyz Bd ef gH ij output should be: Abc xyz Bd ef GH ij While you're asking the Python list, I'd just use GNU sed: sed -i 's/./\U&/' myfile.txt I don't know if the "\U"=="make the repla

Re: change the first character of the line to uppercase in a text file

2009-06-26 Thread Chris Rebert
On Fri, Jun 26, 2009 at 12:43 PM, powah wrote: > How to change the first character of the line to uppercase in a text > file? > e.g. > input is: > abc xyz > Bd ef > gH ij > > output should be: > Abc xyz > Bd ef > GH ij We're not in the business of doing homework. Some hints though: `s.upper()` co

Re: "The system cannot execute the specified program."

2009-06-26 Thread Terry Reedy
Tim Slattery wrote: Tim Slattery wrote: Our office has a copy of Python 3.0 installed on a network share device. When I try to run it I get this message: "The system cannot execute the specified program." Slightly OT, but do try to replace that with 3.1 as soon as you can. Significant improv

Re: change the first character of the line to uppercase in a text file

2009-06-26 Thread Emile van Sebille
On 6/26/2009 12:43 PM powah said... How to change the first character of the line to uppercase in a text file? e.g. input is: abc xyz Bd ef gH ij output should be: Abc xyz Bd ef GH ij How far have you gotten? Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: "The system cannot execute the specified program."

2009-06-26 Thread Trent Mick
Tim Slattery wrote: That's what it is. They give you a choice of MSI or AS. The AS choice is a zip file that you unzip, then run the bat file on the top level. There's no indication that it's "not intended for wide use". Granted not much, other than it isn't listed in the main download tables:

Re: "The system cannot execute the specified program."

2009-06-26 Thread Tim Slattery
Duncan Booth wrote: >Tim Slattery wrote: > >> Our office has a copy of Python 3.0 installed on a network share >> device. When I try to run it I get this message: "The system cannot >> execute the specified program." >> >> When I googled that message, the links that came up had to do with >> mi

Re: "The system cannot execute the specified program."

2009-06-26 Thread Tim Slattery
Trent Mick wrote: >Tim Slattery wrote: >> Tim Slattery wrote: >> >>> Our office has a copy of Python 3.0 installed on a network share >>> device. When I try to run it I get this message: "The system cannot >>> execute the specified program." >> >> I should add that before I knew about our shar

Re: ElementTree.XML(string XML) and ElementTree.fromstring(string XML) not working

2009-06-26 Thread Kee Nethery
First, thanks to everyone who responded. Figured I'd test all the suggestions and provide a response to the list. Here goes ... On Jun 25, 2009, at 7:38 PM, Nobody wrote: Why do you need an ElementTree rather than an Element? XML(string) returns the root element, as if you had used et.parse(

change the first character of the line to uppercase in a text file

2009-06-26 Thread powah
How to change the first character of the line to uppercase in a text file? e.g. input is: abc xyz Bd ef gH ij output should be: Abc xyz Bd ef GH ij -- http://mail.python.org/mailman/listinfo/python-list

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-26 Thread Robert Kern
On 2009-06-26 02:17, Ulrich Eckhardt wrote: Robert Kern wrote: I wish people would stop representing decimal floating point arithmetic as "more accurate" than binary floating point arithmetic. Those that failed, learned. You only see those that haven't learnt yet. Dialog between two teachers:

Re: No trees in the stdlib?

2009-06-26 Thread Carl Banks
On Jun 26, 7:35 am, Hallvard B Furuseth wrote: > Stefan Behnel writes: > >João Valverde wrote: > >> Besides some interface glitches, like returning None > >> on delete if I recall correctly. > > > That's actually not /that/ uncommon. Operations that change an object are > > not (side-effect free)

alternative to JoinableQueue's please

2009-06-26 Thread Filipe Fernandes
I'm currently using the multiprocessing package and I'm hugely impressed at its simplicity (thanks very much Jesse Noller). Although, it seems that there's a bug in JoinableQueue's which renders using it pointless over a regular Queue as per Issue 4660 http://bugs.python.org/issue4660 To re-iter

Re: No trees in the stdlib?

2009-06-26 Thread Aahz
In article , =?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote: > >What's lacking is an associative array that preserves ordering, doesn't >require a hash function and has fast insertions and deletions in >O(log(n)). The particular algorithm to achieve this is a secondary >issue. It's a BST for sure, AVL

Re: No trees in the stdlib?

2009-06-26 Thread Stefan Behnel
João Valverde wrote: > What's lacking is an associative array that preserves ordering, doesn't > require a hash function and has fast insertions and deletions in > O(log(n)). > [...] > I'm genuinely surprised to know > there are no data structures that efficiently support such a common need > in Py

Re: os.system vs subprocess

2009-06-26 Thread Nate
I ended up going with this: http://code.activestate.com/recipes/440554/ seems to feed me new lines of output atleast before the subprocess finishes, with some adjustment of the time delays. I'll guess I'll just be packing winpy into the installer. Or something. -- http://mail.python.org/mailma

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread norseman
Scott David Daniels wrote: norseman wrote: ... A note here: In reading the original posting I get symbols that are not familiar to me as alphabet. From the line in your original: Label(root, text='ęóąśłżźćń').pack() I see text=' then an e with a goatee a capi

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
Aahz wrote: In article <006078f0$0$9721$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: Hash tables (dicts) are useful for many of the same things that trees are useful for, but they are different data structures with different strengths and weaknesses, and different uses. To argue that

Re: "The system cannot execute the specified program."

2009-06-26 Thread Trent Mick
Tim Slattery wrote: Tim Slattery wrote: Our office has a copy of Python 3.0 installed on a network share device. When I try to run it I get this message: "The system cannot execute the specified program." I should add that before I knew about our shared installation, I downloaded the AS dist

Re: No trees in the stdlib?

2009-06-26 Thread Daniel Stutzbach
On Fri, Jun 26, 2009 at 1:54 AM, Miles Kaufmann wrote: > On Jun 26, 2009, at 2:23 AM, Chris Rebert wrote: > >> That's pretty much the bisect module in a nutshell. It manipulates a >> sorted list using binary search. >> > > With O(n) insertions and removals, though. A decent self-balancing binary

Re: No trees in the stdlib?

2009-06-26 Thread Paul Rubin
a...@pythoncraft.com (Aahz) writes: > (In particular, WRT the bisect module, although insertion and deletion > are O(N), the constant factor for doing a simple memory move at C speed > swamps bytecode until N gets very large -- and we already have > collections.deque() for some other common use cas

Re: Py 3 slower than Py 2. Towers of Hanoi implementation

2009-06-26 Thread Udyant Wig
On Jun 26, 8:01 pm, Paul Moore wrote: > 2009/6/26 Udyant Wig : > > > > > > > I implemented this ->http://www.apl.jhu.edu/~hall/lisp/Hanoi.lispin > > both flavors of Python: 2.6.2 and 3.0.1 (CPython) > > > The code: > > #!/usr/bin/env python > > def remaining_peg (peg1, peg2): > >        return (6

Re: No trees in the stdlib?

2009-06-26 Thread Aahz
In article <006078f0$0$9721$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > >Hash tables (dicts) are useful for many of the same things that trees are >useful for, but they are different data structures with different >strengths and weaknesses, and different uses. To argue that we don't ne

Re: No trees in the stdlib?

2009-06-26 Thread Paul Rubin
Stefan Behnel writes: > > But deletes in an AVL tree should not cause mutation. They should > > just allocate a new root and path up to where the deleted node was. > I doubt that there are many AVL implementations that do that. Plus, if > deletion doesn't delete, I'd happily consider that a bug.

Re: validating HTTPS certificates?

2009-06-26 Thread Nobody
On Fri, 26 Jun 2009 10:04:21 +0200, Andras.Horvath wrote: > (disclaimer: this might be a FAQ entry somewhere but I honestly did use > Google) > > I'm in the process of picking a language for a client application that > accesses a HTTPS (actually SOAP) server. This would be easy enough in > Pytho

Re: "The system cannot execute the specified program."

2009-06-26 Thread Duncan Booth
Tim Slattery wrote: > Our office has a copy of Python 3.0 installed on a network share > device. When I try to run it I get this message: "The system cannot > execute the specified program." > > When I googled that message, the links that came up had to do with > missing DLLs. So I fired up Depe

Re: "The system cannot execute the specified program."

2009-06-26 Thread Tim Slattery
Tim Slattery wrote: >Our office has a copy of Python 3.0 installed on a network share >device. When I try to run it I get this message: "The system cannot >execute the specified program." I should add that before I knew about our shared installation, I downloaded the AS distribution of Python 2.

Re: handling https sites

2009-06-26 Thread cgoldberg
> Is there any module in python to open https > sites through a proxy. yes, you can use "urllib2". from the urllib2 docs: "The default is to read the list of proxies from the environment variables" So if you have a proxy setup, it should detect it from your environment vars. If you want to spec

Re: handling https sites

2009-06-26 Thread Shawn Milochik
On Jun 26, 2009, at 12:08 PM, padfoot wrote: Sir, Is there any module in python to open https sites through a proxy.I am connectyed to the net via a proxy server and i am unable to crawl https sites. -- http://mail.python.org/mailman/listinfo/python-list Check out the "Scrape the Web" ser

MultiValueDict?

2009-06-26 Thread BarakatX2
, , ]}> for f in files['rqFiles']: print f.name This gives me an "'str' object has no attribute 'name'" error. I don't know if there is a special way to access MultiValueDicts values, but I assumed each key has a list that is accessed just like any other list. Any help is appreciated.

handling https sites

2009-06-26 Thread padfoot
Sir, Is there any module in python to open https sites through a proxy.I am connectyed to the net via a proxy server and i am unable to crawl https sites. -- http://mail.python.org/mailman/listinfo/python-list

opening a https web page

2009-06-26 Thread Addy
Dear sir, i am not being able to open "https://"; web pages using urllib2 or urllib. I am being able to open "http" pages though. i am connecting the internet through a proxy server. I am being able to open "https://"; pages if i am using an ineternet connection that does not connect thro

R-tree implemetation in python without external C_libraries

2009-06-26 Thread News123
Hi, I'd like to have a small rtree library for a small python project. ( good data structure for 2D searches ) For this mini - project I'd prefer, to have no C-library dependencies Does anyone have a small implementation which I'm allowed to use and modify, which does not use an external C-libra

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
Maybe this picture will tell you more: http://files.getdropbox.com/u/1211593/tkinter.png The original script: http://files.getdropbox.com/u/1211593/test1.py May someone can confirm this osx behaviour? 2009/6/26 Sebastian Pająk : > 2009/6/26 norseman : >> Sebastian Pająk wrote: Can, bu

Re: "The system cannot execute the specified program."

2009-06-26 Thread Tim Golden
Tim Slattery wrote: Our office has a copy of Python 3.0 installed on a network share device. When I try to run it I get this message: "The system cannot execute the specified program." To be honest, I'd look at one of the Portable Python installations, specifically designed to be run off a stic

Re: Recipes for trace statements inside python programs?

2009-06-26 Thread cassiope
On Jun 25, 1:33 am, Francesco Bochicchio wrote: > Hi all, > > as many - I think - python programmers, I find muself debugging my > scripts by placing print statements in strategic places rather than > using the python debugger, and commenting/uncommenting them according > to myy deugging needs.  A

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-26 Thread Andre Engels
On Fri, Jun 26, 2009 at 5:07 PM, Scott David Daniels wrote: > pdpi wrote: >> >> ... But since 10 = 2 * 5, all numbers that can be finitely represented in >> binary can be represented finitely in decimal as well, with the exact >> same number of  places for the fractional part (and no more digits >>

Re: naming packages for pypi

2009-06-26 Thread Aljosa Mohorovic
On Jun 26, 11:15 am, Carl Banks wrote: > Your post seems to suggest some conflating of these concepts so you > need to make it clear what you really mean. my example: when creating website example.com (django project) it contains multiple django apps which i package separately. most of websites h

Re: Py 3 slower than Py 2. Towers of Hanoi implementation

2009-06-26 Thread Paul Moore
2009/6/26 Udyant Wig : > I implemented this -> http://www.apl.jhu.edu/~hall/lisp/Hanoi.lisp in > both flavors of Python: 2.6.2 and 3.0.1 (CPython) > > The code: > #!/usr/bin/env python > def remaining_peg (peg1, peg2): >        return (6 - peg1 - peg2) > > def hanoi (num_discs, start, end): >      

"The system cannot execute the specified program."

2009-06-26 Thread Tim Slattery
Our office has a copy of Python 3.0 installed on a network share device. When I try to run it I get this message: "The system cannot execute the specified program." When I googled that message, the links that came up had to do with missing DLLs. So I fired up Dependency Walker and found out that t

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-26 Thread Scott David Daniels
pdpi wrote: ... But since 10 = 2 * 5, all numbers that can be finitely represented in binary can be represented finitely in decimal as well, with the exact same number of places for the fractional part (and no more digits than the binary representation in the integer part) OK, so base 30 is th

Re: No trees in the stdlib?

2009-06-26 Thread Stefan Behnel
Hallvard B Furuseth wrote: > Stefan Behnel writes: >> João Valverde wrote: >>> Besides some interface glitches, like returning None >>> on delete if I recall correctly. >> That's actually not /that/ uncommon. Operations that change an object are >> not (side-effect free) functions, so it's just pur

Re: Py 3 slower than Py 2. Towers of Hanoi implementation

2009-06-26 Thread Udyant Wig
On Jun 26, 7:14 pm, Stefan Behnel wrote: > Udyant Wig wrote: > > I implemented this ->http://www.apl.jhu.edu/~hall/lisp/Hanoi.lispin > > both flavors of Python: 2.6.2 and 3.0.1 (CPython) > > > The code: > > #!/usr/bin/env python > > def remaining_peg (peg1, peg2): > >    return (6 - peg1 - peg2) >

Re: No trees in the stdlib?

2009-06-26 Thread Hallvard B Furuseth
Stefan Behnel writes: >João Valverde wrote: >> Besides some interface glitches, like returning None >> on delete if I recall correctly. > > That's actually not /that/ uncommon. Operations that change an object are > not (side-effect free) functions, so it's just purity if they do not have a > retur

Re: Py 3 slower than Py 2. Towers of Hanoi implementation

2009-06-26 Thread Stefan Behnel
Udyant Wig wrote: > I implemented this -> http://www.apl.jhu.edu/~hall/lisp/Hanoi.lisp in > both flavors of Python: 2.6.2 and 3.0.1 (CPython) > > The code: > #!/usr/bin/env python > def remaining_peg (peg1, peg2): > return (6 - peg1 - peg2) > > def hanoi (num_discs, start, end): > if

Re: 3.2*2 is 9.6 ... or maybe it isn't?

2009-06-26 Thread pdpi
On Jun 26, 11:01 am, Steven D'Aprano wrote: > On Thu, 25 Jun 2009 12:41:13 -0600, Michael Torrie wrote: > > If you want accurate math, check out other types like what is in the > > decimal module: > > import decimal > a=decimal.Decimal('3.2') > print a * 3 > > 9.6 > > Not so. Decima

Py 3 slower than Py 2. Towers of Hanoi implementation

2009-06-26 Thread Udyant Wig
I implemented this -> http://www.apl.jhu.edu/~hall/lisp/Hanoi.lisp in both flavors of Python: 2.6.2 and 3.0.1 (CPython) The code: #!/usr/bin/env python def remaining_peg (peg1, peg2): return (6 - peg1 - peg2) def hanoi (num_discs, start, end): if (1 == num_discs):

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
>  in place where polish >> accented character should be (like "ęłąśł" etc) >> This problem is only on mac os x and it doesn't apply to button widget >> (where characters are correct) > > I see. So it is a font problem: if the square box is displayed, it means > that the font just doesn't have a gl

Re: seeking thru a file

2009-06-26 Thread Bruno Desthuilliers
Mag Gam a écrit : I have a compressed CSV gziped file. Then gunzip it first... I was wondering if it is possible to seek thru a file For example: I want to load the first 100 lines into an array. Process the data Seek from 101 line to 200 lines. Process the data (remove lines 0 - 100) from

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
2009/6/26 norseman : > Sebastian Pająk wrote: >>> >>> Can, but should not. >>> I read that the problem is when using the Polish language only. Otherwise >>> things work normally. Is that correct? >> >> Yes, correct >> >>> If so then byte swap may be a problem.  Using the u'string' should solve >>>

Re: seeking thru a file

2009-06-26 Thread Nils Rüttershoff
Hi Mag, Mag Gam wrote: > I have a compressed CSV gziped file. I was wondering if it is possible > to seek thru a file > > For example: > > I want to load the first 100 lines into an array. Process the data > > Seek from 101 line to 200 lines. Process the data (remove lines 0 - > 100) from memory >

Re: Python simple web development

2009-06-26 Thread bijoy franco
Hi, I am learning pylons..It seems to be very simple and flexible.. Just give a try if it seems interesting for you Thanks Bijoy On Fri, Jun 26, 2009 at 3:02 AM, Gabriel Genellina wrote: > En Thu, 25 Jun 2009 04:29:28 -0300, Private Private > escribió: > > I am looking for a python library w

Re: file transfer in python

2009-06-26 Thread Francesco Bochicchio
On 26 Giu, 13:38, jayesh bhardwaj wrote: > i am trying to find something useful in python to transfer html files > from one terminal to other. Can this be done with some module or shall > i start coding my own module using low level socket interface. If u > know about some books on this topic or a

Re: file transfer in python

2009-06-26 Thread Doron Tal
On Fri, Jun 26, 2009 at 2:38 PM, jayesh bhardwaj wrote: > i am trying to find something useful in python to transfer html files > from one terminal to other. Can this be done with some module or shall > i start coding my own module using low level socket interface. If u > know about some books on

Re: It's ...

2009-06-26 Thread Angus Rodgers
On Thu, 25 Jun 2009 18:22:48 +0100, MRAB wrote: >Angus Rodgers wrote: >> On Thu, 25 Jun 2009 10:31:47 -0500, Kirk Strauser >> wrote: >> >>> At 2009-06-24T19:53:49Z, Angus Rodgers writes: >>> print ''.join(map(detab, f.xreadlines())) >>> An equivalent in modern Pythons: >>> >> print

file transfer in python

2009-06-26 Thread jayesh bhardwaj
i am trying to find something useful in python to transfer html files from one terminal to other. Can this be done with some module or shall i start coding my own module using low level socket interface. If u know about some books on this topic or any online help then plz help. -- http://mail.pyth

Re: No trees in the stdlib?

2009-06-26 Thread Stefan Behnel
Paul Rubin wrote: > Stefan Behnel writes: >>> Besides some interface glitches, like returning None >>> on delete if I recall correctly. >> That's actually not /that/ uncommon. Operations that change an object are >> not (side-effect free) functions, so it's just purity if they do not have a >> retu

  1   2   >