execute python code from db

2005-01-26 Thread robert
with stdin??. robert. -- http://mail.python.org/mailman/listinfo/python-list

installing tkiner

2005-01-28 Thread Robert
. Robert -- http://mail.python.org/mailman/listinfo/python-list

convert ftp.retrbinary to file object? - Python language lacks expression?

2005-02-03 Thread Robert
I just tried to convert a (hugh size) ftp.retrbinary run into a pseudo-file object with .read(bytes) method in order to not consume 500MB on a copy operation. First I thought, its easy as usual with python using something like 'yield' or so. Yet I didn't manage to do (without using threads or

MySQLdb and cgi

2005-10-30 Thread robert
Dear group, I have a problem with importing MySQLdb in a cgi-script. The code fragment at the beginning: 1 #!/usr/bin/env python 2 3 print Content-Type: text/html\n\n 4 5 import re 6 import cgi 7 import MySQLdb 8 print something but the print statement in line 8 will never be executed.

Re: MySQLdb and cgi

2005-10-31 Thread robert
I am sending it again, since it didn't appear on the mailing list. Dear group, I have a problem with importing MySQLdb in a cgi-script. The code fragment at the beginning: 1 #!/usr/bin/env python 2 3 print Content-Type: text/html\n\n 4 5 import re 6 import cgi 7 import MySQLdb 8 print

Monster python24.dll / stripping off asian codecs to separate package(s) ?

2005-11-04 Thread Robert
Martin v. Löwis schrieb: Robert wrote: Wouldn't it be an issue to think about if future win-python distributions should keep on including the asian codecs in the main-dll? Indeed, it would. As I said before: if somebody defines a clear, fair policy which finds agreement in the community

Re: Monster python24.dll / stripping off asian codecs to separate package(s) ?

2005-11-04 Thread Robert
. * _ssl.pyd has not the recent fixes. Robert -- http://mail.python.org/mailman/listinfo/python-list

Bugfix release 2.3.6 ?

2005-11-04 Thread Robert
. * _ssl.pyd has not the recent fixes. Robert -- http://mail.python.org/mailman/listinfo/python-list

something wrong in wx

2005-11-11 Thread Robert
() app.MainLoop() ### Thanks for any help. Robert -- http://mail.python.org/mailman/listinfo/python-list

Zope side-by-side with Python 2.4

2004-12-03 Thread Robert
If I have Python 2.4 installed and I want to install the latest stable Zope, will Zope have problems or does Zope looks to its own setup and not my install of Python 2.4? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: New versions breaking extensions, etc.

2004-12-10 Thread Robert
VS7 is a really a vastly different beastie than VS6. On 12/10/04 9:31 PM, in article [EMAIL PROTECTED], Jive [EMAIL PROTECTED] wrote: Can someone explain to me why Python 2.4 on MS Windows has these backward compatibility problems? What am I missing? Why won't extensions compiled to run

Unicode Pythonwin / win32 / console?

2006-01-09 Thread Robert
strings should be displayed as nice as possible at the console with normal print-s to stdout (on varying platforms, different windows/countries and linux, ...; I py2exe/cxfreeze apps) ... Any hints how to do this and make it as complete and automated as possible? Robert -- http://mail.python.org

Re: Unicode Pythonwin / win32 / console?

2006-01-10 Thread Robert
Martin v. Löwis schrieb: Robert wrote: I'm using Pythonwin and py2.3 (py2.4). I did not come clear with this: I want to use win32-fuctions like win32ui.MessageBox, listctrl.InsertItem . to get unicode strings on the screen - best results according to the platform/language settings

(Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
encoding on tty's should be tolerant/replace-mode by default. Robert PS: this guy also is somewhat angry about the current situation: http://blog.ianbicking.org/do-i-hate-unicode-or-do-i-hate-ascii.html GvR felt save with 'ascii' for future improvements like utf-8 : http://mail.python.org

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
gregarican wrote: Robert wrote: (windows or linux console) print u'\u034a' Traceback (most recent call last): File stdin, line 1, in ? File C:\PYTHON23\lib\encodings\cp850.py, line 18, in encode return codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError

Re: Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
. Shouldn't something like that (or 'replace') (or a prominent switch-function for such behaviour) be the default for python - output the maximum, not minimum ? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode Pythonwin / win32 / console?

2006-01-11 Thread Robert
Martin v. Löwis schrieb: Robert wrote: win32ui.MessageBox(s) Traceback (most recent call last): File interactive input, line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode characters in position 12-16: ordinal not in range(128) Can't comment on that - this is a PythonWin

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-11 Thread Robert
Neil Hodgson schrieb: Robert: PythonWin did have some Unicode support but I think Mark Hammond was discouraged by bugs. In pythonwin/__init__.py there is a setting is_platform_unicode = 0 with a commented out real test for Unicode on the next line. Change this to 1 and restart and you

Unicode style in win32/PythonWin

2006-01-12 Thread Robert
Neil Hodgson wrote: Robert: After is_platform_unicode = auto, scintilla displays some unicode as you showed. but the win32-functions (e.g. MessageBox) still do not pass through wide unicode. Win32 issues are better discussed on the python-win32 mailing list which is read by more

Re: Unicode Pythonwin / win32 / console?

2006-01-12 Thread Robert
Martin v. Löwis schrieb: Robert wrote: is in a PythonWin Interactive session - ok results for cyrillic chars (tolerant mbcs/utf-8 encoding!). But if I do this on Win console (as you probably mean), I get also encoding Errors - no matter if chcp1251, because cyrillic chars raise

Re: Unicode style in win32/PythonWin

2006-01-13 Thread Robert
Thomas Heller schrieb: Robert [EMAIL PROTECTED] writes: Neil Hodgson wrote: Robert: After is_platform_unicode = auto, scintilla displays some unicode as you showed. but the win32-functions (e.g. MessageBox) still do not pass through wide unicode. Win32 issues are better

time.strptime intolerant on weekday string length?

2005-09-13 Thread Robert
%Y %H:%M:%S I also don't see how to alter the pattern for strptime to be tolerante for more long weekday strings? Any ideas? Shouldn't it be possible to insert real regexp-like stuff in the pattern? Robert -- http://mail.python.org/mailman/listinfo/python-list

Small python24.dll / how to strip off asian codecs to separate package(s) ?

2005-09-22 Thread Robert
updating a py2exe'd software I was impressed by python24.dll's footprint - double size of python23.dll Is there a version without/separate asianc codecs (which seem to mainly blow up python24.dll)? Or how to build one? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Small python24.dll / how to strip off asian codecs to separate package(s) ?

2005-09-24 Thread Robert
codecs? Robert Martin v. Löwis [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Robert wrote: Or how to build one? Just download the source, and follow the instructions in PCBuild/readme.txt. Then, edit the pythoncore project to remove the files you don't want to include

wxPython + pyPlot

2005-10-18 Thread Robert
=wx.Point(0, 0), size=wx.Size(510, 328), style=0) and I don't now how to do that. thanks for any help. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython + pyPlot

2005-10-18 Thread Robert
Maebe, does anyone have some examples with wxPython and pyplot? Thanks again, Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython + pyPlot

2005-10-18 Thread Robert
Philippe C. Martin wrote: I think wxWidget comes with a sample Philippe Yes I use it, but there is not a sample with pyplot. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: importing pyc from memory?

2005-07-04 Thread Robert
('xy') exec co in mod.__dict__ Robert -- http://mail.python.org/mailman/listinfo/python-list

Error with Python

2005-08-22 Thread Robert
... Regards Robert -- http://mail.python.org/mailman/listinfo/python-list

sslerror: (8, 'EOF occurred in violation of protocol') ???

2005-08-29 Thread Robert
?) occures? What can be done to handle/circumvent that problem? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: sslerror: (8, 'EOF occurred in violation of protocol') ???

2005-08-30 Thread Robert
Robert [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] On some connections only from some computers/network setups I get this error: Traceback (most recent call last): File interactive input, line 1, in ? File ClientCookie\_urllib2_support.pyo, line 524, in open File

Re: micro-python - is it possible?

2005-08-30 Thread Robert
such a mini-python be worth using over C, Forth, etc? guess so if your app has non-trivial complexity: Faktor 5 in programming speed and clarity of code - if you can grant 0.5..2MB overhead. but guess you still need some 1%..5% C for time critical stuff. Robert -- http://mail.python.org

socket.sslerror:(1, 'error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol')

2005-08-31 Thread Robert
\', 600, \'_send_output\', None), (\'httplib.pyo\', 567, \'send\', None), (\'httplib.pyo\', 988, \'connect\', None), (\'socket.pyo\', 73, \'ssl\', None)] Robert -- http://mail.python.org/mailman/listinfo/python-list

Python / web

2005-09-01 Thread Robert
..., Also a fair amount of googling. I'll say there's a large amount of technology to pick from. Rather than spend time going down the wrong road, can I get some feedback as directions from you folks that's been there, done that. thanks a bunch. Robert -- http://mail.python.org/mailman/listinfo

sslerror: (8, 'EOF occurred in violation of protocol')

2005-09-05 Thread Robert
/routers are in use. What is the nature of this error? How is it possible that an EOF in ssl-connections (during connect?) occures? What can be done to handle/circumvent that problem? Robert -- http://mail.python.org/mailman/listinfo/python-list

Python cannot print - Re: Unicode style in win32/PythonWin

2006-01-15 Thread Robert
.py and has to do with my (undefined?) files? A very cice language, which cannot print by default... go to Java ... Bye My recommendation is to use 'backslashreplace as default mode. Nobody is angry when alien chars are printed in this style. Robert -- http://mail.python.org/mailman/listinfo

Guessing _charset for MIMEText ?

2006-01-18 Thread Robert
, but 'ISO-8859-1' or 'Windows-1252' are usually used for that area. Robert PS: side-question: why is there a latin_1.py and a iso8859_1.py in lib/encodings ? Shouldn't they be the same? -- http://mail.python.org/mailman/listinfo/python-list

Ruby/Python Continuations: Turning a block callback into a read()-method ?

2006-02-12 Thread Robert
() ... ... = Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Tracking down memory leaks?

2006-02-12 Thread Robert
the issue by not creating cycles containing objects with __del__() methods, and garbage can be examined in that case to verify that no such cycles are being created. Robert -- http://mail.python.org/mailman/listinfo/python-list

SSL and Proxy problem with urllib2 ?

2005-04-05 Thread Robert
sslerror: (1, 'error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol') using python 2.3.5 any Ideas about the problem? Robert -- http://mail.python.org/mailman/listinfo/python-list

unknown protocol error in httplib using HTTPS

2005-04-05 Thread Robert
did you solve this problem? It seems to be still present here with py2.3.5. Robert -- From: Manish Jethani [EMAIL PROTECTED] User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups

pygtk and long running process

2005-04-24 Thread Robert
Hi, I have a command line app that can take up to 20 minutes to complete and every minute or so updates it's status (spits it out to console). I am writing a front end for this app in python/gtk and was wondering what command I use to a) invoke the command and b) how to capture it's out put and

Re: pygtk and long running process

2005-04-25 Thread Robert
On Sun, 24 Apr 2005 19:46:52 -0600, Daniel Cer wrote: Daniel Cer wrote: Robert wrote: I have a command line app that can take up to 20 minutes to complete and every minute or so updates it's status (spits it out to console). I am writing a front end for this app in python/gtk

counting lines using fileinput module

2008-02-13 Thread Robert
I would like to count lines in a file using the fileinput module and I am getting an unusual output. -- #!/usr/bin/python import fileinput # cycle through files for line in fileinput.input(): if

Re: counting lines using fileinput module

2008-02-13 Thread Robert
On Feb 13, 8:31 pm, 7stud [EMAIL PROTECTED] wrote: On Feb 13, 6:47 pm, Robert [EMAIL PROTECTED] wrote: I would like to count lines in a file using the fileinput module and I am getting an unusual output

Large file support 2/4GB ?

2008-02-25 Thread robert
Somebody who uses my app gets a error : os.stat('/path/filename') OSError: [Errno 75] Value too large for defined data type: '/path/filename' on a big file 4GB ( Python 2.4.4 / Linux ) How about that? Does Python not support large files? Or which functions do not support? Robert -- http

Does Python use a special home-made parser, or does it use Yacc?

2008-04-16 Thread Robert
Or some other pre-packaged parser tool? -- http://mail.python.org/mailman/listinfo/python-list

Accessing mail box tree of Thunderbird/Seamonkey?

2009-04-05 Thread robert
Is there a API/possibilty for readingwriting (live) in the mail box tree of Thunderbird/Seamonkey with Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing mail box tree of Thunderbird/Seamonkey?

2009-04-06 Thread robert
Chris Rebert wrote: On Sun, Apr 5, 2009 at 1:04 AM, robert rob...@nowhere.invalid wrote: Is there a API/possibilty for readingwriting (live) in the mail box tree of Thunderbird/Seamonkey with Python? From what I can google, they're already in mbox format, so you can use mailbox.mbox to read

Detecting dir (tree) changes fast?

2008-09-29 Thread robert
I want to detect changes in a directory tree fast with minimum overhead/load. In order to check the need for sync tasks at high frequency. It must not be 100% reliable (its also forced time periodic), so kind of hashing would be ok. How? Robert -- http://mail.python.org/mailman/listinfo

Re: loops

2008-10-18 Thread robert
about voluptuous multimulti..possibilites, not worth the play: one-ness of mind If insistent, you could sometimes save lines like this ;-) x=1 while x=100: print x; x+=x Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: loops

2008-10-18 Thread robert
Aaron Brady wrote: Gandalf wrote: On Oct 18, 12:39 pm, Duncan Booth [EMAIL PROTECTED] wrote: Gandalf [EMAIL PROTECTED] wrote: how can I do width python a normal for loop width tree conditions like for example : for x=1;x=100;x+x: print x What you wrote would appear to be an infinite

Re: dumping in destructor

2008-10-20 Thread robert
) (or the second refcount) to fall below 1 plus number of extra local refs. In case execute your obj.__deregister() or so ... Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: efficient Python object count

2008-11-07 Thread robert
not reachable through gc.get_objects() - as used by the script above. So be aware. Maybe you've got the same motive for your counter. I was somewhat stunn seeing, that obviously almost any serious bigger app needs to watch and handle/free the gc.garbarge list by hand, to remain stable. Robert

Configuration files

2008-06-14 Thread Robert
What is the most Pythonic way to maintain a configuration file? Are there any libraries mimicking registry / ini file writing that many windows programming languages/environments offer? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Configuration files

2008-06-16 Thread Robert
Does ConfigParser allow writing configuration changes also? Dennis Lee Bieber [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] On Sat, 14 Jun 2008 21:27:19 +0200, Robert [EMAIL PROTECTED] declaimed the following in comp.lang.python: What is the most Pythonic way to maintain

Re: py2exe 0.6.8 released

2008-06-16 Thread Robert
) - a wxPython2.8-win32-unicode-2.8.7.1-py25.exe install - a py2exe-0.6.8.win32-py2.5.exeinstall. I have deleted C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wxPython because there indications that this is not needed, but other problems emerged. Any clues how to proceed next? Robert -- http

Hands-on HTML Table Parser/Matrix?

2008-07-06 Thread robert
(without need for callback functions,classes.. for basic tasks)? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Hands-on HTML Table Parser/Matrix?

2008-07-06 Thread robert
Tim Cook wrote: On Sun, 2008-07-06 at 14:40 +0200, robert wrote: Often I want to extract some web table contents. Formats are mostly static, simple text numbers in it, other tags to be stripped off. So a simple fast approach would be ok. What of the different modules around is most easy

formatting list - comma separated

2008-07-09 Thread Robert
given d: d = [soep, reeds, ook] I want it to print like soep, reeds, ook I've come up with : print (%s+, %s*(len(d)-1)) % tuple(d) but this fails for d = [] any (pythonic) options for this? Robert -- http://mail.python.org/mailman/listinfo/python-list

string split without consumption

2008-02-02 Thread robert
\n'] re.split(r'(?m)$',ss) ['owi\nweoifj\nfheu\n'] re.split(r'(?m)\Z',ss) ['owi\nweoifj\nfheu\n'] re.split(r'(?m)\A',ss) ['owi\nweoifj\nfheu\n'] re.split(r'(?s)\A',ss) ['owi\nweoifj\nfheu\n'] re.split(r'(?s)(?m)\A',ss) ['owi\nweoifj\nfheu\n'] how to do? Robert -- http

Re: string split without consumption

2008-02-02 Thread robert
in that regard: there is always a last empty or half line, which can be fed readily as start to the further input buffering. With the .splitlines(True/False) results you need to fiddle, test the last result's last char... Or you fail altogether with False. So I'd call this a wrong implementation. Robert

Re: string split without consumption

2008-02-02 Thread robert
()] ['owi\n', 'eoifj\n', 'heu\n', 'xxx\n'] as another try for your edge case. It's understandable and natural-looking nice for some display purposes, but wrong regarding a general logic. The 'xxx' is not a complete line in the general case. Its and (open) part and should appear so. Robert

Re: string split without consumption

2008-02-02 Thread robert
Jeffrey Froman wrote: robert wrote: thanks. Yet this does not work naturally consistent in my line processing algorithm - the further buffering. Compare e.g. ss.split('\n') .. 'owi\nweoifj\nfheu\n'.split('\n') ['owi', 'weoifj', 'fheu', ''] 'owi\nweoifj\nfheu\nxx'.split('\n') ['owi

Re: string split without consumption

2008-02-02 Thread robert
Steve Holden wrote: robert wrote: [...] but its also wrong regarding partial last lines. re.split obviously doesn't understand \A \Z ^ $ and also \b etc. empty matches. [...] Or perhaps you don't understand re? It's a tricky thing to start playing with. Look up re.MULTILINE ans

sem_post: Invalid argument

2007-10-25 Thread robert
On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits sem_post: Invalid argument. What is this and how can this solved? Robert == server [~]# python2.4 sem_post: Invalid argument sem_post: Invalid argument sem_post: Invalid argument sem_post

Re: sem_post: Invalid argument

2007-10-25 Thread robert
Jonathan Gardner wrote: On Oct 25, 12:56 pm, robert [EMAIL PROTECTED] wrote: On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits sem_post: Invalid argument. What is this and how can this solved? ... Python 2.4.3 (#1, Jun 6 2006, 21:10:41) [GCC

Re: sem_post: Invalid argument

2007-10-27 Thread robert
Jonathan Gardner wrote: On Oct 25, 2:19 pm, robert [EMAIL PROTECTED] wrote: Jonathan Gardner wrote: On Oct 25, 12:56 pm, robert [EMAIL PROTECTED] wrote: On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits sem_post: Invalid argument. What

Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-17 Thread robert
In a makefile I want to locate the .so for a dynamically linked Python on Linux. (for cx_Freeze's --shared-lib-name) e.g. by running a small script with that Python. How to? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-18 Thread robert
James Stroud wrote: robert wrote: In a makefile I want to locate the .so for a dynamically linked Python on Linux. (for cx_Freeze's --shared-lib-name) e.g. by running a small script with that Python. How to? Robert def findaso(aso): import os for apath in os.sys.path

Re: Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-18 Thread robert
Neal Becker wrote: robert wrote: In a makefile I want to locate the .so for a dynamically linked Python on Linux. (for cx_Freeze's --shared-lib-name) e.g. by running a small script with that Python. How to? Robert How about run python -v yourscript and filter the output? for examples

How to find cause for Python/Pythonwin crash only on Dual Core Machines ?

2006-03-02 Thread robert
with Python/Pythonwin specific for dual core's (py2.3.5 / pywin203) ? What could I do to find the problem? Robert -- PS: there is very little C extension-code (SWIG) involved, yet I looked over that so often, I guess its save: // #include stdafx.h #include commctrl.h #include ext.h

os.popen3 delivers no error exist status ?

2006-03-02 Thread robert
os.popen3 delivers no error exit status on .close() - while os.popen does Is this intended or a bug? How do I get the status? Robert Python 2.4.1 (#2, May 5 2005, 11:32:06) [GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2 Type help, copyright, credits or license for more information. import os

wxPython memory footprint? - Re: Write a GUI for a python script?

2006-03-02 Thread robert
. ( When I made a test with wxPython some years ago, it had no option to step/share its Messageloop. Interaction was crusty and I didn't manage to get smooth debugging (on Windows). ) Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: how to validate a proxy is alive?

2006-03-10 Thread robert
)) Traceback (most recent call last): File interactive input, line 1, in ? File string, line 1, in connect error: (10061, 'Connection refused') s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('existing-proxy-server',3128)) 1 1 Robert -- http://mail.python.org/mailman

How to best update remote compressed, encrypted archives incrementally?

2006-03-10 Thread robert
directly compare agains and update a single consistent file like ftp:///archive.zip.gpg Is something like this possible? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: How to best update remote compressed, encrypted archives incrementally?

2006-03-11 Thread robert
Steven D'Aprano wrote: On Fri, 10 Mar 2006 15:13:07 +0100, robert wrote: Hello, I want to put (incrementally) changed/new files from a big file tree directly,compressed and password-only-encrypted to a remote backup server incrementally via FTP,SFTP or DAV At best within a closed

RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
to not fail? Or can I only retry several times in case of RuntimeError? (which would apears to me as odd gambling; retry how often?) Robert PS: Zope dumps thread exposed data structes regularly. How does the ZODB in Zope handle dict/list changes during its pickling operations? --- Python 2.4.1

Re: RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
Is a copy.deepcopy ( - cPickle.dump(copy.deepcopy(obj),f) ) an atomic opertion with a guarantee to not fail? Or can I only retry several times in case of RuntimeError? (which would apears to me as odd gambling; retry how often?) For an intermediate solution, I'm playing roulette:

Re: RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
robert wrote: Is a copy.deepcopy ( - cPickle.dump(copy.deepcopy(obj),f) ) an atomic opertion with a guarantee to not fail? Or can I only retry several times in case of RuntimeError? (which would apears to me as odd gambling; retry how often?) For an intermediate solution, I'm

Re: How to best update remote compressed, encrypted archives incrementally?

2006-03-11 Thread robert
archive slices is arduous Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
Felipe Almeida Lessa wrote: Em Sáb, 2006-03-11 às 12:49 +0100, robert escreveu: Meanwhile I think this is a bug of cPickle.dump: It should use .keys() instead of free iteration internally, when pickling elementary dicts. I'd file a bug if no objection. AFAICS, it's a problem with your

Re: RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
EleSSaR^ wrote: robert si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: [cut] I don't know what's your code like, but a similar error occurred in some of my software and it was my fault indeed. I think you should either use a lock, or implement a deepcopy

Re: How to best update remote compressed, encrypted archives incrementally?

2006-03-11 Thread robert
Steven D'Aprano wrote: On Sat, 11 Mar 2006 16:09:22 +0100, robert wrote: Lastly, have you considered that your attempted solution is completely the wrong way to solve the problem? If you explain _what_ you are wanting to do, rather than _how_ you want to do it, perhaps there is a better way

Re: RuntimeError: dictionary changed ... Ruby

2006-03-11 Thread robert
Alex Martelli wrote: robert [EMAIL PROTECTED] wrote: ... 99.99% no. I would have to use a lock everywhere, where I add or remove something into a dict or list of the struct. Thats not the purpose of big thread locks. Such simple operations are already atomic by the definition of Python

Re: RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
EleSSaR^ wrote: robert si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: own deepcopy: thus, do you already know if the existing deepcopy has the same problem as cPickle.dump ?(as the problem araises rarely, it is difficult for me to test it out) I don't

Re: RuntimeError: dictionary changed size during iteration ; Good atomic copy operations?

2006-03-11 Thread robert
Tim Peters wrote: [robert] ... PS: how does ZODB work with this kind of problem? I thought is uses cPickle? It does. Each thread in a ZODB application typically uses its own connection to a database. As a result, each thread gets its own consistent view of database objects, which can

Global Lock for Python Threading ? - Re: RuntimeError: dictionary changed ...

2006-03-11 Thread robert
robert wrote: Guess it would be more wise to not expose deepcopy, cPickle.dump etc. to this kind of RuntimeError unnecessarily. The speed gain of the iterator-method - if any - is minor, compared to the app crash problems, which are not easy to discover and work-around (because

Pythons (undefined) Practical Atoms ? - Re: RuntimeError: dictionary changed ...

2006-03-12 Thread robert
Alex Martelli wrote: robert [EMAIL PROTECTED] wrote: ... What? When I add/del an item to a dict or list, this is not an atomic thread-safe operation? Exactly: there is no such guarantee in the Python language. E.g.: One thread does things like d['x']='y' Another thread reads d['z

Global Threading Lock 2 - Re: RuntimeError: dictionary changed size during iteration..

2006-03-13 Thread robert
the loop and may probably not switch at all ... Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: How to best update remote compressed, encrypted archives incrementally?

2006-03-13 Thread robert
[EMAIL PROTECTED] wrote: Would rsync into a remote encrypted filesystem work for you? the sync (selection) is custom anyway. The remote filesystem is general/unknow. FTP(S) / SFTP is the only standard given. -- http://mail.python.org/mailman/listinfo/python-list

global, globals(), _global ?

2006-03-15 Thread robert
are pulled off at exit() ) Somehow I miss a nice standard method for using globals in an unfragmented way everywhere. What do you think? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: global, globals(), _global ?

2006-03-15 Thread robert
Xaver Hinterhuber wrote: Hi Robert, I was using global variables some time ago, too. But with the time the program simply got unmaintainable, because it is very hard to trace, why a global variable has some special value and not the one, you thought it should have. So I redesigned

Re: WORKAROUND the Python GUI-lib situation ...

2006-03-15 Thread robert
a real Python GUI toolkit and unite the OS'es directly - as good as it does for the os module ? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: global, globals(), _global ?

2006-03-15 Thread robert
Fredrik Lundh wrote: robert wrote: Most variable read-s in Python anyway go to module globals - as there are no other kinds of namespaces except __builtins__ your post made some sense until I got to this paragraph, which appears to completely ignore local variables, arguments

Re: WORKAROUND the Python GUI-lib situation ...

2006-03-15 Thread robert
). One could steal a few principles, abstract algs. and even names in less time than gluing the fragile C++. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: global, globals(), _global ?

2006-03-15 Thread robert
Alex Martelli wrote: robert [EMAIL PROTECTED] wrote: ... ( And that later scheme is fairly wonderful - compare for example the namespace fuzz in C/C++, Pascal, Ruby, ... where you never know which module file addeds what to which namespace; Pascal (per se) doesn't really have much

Re: global, globals(), _global ?

2006-03-15 Thread robert
Alex Martelli wrote: robert [EMAIL PROTECTED] wrote: Using global variables in Python often raises chaos. Other languages use a clear prefix for globals. Ruby does ($ means global), but, what other languages? Perl, C, C++, Java (taking a class's statics as Java's equivalent of other

A Frame-space syntax ? - Re: global, globals(), _global ?

2006-03-16 Thread robert
Alex Martelli wrote: robert [EMAIL PROTECTED] wrote: ... I think its good to leave the default global binding (that is probably whats Guido doesn't want to give up for good reason) Then, on the principle that there should be preferably only one obvious way to do something, we'll never

Pythonic debugging - Re: Python Debugger / IDE ??

2006-03-17 Thread robert
is maybe for a (slow) breakpoint b Unfortunately such method is not encouraged and exposed (clearly) in the big IDE's. Those' overall style is a lazy copy of C, Java I do-hacker history. Im curious much about their value at all. Keep it simple and let Python do. Robert -- http://mail.python.org

  1   2   3   4   5   6   7   8   9   10   >