Scalpel Audio Editor 0.8.0
Scalpel is an audio editor for Linux written in Python. It aims at providing a simple-to-use and easy-to-extend audio editor. Sound hackers, get started translating your Matlab routines into Python/Numpy functions! Scalpel uses PyGTK for the user interface, Numpy for the internal processing, ALSA for the audio playing and libsndfile for reading and writing files. A minimal part of the code is written in Cython for better performance. Scalpel still has some rough edges but is quite usable. Try it now and be sure to send your feedback. Links: * Homepage: http://scalpelsound.online.fr * Source: http://gitorious.org/scalpel * Pypi: http://pypi.python.org/pypi/scalpel -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Re: position independent build of python
On Dec 3, 5:05 pm, de...@web.de (Diez B. Roggisch) wrote: erikj tw55...@gmail.com writes: If my understanding is correct, the sys.prefix variable holds the root directory python uses to find related files, and eg its site-packages. the value of sys.prefix is specified at compile time. it seems that on windows, when I build/install python at one location, and later move it to another location, python will find all its needs relative to the new location. That's indeed a good idea, I will investigate it. But if this works, I still need some kind of wrapper around python itself... however, when I do the same on linux, python keeps looking for its dependencies in the build location. is there a possibility to have it always look at a position relative to the location of the executable ? the goal is to be able to build python on one machine, and then simply copy the build tree to other machines at other locations. Maybe looking at virtualenv, especially with the --no-site-packages variable set gives you a hint. AFAIK there are some hard-coded paths involved, but not inside compiled code. Maybe you can remedy that somehow. Diez -- http://mail.python.org/mailman/listinfo/python-list
PIL how to enlarge image
Hi, I try to enlarge original image. I have image in size: 100x100 and I want to make it 120x120. But resize() doesn't make it bigger. Is there any method for that? -- http://mail.python.org/mailman/listinfo/python-list
Re: import module doesn't work for new package
goldtech wrote: I tried install a Python - would the word be package? - on Ubuntu 10.10. Could you tell me how to fix? I would be grateful, is it a path problem? Thanks. Lee If you are talking about http://paul.giannaros.org/pykhtml/ , this package requires kde3 while you are /probably/ running kde4. gi...@giga1:~/Desktop/pykhtml-0.2$ sudo python setup.py install [sudo] password for giga1: running install running build running build_py creating build creating build/lib.linux-i686-2.6 creating build/lib.linux-i686-2.6/pykhtml copying pykhtml/dom.py - build/lib.linux-i686-2.6/pykhtml copying pykhtml/__init__.py - build/lib.linux-i686-2.6/pykhtml running install_lib running install_egg_info Removing /usr/local/lib/python2.6/dist-packages/PyKHTML-0.2.egg-info Writing /usr/local/lib/python2.6/dist-packages/PyKHTML-0.2.egg-info then: import pykhtml Traceback (most recent call last): File stdin, line 1, in module File pykhtml/__init__.py, line 3, in module import khtml, kdecore, kdeui, kio, dcopext ImportError: No module named khtml This would become from PyKDE4 import khtml, kdecore, kdeui, kio in KDE4, but there are /probably/ API changes. DCOP which is /probably/ what dcopext provides has been replaced with dbus. Given these changes and the fact that pykhtml development has stopped in early 2008 you'd /probably/ have to put in a lot of effort to make it work with your current desktop environment. -- http://mail.python.org/mailman/listinfo/python-list
Re: PIL how to enlarge image
robos85 prog...@gmail.com writes: Hi, I try to enlarge original image. I have image in size: 100x100 and I want to make it 120x120. But resize() doesn't make it bigger. Is there any method for that? You have to use i.transform() -- Alain. -- http://mail.python.org/mailman/listinfo/python-list
A web site using Python
I would like to design a web site that can be used to help people to find a cat that they can adopt. Note, this is a non-profit project, but one that I believe to be quite important. Here are some of my initial thoughts on this project. /Site purpose:/ *To provide a web site for anyone to look at information on cats at this home, and how they can adopt one or more of these homeless cats.* /Some features of the site:/ 1. A cat database that I as the web site designer would create. This database would contain an entry for each cat available for adoption. It would include such things as the name, sex, age, paths to image(s) and/or video(s) of the cat, health status, etc (see below). 2. Anyone accessing this site should be able to easily navigate around it and to examine entries in this database. The client (designated person at the home where the cats are kept for adoption) would be given privileges to modify the database (add, delete, and modify entries). The user interface for the client to update the database should be very easy to use. This GUI provided to the client for modification of the database would be written in Python. 3. There would be no inputs to this web site. There would be an embedded link for a potential customer to send an email to the responsible person (bringing up their email client). 4. Track number of visitors to the site. /Preliminary notes on the database/ Fields: - ID code (key) - Name - Sex (M / F) - Neutered / Not neutered - Age (estimated) - Type (breed) - Tagged (chip or ear marking)/ Not tagged - Checked In date (yy/mm/dd) - Checked Out date (yy/mm/dd) - Status (needs home / has home) - Social state (1,2,3,4,5) - Health state (1,2,3,4,5) - Companion state (1,2,3,4,5) - Image (file name) % multiple files allowed - Video (file name) % multiple files allowed - Medical/vet data (text on vaccinations, etc.) - General information (text on cat that includes comments, observations, etc.) --- Notes on database: * state = 1, Best 5, Worst Examples: Social state = 5, very unfriendly, afraid, etc. 3, can touch if careful 1, very friendly, unafraid Health state = 5, not in good health (e.g. infection) 3, only minor health problems 1, in very good health Companion state = 5, must have another cat or cats as company 3, could be with other cat(s) company 1, does not need the company of another cat Now, with this initial information (granted this is very rough), my question: *How, armed with Python 2.6 (or 2.7) and all of the Python packages available, should I attack the problem of getting this web site up and running on a Windows platform?* Please keep in mind that do have some experience with Python and HTML; but, this would be my first web site project using Python. Any suggestions, study plan, references, etc. would be welcomed. --V -- http://mail.python.org/mailman/listinfo/python-list
Re: class attribute confusion
Am 03.12.2010 23:11, schrieb Arnaud Delobelle: OANprogramm...@toomuchcookies.net writes: Hi, i was having a problem with class attributes initiated outside of __init__. This code is a demonstration of what i mean: class A(): mylist = [] def __init__(self): self.mylist.append(1) pass class B(A): def __init__(self): A.__init__(self) self.mylist.append(2) v = A() print 'v:',v.mylist x = B() print 'x:',x.mylist y = B() print 'y:',y.mylist z = A() print 'z:',z.mylist print 'v:',v.mylist I would expect the following result: v: [1] x: [1, 2] y: [1, 2] z: [1] v: [1] Who wouldn't, right? But actually python 2.6(.6) gives me the following result: v: [1] x: [1, 1, 2] y: [1, 1, 2, 1, 2] z: [1, 1, 2, 1, 2, 1] v: [1, 1, 2, 1, 2, 1] The four variables v,x,y and z now actually share the same 'mylist'!! To get the correct results, i have to initialize 'mylist' inside of the __init__ method! Yes. See below. I think this behaviour is totally wrong, since it seems A.__init__(self) is changing the value inside of A() not inside of the object variable 'self' (that should be x or y)!! It's not wrong at all. You expect mylist to behave as an instance attribute, but you defined it as a class attribute. Instance attributes are naturally initialised in the __init__() method. Could you please point me to a reference in the doc?? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list
Re: class attribute confusion
On Sat, 04 Dec 2010 15:00:43 +0100, Omar Abo-Namous wrote: I think this behaviour is totally wrong, since it seems A.__init__(self) is changing the value inside of A() not inside of the object variable 'self' (that should be x or y)!! It's not wrong at all. You expect mylist to behave as an instance attribute, but you defined it as a class attribute. Instance attributes are naturally initialised in the __init__() method. Could you please point me to a reference in the doc?? http://docs.python.org/reference/datamodel.html In the section about classes: Class attribute assignments update the class’s dictionary ... and in the section about class instances: Attribute assignments and deletions update the instance’s dictionary, never a class’s dictionary. In this specific example, you also have to realise that mylist.append() mutates the list in place, and doesn't create a new list. It doesn't matter whether the list comes from a global variable, a local variable, an instance attribute or a class attribute, append is always an inplace operation. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: A web site using Python
I am working on a tool that can create an application like that without write server code, but the system is write in Python3.1 On Dec 4, 2010 9:32am, Virgil Stokes v...@it.uu.se wrote: I would like to design a web site that can be used to help people to find a cat that they can adopt. Note, this is a non-profit project, but one that I believe to be quite important. Here are some of my initial thoughts on this project. Site purpose: To provide a web site for anyone to look at information on cats at this home, and how they can adopt one or more of these homeless cats. Some features of the site: 1. A cat database that I as the web site designer would create. This database would contain an entry for each cat available for adoption. It would include such things as the name, sex, age, paths to image(s) and/or video(s) of the cat, health status, etc (see below). 2. Anyone accessing this site should be able to easily navigate around it and to examine entries in this database. The client (designated person at the home where the cats are kept for adoption) would be given privileges to modify the database (add, delete, and modify entries). The user interface for the client to update the database should be very easy to use. This GUI provided to the client for modification of the database would be written in Python. 3. There would be no inputs to this web site. There would be an embedded link for a potential customer to send an email to the responsible person (bringing up their email client). 4. Track number of visitors to the site. Preliminary notes on the database Fields: - ID code (key) - Name - Sex (M / F) - Neutered / Not neutered - Age (estimated) - Type (breed) - Tagged (chip or ear marking)/ Not tagged - Checked In date (yy/mm/dd) - Checked Out date (yy/mm/dd) - Status (needs home / has home) - Social state (1,2,3,4,5) - Health state (1,2,3,4,5) - Companion state (1,2,3,4,5) - Image (file name) % multiple files allowed - Video (file name) % multiple files allowed - Medical/vet data (text on vaccinations, etc.) - General information (text on cat that includes comments, observations, etc.) --- Notes on database: * state = 1, Best 5, Worst Examples: Social state = 5, very unfriendly, afraid, etc. 3, can touch if careful 1, very friendly, unafraid Health state = 5, not in good health (eg infection) 3, only minor health problems 1, in very good health Companion state = 5, must have another cat or cats as company 3, could be with other cat(s) company 1, does not need the company of another cat Now, with this initial information (granted this is very rough), my question: How, armed with Python 2.6 (or 2.7) and all of the Python packages available, should I attack the problem of getting this web site up and running on a Windows platform? Please keep in mind that do have some experience with Python and HTML; but, this would be my first web site project using Python. Any suggestions, study plan, references, etc. would be welcomed. --V -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On 12/2/2010 11:42 PM, Harishankar wrote: One of the reasons why I feared to do this is because I need to know each and every exception that might be thrown by the function and litter my top-level code with too many exception handlers. You appear to be suffering from the delusion that all exceptions must be caught and handled. This is far from being the case. But still, better to have your top-level code littered with exception handlers than to have your functions littered with if statements. Quite often it's impossible for the function to know what needs to be done when a specific conditions arises, in which case (presumably) you have to return some error code and test for that ... regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
You appear to be suffering from the delusion that all exceptions must be caught and handled. This is far from being the case. But still, better to have your top-level code littered with exception handlers than to have your functions littered with if statements. Of course not. But going by the replies here, it appears that Python has made exceptions as the norm for error handling which is ironical considering the meaning of the word exception. I find a bit cumbersome that exceptions are advocated for certain conditions which can be sanely worked around in the application's logic and even avoided, rather than waiting for them to get caught and providing an unsatisfactory result. Quite often it's impossible for the function to know what needs to be done when a specific conditions arises, in which case (presumably) you have to return some error code and test for that ... Not necessarily. I wasn't talking about low-level or built-in exceptions. I was talking about using exceptions in my programming where often the function is reasonably confident of the kind of errors it is likely to incur. I did not start this as a criticism of Python's exceptions as such. I just expressed my personal aversion to using them in my own code. However, in my next project I have started using exceptions and will keep an open mind on how it turns out. So far it doesn't seem too bad. regards Steve -- Harishankar (http://harishankar.org http://lawstudentscommunity.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On Sat, 4 Dec 2010 17:07:45 + (UTC) Harishankar v.harishan...@gmail.com wrote: Of course not. But going by the replies here, it appears that Python has made exceptions as the norm for error handling which is ironical considering the meaning of the word exception. I find a bit cumbersome that exceptions are advocated for certain conditions which can be sanely worked around in the application's logic and even avoided, rather than waiting for them to get caught and providing an unsatisfactory result. It just seems to me that you have a semantic issue rather than a technical one. If the word exception was replaced by check or something else would that make the process easier to swallow? try: somefunc() check ValueError: handle_error() Whatever it's called it's just flow control. Quite often it's impossible for the function to know what needs to be done when a specific conditions arises, in which case (presumably) you have to return some error code and test for that ... Not necessarily. I wasn't talking about low-level or built-in exceptions. I was talking about using exceptions in my programming where often the function is reasonably confident of the kind of errors it is likely to incur. I did not start this as a criticism of Python's exceptions as such. I just expressed my personal aversion to using them in my own code. However, in my next project I have started using exceptions and will keep an open mind on how it turns out. So far it doesn't seem too bad. Open minds are good. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list
Print recent CGI error
I have a serious error that causes the process to crash. Apache refuses to log the error and it only happens on the server, not on the dev machine. Problem is, I can't figure out how to get the most recent error. I can find all sorts of pages telling how to print a specific error, but how to get an unknown error: Here is where I am: NowCookie.load(savedCookie) try: savedCookie=NowCookie['Sectrum'].value # PROCESS CRASHES HERE except: print(Content-type:text/html\n\n) print(???) # PRINT WHATEVER ERROR OCCURRED quit() There must be something so simple I am missing... This is Python 3. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list
Re: Google AI challenge: planet war. Lisp won.
small Pox smallpox...@gmail.com writes: Gábor wrote a blog about it herehttp://quotenil.com/Planet-Wars-Post-Mortem.html http://presstv.ir/detail/153770.html It is said in the protocols to corrupt the minds of the GOYIM by alcohol gambling games - pornography adulteries sex Yeah, riiight. So it's a crime to have any fun in life, right? Go get a life. -- Benjamin L. Russell -- http://mail.python.org/mailman/listinfo/python-list
Backup postgresql database from python
Hi, I need to backup a postgresql database from python withour using pg_dump! Is any way of doing that? Thank you in advance for your help. Zorze -- http://mail.python.org/mailman/listinfo/python-list
Re: Backup postgresql database from python
On Sat, 4 Dec 2010 19:12:08 + starglider develop starglider@gmail.com wrote: I need to backup a postgresql database from python withour using pg_dump! Is any way of doing that? Probably. I guess the first question is why can't you use pg_dump? That might give us a clue as to the requirements. Any other details would be good too. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list
Re: Print recent CGI error
I've sometimes got similar situations in CGI, that turned out to be because of a syntax error that kept apache from being able to run the script. What if you just run the script at the command line? It should either error out due to lack of a CGI environment/arguments, but hopefully it'll give you an error message that'll be useful. Also, you might be able to get some mileage out of finding out what env vars and command line options are being passed, and running from the command line with those. On Sat, Dec 4, 2010 at 10:33 AM, Gnarlodious gnarlodi...@gmail.com wrote: I have a serious error that causes the process to crash. Apache refuses to log the error and it only happens on the server, not on the dev machine. Problem is, I can't figure out how to get the most recent error. I can find all sorts of pages telling how to print a specific error, but how to get an unknown error: Here is where I am: NowCookie.load(savedCookie) try: savedCookie=NowCookie['Sectrum'].value # PROCESS CRASHES HERE except: print(Content-type:text/html\n\n) print(???) # PRINT WHATEVER ERROR OCCURRED quit() There must be something so simple I am missing... This is Python 3. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Print recent CGI error
On 04/12/2010 18:33, Gnarlodious wrote: I have a serious error that causes the process to crash. Apache refuses to log the error and it only happens on the server, not on the dev machine. Problem is, I can't figure out how to get the most recent error. I can find all sorts of pages telling how to print a specific error, but how to get an unknown error: Here is where I am: NowCookie.load(savedCookie) try: savedCookie=NowCookie['Sectrum'].value # PROCESS CRASHES HERE except: print(Content-type:text/html\n\n) print(???) # PRINT WHATEVER ERROR OCCURRED quit() There must be something so simple I am missing... This is Python 3. You could try something like: import traceback NowCookie.load(savedCookie) try: savedCookie=NowCookie['Sectrum'].value # PROCESS CRASHES HERE except: print(Content-type:text/html\n\n) traceback.print_exception(*sys.exc_info()) # PRINT WHATEVER ERROR OCCURRED quit() -- http://mail.python.org/mailman/listinfo/python-list
Re: Google AI challenge: planet war. Lisp won.
Yeah, riiight. So it's a crime to have any fun in life, right? Go get a life. -- Benjamin L. Russell +1 -- http://mail.python.org/mailman/listinfo/python-list
Re: Print recent CGI error
What you posted doesn't work, I don't know why. All I get is a blank page and no Apache error report. There are two problems with this. I am really trying to figure out how to trap an error on the server without exposing my innards to the world, which import cgitb; cgitb.enable() does. The other problem is that no traceback seems to play well with a try-except block. I guess I am forced to use one or the other, but not both. What I really wanted to do is display any error in a simple error statement. This is probably a KeyError, but how am I to know? There must be some way to print a dump of the current thread before it deallocates. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list
Re: Print recent CGI error
On 04/12/2010 21:13, Gnarlodious wrote: What you posted doesn't work, I don't know why. All I get is a blank page and no Apache error report. There are two problems with this. I am really trying to figure out how to trap an error on the server without exposing my innards to the world, which import cgitb; cgitb.enable() does. The other problem is that no traceback seems to play well with a try-except block. I guess I am forced to use one or the other, but not both. What I really wanted to do is display any error in a simple error statement. This is probably a KeyError, but how am I to know? There must be some way to print a dump of the current thread before it deallocates. Double-check what version of Python is on the server. See if you can write the traceback to a file on the server which you can then download. -- http://mail.python.org/mailman/listinfo/python-list
Re: Unknown function operation deciphering, exercise in readability by program reasoning
In article 46365e1d-42d8-4b3b-8e69-941472467...@u25g2000pra.googlegroups.com, small Pox smallpox...@gmail.com wrote: Rules : No need to add any additional hurdles -- the code as presented is thoroughly unreadable by humans. @1@ No execution of the function, only checking syntax What about desk checking (a lost art from the oldene dayes)? @2@ No profiling using a debugger or profiler @3@ Editing allowed to make simpler variables Maybe if you had done that yourself before posting it then I would have tried to understand it. As it is, no way. (defun unknown-function (nano-thermite-911-FBI-fat-per-diem-bustards- kept-their-odious-mouth-shut-on-anthrax-and-911-lie) (let (BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY-NEOCONS- PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI-MURDERERS I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) (while (or I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- SPEECH-ON-KHAZARS nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie) (if nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- odious-mouth-shut-on-anthrax-and-911-lie (if (consp nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie) (setq I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- SPEECH-ON-KHAZARS (cons (cdr nano-thermite-911-FBI-fat-per-diem- bustards-kept-their-odious-mouth-shut-on-anthrax-and-911-lie) I-AM-THE-WITNESS-DOT-COM-has-MR- BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie (car nano-thermite-911- FBI-fat-per-diem-bustards-kept-their-odious-mouth-shut-on-anthrax- and-911-lie)) (setq BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY- NEOCONS-PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI- MURDERERS (cons nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- odious-mouth-shut-on-anthrax-and-911-lie BERNARD-MADOFF-PHILIP-MARKOFF- MIKHAIL-KHODORKOVSKY-NEOCONS-PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE- KATSEV-MOSSAD-DUBAI-MURDERERS) nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie nil)) (setq nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- odious-mouth-shut-on-anthrax-and-911-lie (car I-AM-THE-WITNESS-DOT-COM- has-MR-BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN-SPEECH- ON-KHAZARS (cdr I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- SPEECH-ON-KHAZARS BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY-NEOCONS-PAUL- WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI-MURDERERS)) -- --- | BBBb\ Barbara at LivingHistory stop co stop uk | B B aa rrr b | | BBB a a r bbb |Quidquid latine dictum sit, | B B a a r b b |altum videtur. | BBBaa a r bbb | - -- http://mail.python.org/mailman/listinfo/python-list
3 Sr. Mac OS X Developer Position - West End Toronto, ON (Urgently needed)
Here’s the details of a job opportunity I may have for any of you or someone you may know. Below is the job description. Please send me a copy of your resume in word format and state the best time I can give you a call. Please feel free to pass it on to anyone whom you think may fit in the profile as there are currently three (3) openings for this position. It is a full time permanent position with an attractive compensation package. Email me at: lakes...@mtmstaffing.com SENIOR MAC OS X DEVELOPER Our client is an innovative software consumer products company with advanced media mobility solutions; allowing users to view their content incomparably experience seamless media mobility. Job Summary: As a Senior MAC OS X Developer, you are an integral member of a team of talented software and systems engineers committed to developing world-class embedded STB software solutions for the digital-TV, consumer electronics, IPTV, cable and broadcasting industries. Job Responsibilities: ·Design and development of iOS application software, with the further goal of using core technologies from the iOS application in a Mac OS X application. ·User interface design and development ·Coordination with human interface specialists ·Re-factoring components to insure proper Cocoa design patterns ·Working with Quality Assurance team on issue identification and resolution ·Testing implementing multimedia/networking products with a primary focus iPhone ·Writes debugs multi-threaded applications ·Works closely with team members to quickly diagnose and resolve problems Requirements: ·Bachelors degree or higher in a technical discipline, (e.g.: Computer Science or Electrical Engineering etc) ·Established MAC OS, iPhone iPad development Experience ·Experience in digital video, audio, cable and/or broadcasting industry ·Minimum 5 Years experience in Objective-C, Cocoa, XCode, Interface Builder, C/C++ on Mac OS X systems (iPhone OS development alone does not qualify) ·Detail oriented, with strong analytical, problem solving and troubleshooting skills ·Networking Experience ·Excellent verbal and written communication -- http://mail.python.org/mailman/listinfo/python-list
Which non SQL Database ?
Hello all. Newbie question. Sorry. As part of my process to learn python I am working on two personal applications. Both will do it fine with a simple structure of data stored in files. I now there are lot of databases around I can use but I would like to know yoor advice on what other options you would consider for the job (it is training so no pressure on performance). One application will run as a desktop one,under Windows, Linux, Macintosh, being able to update data, not much, not complex, not many records. The second application, running behind web pages, will do the same, I mean, process simple data, updating showing data. not much info, not complex. As an excersice it is more than enough I guess and will let me learn what I need for now. Talking with a friend about what he will do (he use C only) he suggest to take a look on dBase format file since it is a stable format, fast and the index structure will be fine or maybe go with BD (Berkley) database file format (I hope I understood this one correctly) . Plain files it is not an option since I would like to have option to do rapid searches. What would do you suggest to take a look? If possible available under the 3 plattforms. Thanks in advance for your comments. Jorge Biquez -- http://mail.python.org/mailman/listinfo/python-list
Re: Backup postgresql database from python
On Dec 4, 2010, at 2:32 PM, D'Arcy J.M. Cain wrote: On Sat, 4 Dec 2010 19:12:08 + starglider develop starglider@gmail.com wrote: I need to backup a postgresql database from python withour using pg_dump! Is any way of doing that? Probably. I guess the first question is why can't you use pg_dump? That might give us a clue as to the requirements. Excellent point. No offense to the OP, but this isn't really a Python question. You could re-implement pg_dump in Python, Javascript, or any language you like and you'd have your solution. That's probably not what you were looking for though. As D'Arcy said, the first thing to establish is why you want to avoid pg_dump. Another important question is whether or not you expect the database to be in use while you're doing backups. bye Philip -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
Jorge Biquez jbiq...@icsmx.com writes: Hello all. Newbie question. Sorry. As part of my process to learn python I am working on two personal applications. Both will do it fine with a simple structure of data stored in files. I now there are lot of databases around I can use but I would like to know yoor advice on what other options you would consider for the job (it is training so no pressure on performance). One application will run as a desktop one,under Windows, Linux, Macintosh, being able to update data, not much, not complex, not many records. The second application, running behind web pages, will do the same, I mean, process simple data, updating showing data. not much info, not complex. As an excersice it is more than enough I guess and will let me learn what I need for now. Talking with a friend about what he will do (he use C only) he suggest to take a look on dBase format file since it is a stable format, fast and the index structure will be fine or maybe go with BD (Berkley) database file format (I hope I understood this one correctly) . Plain files it is not an option since I would like to have option to do rapid searches. What would do you suggest to take a look? If possible available under the 3 plattforms. Have you considered sqlite3? It is part of the Python standard library. It'll work under GNU/Linux, Windows and Mac OSX. For more details see: http://docs.python.org/library/sqlite3.html -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
I use sqlite3, it is fairly simple, fast and not too strict. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list
Re: [Tutor] Which non SQL Database ?
On Sat, Dec 4, 2010 at 5:42 PM, Jorge Biquez jbiq...@icsmx.com wrote: Newbie question. Sorry. If it isn't you're on the wrong list :) training so no pressure on performance). One application will run as a desktop one,under Windows, Linux, Macintosh, being able to update data, not much, not complex, not many records. The important details here are: simple data, low-volume. I'm assuming this is single-user (as in, each instance of your application has it's own DB) The second application, running behind web pages, will do the same, Is this multiple users, each accessing the same DB? That really changes what you are looking for. If you are dealing with single-user, or only a few users, I'd say look into SQLite - It uses SQL syntax but doesn't run as a server and stores the database as a single file. It's great to use in small projects because the syntax is the same as larger projects, and you can replace with a full-blown multi-user SQL DB if you ever need to without having to rework everything. It's also very simple to use. I believe SQLite (sqlite3) is part of the core library in recent Python versions, or available as a package for older pythons. Berkeley DB is pretty much interchangeable with SQLite in terms of functionality. I much prefer SQLite. If your web application intends to have multiple users interacting with the same data, neither is probably a good fit. -- Brett Ritter / SwiftOne swift...@swiftone.org -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
At 05:02 p.m. 04/12/2010, you wrote: Jorge Biquez jbiq...@icsmx.com writes: Hello all. Newbie question. Sorry. As part of my process to learn python I am working on two personal applications. Both will do it fine with a simple structure of data stored in files. I now there are lot of databases around I can use but I would like to know yoor advice on what other options you would consider for the job (it is training so no pressure on performance). One application will run as a desktop one,under Windows, Linux, Macintosh, being able to update data, not much, not complex, not many records. The second application, running behind web pages, will do the same, I mean, process simple data, updating showing data. not much info, not complex. As an excersice it is more than enough I guess and will let me learn what I need for now. Talking with a friend about what he will do (he use C only) he suggest to take a look on dBase format file since it is a stable format, fast and the index structure will be fine or maybe go with BD (Berkley) database file format (I hope I understood this one correctly) . Plain files it is not an option since I would like to have option to do rapid searches. What would do you suggest to take a look? If possible available under the 3 plattforms. Have you considered sqlite3? It is part of the Python standard library. It'll work under GNU/Linux, Windows and Mac OSX. For more details see: http://docs.python.org/library/sqlite3.html -- Arnaud -- Hello all. Ok. sqlite3 seems like it is the best option since it is part of python already you are right of course. I do not see a good reason for not using Sqlite3 BUT if for some reason would not be an option what plain schema of files would you use? I am sorry to insist. I do not know much about the size tha using Sqlite adds to the application but the idea is that the , application, single user for desktop yes, will be the smallest it can be since the idea is to distribute the executable only. (all this is to have a prototype I have done in other language) For the web part, yes, of course would be multiple users. Thanks to all. Jorge Biquez -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
On Dec 4, 6:43 pm, Jorge Biquez jbiq...@icsmx.com wrote: At 05:02 p.m. 04/12/2010, you wrote: Jorge Biquez jbiq...@icsmx.com writes: Hello all. Newbie question. Sorry. As part of my process to learn python I am working on two personal applications. Both will do it fine with a simple structure of data stored in files. I now there are lot of databases around I can use but I would like to know yoor advice on what other options you would consider for the job (it is training so no pressure on performance). One application will run as a desktop one,under Windows, Linux, Macintosh, being able to update data, not much, not complex, not many records. The second application, running behind web pages, will do the same, I mean, process simple data, updating showing data. not much info, not complex. As an excersice it is more than enough I guess and will let me learn what I need for now. Talking with a friend about what he will do (he use C only) he suggest to take a look on dBase format file since it is a stable format, fast and the index structure will be fine or maybe go with BD (Berkley) database file format (I hope I understood this one correctly) . Plain files it is not an option since I would like to have option to do rapid searches. What would do you suggest to take a look? If possible available under the 3 plattforms. Have you considered sqlite3? It is part of the Python standard library. It'll work under GNU/Linux, Windows and Mac OSX. For more details see: http://docs.python.org/library/sqlite3.html -- Arnaud -- Hello all. Ok. sqlite3 seems like it is the best option since it is part of python already you are right of course. I do not see a good reason for not using Sqlite3 BUT if for some reason would not be an option what plain schema of files would you use? I am sorry to insist. I do not know much about the size tha using Sqlite adds to the application but the idea is that the , application, single user for desktop yes, will be the smallest it can be since the idea is to distribute the executable only. (all this is to have a prototype I have done in other language) SQlite itself is around 300 kilobytes. That's negligible. It is also already in Python, so you'd have to purposefully exclude it in creating your executable to save those 300 kb and thus the 1/13th of a second additional time it would take average (3.9 MB/s) users to download your app if it were included. -- http://mail.python.org/mailman/listinfo/python-list
Re: Print recent CGI error
After many curse words I figured it out. A two-stage filter was needed. The 5th line solves the problem of colliding domain cookies: NowCookie=http.cookies.SimpleCookie() # Instantiate a SimpleCookie object savedCookie=os.environ.get('HTTP_COOKIE') # get the cookie string if savedCookie: # Already is a domain cookie NowCookie.load(savedCookie) # Could be any domain cookie if CookieName in NowCookie: # Look for a specific cookie savedCookie=NowCookie[CookieName].value # Load the cookie string into a dict self.List=list(savedCookie.split('~')) # Parse the payload string delimited at tilde return self.List=[hashlib.sha1(repr(time.time()).encode()).hexdigest(), '', ''] # Else default payload self.Write() # Tell the client to remember -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
Jorge Biquez jbiq...@icsmx.com writes: I do not see a good reason for not using Sqlite3 BUT if for some reason would not be an option what plain schema of files would you use? I am sorry to insist. SQLite stores the entire database in a single file. Does that answer the question? I'm not sure I understand. Preferably, check SQLite's own site URL:http://www.sqlite.org/ for answers, since it seems your concerns are not specific to Python. If you have Python-specific concerns about SQLite you'll need to make them more explicit for us to answer them. I do not know much about the size tha using Sqlite adds to the application As you noted, SQLite is already in the Python standard library. For the web part, yes, of course would be multiple users. Systems like Berkeley DB, SQLite, dBase, et cetera achieve their simplicity at the expense of concurrent access to the database. If you want concurrent access to the database by many connections, that's where you need to look at a more sophisticated solution. For efficient concurrent access, a DBMS such as PostgreSQL is the best choice. -- \ “When I was little, my grandfather used to make me stand in a | `\ closet for five minutes without moving. He said it was elevator | _o__)practice.” —Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list
How do I get the email address of the person who clicked the link in the email?
Hello, I am working with Google App Engine python version. The app sends an email to the user with a link to a page to upload an image as an avatar. It would be nice to have the email so that I can associate the avatar with that email. How can I do this? Thank you. -- http://mail.python.org/mailman/listinfo/python-list
SunLisp: A new Lisp drinking society in Ft Lauderdale, FL debuting 7PM, Pearl Harbor Day
In case you missed it, SunLisp is debuting on Pearl Harbor Day (December 7th) at 7PM. It's been added to the Lisp Meetings Calendar as well. Who: His Kennyness, his CIO Dan (can you say Lisp jobs? Sher ya can) and a notable group of Lispers doing a nice project in FL and anyone who cares to join them. When: First Tuesday of the month, 7PM, starting with Pearl Harbor Day, 2010 Where: http://www.thefrogandtoadpub.com/ That is just a couple of blocks below West Cypress Creek aka 62nd on the east side of Powerline. What: They serve beer, wine, and a substantial menu of great food. Why: So we can flame each other in person over beer about the right number of namespaces. Why else? RSVP for this first meet so we know if we should ask them to tidy up the back room which is smashing but lacks tellys. HK (Someone want to pass this along to the yobbos on #lisp?) -- http://mail.python.org/mailman/listinfo/python-list
Re: How do I get the email address of the person who clicked the link in the email?
As a suggestion, you can auto-format your email link so that the email of the user is sent as part of the URL GET argument. Cheers, Xav On 5 December 2010 08:15, Zeynel azeyn...@gmail.com wrote: Hello, I am working with Google App Engine python version. The app sends an email to the user with a link to a page to upload an image as an avatar. It would be nice to have the email so that I can associate the avatar with that email. How can I do this? Thank you. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On 12/4/2010 12:07 PM, Harishankar wrote: Of course not. But going by the replies here, it appears that Python has made exceptions as the norm for error handling which is ironical considering the meaning of the word exception. In communications parlance, 'exception' = out-of-band signal or return value, while 'return'ed value = in-band signal. A fake in-band return value, like returning None (ok) or False (worse) to *signal* 'I cannot return a list' is still an exception signal, even if 'in-band'. The advantage of out-of-band signals is that they cannot be mistaken for valid in-band signals (return values). If a caller neglects to catch an exception, the process stops, as it should. If a caller neglects to check return values, the process goes on (at least for a while) under the pretense that error codes (in-band exception signals) are valid return values. Neglecting to check return values for error codes is a common bug in C code. At worst, the process eventually return a bad value or performs a bad action. At best, it crashes sometime later, making the bug hard to find. Or a function is called without even storing, let alone checking the return value. This is common for i/o functions. A program may 'finish' without any indication that it failed. If one does the same with Python functions (equally common), any exceptions *will* be passed up until either caught or displayed on the screen with an informative traceback (assuming that the screen is the not source of the error). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On Sat, 04 Dec 2010 17:07:45 +, Harishankar wrote: I find a bit cumbersome that exceptions are advocated for certain conditions which can be sanely worked around in the application's logic and even avoided, rather than waiting for them to get caught and providing an unsatisfactory result. That's surprisingly rare in Python. In fact, I'd go so far as to say that in Python there is *nothing* that you can test for and then have a *guarantee* that it will succeed. Of course, this is mainly of theoretical concern. In practice, Look Before You Leap (test first, then process) is often fine. But there are traps to look out for. For example, unless you are running a single- process machine, the following code is subject to race conditions and is not safe: if os.exists(pathname): fp = open(pathname) else: handle_missing_file() Just because the file is there when os.exists() looks for it, doesn't mean it still exists a microsecond later when you try opening it. Or consider this code: if y != 0: result = x/y else: handle_division_by_zero() This is also unsafe unless you know the type of y. Suppose y is an interval quantity that straddles zero, then division by y may fail even though y != 0. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
Hello all. Understood perfectly. Will forget other alternatives. Sqlite3 is the best option. Thanks for the explanation and time. Sqlite for single user and Postgresql will be the choice. Thanks all. Take care Jorge Biquez At 06:01 p.m. 04/12/2010, you wrote: Jorge Biquez jbiq...@icsmx.com writes: I do not see a good reason for not using Sqlite3 BUT if for some reason would not be an option what plain schema of files would you use? I am sorry to insist. SQLite stores the entire database in a single file. Does that answer the question? I'm not sure I understand. Preferably, check SQLite's own site URL:http://www.sqlite.org/ for answers, since it seems your concerns are not specific to Python. If you have Python-specific concerns about SQLite you'll need to make them more explicit for us to answer them. I do not know much about the size tha using Sqlite adds to the application As you noted, SQLite is already in the Python standard library. For the web part, yes, of course would be multiple users. Systems like Berkeley DB, SQLite, dBase, et cetera achieve their simplicity at the expense of concurrent access to the database. If you want concurrent access to the database by many connections, that's where you need to look at a more sophisticated solution. For efficient concurrent access, a DBMS such as PostgreSQL is the best choice. -- \ âWhen I was little, my grandfather used to make me stand in a | `\ closet for five minutes without moving. He said it was elevator | _o__)practice.â Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On Sun, 05 Dec 2010 01:59:27 +, Steven D'Aprano wrote: Of course, this is mainly of theoretical concern. In practice, Look Before You Leap (test first, then process) is often fine. But there are traps to look out for. For example, unless you are running a single- process machine, the following code is subject to race conditions and is not safe: if os.exists(pathname): fp = open(pathname) else: handle_missing_file() Just because the file is there when os.exists() looks for it, doesn't mean it still exists a microsecond later when you try opening it. I understand this line of thinking. And it makes sense to see why it would matter to leave the exception handling mechanism deal with such issues. Or consider this code: if y != 0: result = x/y else: handle_division_by_zero() This is also unsafe unless you know the type of y. Suppose y is an interval quantity that straddles zero, then division by y may fail even though y != 0. Of course in each of these cases the in-built exceptions are used to verify the result of certain system level or lower level operations. My object was not to deprecate the system-level or other low level exceptions thrown by Python, but to consider whether such a mechanism would be a preferable method of handling your own programs error- conditions. The issue to be considered by every programmer is to define what can be defined as the exceptional condition and what is a condition that merits merely different treatment without causing disruption of the normal flow of the program. -- Harishankar (http://harishankar.org http://lawstudentscommunity.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Unknown function operation deciphering, exercise in readability by program reasoning
On Dec 4, 4:49 pm, Barb Knox s...@sig.below wrote: In article 46365e1d-42d8-4b3b-8e69-941472467...@u25g2000pra.googlegroups.com, small Pox smallpox...@gmail.com wrote: Rules : No need to add any additional hurdles -- the code as presented is thoroughly unreadable by humans. @1@ No execution of the function, only checking syntax What about desk checking (a lost art from the oldene dayes)? @2@ No profiling using a debugger or profiler @3@ Editing allowed to make simpler variables Maybe if you had done that yourself before posting it then I would have tried to understand it. As it is, no way. (defun unknown-function (nano-thermite-911-FBI-fat-per-diem-bustards- kept-their-odious-mouth-shut-on-anthrax-and-911-lie) (let (BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY-NEOCONS- PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI-MURDERERS I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) (while (or I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- SPEECH-ON-KHAZARS nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie) (if nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- odious-mouth-shut-on-anthrax-and-911-lie (if (consp nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie) (setq I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- SPEECH-ON-KHAZARS (cons (cdr nano-thermite-911-FBI-fat-per-diem- bustards-kept-their-odious-mouth-shut-on-anthrax-and-911-lie) I-AM-THE-WITNESS-DOT-COM-has-MR- BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie (car nano-thermite-911- FBI-fat-per-diem-bustards-kept-their-odious-mouth-shut-on-anthrax- and-911-lie)) (setq BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY- NEOCONS-PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI- MURDERERS (cons nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- odious-mouth-shut-on-anthrax-and-911-lie BERNARD-MADOFF-PHILIP-MARKOFF- MIKHAIL-KHODORKOVSKY-NEOCONS-PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE- KATSEV-MOSSAD-DUBAI-MURDERERS) nano-thermite-911-FBI-fat-per-diem-bustards-kept- their-odious-mouth-shut-on-anthrax-and-911-lie nil)) (setq nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- odious-mouth-shut-on-anthrax-and-911-lie (car I-AM-THE-WITNESS-DOT-COM- has-MR-BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN-SPEECH- ON-KHAZARS (cdr I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- SPEECH-ON-KHAZARS BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY-NEOCONS-PAUL- WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI-MURDERERS)) -- --- | BBB b \ Barbara at LivingHistory stop co stop uk | B B aa rrr b | | BBB a a r bbb | Quidquid latine dictum sit, | B B a a r b b | altum videtur. | BBB aa a r bbb | - I think this is correct: (defun unknown-function (sym0) (let (sym1 sym2) (while (or sym2 sym0) (if sym0 (if (consp sym0) (setq sym2 (cons (cdr sym0) sym2) sym0 (car sym0)) (setq sym3 sym4 (cons sym0 sym1) sym0 nil)) (setq sym0 (car sym2) sym2 (cdr sym2 sym1)) Thank emacs, not me. -- http://mail.python.org/mailman/listinfo/python-list
INVITATION TO AN INFORMATION FOR GROUP (...)
INVITATION TO AN INFORMATION FOR GROUP (...) BUSINESS ADS (ANNOUNCEMENTS) http://nettengelir.blogspot.com/ ___ ONLINE NEWS SYSTEMS THAT'S REPLY ... http://nettengelir.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: PIL how to enlarge image
robos85 prog...@gmail.com wrote: Hi, I try to enlarge original image. I have image in size: 100x100 and I want to make it 120x120. But resize() doesn't make it bigger. Is there any method for that? resize does not change the image. Instead, it returns the resized image. If you don't need the original any more: img = img.resize((120,120)) -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On 2010-12-05, Harishankar v.harishan...@gmail.com wrote: Or consider this code: if y != 0: result = x/y else: handle_division_by_zero() This is also unsafe unless you know the type of y. Suppose y is an interval quantity that straddles zero, then division by y may fail even though y != 0. Of course in each of these cases the in-built exceptions are used to verify the result of certain system level or lower level operations. My object was not to deprecate the system-level or other low level exceptions thrown by Python, but to consider whether such a mechanism would be a preferable method of handling your own programs error- conditions. Whether you happen to like the exception mechanism and syntax or not, it is the idiomatic way of handling errors in Python. Using two different conventions in your code will lead to confusion. I come from a long C background as well. I have come to appreciate the power the Python's exception handling provides. It does everything that you need to do with passing values in C and more. The issue to be considered by every programmer is to define what can be defined as the exceptional condition and what is a condition that merits merely different treatment without causing disruption of the normal flow of the program. That is an issue much harder to define. Anything it is an obvious error *should* throw an exception. Invalid input is an error. Unusable hardware states are errors. Any invalid request to an object, is an error. Essentially anything that deviates from a normal flow of a program, to handle an exceptional condition, is an error Where it becomes less obvious is when you start using exceptions as part normal control flow. An example is a try it and see methodology. You might for instance have a group of file objects which might or might not support a particular method attribute. You might have a preference for using the attribute; but, have a fallback plan if it does not. One way to handle this is to try to use the attribute and catch the exception raised if it is not present to execute your backup method. I have found this *essential* in some marsaling enviroments where you might not have access to the meta-data of the object that you are working with. Another, questionable but useful use, is to ignore the complex accounting of your position inside of a complex data structure. You can continue moving through the structure until an exception is raised indicating that you have reached a boundary of the structure. Whether you accept uses of exceptions like these is more of a personal quesion. Like many good tools, they can be useful in ways that they were never really designed to be and I would hate to proclude some of these really useful features. This can, of course, be easily abused. I was once writing code, involving complex object marshaling like I described above, with a partner who wasn't totally familiar with Python. We came to a situation where it was impossible to know ahead of time what kind of object (one of two possiblities) we would receive from another marshalled object and had no meta-data to be able to figure out before attempting to access the object. I used a try/except clause to resolve the problem. The next day, I found several poorly conceived try/except blocks in the codebase that my partner had used for control structures using dictionaries because he didn't know of dict.has_key(). I was not so pleased. -- http://mail.python.org/mailman/listinfo/python-list
Re: Which non SQL Database ?
On 12/4/10 3:43 PM, Jorge Biquez wrote: I do not see a good reason for not using Sqlite3 BUT if for some reason would not be an option what plain schema of files would you use? Would shelve work? -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On 2010-12-05, Tim Harig user...@ilthio.net wrote: Another, questionable but useful use, is to ignore the complex accounting of your position inside of a complex data structure. You can continue moving through the structure until an exception is raised indicating that you have reached a boundary of the structure. Here is another example in this vein. A friend was trying to derive a mathematical formula for determining the possibly distribution of results from rolling arbitrariy numbers of m n-sided dice and needed several sets of data in different directions from which to draw conclusions. I created objects for dice and roles which contained and manipulated multiple dice. To generate a listing of all (non-uniq) possible roles, I would call the first dices increment method read and read the dice faces into a log until the first dice threw an exception that it could not be further incremented. Then I would call reset() on the first dice and increment the second and so on much like the odometer of a car. By using exceptions rather then checking the return value of increment, the state information of the dice was completely isolated to the dice and did not polute into the role structure; the logic for incrementing the dice, logging the role state, and rolling over the dice where all completely seperated and independent of any state; and therefore reseting multiple previous dice as the higher values on the odometer were incremented functioned automatically as each dice threw its own exception recursively rather then requiring logic to handle these multiple rollovers. -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
Tim Harig user...@ilthio.net writes: A friend was trying to derive a mathematical formula for determining the possibly distribution of results from rolling arbitrariy numbers of m n-sided dice http://en.wikipedia.org/wiki/Multinomial_distribution To generate a listing of all (non-uniq) possible roles, I would call the first dices increment method read and read the dice faces into a log until the first dice threw an exception that it could not be further incremented. Then I would call reset() on the first dice and increment the second and so on much like the odometer of a car. from itertools import product m, n = 5, 2 for roll in product(*(xrange(1,m+1) for i in xrange(n))): print roll -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On Sun, 05 Dec 2010 04:13:02 +, Tim Harig wrote: Anything it is an obvious error *should* throw an exception. Well, maybe... there are good use-cases for returning a sentinel. E.g. str.find, or the use of quiet NANs in IEEE floating point and decimal maths. NANs and INFs in floating point maths are a good example of the right way to do it. If you forget to check for a NAN, it will propagate through your calculation. INF will, under some circumstances where it is mathematically valid to do so, will disappear leaving a normal result. This means you only need to check your result at the very end of the calculation, not after every step. str.find is more troublesome, because the sentinel -1 doesn't propagate and is a common source of errors: result = string[string.find(delim):] will return a plausible-looking but incorrect result if delim is missing from string. But the convenience and familiarity of str.find means it will probably be around forever. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: Comparison with False - something I don't understand
On 2010-12-05, Paul Rubin no.em...@nospam.invalid wrote: Tim Harig user...@ilthio.net writes: A friend was trying to derive a mathematical formula for determining the possibly distribution of results from rolling arbitrariy numbers of m n-sided dice http://en.wikipedia.org/wiki/Multinomial_distribution I sure he rediscovered much of that. Working that out for himeself was probably far more educational then simply reading an article on the solution. To generate a listing of all (non-uniq) possible roles, I would call the first dices increment method read and read the dice faces into a log until the first dice threw an exception that it could not be further incremented. Then I would call reset() on the first dice and increment the second and so on much like the odometer of a car. from itertools import product m, n = 5, 2 for roll in product(*(xrange(1,m+1) for i in xrange(n))): print roll The fact that I bothered to create classes for the dice and roles, rather then simply iterating over a list of numbers, should tell you that I produced was of a far more flexible nature; including the support for roles with dice having different numbers of sides. I basically created a DSL that he could use to generate and automatically calculate the properties of series of roles defined by one or more varying property. I merely posted a simplied description of the dice-role objects because I thought that it demonstrated how exceptions can provide eligance of control for situations that don't involve what would traditionally be defined as an error. -- http://mail.python.org/mailman/listinfo/python-list
[issue6210] Exception Chaining missing method for suppressing context
Changes by Georg Brandl ge...@python.org: -- assignee: - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10615] Trivial mingw compile fixes
Johann Hanne pyt...@jf.hanne.name added the comment: When the patch is applied, what's the resulting status of mingw compilation? It compiles all C files which I require. Not sure if this is really *all* C files, but at least very close to all. I will post a list of object files I get on Monday. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue766910] fix one or two bugs in trace.py
Eli Bendersky eli...@gmail.com added the comment: Alexander, I reviewed the patch and ported the changes to the newest sources (since the fix to issue 9299, os.makedirs can be naturally used with its new flag to fix the bug Zooko refers to). However, while experimenting, I think I ran into much larger problems. Either that or I've forgotten how to use the module :-) Attaching two files (one imports the other) on which I try to run the following: python -m trace -c trace_target.py OK: I get trace_target.cover traced_module.cover created However, now running: python -m trace -r --file=trace_target.cover ... pickle.load(open(self.infile, 'rb')) _pickle.UnpicklingError: invalid load key, ' '. Also, trying to provide --file to -c: python -m trace -c trace_target.py --file=xyz.cover xyz.cover is ignored and the same two .cover files are created. Can you take a look at this? -- Added file: http://bugs.python.org/file19933/trace_target.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue766910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue766910] fix one or two bugs in trace.py
Changes by Eli Bendersky eli...@gmail.com: Added file: http://bugs.python.org/file19934/traced_module.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue766910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10615] Trivial mingw compile fixes
Martin v. Löwis mar...@v.loewis.de added the comment: Am 04.12.2010 09:32, schrieb Johann Hanne: Johann Hanne pyt...@jf.hanne.name added the comment: When the patch is applied, what's the resulting status of mingw compilation? It compiles all C files which I require. Not sure if this is really *all* C files, but at least very close to all. I will post a list of object files I get on Monday. Will it then also link something? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10516] Add list.clear() and list.copy()
Eli Bendersky eli...@gmail.com added the comment: Was list.copy() also approved? After all, there are many ways to achieve the same even now: 1. L[:] 2. list(L) 3. import copy and then copy.copy Especially re the last one: list.copy() can be deep or shallow, which one should it be? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10516] Add list.clear() and list.copy()
Eli Bendersky eli...@gmail.com added the comment: Also, where is the *official* place to document list objects and their methods? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6045] Add more dict methods to dbm interfaces
Georg Brandl ge...@python.org added the comment: r87013 adds get() and setdefault() to dbm.gnu -- now gdbm and ndbm have the same set of dict methods available. For me, that is enough to demote this to feature request. There's another issue anyway for iteration protocol support. -- priority: critical - normal title: Fix dbm interfaces - Add more dict methods to dbm interfaces type: behavior - feature request versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6045 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
New submission from Boštjan Mejak bostjan.me...@gmail.com: Python interpreter should put spaces around operators in return values of complex numbers. If you give it 1 + 2j it should return (1 + 2j) and not the current (1+2j) My argument is that complex numbers are written like this, with spaces surrounding operators. Wikipedia has multiple instances of the complex number writren, and it's x + yi (in our world it's x + yj but you get the point and you can see that there are spaces around the operator). Please fix the tokenizer to do the right thing. -- components: IO messages: 123324 nosy: Retro priority: normal severity: normal status: open title: 1 + 2j -- (1 + 2j) and not (1+2j) versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10516] Add list.clear() and list.copy()
Georg Brandl ge...@python.org added the comment: Yes, list.copy was also approved IIRC. And it should be a shallow copy, like all other copy methods on builtins. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10516] Add list.clear() and list.copy()
Boštjan Mejak bostjan.me...@gmail.com added the comment: This is really welcome. It makes Python even more readable. If 'a' is a list object, a[:] is not so obvious at first to a newcomer, but a.copy() is. Also, a.clear() is so perfect and understandable. I wish you could decorate Python versions prior to 3.3 with this two new list methods. -- nosy: +Retro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7904] urlparse.urlsplit mishandles novel schemes
Senthil Kumaran orsent...@gmail.com added the comment: On Fri, Dec 03, 2010 at 10:33:50PM +, Fred L. Drake, Jr. wrote: Though msg104261 suggests this change be documented in NEWS.txt, it doesn't appear to have made it. Better late than never. I just added the NEWS in r87014 (py3k) ,r87015(release31-maint) ,r87016(release27-maint). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10553] Add optimize argument to builtin compile() and byte-compilation modules
Georg Brandl ge...@python.org added the comment: Added PyZipFile API, and fixed the optimze. Committed in r87019. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10553 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10618] regression in subprocess.call() command quoting
Tim Golden m...@timgolden.me.uk added the comment: I'm not quite sure how anyone's supposed to determine which bugs are likely to have been worked around and which haven't :) I'm also unsure why a clear bugfix shouldn't make it into a minor version release. Surely this isn't the only one to do so... I'm happy to repatch/test to strip quotes before adding, but I see that Benjamin prefers to leave it alone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
Mark Dickinson dicki...@gmail.com added the comment: I suggest closing this as 'won't fix' (or even the apostrophetically-challenged 'wont fix'). I'll leave it open for a while to allow others to comment. I have some sympathy for the idea: I also think that the str/repr of a complex number would look better with spaces (and without parentheses (and with 'i' in place of 'j'))). I've always appreciated the fact that lists are printed in the form '[1, 2, 3]' rather than the less readable '[1,2,3]'. But there's a big difference between 'it might have been better if ...' and 'it's worth changing this'. Tinkering with minor details like this from release to release just isn't worth the potential difficulties (however minor) caused to users as they have to adapt their code. The current behaviour is perfectly serviceable. P.S. What's the tokenizer got to do with this? -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1513299] Clean up usage of map() in the stdlib
Georg Brandl ge...@python.org added the comment: Committed what was left applicable of the patch in r87020. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1513299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10614] ZipFile and CP932 encoding
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I'm not sure why, but I got BadZipFile error now. Anyway, here is cp932 zip file to be created with python2.7. -- Added file: http://bugs.python.org/file19935/non-ascii-cp932.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10614 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1772833] -q (quiet) option for python interpreter
Georg Brandl ge...@python.org added the comment: Based on the +1's in #1728488, committed in r87021, with addition to the command-line docs. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1772833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1569291] Speed-up in array_repeat()
Georg Brandl ge...@python.org added the comment: I changed the patch to look more like unicode_repeat (which addresses Alex' point #2) and committed in r87022. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1569291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Mark Dickinson dicki...@gmail.com added the comment: Looks okay, I guess. I don't much like the extra boilerplate that's introduced (and repeated) in longobject.c, floatobject.c and complexobject.c, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7905] Shelf 'keyencoding' keyword argument is undocumented and does not work.
Georg Brandl ge...@python.org added the comment: Patched up and committed in r87024. -- resolution: - fixed status: open - closed versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()
Gregory P. Smith g...@krypto.org added the comment: I've committed this feature just in time for 3.2beta1 (so it can't be said i'm adding a feature after the beta ;). r87026 It still needs tests and documentation. It doesn't break any existing tests. I'll take care of that after some sleep. -- assignee: - gregory.p.smith nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10622] WebKit browsers show superfluous scrollbars in html docs
New submission from Davide Rizzo sor...@gmail.com: Some WebKit browsers show a superflous scrollbar on the right side of the pre boxes in the Sphinx generated html docs. For example: http://666kb.com/i/boxys2zktxky17vsh.png taken on Chrome 7 on Windows. I believe that the cause of the behaviour is a bug in the WebKit engine. If that's the case, adding overflow-y: hidden to the pre css style would fix the issue. overflow-y is not standard css, but it is understood by the affected browsers, looks ok on other modern browsers and is just ignored on older releases. The provided patch has been tested on all major Windows browsers. -- assignee: d...@python components: Documentation files: webkit.patch keywords: patch messages: 123338 nosy: davide.rizzo, d...@python priority: normal severity: normal status: open title: WebKit browsers show superfluous scrollbars in html docs type: behavior versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19936/webkit.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10622] WebKit browsers show superfluous scrollbars in html docs
Gregory P. Smith g...@krypto.org added the comment: r87027 has it for py3k / 3.2. needs backporting to the other branches. -- nosy: +gregory.p.smith versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10596] modulo operator bug
Mark Dickinson dicki...@gmail.com added the comment: Fixed the sign of the zero (in py3k) in r87032. I'll backport to 2.7 and 3.1, then close this. Sergio, is that acceptable? You still haven't said what results you were expecting for these operations. -- resolution: - fixed stage: - committed/rejected versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
Eric Smith e...@trueblade.com added the comment: I agree. It would be nice, but the impact on existing code is too large. I can easily imagine someone parsing the output of print(somecomplexnumber) and not considering spaces. For the record, it would require changing complex.__repr__ (which is also complex.__str__) and complex.__format__. Now that I look at the code, it seems that complex_format is only called from one place (complex_repr), with fixed parameters. It could be moved into complex_repr for what I think is a small improvement in readability. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
Boštjan Mejak bostjan.me...@gmail.com added the comment: Please do the move to complex_repr if everything then works the same (i.e. nothing breaks the build) if the readability is in fact improved. Also, change the docs and fix the tests. You know the drill. P.S.: (1+2j) is worth changing to become (1 + 2j) in the future (in Python 3.3 if not sooner?). Is it very hard to do this? It's worth changing this. Reasons like 'Readability counts.' come into mind... -- Added file: http://bugs.python.org/file19937/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___divPlease do the move to complex_repr if everything then works the same (i.e. nothing breaks the build) if the readability is in fact improved. Also, change the docs and fix the tests. You know the drill./divdivbr/div divP.S.: (1+2j) is worth changing to become (1 + 2j) in the future (in Python 3.3 if not sooner?). Is it very hard to do this? It#39;s worth changing this. Reasons like #39;Readability counts.#39; come into mind.../div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
Eric Smith e...@trueblade.com added the comment: There are no tests or docs to fix: it's an internal (static) helper function. It's not a particularly straightforward change, because you're inserting a space into the middle of the floating point imaginary string. There would be extra bookkeeping and memory management going on. But even if it were easy, I disagree that it's worth breaking existing usages of complex.__str__, .__repr__, and .__format__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10596] modulo operator bug
Mark Dickinson dicki...@gmail.com added the comment: Backported to 3.1 (after one botched backport attempt) and 2.7 in r87037 and r87033. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10623] What’s New In Python 3.2 document re fers to PEP 382: Defining a Stable ABI
New submission from Daniel Urban urban.dani...@gmail.com: But Defining a Stable ABI is PEP 384: http://www.python.org/dev/peps/pep-0384/ (PEP 382 is Namespace Packages) -- assignee: d...@python components: Documentation messages: 123345 nosy: d...@python, durban priority: normal severity: normal status: open title: What’s New In Python 3.2 document refers to PEP 382: Defining a Stable ABI type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10623 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support
New submission from Eric Smith e...@trueblade.com: The decorator could be shared in at least datetimetester, test_cmath, test_complex, test_decimal, test_fractions, test_long, and test_math. -- assignee: eric.smith components: Tests keywords: easy messages: 123346 nosy: eric.smith, mark.dickinson priority: low severity: normal status: open title: Move requires_IEEE_754 decorator from test_complex into test.support versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10624 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support
Mark Dickinson dicki...@gmail.com added the comment: +1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10624 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10625] There is no test for repr(complex(-0., 1.)) special handling
New submission from Eric Smith e...@trueblade.com: There's a special test in the C code for this, but there no test for it in test_complex. Note that this needs to be a IEEE 754 specific test. -- assignee: eric.smith components: Tests keywords: easy messages: 123348 nosy: eric.smith priority: normal severity: normal status: open title: There is no test for repr(complex(-0.,1.)) special handling versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support
Eric Smith e...@trueblade.com added the comment: Moved from test_math.py into support.py in r87040. I'll fix up the other modules shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10624 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10625] There is no test for repr(complex(-0., 1.)) special handling
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10625] There is no test for repr(complex(-0., 1.)) special handling
Eric Smith e...@trueblade.com added the comment: Technically the special handling in complex_repr() is for +0, but there needs to be a test both ways. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10623] What’s New In Python 3.2 document re fers to PEP 382: Defining a Stable ABI
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the report. Fixed in r87042 -- nosy: +loewis resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10623 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10626] test_concurrent_futures failure under Windows Server 2008
New submission from Antoine Pitrou pit...@free.fr: See this buildbot log: http://www.python.org/dev/buildbot/all/builders/AMD64%20Windows%20Server%202008%203.x/builds/198/steps/test/logs/stdio == FAIL: test_done_callback_raises (test.test_concurrent_futures.FutureTests) -- Traceback (most recent call last): File c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_concurrent_futures.py, line 646, in test_done_callback_raises self.assertIn('Exception: doh!', logging_stream.getvalue()) AssertionError: 'Exception: doh!' not found in '' -- -- assignee: bquinlan components: Library (Lib), Tests messages: 123352 nosy: bquinlan, brian.curtin, pitrou priority: normal severity: normal status: open title: test_concurrent_futures failure under Windows Server 2008 type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10516] Add list.clear() and list.copy()
Eli Bendersky eli...@gmail.com added the comment: Attaching a patch with the following: 1. list.copy() and list.clear() implemented in Objects/listobject.c, with appropriate doc strings (modeled after dict's docstrings) 2. Same methods implemented in collections.UserList 3. Tests added that exercise the methods in both list and UserList Re the documentation, it's currently unclear where it should go. I asked on d...@python.org. -- Added file: http://bugs.python.org/file19938/issue10516.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10516] Add list.clear() and list.copy()
Éric Araujo mer...@netwok.org added the comment: Hi Eli, I think the right place is 4.6.4, http://docs.python.org/dev/library/stdtypes#mutable-sequence-types It starts with “List and bytearray objects support additional operations that allow in-place modification of the object”. For methods not supported by bytearray, you can use the fake footnote (8) and edit its texte (“sort() is not supported by bytearray objects”). Regards -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6490] os.popen documentation in 2.6 is probably wrong
Changes by Neil Muller drnlmuller+b...@gmail.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9523] Improve dbm modules
Éric Araujo mer...@netwok.org added the comment: In 3.2, objects return by dbm.dumb.open implement MutableMapping with incorrect semantics: keys return a list, iterkeys exist, etc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10609] dbm documentation example doesn't work (iteritems())
Éric Araujo mer...@netwok.org added the comment: Arg, the internal classes returned by dbm.*.open have keys but not necessarily items. See #9523, #6045 and #5736. The docs should be fixed independently of that, with the less non-idiomatic code that we can find. Do you want to check the dbm docs for other similar broken examples? I’ll review the patch. -- assignee: d...@python - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support
Eric Smith e...@trueblade.com added the comment: Modified all other tests to use support.requires_IEEE_754 in r87043. -- resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10624 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5736] Add the iterator protocol to dbm modules
Éric Araujo mer...@netwok.org added the comment: This may be superseded by #9523. There are comments and patches in both issues, so I’m not closing either as duplicate of the other. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6045] Add more dict methods to dbm interfaces
Éric Araujo mer...@netwok.org added the comment: See also #9523. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6045 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10625] There is no test for repr(complex(-0., 1.)) special handling
Eric Smith e...@trueblade.com added the comment: Checked-in in r87044. -- resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7936] sys.argv contains only scriptname
Jiri Kulik jiri.ku...@jkulik.eu added the comment: Encountered the same issue with 3.1.2 and 3.1.3 64bit on Win7 64bit. I was able to fix it in registry but did so many changes at once that I'm not able to reproduce (was really annoyed after trying to fix it for half a day...). Anyway, sending my observations: - the root cause seems to be creation of python.exe and pythonw.exe entries under HKEY_CLASSES_ROOT. Their open command did not have %*. They were not created under HKEY_LOCAL_MACHINE. They were probably created automatically by the system when manually associating py and pyw files (see below). - .py and .pyw files were originally associated with py_auto_file and pyw_auto_file in HKCR. The associations were probably created by the system, when I manually change association of the .py and .pyw files from jython to python through control panel. The py_auto_file and pyw_auto_files seemed to call those python.exe and pythonw.exe entries in the HKLC. - The assoc and ftype commands changed association in HKLM but it is not propagated automatically into HKCR, not even after restart. After manually deleting .py and .pyw entries from HKCR, they were replaced by correct entries from HKLM. - BUT!! the system still called open commands under python.exe and pythonw.exe entries in HKCR! (even if .py was associated with Python.File in HKCR and proper Python.File existed even in HKCR!) Only after deleting them, it works as should. But I deleted a lot of other python related entries as well, so this is only assumption. If anyone else can confirm that deleting of python.exe and pythonw.exe from HKCR itself corrects the issue, I think the installation program can check if these entries exists and offer to delete them. Just for complete picture, it works now even with .py and .pyw in PATHEXT, so calling the scripts without extension. -- nosy: +jiri.kulik versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7936 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5863] bz2.BZ2File should accept other file-like objects.
Xuanji Li xua...@gmail.com added the comment: I'll try working on a patch. -- nosy: +xuanji ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5863 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10616] Change PyObject_AsCharBuffer() error message
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file19937/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10621] 1 + 2j -- (1 + 2j) and not (1+2j)
Éric Araujo mer...@netwok.org added the comment: -1 on the change. Retro: would you mind stop sending HTML email to this tracker? It creates unnamed attachments that are distracting. Thanks in advance. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com