Re: More About Unicode in Python 2 and 3
Chris A wrote: I'm not sure that there is an easy way. See, here's the deal. If all your data is ASCII, you can shut your eyes to the difference between bytes and text and Python 2 will work perfectly for you. Then some day you'll get a non-ASCII character come up (or maybe you'll get all of Latin-1 for free and it's when you get a non-Latin-1 character - same difference), and you start throwing in encode() and decode() calls in places. But you feel like you're fixing little problems with little solutions, so it's no big deal. Making the switch to Python 3 forces you to distinguish bytes from text, even when that text is all ASCII. Suddenly that's a huge job, a huge change through all your code, and it's all because of this switch to Python 3. The fact that you then get the entire Unicode range for free doesn't comfort people who are dealing with URLs and are I think this is important because this kind of programming, working with urls is so common and so important. whEther anyone like's it or not, python 3 makes itch harder to do this very crucial kind of programming. And dismissing-Armin's frustrations and commetncnames dozens make this problem go away. -- https://mail.python.org/mailman/listinfo/python-list
Re: More About Unicode in Python 2 and 3
I'm so sorry for the mess in my post above, I apologize to all, I accidentally hit return ... I just meant to say that internet programming using ASCII urls is so common and important that it hurts that Python 3 makes it so much harder. It sure would be great if Python 3 could be improved to allow such programming to be done using ASCII urls without requiring all the unicode overhead. Armin is right. Calling his post a rant doesn't help. -- https://mail.python.org/mailman/listinfo/python-list
Re: hello everyone! i'm a new member from China
On Jul 2, 12:50 am, Peter Otten __pete...@web.de wrote: levi nie wrote: i love python very much.it's powerful,easy and useful. i got it from Openstack.And i'm a new guy on python. Welcome! Can i ask some stupid questions in days? haha... Sure, but we cannot guarantee that the answer will be stupid, too ;) Hello and welcome, What part of China do you live in? I have visited many cities in China on business and had wonderful experiences. I think Python is kind of like the Middle Kingdom of programming languages. :-) Ron Stephens Awaretek -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
I think this is the wave of the furture for deploying simple programs to many users. It is almost 100% cross platform (can be used on desktop, smartphone, tablet, windows, linux, mac etc) and is very easy to do, even for casual non-programmers who do a little programming (such as many engineers). I think efforts to make a better, and more definitive, GUI builder for Python should focus on makigng an easy to use IDE for creating these kinds of Python-HTMl-Javascript front ends for applications. *That* would really help Python's popularity to take off and expode. Ron Stephens Replying to myself, to add this note: I just read the link likehacker.com/learn-to-code/ about Google's Blockly a drag and drop tool for building apps that outputs Python or Javascript code (among others) and it might be usable along these lines...I'm sure serious programmers would not use it but maybe engineers looking to make web front ends for data acquisition or data base apps might use it... -- http://mail.python.org/mailman/listinfo/python-list
Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)
On Jun 10, 12:37 pm, Dietmar Schwertberger maill...@schwertberger.de wrote: Personally, I prefer Python with console, wx or Qt for local applications and Python/HTTP/HTML/Javascript for multi-user database applications. Regards, Dietmar +1 I think this is the wave of the furture for deploying simple programs to many users. It is almost 100% cross platform (can be used on desktop, smartphone, tablet, windows, linux, mac etc) and is very easy to do, even for casual non-programmers who do a little programming (such as many engineers). I think efforts to make a better, and more definitive, GUI builder for Python should focus on makigng an easy to use IDE for creating these kinds of Python-HTMl-Javascript front ends for applications. *That* would really help Python's popularity to take off and expode. Ron Stephens -- http://mail.python.org/mailman/listinfo/python-list
Re: what gui designer is everyone using
On Jun 5, 7:10 am, Mark R Rivet markrri...@aol.com wrote: I want a gui designer that writes the gui code for me. I don't want to write gui code. what is the gui designer that is most popular? I tried boa-constructor, and it works, but I am concerned about how dated it seems to be with no updates in over six years. No one size fits all, and many Pythonistas prefer to write GUI code by hand anyway. However, I like PythonCard. Try it, you might like it. -- http://mail.python.org/mailman/listinfo/python-list
Re: Pushing for Pythoncard 1.0
On May 3, 12:15 pm, rnd roman.s...@gmail.com wrote: On May 2, 10:48 pm, John Henry john106he...@hotmail.com wrote: Attempt to push Pythoncard to a 1.0 status is now underway. A temporary website has been created at: http://code.google.com/p/pythoncard-1-0/ The official website continues to behttp://pythoncard.sourceforge.net/ Pythoncard is such a wonderful package that it would be a shame to allow development for the package to go stagnant. The Python community deserves to continue enjoying the simplicity of Pythoncard for creating a GUI Python application. I was very positively surprised to hear someone talking about PythonCard these days. Even though I've not needed to develop GUI apps for years, I believe its still great idea to revive PythonCard even though everybody is busy developing for iThings right now. Regards, Roman Suzi I love and use PythonCard! -- http://mail.python.org/mailman/listinfo/python-list
Re: python GUIs comparison (want)
Paul Boddie wrote: The figures behind the scenes are quite enlightening for that particular page. If you (or community experiences) don't agree with the rankings (wxPython apparently even easier to learn than PythonCard and Tinder, a bunch of Gtk-based toolkits having more or less full Linux scores) then you'll have some surprises, I'm sure. Nevertheless, it's an interesting concept. Well, I don't know what I was thinking, exactly, when I rated PythonCard's ease of use...so I went back and changed it to rate it a lot higher. The ratings in this script were done a long time ago now and I need to re-do them, and add some new categories to rate also. Maybe this weekend... I have been thinking about doing a new version of this script that allows visitors to the web site to enter their own ratings for each GUI toolkit, for each criterion, store them by CGI and calculate a running average of the ratings, maybe eliminating the very extreme high and low scores to weed out spam, etc. Then, a visitor could use an online script with each GUI toolkit rated by the community for each criterion. I could do the same for Python IDE's, web frameworks, etc. Still, these would still be toys and not to be taken too seriously, but I might do it as a little project nonetheless. Concerning GUI toolkits, I find myself coming back to Tkinter these days. A lot of Python programs are written using Tkinter. I like to fool around with a lot of the old stuff on the web for free, miscellaneous apps and such, and there are still more Tkinter GUI's out there than anything else. Recently I have been having fun figuring out which new phone to buy. I decided to get a smart phone that could run Python. If I lived in Europe, or anywhere GSM rules, one of the Nokia series 60 would be a no -brainer. But here in the USA, I will probably will wind up getting a Windows based model. Guess what: Folks have Tkinter up and running on Pocket PC's and smartphones. I like that. Tkinter is everywhere. Don't forget, the Komodo IDE has a Tk based GUI builder. Just my 2 cents worth... Ron Stephens P.S. There is a 3 hour lecture by Dr. Sergio Rey of San Diego St. U. I am putting up as a podcast. He teaches a course in Python in the graduate department of Geographical Sciences. Python is heavily used in that field of study (as is Tkinter). The lecture is in 2 parts. Sound quality is excellent. a href=http://www.awaretek.com/python/index.html;Tkinter podcasts/a -- http://mail.python.org/mailman/listinfo/python-list
Re: Talking to marketing people about Python
Roy Smith wrote: Can anybody suggest some good material I can give to him which will help explain what Python is and why it's a good thing, in a way that a marketing/product management person will understand? As a sometimes marketing droid on my day job (please don't tell anyone!) I think you should point out that, while 5-10 years ago Perl was more popular and widely used than Python, Python has been growing at a much higher rate, and by many (most?) measurements, Python is now more widely used than Perl for many types of applications. These measurements are not precise, but all of the below show Python catching or surpassing Perl today: 1. Number of newsgroup postings 2. Number of books published and sold 3. Number of universities offering courses 4. Number of commerical training courses and seminars offered 5. Number of job listings on internet job listing boards. With Python, it's all about growth; the growth rate of Python, by any of the measurements above and others too numerous to mention, is far greater than Perl's growth rate. Any marketing droid worth his salt should be impressed with high growth rates persisting over several years. ;-)) Ron Stephens www.awaretek.com/plf.html -- http://mail.python.org/mailman/listinfo/python-list
Introduction to Threading with Python, a podcast
Chris Hefele has done an excellent talk about programming with threads using Python, including a fair amount of detail and a look at various related tools and topics. Chris did a lot of research and put a lot of effort into producing this podcast. I find it to be a particularly clear and lucid explanation of the basic principles of programming with threads. This is a far better-than-normal piece of work, so I feel it is worth mentioning here so that interested people can check it out, Go to www.awaretek.com/python/index.html and just click on the top podcast in the list of podcasts there. Ron Stephens -- http://mail.python.org/mailman/listinfo/python-list
Re: Talking to marketing people about Python
Fredrik Lundh wrote: I think the use of applications here implies new applications, not applications still in use somewhere. Good point, Fredrik. I do recall that, a few years ago, I graphed the *growth rate* of new Sourceforge projects written in Python vs. the same for Perl, and it was a very clear growth trend in Python's favor; even though Perl still had more total projects because of its earlier popularity. However, I did not keep the data. Ron Stephens -- http://mail.python.org/mailman/listinfo/python-list
Re: Leave the putdowns in the Perl community, the Python world does not need them
Metaperl, Steve makes a good point. Fredrik is one of the most important contributors of Python code, tools, etc and as far as I am concerned, that is so important that it gives him the right to be cranky from tiem to time. If somebody like me were to get cranky and negative, on the other hand, that would be unacceptable. Actual production of useful code is of paramount importance ;-)) Ron Stephens -- http://mail.python.org/mailman/listinfo/python-list
Re: suggestions between these two books
Both of these books are great. Youc an't go wrong with either one. The Beginning Python has an itroduction to the language and then also some projects. Learning Python doens't have projects but is a great introduction to the language. Ron John Salerno wrote: Hi all. I'm fairly new to programming and I thought I'd like to try Python. I'm trying to decide between these two books: Learning Python (O'Reilly) Beginning Python: From Novice to Professional (APress) and I was hoping you might have some suggestions. LP seems to be a good intro, but the other was published only a month ago and covers 2.4. So one question would be, is 2.2 different enough from 2.4 to warrant getting the newer book for that reason? I might end up getting both eventually, but to start with I'm not sure which to choose. Thanks! -- http://mail.python.org/mailman/listinfo/python-list
TurboGears the Podcast
Can be found at http://www.awaretek.com/python/index.html -- http://mail.python.org/mailman/listinfo/python-list
Re: Creating Palm OS programs with python?
Hello Peter, There are some links to Python on Palm web resources at my a href=http://www.awaretek.com/pymo.html;Python for Mobile Devices/a page. The only mobile device I have personnally run Python on is the Zaurus, which works great. I will try to post links to just the Python on Palm resources below, but these can all be found on my site as well as Pythonic links for Zaurus, Pocket PC, Nokia Series 60, iPod, iRiver, etc bigbia name = palmPalm/a/i/bbrbr/big ba href=http://pyar.decode.com.ar/Members/ltorre/PythonPalm;Python for Palm Operating System/a/b BR2.3.2 from Argentina BRbr ba href=http://pippy.sourceforge.net/;Pippy, Python for the Palm PDA Platform/a/b BR BR ba href=http://www-106.ibm.com/developerworks/linux/library/l-pippy.html?t=gr,p2=Python4PalmOS;Python for the Palm OS/a/b BR an old article but helpful for getting startedBRbr ba href=http://www.pyrite.org/ Pyrite/a/bbra comprehensive set of modules which allow access to Palm Computing platform devices and their data via Python. It includes APIs for transparent database access, records as Python objects, conduits, and plug-ins for extensability. Pyrite was formerly known as PalmPython. BR BR ba href=http://c2.com/cgi/wiki?PalmPython;Palm Python Wiki/a /b BRbrbr Peter Hansen wrote: [EMAIL PROTECTED] wrote: QUick question: Is it possible to create a palm os program to use on a PDA with python? Practically speaking, no. I did find it relatively easy to install and learn enough of Plua to write a useful app for my old Palm V, however, and Lua isn't so far from Python that you feel like you've travelled to a foreign country to do it. -Peter -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Newbie
You might want to take a look at my page listing over 200 pythonic tutorials by category. http://www.awaretek.com/tutorials.html linuxfreak wrote: Hi all, I came accross this article by Eric Raymond in which he has sung peans about the python language. Well that has whetted my appetite... So I decided to get down and dirty. But alas I got down but not dirty.. i cant seem to find a good tutorial to help me get started. Whats the next best thing to do? Ask the pros and where do you find them...in a mailing list of course. So heres me asking if anyone has any pointers to some good basic python tutorial. Something that teaches one to get going. Thanks a ton guys, Linuxfreak -- http://mail.python.org/mailman/listinfo/python-list
Re: a new Python Podcast series (and the use of Python in creating podcasting tools)
I'd love to get some guest lectures from advanced folks, and interviews with prominent Pythonista people etc. Ron -- http://mail.python.org/mailman/listinfo/python-list
a new Python Podcast series (and the use of Python in creating podcasting tools)
Python411 is a series of podcasts about Python, aimed at hobbyists and others who are learning Python. Each episode focuses on one aspect of learning Python, or one kind of Python programming, and points to online tools and tutorials. Python related news and events will also be reported upon. This podcast series will probably not be of much interest to expert or professional programmers. I am a hobbyist and am not qualified nor capable of creating a podcast series for accomplished programmers. Maybe someone else will do that. The four podcasts so far are titled as such: Introduction to Python Computer Programming for Everybody GUI toolkits for Python Python for Mobile Devices New podcasts will appear from time to time. Interestingly, while on the subject of podcasts, I would like to point out that Python is emerging as the programming language of choice for creating tools for creating podcasts and using podcasts. For instance, iPodder is the leading podcast aggregator, or podcatcher, and is written in Python. Also, a new program called Podcatcher on a Stick is an open source Python project that is creating a podcatcher that runs on a mobile mp3 player itself, rather than on a PC. Links to these programs can be found on my web site. The home page for Python411 is http://www.awaretek.com/python/index.html and one can click on the podcasts there to play them, or better you can subscribe to an rss feed at http://www.awaretek.com/python/index.xml -- http://mail.python.org/mailman/listinfo/python-list
Re: Looking for Image, Audio and Internet/Web HOTWO's or tutorials
try looking at http://www.awaretek.com/tutorials.html -- http://mail.python.org/mailman/listinfo/python-list
Re: Can you introduce some book about python?
You m,igth try my page of Python Book reviews at http://www.awaretek.com/book.html Ron Stephens fdsl ysnh wrote: --- [EMAIL PROTECTED]: Send Python-list mailing list submissions to python-list@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/python-list or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than Re: Contents of Python-list digest... Today's Topics: 1. Re: appending key-value pairs to a dict (Peter Hansen) 2. Re: Is Python suitable for a huge, enterprise size app? (Paul Rubin) 3. Re: appending key-value pairs to a dict (Brian Beck) 4. Re: Comparing 2 similar strings? (Skip Montanaro) 5. Re: Is Python suitable for a huge, enterprise size app? (Paul Rubin) 6. Re: buffer_info error ([EMAIL PROTECTED]) 7. Re: appending key-value pairs to a dict (James Stroud) 8. From the call hook, how do I know more precisely what is called? (Vijay Kumar) 9. Re: PyGame and Rotozoom (Sorry if OT) (Lee Harr) 10. Re: buffer_info error (Jp Calderone) 11. Re: appending key-value pairs to a dict (Roy Smith) 12. Re: Is Python suitable for a huge, enterprise size app? (Dave Brueck) 13. Re: Process monitoring (John Abel) : Peter Hansen [EMAIL PROTECTED] : python-list@python.org : Fri, 20 May 2005 16:12:17 -0400 : Re: appending key-value pairs to a dict rbt wrote: I know how to setup an empty list and loop thru something... appending to the list on each loop... how does this work with dicts? I'm looping thru a list of files and I want to put the file's name and its sha hash into a dict on each loop. Whereas with a list you would call append in the loop, with a dictionary you simply use an indexed-assignment type of access: mydict = {} for filename in some_list_of_filenames: hash = sha.sha(open(filename).read()).hexdigest() # or whatever mydict[filename] = hash -Peter : Paul Rubin http://[EMAIL PROTECTED] : python-list@python.org : 20 May 2005 13:12:50 -0700 : Re: Is Python suitable for a huge, enterprise size app? Dave Brueck [EMAIL PROTECTED] writes: One thing from your experience that did resonate with me is that, except for ftplib and occasionally urllib (for basic, one-shot GETs), we don't use any of the standard library's protocol modules - partly because we had to implement our own HTTP libraries for performance and scalability reasons anyway, and partly because we had trouble figuring out e.g. all the ins and outs of urllib/urllib2/httplib. What do you use for HTTPS? And did you use the Cookie module in your HTTP servers? You may have had problems without even being aware of them (until recently if you used Cookie with its default settings, any attacker could completely take over your server by sending you carefully concoted cookies). I'm not trying to be contentious here, just mentioning a couple further cases of where problems aren't visible from far away but are there when you look close. : Brian Beck [EMAIL PROTECTED] : python-list@python.org : Fri, 20 May 2005 16:14:17 -0400 : Re: appending key-value pairs to a dict rbt wrote: I know how to setup an empty list and loop thru something... appending to the list on each loop... how does this work with dicts? I'm looping thru a list of files and I want to put the file's name and its sha hash into a dict on each loop. Like so: d = {} for filename in files: d[sha_func(filename)] = filename Or like so: d = dict([(sha_func(filename), filename) for filename in files]) -- Brian Beck Adventurer of the First Order : Skip Montanaro [EMAIL PROTECTED] : python-list@python.org : Steve Holden [EMAIL PROTECTED] : Fri, 20 May 2005 15:16:49 -0500 : Re: Comparing 2 similar strings? Steve (is this the same as 'Conchobar'?) No, that's a trendy pub in Key West... wink Skip : Paul Rubin http://[EMAIL PROTECTED] : python-list@python.org : 20 May 2005 13:15:48 -0700 : Re: Is Python suitable for a huge, enterprise size app? Fredrik Lundh [EMAIL PROTECTED] writes: this has been reported before, and it won't get fixed (unless you're volunteering to add Python-compatible garbage collection to Tk, that is). Yeah, I think I understand what the issue is. I can think of some kludgy possible fixes but I assume they've been thought about already and rejected. The workaround of making the application save an extra reference isn't too bad, but all relevant docs that say anything about these images should mention
Re: Python Cookbook
I want to just second this comment by Heike. I received my copy of the 2nd Edition from O'Reilly on Friday. I am still working my way slowly through the first chapter on Text, and I am nearing the end of that chapter. I intend to work my way through sequentially, because I can't think of a better way to improve my understanding of intelligent usage of Python. So far, even the recipes and discussions that are reach-out and difficult for me are beginning to make sense after I read carefully and sometimes re-read the discussions. I couldn't ask for better instruction, and the effort I make to learn is richly rewarded. I know that the material will become considerably more complex as I move deeper into the book, but the work of the authors and editors in chapter one gives me faith that I can make progress as I go, as long as I make the effort to really try to understand each recipe's discussion. This will no doubt be a valued reference work, but I am finding it to be a uniquely rewarding educational experience. Ron Stephens www.awaretek.com/plf.html -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Cookbook, 2'nd. Edition is published
Hello Larry, I don't have my copy yet. Can you give any guidance on how the 2'nd edition compares to the 1'st edition? At 844 pages, it seems to be 250+ pages bigger than the 1'st Ed. How much of the book is new, and does it use the same chapter headings? Ron Stephens Someone else asked a similar questiosn in another thread, I copy it here.. Is the second edition of the Python Cookbook worth getting if you have the first edition? How much new material is there in the 2nd edition? Thanks, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list
Python Cookbook, 2'nd. Edition is published
See http://www.oreilly.com/catalog/pythoncook2/index.html I don't see it on Amazon yet, but you can order it from O'Reilly. Ron Stephens www.awaretek.com -- http://mail.python.org/mailman/listinfo/python-list
133+ Tutorials and counting...
..and there are more seemingly every day... Table of Contents Beginners (12) Database (6) Extending and Embedding (4) General and Advanced (15) Grimoire (1) GUI Programming: General and Miscellaneous (6) GUI Programming: Tkinter (4) GUI Programming: wxPython and PythonCard (7) GUI Programming: pyGTK and Gnome (6) GUI Programming: QT and KDE (1) HTML and XML (9) IDE's and Editors (4) Internet, CGI, and Web Frameworks (9) Jython (5) Mac and Apple (8) Math, Science, Physics and Bioinformatics (10) Microsoft Windows (6) Objects, Metaclasses and Introspection (3) References (8) Specific Topics including Sorting, Threads, RE, Curses, OpenOffice, RDF, ZeroConf, Console, Flash, Doxygen and PiPy(12) Testing, Test Driven Progamming, Unit Test (2) Unicode (2) at www.awaretek.com/tutorials.html -- http://mail.python.org/mailman/listinfo/python-list
pyGoogle is fun and easy to use, and thinks Python is the best programming language
I am having a lot of fun using the pyGoogle module ( http://pygoogle.sourceforge.net/ ) that uses the Google API. It is about as easy to use as I can imagine, and it is a lot nicer than using my old HTMl screen scraping habits. My online CGI program Ask Merlin at www.awaretek.com/askmerlin.html is an example. Currently, the program takes any user's question and picks the best answer from amongst the possible answers given by the user. The program uses an algorithm that uses an intelligent analysis of search results from Google. OK, OK, I know already, that this is of limited utility compared to answering any question without requiring the user to give options to choose from; and, furthermore i know full well that at this point Merlin is far from foolproof even when given options to choose amongst. Still, if you play with it for a while you will be amazed at how well it does do. Moreover, I am hard at work on a version that will answer any question without being given options, by choosing options from Google search results that are most appropriate and then applying my intelligent algorithm. But hey, even as it stands, when queried which is the best programming language to use for ease of use, Merlin picks Python from amongst a list of python, ruby, ADA and java. When queried which language is the best programming language to use for a large project requiring realtime operation and involving life and death issues of human life, Merlin picks ada out of the same list. And, when just plain asked what is the best programming language Merlin wisely picks Python from the list. And I assure you that none of this is hard coded but instead just uses the regular algorithm applied to any other question ;- OK, it's just a fun little hack by a very amateurish hacker; but that's sort of the point. Just think what a good programmer could do with pyGoogle ;- -- http://mail.python.org/mailman/listinfo/python-list