ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Joakim Hove
Hello, I wonder if I am encountering a bug in ctypes; or if I am doing things wrong? I have written a small Python class wrapping a C library, the Python class has a from_param() method which passes a raw pointer value from Python to C. When reaching C the pointer has been truncated to 32 bits.

Re: ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Stefan Behnel
Joakim Hove, 18.02.2011 09:29: I wonder if I am encountering a bug in ctypes; or if I am doing things wrong? I have written a small Python class wrapping a C library, the Python class has a from_param() method which passes a raw pointer value from Python to C. When reaching C the pointer has

Re: reimport module every n seconds

2011-02-18 Thread Santiago Caracol
Don't do that.  ;-)  I suggest using exec instead.  However, I would be surprised if import worked faster than, say, JSON (more precisely, I doubt that it's enough faster to warrnat this kludge). I'm with Aahz.  Don't do that. I don't know what you're doing, but I suspect an even better

Re: ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Joakim Hove
Thanks for answering; I rarely use ctypes You should :-) Apart from my current struggle I think ctypes is really good. and I actually don't know how this specific case works. However, you are not providing a function signature for the print_addr C function in the BugTest case, so my guess

Re: ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Stefan Behnel
Joakim Hove, 18.02.2011 09:46: Thanks for answering; I rarely use ctypes You should :-) Apart from my current struggle I think ctypes is really good. I'm well aware that it's a very good solution for the cases where you can trade performance for minimizing your external dependencies. But

Re: ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Stefan Krah
Joakim Hove joakim.h...@gmail.com wrote: and I actually don't know how this specific case works. However, you are not providing a function signature for the print_addr C function in the BugTest case, so my guess is that it assumes the standard signature for C functions, which is int

Re: ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Joakim Hove
Ok, then take care to post proper code next time. Details can be important, especially when asking about non-obvious problems. Point taken - however the original context where the problem arose consists of several massive libraries, which would be quite impractical to post on a forum. The code

Re: ctypes from_param() truncating 64 bit pointers to 32 bit

2011-02-18 Thread Joakim Hove
On 18 Feb, 10:55, Stefan Krah stefan-use...@bytereef.org wrote: Joakim Hove joakim.h...@gmail.com wrote: and I actually don't know how this specific case works. However, you are not providing a function signature for the print_addr C function in the BugTest case, so my guess is that it

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steven D'Aprano
On Thu, 17 Feb 2011 21:43:37 -0800, John Nagle wrote: I've used both the MIT Space Cadet keyboard on a Symbolics LISP machine, and the Stanford SAIL keyboard. There's something to be said for having more mathematical symbols. Agreed. I'd like Python to support proper mathematical symbols

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 02:50:11 -0500, Chris Jones wrote: Always struck me as odd that a country like Japan for instance, with all its achievements in the industrial realm, never came up with one single major piece of software. I think you are badly misinformed. The most widespread operating

mortar_rdb 1.0.0 released!

2011-02-18 Thread Chris Withers
Hi All, I'm very pleased to finally announce the release of mortar_rdb 1.0.0. This package ties together SQLAlchemy, sqlalchemy-migrate and the component architecture to make it easy to develop projects using SQLAlchemy through their complete lifecycle. While I'll be using it with Pyramid, the

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Giacomo Boffi
Chris Jones cjns1...@gmail.com writes: [...] most any software of note appears to have come out of cultures where English is either the native language, or where the native language is either relatively close to English... i do acknowledge your most, but how do you spell Moon in Portuguese?

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Giacomo Boffi
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: A dedicated concatenation operator would have avoided that mess. I don't quite agree that the mess is as large as you make out, but yes, more operators would be useful. am i wrong, or | is still available? -- l'amore e' un

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Xah Lee
On 2011-02-16, Xah Lee  wrote: │ Vast majority of computer languages use ASCII as its character set. │ This means, it jams multitude of operators into about 20 symbols. │ Often, a symbol has multiple meanings depending on contex. On 2011-02-17, rantingrick wrote: … On 2011-02-17, Cthun wrote: │

Re: Archiving Modules

2011-02-18 Thread peter
On Feb 17, 9:55 pm, Jorgen Grahn grahn+n...@snipabacken.se wrote: RAR is a proprietary format, which complicates things. For example, Linux distributions like Debian cannot distribute software which handles it.  If Python included such a module, they'd be forced to remove it from their

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Xah Lee
Chris Jones wrote: «.. from a quite different perspective it may be worth noting that practically all programming languages (not to mention the attached documentation) are based on the English language. And interestingly enough, most any software of note appears to have come out of cultures where

email library, get_payload() bug?

2011-02-18 Thread peterob
Helllo, I want to get the raw format of email body. the code Im using is for part in email.walk(): if part.get_content_maintype() == 'multipart': continue if part.get_content_type() == 'text/plain': # print

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steve Schafer
On Thu, 17 Feb 2011 20:47:57 -0800 (PST), rantingrick rantingr...@gmail.com wrote: What is evolution? Evolution is the pursuit of perfection at the expense of anything and everything! No, evolution is the pursuit of something just barely better than what the other guy has. Evolution is about

Re: Best way to gain root privileges

2011-02-18 Thread Ricardo Aráoz
On 17/02/2011 06:46 p.m., Steven D'Aprano wrote: On Thu, 17 Feb 2011 19:44:20 +, Katie T wrote: Running any kind of script sudo'd is a bad idea, it's very very hard (in many cases impossible) to do securely. Root permissions in general should only be used for what they're needed for and

Re: interrupted system call w/ Queue.get

2011-02-18 Thread Roy Smith
In article b3ebf4ec-e0bc-4bfc-8c29-368fee488...@l18g2000yqm.googlegroups.com, Philip Winston pwins...@gmail.com wrote: We have a multiprocess Python program that uses Queue to communicate between processes. Recently we've seen some errors while blocked waiting on Queue.get: IOError:

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread rantingrick
On Feb 18, 7:55 am, Steve Schafer st...@fenestra.com wrote: On Thu, 17 Feb 2011 20:47:57 -0800 (PST), rantingrick rantingr...@gmail.com wrote: What is evolution? Evolution is the pursuit of perfection at the expense of anything and everything! No, evolution is the pursuit of something

Re: Best way to gain root privileges

2011-02-18 Thread Adam Skutt
On Feb 18, 9:04 am, Ricardo Aráoz ricar...@gmail.com wrote: I've always asked myself why can't a program be used by users of a certain group but run with the privileges of some other user, not necessarily the one that uses it, but one created specifically for the tasks the program is

Re: interrupted system call w/ Queue.get

2011-02-18 Thread Jean-Paul Calderone
On Feb 17, 8:46 pm, Philip Winston pwins...@gmail.com wrote: We have a multiprocess Python program that uses Queue to communicate between processes.  Recently we've seen some errors while blocked waiting on Queue.get: IOError: [Errno 4] Interrupted system call What causes the exception?  Is

Re: Best way to gain root privileges

2011-02-18 Thread GSO
On 17 February 2011 18:39, Adam Skutt ask...@gmail.com wrote: ... As Terry suggests (and I fully concur), all of these issues are best solved by having a privileged daemon (though it may not need to be root or entirely root). I think this could be done more or less with the multiprocessing

Re: Best way to gain root privileges

2011-02-18 Thread John Pinner
On Feb 17, 3:32 pm, GSO gso...@yahoo.co.uk wrote: I'm having a awfully hard time figuring out why a home CCTV application might need privilege at all.  Are you sure you really need privilege?  It sounds to me like there may be some larger design issues mandating the need for privilege when

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread rantingrick
On Feb 18, 8:22 am, rantingrick rantingr...@gmail.com wrote: Perfect is the enemy of good. Do you think that just because something has a negative impact towards you (or your existence) that the *something* is then evil? Take a animal for instance: We kill animals for sustenance. The act of

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steve Schafer
On Fri, 18 Feb 2011 06:22:32 -0800 (PST), rantingrick rantingr...@gmail.com wrote: Evolution is about one cog gaining an edge over another, yes. However the system itself moves toward perfection at the expense of any and all cogs. Um, do you actually know anything about (biological) evolution?

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Stephen Hansen
On 2/17/11 7:42 PM, Littlefield, Tyler wrote: My intention was to educate him on the pitfalls of multiplicity. O. that's what you call that long-winded nonsense? Education? You must live in America. Can I hazard a guess that your universal language might be english? Has it not ever occured to

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Cthun
On 18/02/2011 7:43 AM, Xah Lee wrote: On 2011-02-17, Cthun wrote: │ And you omitted the #1 most serious objection to Xah's proposal, │ rantingrick, which is that to implement it would require unrealistic │ things such as replacing every 101-key keyboard with 10001-key keyboards What does your

Re: client server socket interaction (inetd)

2011-02-18 Thread Tim
On Feb 17, 6:09 pm, Martin Gregorie mar...@address-in-sig.invalid wrote: On Thu, 17 Feb 2011 13:02:08 -0800, Tim wrote: But. The server may encounter a problem during the process and ask the user for more information like 'abort/retry' or something like that. Servers never ask the client

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Chris Jones
On Fri, Feb 18, 2011 at 06:40:17AM EST, Steven D'Aprano wrote: On Fri, 18 Feb 2011 02:50:11 -0500, Chris Jones wrote: Always struck me as odd that a country like Japan for instance, with all its achievements in the industrial realm, never came up with one single major piece of software.

Re: Problem with giant font sizes in tkinter

2011-02-18 Thread Chris Jones
On Fri, Feb 11, 2011 at 09:35:56PM EST, Steven D'Aprano wrote: On Fri, 11 Feb 2011 01:29:02 -0500, Chris Jones wrote: labelfont = '-Adobe-Helvetica-Bold-R-Normal-*-140-*' [...] First of all, you need to know precisely what the above font name coding means. [...]

Re: client server socket interaction (inetd)

2011-02-18 Thread Martin Gregorie
On Fri, 18 Feb 2011 07:23:35 -0800, Tim wrote: Thanks for helping me to understand. I don't know if you're familiar with LaTeX, but that's part of what daemon.py calls via subprocess, and that is the underlying process I wanted the user to be able to interact with. I've used nroff but never

Re: Newbie getting desperate with for

2011-02-18 Thread Michael Torrie
On 02/17/2011 04:10 PM, Werner wrote: It is meant to put load on a CPU, RAM and disk (swap). The code now looks like this: #!/usr/bin/python while True: i = 0 for i in range(2000): break Just for your information, your code is the equivalent of: while True: temp =

Re: Newbie getting desperate with for

2011-02-18 Thread Michael Torrie
On 02/17/2011 09:15 PM, Larry Hudson wrote: A true time waster indeed -- it's an infinite loop that will _never_ end. Others have already about the need of the shebang line to run as a python script, but I'm surprised no one mentioned how truly useless this code is. The i = 0 line is

Re: Unit testing multiprocessing code on Windows

2011-02-18 Thread Matt Chaput
On 18/02/2011 2:54 AM, Terry Reedy wrote: On 2/17/2011 6:31 PM, Matt Chaput wrote: Does anyone know the right way to write a unit test for code that uses multiprocessing on Windows? I would start with Lib/test/test_multiprocessing. Good idea, but on the one hand it doesn't seem to be doing

Re: Newbie getting desperate with for

2011-02-18 Thread Noah Hall
On Fri, Feb 18, 2011 at 4:54 PM, Michael Torrie torr...@gmail.com wrote: On 02/17/2011 04:10 PM, Werner wrote: Just for your information, your code is the equivalent of: while True:    temp = range(2000) The for loop does absolutely nothing in your case.  After the range is computed,

Re: Unit testing multiprocessing code on Windows

2011-02-18 Thread Matt Chaput
On 17/02/2011 8:22 PM, phi...@semanchuk.com wrote: Hi Matt, I assume you're aware of this documentation, especially the item entitled Safe importing of main module? http://docs.python.org/release/2.6.6/library/multiprocessing.html#windows Yes, but the thing is my code isn't __main__, my

Re: Newbie getting desperate with for

2011-02-18 Thread Werner
On 18/02/11 07:29, Cameron Simpson wrote: On 18Feb2011 08:40, I wrote: | On 17Feb2011 18:40, Alister Ware alister.w...@ntlworld.com wrote: | | On Thu, 17 Feb 2011 16:42:05 +0800, Werner wrote: | | On 17/02/11 16:39, Chris Rebert wrote: | | On Thu, Feb 17, 2011 at 12:27 AM, Werner

Re: Archiving Modules

2011-02-18 Thread Westley Martínez
On Fri, 2011-02-18 at 04:55 -0800, peter wrote: On Feb 17, 9:55 pm, Jorgen Grahn grahn+n...@snipabacken.se wrote: RAR is a proprietary format, which complicates things. For example, Linux distributions like Debian cannot distribute software which handles it. If Python included such a

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Westley Martínez
On Fri, 2011-02-18 at 04:43 -0800, Xah Lee wrote: On 2011-02-16, Xah Lee wrote: │ Vast majority of computer languages use ASCII as its character set. │ This means, it jams multitude of operators into about 20 symbols. │ Often, a symbol has multiple meanings depending on contex. On

Re: Closures in metaclasses

2011-02-18 Thread zambr123
Hi there, We are currently looking for someone who has ideally several years coding experience, and who is familar with Network coding and the Python language. The project revolves around emulation and a chat based system, altough the vast majority of the project is focused on the chat

Re: Python Path registry Key

2011-02-18 Thread Westley Martínez
On Fri, 2011-02-18 at 11:56 +0530, Sathish S wrote: Hi Ppl, I'm trying to launch IDLE from another application. For this I need the python directory path. I have been trying to get the Active Python versions path from the Windows registry. However, these registry entries seem not be

Open InvitationTo Join Fun Python based Project

2011-02-18 Thread zambr123
Sorry, for the double post, was not intended. Because of wrong subject name ! Hi there, We are currently looking for someone who has ideally several years coding experience, and who is familar with Network coding and the Python language. The project revolves around emulation and a chat based

Re: Archiving Modules

2011-02-18 Thread Alexander Kapps
On 18.02.2011 19:51, Westley Martínez wrote: On Fri, 2011-02-18 at 04:55 -0800, peter wrote: On Feb 17, 9:55 pm, Jorgen Grahngrahn+n...@snipabacken.se wrote: RAR is a proprietary format, which complicates things. For example, Linux distributions like Debian cannot distribute software which

Re: Best way to gain root privileges

2011-02-18 Thread Alexander Kapps
On 18.02.2011 15:22, Adam Skutt wrote: On Feb 18, 9:04 am, Ricardo Aráozricar...@gmail.com wrote: Many a time I have wanted to allow access to certain privileges to a user but *only* through a program. As far as security is concerned it would be enough that only root has permission to give

Re: Best way to gain root privileges

2011-02-18 Thread Alexander Kapps
On 18.02.2011 15:42, GSO wrote: I note that policykit was created by redhat, and that RHEL6 does not include gksudo in with its gnome for some odd reason. Don't know if this helps you, but at least for CentOS 5.4, gksudo is available in the gksu package from rpmforge. --

Re: Best way to gain root privileges

2011-02-18 Thread GSO
On 18 February 2011 20:21, Alexander Kapps alex.ka...@web.de wrote: ... IIUC, than SELinux can also help, since it allows program-specific permissions. But I could easily be wrong here since I have yet to really learn SElinux. Who has, LOL! If you could post a (very very) quick 'I don't have

Re: IMAP4_SSL, libgmail, GMail and corporate firewall/proxy

2011-02-18 Thread Alexander Gattin
Hello, On Fri, Feb 18, 2011 at 09:40:19AM +0500, Andrea Gavana wrote: Fails with a variety of errors depending on which port I use: - Port 80: urllib2.HTTPError: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web

Re: Best way to gain root privileges

2011-02-18 Thread GSO
On 18 February 2011 20:23, Alexander Kapps alex.ka...@web.de wrote: ... Don't know if this helps you, but at least for CentOS 5.4, gksudo is available in the gksu package from rpmforge. It looks as though policykit includes similar functionality, namely the command pkexec replaces gksudo:

Re: client server socket interaction (inetd)

2011-02-18 Thread Nobody
On Fri, 18 Feb 2011 07:23:35 -0800, Tim wrote: When LaTeX encounters a problem it stops processing, asks the user what to do (like abort/retry, kind-of), and does whatever the user says. The daemon.py script handles that okay from the command line, but if I'm understanding you this will be

Re: Connecting to remote Oracle db via Python

2011-02-18 Thread Alexander Gattin
Hello, On Thu, Feb 17, 2011 at 02:40:22AM -0800, pstatham wrote: I've installed the cx_Oracle module for Python and I'm trying to connect to my remote Oracle db. Can you tnsping your remote Oracle DB successfully? uid = scott pwd = tiger service = 10.5.1.12:1521:PR10 db =

Re: Archiving Modules

2011-02-18 Thread Jorgen Grahn
On Fri, 2011-02-18, Alexander Kapps wrote: On 18.02.2011 19:51, Westley Martínez wrote: On Fri, 2011-02-18 at 04:55 -0800, peter wrote: On Feb 17, 9:55 pm, Jorgen Grahngrahn+n...@snipabacken.se wrote: RAR is a proprietary format, which complicates things. For example, Linux distributions

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 04:43:13 -0800, Xah Lee wrote: for example, when you type = in python, the text editor can automatically change it to ≥ (when it detects that it's appropriate, e.g. there's a “if” nearby) You can't rely on the presence of an `if`. flag = x = y value = lookup[x = y]

Re: How to use Python well?

2011-02-18 Thread Jorgen Grahn
On Thu, 2011-02-17, Roy Smith wrote: In article slrnilr5lj.15e.grahn+n...@frailea.sa.invalid, Jorgen Grahn grahn+n...@snipabacken.se wrote: - Write user documentation and build/installation scripts. Since I'm on Unix, that means man pages and a Makefile. Wow, I haven't built a man page

Re: How to use Python well?

2011-02-18 Thread Roy Smith
In article slrnilu2e0.15e.grahn+n...@frailea.sa.invalid, Jorgen Grahn grahn+n...@snipabacken.se wrote: On Thu, 2011-02-17, Roy Smith wrote: In article slrnilr5lj.15e.grahn+n...@frailea.sa.invalid, Jorgen Grahn grahn+n...@snipabacken.se wrote: - Write user documentation and

Re: How to use Python well?

2011-02-18 Thread Ben Finney
Roy Smith r...@panix.com writes: In article slrnilu2e0.15e.grahn+n...@frailea.sa.invalid, Jorgen Grahn grahn+n...@snipabacken.se wrote: On Thu, 2011-02-17, Roy Smith wrote: These days, user documentation for me means good help text for argparse to use. Perhaps I'm old-fashioned,

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 11:16:30 -0800, Westley Martínez wrote: Allowing non-ascii characters as operators is a silly idea simply because if xorg breaks, which it's very likely to do with the current video drivers, I'm screwed. And if your hard drive crashes, you're screwed too. Why stop at xorg

Making Line Graphs

2011-02-18 Thread spam head
I'm looking for an easy way to display simple line graphs generated by a python program in Windows. It could be done from within the program, or I could write the information out to a file and call an external program. Either is fine. Does anybody have any recommendations for a good program

Re: Making Line Graphs

2011-02-18 Thread Paul Rubin
spam head spamhea...@gmail.com writes: I'm looking for an easy way to display simple line graphs generated by a python program in Windows. It could be done from within the program, or I could write the information out to a file and call an external program. Either is fine. I've used gnuplot

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Westley Martínez
On Sat, 2011-02-19 at 01:01 +, Steven D'Aprano wrote: On Fri, 18 Feb 2011 11:16:30 -0800, Westley Martínez wrote: Allowing non-ascii characters as operators is a silly idea simply because if xorg breaks, which it's very likely to do with the current video drivers, I'm screwed. And

Re: How to use Python well?

2011-02-18 Thread Westley Martínez
On Sat, 2011-02-19 at 11:39 +1100, Ben Finney wrote: Roy Smith r...@panix.com writes: In article slrnilu2e0.15e.grahn+n...@frailea.sa.invalid, Jorgen Grahn grahn+n...@snipabacken.se wrote: On Thu, 2011-02-17, Roy Smith wrote: These days, user documentation for me means good help

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Paul Rubin
Westley Martínez aniko...@gmail.com writes: When I read Python code, I only see text from Latin-1, which is easy to input and every *decent* font supports it. When I read C code, I only see text from Latin-1. When I read code from just about everything else that's plain text, I only see text

Re: How to use Python well?

2011-02-18 Thread Ben Finney
Westley Martínez aniko...@gmail.com writes: From what I've seen, the man pages are supposed to be in depth information that covers every nook and cranny of every option Those are man pages the document commands. There are many more man pages on a typical Unix-like system, which do not document

Re: How to use Python well?

2011-02-18 Thread Roy Smith
In article 878vxcbudn@benfinney.id.au, Ben Finney ben+pyt...@benfinney.id.au wrote: This collection of a great deal of documentation for the operating system into a single “manual” is one reason why users like man pages so much: we want to find anything installed on the system

Re: How to use Python well?

2011-02-18 Thread Ben Finney
Roy Smith r...@panix.com writes: Whether it's a wiki or the generated output of sphinx/doxygen/etc, HTML provides for a much richer presentation. Which is more convenient: having the signal(3) man page reference sigaction(2) textually, or having it be a clickable link that can take me

Python leaks in cyclic garbage collection

2011-02-18 Thread moerchendiser2k3
Hi, I have some problems with Python and the garbage collection. In the following piece of code I create a simple gargabe collection but I am still wondering why the finalizers are never called - at least on exit of Py they should be called somehow. What do I miss here? I know, there is no

Re: Python leaks in cyclic garbage collection

2011-02-18 Thread moerchendiser2k3
Thanks a lot for any help!!! Bye, moerchendiser2k3 -- http://mail.python.org/mailman/listinfo/python-list

file/folder naming

2011-02-18 Thread ecu_jon
im trying to use wxpython to get a source file/files, then a destination folder to write them to. the file and folder picker works. the problem is, actually copying (actually shutil.copy2() ). i get an except error, as if the destination file name is not correct. looking at the print lines the

Re: Making Line Graphs

2011-02-18 Thread Waldemar Osuch
Standard answer in such a case is matplotlib http://matplotlib.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python leaks in cyclic garbage collection

2011-02-18 Thread Chris Rebert
On Fri, Feb 18, 2011 at 8:10 PM, moerchendiser2k3 googler.1.webmas...@spamgourmet.com wrote: Hi, I have some problems with Python and the garbage collection. In the following piece of code I create a simple gargabe collection but I am still wondering why the finalizers are never called - at

Re: file/folder naming

2011-02-18 Thread Chris Rebert
On Fri, Feb 18, 2011 at 8:29 PM, ecu_jon hayesjd...@yahoo.com wrote: im trying to use wxpython to get a source file/files, then a destination folder to write them to. the file and folder picker works. the problem is, actually copying (actually shutil.copy2() ). i get an except error Please

Re: email library, get_payload() bug?

2011-02-18 Thread aspineux
On 18 fév, 14:41, peterob peterob...@gmail.com wrote: Helllo, I want to get the raw format of email body. the code Im using is         for part in email.walk():                 if part.get_content_maintype() == 'multipart':                         continue                 if

Re: file/folder naming

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 20:29:13 -0800, ecu_jon wrote: im trying to use wxpython to get a source file/files, then a destination folder to write them to. the file and folder picker works. the problem is, actually copying (actually shutil.copy2() ). i get an except error, as if the destination file

Re: Python leaks in cyclic garbage collection

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 20:49:09 -0800, Chris Rebert wrote: And following the pointer to gc.garbage's docs: http://docs.python.org/library/gc.html#gc.garbage : Objects that have __del__() methods and are part of a reference cycle ***cause the entire reference cycle to be uncollectable*** [...]

Re: file/folder naming

2011-02-18 Thread ecu_jon
On Feb 18, 11:59 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 18, 2011 at 8:29 PM, ecu_jon hayesjd...@yahoo.com wrote: im trying to use wxpython to get a source file/files, then a destination folder to write them to. the file and folder picker works. the problem is, actually

Re: file/folder naming

2011-02-18 Thread ecu_jon
ok changed the try/except to just a file copy and got this: sourcepath is : [u'I:\\college\\spring11\\capstone-project\ \facbac-009.py'] destpath is : V:\week3 destpath is : V:\week3\facbac-009.py Traceback (most recent call last): File I:\college\spring11\capstone-project\folder.py, line 53, in

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-18 Thread Yang Zhang
After way too much time, I figured it out, after a quote from [this post](http://fixunix.com/questions/379652-sending-eof-named-pipe.html) jumped out at me: See the I/O on Pipes and FIFOs section of pipe(7) (man 7 pipe) If all file descriptors referring to the write end of a pipe have been

Re: Unit testing multiprocessing code on Windows

2011-02-18 Thread David
Il Thu, 17 Feb 2011 18:31:59 -0500, Matt Chaput ha scritto: The problem is that with both python setup.py tests and nosetests, Maybe multiprocessing is starting new Windows processes by copying the command line of the current process? But if the command line is nosetests, it's a one way

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 18:14:32 -0800, Westley Martínez wrote: Besides, Windows and MacOS users will be scratching their head asking xorg? Why should I care about xorg? Why should I care if my programs run on Windows and Mac? Because I'm a nice guy I guess Python is a programming language

Re: file/folder naming

2011-02-18 Thread Chris Rebert
On Fri, Feb 18, 2011 at 10:13 PM, ecu_jon hayesjd...@yahoo.com wrote: ok changed the try/except to just a file copy and got this: sourcepath is : [u'I:\\college\\spring11\\capstone-project\ \facbac-009.py'] destpath is : V:\week3 destpath is : V:\week3\facbac-009.py Traceback (most recent

Re: file/folder naming

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 22:13:42 -0800, ecu_jon wrote: ok changed the try/except to just a file copy and got this: sourcepath is : [u'I:\\college\\spring11\\capstone-project\\facbac-009.py'] Note that it's a list. shutil.copy2(sourcepath,

Re: file/folder naming

2011-02-18 Thread ecu_jon
On Feb 19, 1:38 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 18 Feb 2011 22:13:42 -0800, ecu_jon wrote: ok changed the try/except to just a file copy and got this: sourcepath is : [u'I:\\college\\spring11\\capstone-project\\facbac-009.py'] Note that it's a

Re: Python Path registry Key

2011-02-18 Thread Sathish S
Hi, Thanks for replying. Yes sys.prefix works in the python shell window. But I have to find out python's path from another application running on windows. How can I access sys.prefix from that application. Thanks, Sathish On Sat, Feb 19, 2011 at 12:50 AM, Westley Martínez

Re: Problems of Symbol Congestion in Computer Languages

2011-02-18 Thread Westley Martínez
On Sat, 2011-02-19 at 06:29 +, Steven D'Aprano wrote: On Fri, 18 Feb 2011 18:14:32 -0800, Westley Martínez wrote: Besides, Windows and MacOS users will be scratching their head asking xorg? Why should I care about xorg? Why should I care if my programs run on Windows and Mac? Because

[issue10709] Misc/AIX-NOTES needs updating

2011-02-18 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: Here is a new version of the file: It integrates the corrections by R. David, and I also modified the memory limitations section in order to use ldedit rather than some flags for the linker. -- Added file:

[issue11212] Python memory limit on AIX

2011-02-18 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I updated the documentation in issue 10709 so that it mentions ldedit rather than the linker flags (more convenient to activate support for more memory). Once Python 3.2 is released, we may add LDR_CNTRL or ldedit in the Makefile

[issue11242] urllib.request.url_open() doesn't support SSLContext

2011-02-18 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Issue #9003 added cafile and capath arguments to url_open(), but it is not possible to reuse a SSLContext object (which would avoid to reload certificates, CRL, etc.). -- components: Library (Lib) messages: 128779 nosy:

[issue9523] Improve dbm modules

2011-02-18 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: An updated patch, based on latest several reviews on http://codereview.appspot.com/4185044/ update: 1, Refactoring the common tests between test_dbm_gnu and test_dbm_ndbm. 2, Move the abc registering in Lib/dbm/ndbm.py and Lib/dbm/gnu.py. 3, Other

[issue9523] Improve dbm modules

2011-02-18 Thread Ray.Allen
Changes by Ray.Allen ysj@gmail.com: Removed file: http://bugs.python.org/file20771/issue_9523.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9523 ___

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, my patch is incomplete: time2netscape() has the same issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5537 ___

[issue11242] urllib.request.url_open() doesn't support SSLContext

2011-02-18 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11242 ___ ___ Python-bugs-list

[issue11243] email/message.py str conversion [patch]

2011-02-18 Thread Steffen Daode Nurpmeso
New submission from Steffen Daode Nurpmeso sdao...@googlemail.com: Hy David, while hacking a bit on my thing i've found two places where header.Header needs to be explicitely converted via str(). Have a nice weekend. -- files: email_message.patch keywords: patch messages: 128782 nosy:

[issue11243] email/message.py str conversion [patch]

2011-02-18 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: (Will get that tracker right as time goes by.) -- type: - behavior versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243

[issue11243] email/message.py str conversion

2011-02-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the report. I probably won't have time to look at this for a bit. -- assignee: - r.david.murray stage: - patch review title: email/message.py str conversion [patch] - email/message.py str conversion versions:

[issue7330] PyUnicode_FromFormat segfault

2011-02-18 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: No you don't. You can copy a substring of the input string with Py_UNICODE_COPY: just pass a smaller length. Oh, yes, I got your meaning now. I'll follow this. You can truncate the input char* on the call to PyUnicode_DecodeUTF8: Oh, what if

[issue7330] PyUnicode_FromFormat segfault

2011-02-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, what if the trunked char* cannot be decoded correctly? e.g. a tow-bytes character is divided in the middle? Yes, but PyUnicode_FromFormatV() uses UTF-8 decoder with replace error handler, and so the incomplete byte sequence

[issue11243] email/message.py str conversion

2011-02-18 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: We all know EMail 6.0 will blow them off the streets in the end. -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Victor, I don't see your patch. Did you remove it? -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5537

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: No, I forgot to upload it... -- keywords: +patch Added file: http://bugs.python.org/file20785/cookiejar_datetime.patch ___ Python tracker rep...@bugs.python.org

  1   2   >