AVC 0.5.0 released

2008-02-04 Thread f . pollastri
Announcing AVC 0.5.0 Webpage: http://avc.inrim.it/ What is AVC? - AVC is a multiplatform, fully automatic, live connection among graphical interface widgets and application variables for the python language. AVC supports in a uniform way the most

Python-URL! - weekly Python news and links (Feb 4)

2008-02-04 Thread Gabriel Genellina
QOTW: Everyone with a PC knows that eventually their computer will slow down, crash unexpectedly, and develop problems with applications. - promotional materials for award-winning *Degunking Windows* book It's a very good idea to read the entire FAQ as soon as you've gotten past the very basic

Pydev 1.3.13 Released

2008-02-04 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.13 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

ANN: SUMMON 1.8.5 Released: 2D Visualization prototyping and scripting

2008-02-04 Thread rasmus
SUMMON 1.8.5 SUMMON is a python extension module that provides rapid prototyping of 2D visualizations. By heavily relying on the python scripting language, SUMMON allows the user to rapidly prototype a custom visualization for their data, without the overhead of a designing a graphical user

Re: Too many open files

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 12:50:15 -0200, Christian Heimes [EMAIL PROTECTED] escribi�: Jeff wrote: Why don't you start around 50 threads at a time to do the file writes? Threads are effective for IO. You open the source file, start a queue, and start sending data sets to be written to the

Re: Elementary string-parsing

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 09:43:04 +, Odysseus wrote: In article [EMAIL PROTECTED], Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: def extract_data(names, na, cells): found = dict() The problem with initializing the 'super-dictionary' within this function is that I want to be

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Jon Ribbens
On 2008-02-04, Christian Heimes [EMAIL PROTECTED] wrote: Jon Ribbens wrote: Why? I don't think you do. Neither does BSD daemon.c or glibc daemon.c The problem is well documented at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 OK I understand what is being said here,

Re: Unexpected timing results with file I/O

2008-02-04 Thread rdahlstrom
It doesn't matter how many doors opening and closing there are, it matters the order in which the opening, walking through, and closing are done. That's my point. In the second example, all of the disk operations are done at the same time. That's what I meant by people going through the doors.

Re: Client side GUI-like web framework ?

2008-02-04 Thread USCode
[EMAIL PROTECTED] wrote: You just described what XUL aims to be http://developer.mozilla.org/en/docs/The_Joy_of_XUL http://developer.mozilla.org/en/docs/XULRunner At present it lacks for sure documentation (or maybe it isn't organized really well) Just took a look at XUL and it in some

Re: Unexpected timing results with file I/O

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 10:48:32 -0800, rdahlstrom wrote: It doesn't matter how many doors opening and closing there are, it matters the order in which the opening, walking through, and closing are done. That's my point. In the second example, all of the disk operations are done at the same

Re: Unexpected timing results with file I/O

2008-02-04 Thread Carl Banks
On Feb 4, 12:53 pm, rdahlstrom [EMAIL PROTECTED] wrote: On Feb 4, 10:17 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: After reading an earlier thread about opening and closing lots of files, I thought I'd do a little experiment. Suppose you have a whole lot of files,

Re: Unexpected timing results with file I/O

2008-02-04 Thread rdahlstrom
On Feb 4, 10:17 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: After reading an earlier thread about opening and closing lots of files, I thought I'd do a little experiment. Suppose you have a whole lot of files, and you need to open each one, append a string, then close

Re: Python feature request : operator for function composition

2008-02-04 Thread Kay Schluehr
This won't work for builtin functions. It hardly works for functions and methods defined in 3rd party modules and in no way for functions defined in C extensions. It adds boilerplate statically to remove it at runtime. -- http://mail.python.org/mailman/listinfo/python-list

Pydev 1.3.13 Released

2008-02-04 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.13 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

Re: Too many open files

2008-02-04 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 04 Feb 2008 13:57:39 +0100, AMD wrote: The problem I have under windows is that as soon as I get to 500 files I get the Too many open files message. I tried the same thing in Delphi and I can get to 3000 files. How can I increase the number

Re: Python GUI toolkit

2008-02-04 Thread Kevin Walzer
Chris Mellon wrote: Nitpick, but an important one. It emulates *look*. Not feel. Native look is easy and totally insufficient for a native app - it's the feel that's important. Is this opinion based on firsthand experience with use of the Tile/ttk widgets on any of the relevant platforms?

Re: Pysqlite issue no attribute 'autocommit' RESOLVED

2008-02-04 Thread Andy Smith
Ok, simple fix... Updated to MySQL_python-1.2.2 and all ok now! :D - Original Message - From: Andy Smith To: python-list@python.org Sent: Monday, February 04, 2008 3:45 PM Subject: Pysqlite issue no attribute 'autocommit' Hi there, Im trying to run a Python based

Re: Terse Syntax through External Methods

2008-02-04 Thread aggergren
On Jan 29, 11:50 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Jens schrieb: On Jan 25, 3:19 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Jens schrieb: Hello Everyone I'm newbie toZopeand i have a few questions regarding external methods. What i wan't to do is provide a terse

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Rolf van de Krol
To create a deamon, you indeed need to fork two times. For more information and a working example see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 . I'm quite sure this works, because I used it several times to create a deamon. Jon Ribbens wrote: On 2008-02-04, Christian

Re: Python feature request : operator for function composition

2008-02-04 Thread Dustan
On Feb 4, 10:11 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: This is nice. Thanks. * I wouldn't choose '' as the composing operator as when I read 'double square' I think 'take an x, double it square it' which is the wrong interpretation (perhaps instead?). A very good point that I

Re: Python GUI toolkit

2008-02-04 Thread bockman
Another toolkit you might look into is Tkinter. I think it is something like the official toolkit for python. I also think it is an adapter for other toolkits, so it will use gtk widgets on gnome, qt widgets on kde and some other strange widgets on windows. Not t so, AFAIK. Tkinter is the

Re: Extending the import mechanism - what is recommended?

2008-02-04 Thread dbr517
On Jan 29, 2:36 pm, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I need to extend the import mechanism to support another file type. I've already written the necessary C library to read the file and return a python code object. I found one example which just sub-classed

Re: type, object hierarchy?

2008-02-04 Thread Jason
On Feb 3, 10:31 pm, 7stud [EMAIL PROTECTED] wrote: On Feb 3, 10:28 pm, 7stud [EMAIL PROTECTED] wrote: From the docs: issubclass(class, classinfo) Return true if class is a subclass (direct or indirect) of classinfo. print issubclass(Dog, object) #True print issubclass(type, object)

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Jon Ribbens
On 2008-02-04, Gilles Ganault [EMAIL PROTECTED] wrote: I need to launch a Python script, and fork it so that the calling script can resume with the next step will the Python script keeps running. I tried those two, but they don't work, as the calling script is stuck until the Python

Re: PyOpenGL

2008-02-04 Thread Mike C. Fletcher
[EMAIL PROTECTED] wrote: Hi all, I apologize if this question was already answered before but I was unable to find a proper solution to my problem. Anyways, I am trying to run shaderobjects.py on Windows (Python 2.5.1) by just double- clicking, and I got the following error: [...] File

Re: Python GUI toolkit

2008-02-04 Thread Eric Brunel
On Sun, 03 Feb 2008 20:38:41 +0100, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote: [snip] Another toolkit you might look into is Tkinter. I think it is something like the official toolkit for python. I also think it is an adapter for other toolkits, so it will use gtk widgets on gnome, qt

Re: MySQLdb: commit before cursor close, or after?

2008-02-04 Thread Frank Aune
On Monday 04 February 2008 19:14:13 John Nagle wrote: I'm getting some wierd commit-related behavior from MySQLdb. I'm using InnoDB, so transactions really matter. I'm currently doing cursor = db.cursor() cursor.execute(...) cursor.close() db.commit() Is that

Re: When is min(a, b) != min(b, a)?

2008-02-04 Thread Albert van der Horst
In article [EMAIL PROTECTED], Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 24 Jan 2008 13:34:56 +, Antoon Pardon wrote: On 2008-01-21, Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 20 Jan 2008 21:15:02 -0600, Albert Hopkins wrote: According to the IEEE-754 standard the usual

Re: Client side GUI-like web framework ?

2008-02-04 Thread Salvatore
[EMAIL PROTECTED] a écrit : You just described what XUL aims to be http://developer.mozilla.org/en/docs/The_Joy_of_XUL http://developer.mozilla.org/en/docs/XULRunner XUL is great but it does not allow yet to use Python. There use to be such a beast, it was named 'Nufox'... Give a try to

Re: type, object hierarchy?

2008-02-04 Thread 7stud
Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Client side GUI-like web framework ?

2008-02-04 Thread [EMAIL PROTECTED]
On 4 Feb, 18:45, USCode [EMAIL PROTECTED] wrote: Wouldn't it be handy if there was a web framework that allowed you to create pages and control the interface like you would using a client-side GUI framework such as Tkinter? The framework would need a small, fast web server that would

Re: Unexpected timing results with file I/O

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 15:17:18 +, Steven D'Aprano wrote: # Method one: grouped by file. for each file: open the file, append the string, then close it # Method two: grouped by procedure. for each file: open the file for each open file: append the string for each open

Re: Is it explicitly specified?

2008-02-04 Thread André Malo
* Steven D'Aprano wrote: On Sun, 03 Feb 2008 15:31:49 -0800, Paul Boddie wrote: I don't know whether I can offer much better advice than others, but I have noticed that a lot of my own code has moved in the direction of not having specific default values in function/method signatures. So,

Re: MySQLdb: commit before cursor close, or after?

2008-02-04 Thread Carsten Haese
On Mon, 2008-02-04 at 19:53 +0100, Frank Aune wrote: No, you obviously need to commit your changes before closing the cursor. I'm surprised if your code above even works if adding content to the db. Why is that obvious? Is this some MySQL-specific oddity? In other databases, it's the cursor's

Re: Python GUI toolkit

2008-02-04 Thread Kevin Walzer
Chris Mellon wrote: I didn't say inherently unable, I said the toolkit doesn't provide it. Note that you said that you did a lot of work to follow OS X conventions and implement behavior. The toolkit doesn't help you with any of this. A mac-native toolkit (or one that strives for native

Re: type, object hierarchy?

2008-02-04 Thread Eduardo O. Padoan
On Feb 4, 2008 1:36 AM, 7stud [EMAIL PROTECTED] wrote: print dir(type) #__mro__ attribute is in here print dir(object) #no __mro__ attribute class Mammals(object): pass class Dog(Mammals): pass print issubclass(Dog, type) #False print Dog.__mro__ --output:-- (class

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Jon Ribbens
On 2008-02-04, Rolf van de Krol [EMAIL PROTECTED] wrote: To create a deamon, you indeed need to fork two times. For more information and a working example see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 . I'm quite sure this works, because I used it several times to

Re: Elementary string-parsing

2008-02-04 Thread Odysseus
In article [EMAIL PROTECTED], Dennis Lee Bieber [EMAIL PROTECTED] wrote: snip Rather complicated description... A sample of the real/actual input /file/ would be useful. Sorry, I didn't want to go on too long about the background, but I guess more context would have helped. The data

polling for output from a subprocess module

2008-02-04 Thread jakub . hrozek
Hello, My program uses the subprocess module to spawn a child and capture its output. What I'd like to achieve is that stdout is parsed after the subprocess finishes, but anything that goes to stderr is printed immediately. The code currently looks like: try: test =

Re: Too many open files

2008-02-04 Thread Larry Bates
AMD wrote: Hello, I need to split a very big file (10 gigabytes) into several thousand smaller files according to a hash algorithm, I do this one line at a time. The problem I have is that opening a file using append, writing the line and closing the file is very time consuming. I'd

Re: Is it explicitly specified?

2008-02-04 Thread George Sakkis
On Feb 4, 6:53 am, André Malo [EMAIL PROTECTED] wrote: * Steven D'Aprano wrote: On Sun, 03 Feb 2008 15:31:49 -0800, Paul Boddie wrote: I don't know whether I can offer much better advice than others, but I have noticed that a lot of my own code has moved in the direction of not having

Re: Elementary string-parsing

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 12:25:24 +, Odysseus wrote: I'm not clear on what makes an object global, other than appearing as an operand of a global statement, which I don't use anywhere. But na is assigned its value in the program body, not within any function: does that make it global? Yes.

Re: Windows - remote system window text

2008-02-04 Thread [EMAIL PROTECTED]
I can understand that. But look at the bright side, you don't have to rely on windows authentication, you just need an open port. Now i don't know what you are building, but with a client/server setup you can also get to other data that you might need, like mouse movement to detect for activity,

Re: type, object hierarchy?

2008-02-04 Thread Mel
7stud wrote: On Feb 3, 10:28 pm, 7stud [EMAIL PROTECTED] wrote: From the docs: issubclass(class, classinfo) Return true if class is a subclass (direct or indirect) of classinfo. print issubclass(Dog, object) #True print issubclass(type, object) #True print issubclass(Dog, type)

Re: Extending the import mechanism - what is recommended?

2008-02-04 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Jan 29, 2:36 pm, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I need to extend the import mechanism to support another file type. I've already written the necessary C library to read the file and return a python code object. I found one example

Re: polling for output from a subprocess module

2008-02-04 Thread Christian Heimes
Thomas Bellman wrote: The readlines() method will read until it reaches end of file (or an error occurs), not just what is available at the moment. You can see that for your self by running: Bad idea ;) readlines() on a subprocess Popen instance will block when you PIPE more than one stream

Re: Python GUI toolkit

2008-02-04 Thread Chris Mellon
On Feb 4, 2008 9:19 AM, [EMAIL PROTECTED] wrote: Another toolkit you might look into is Tkinter. I think it is something like the official toolkit for python. I also think it is an adapter for other toolkits, so it will use gtk widgets on gnome, qt widgets on kde and some other strange

Re: Project naming suggestions?

2008-02-04 Thread Kay Schluehr
On Feb 3, 7:17 pm, [EMAIL PROTECTED] wrote: I'm considering writing a little interpreter for a python-like language and I'm looking for name suggestions. :-) Basically, I don't want to change a whole lot about Python. In fact, I see myself starting with the compiler module from Python 2.5

Re: Smart Debugger (Python)

2008-02-04 Thread kraman
On Feb 3, 3:55 pm, Norm Matloff [EMAIL PROTECTED] wrote: I have something of an obsession with debuggers, so I was glad to see this posting. While we're on the subject, I might as well add my own small contribution, which I call Xpdb. Xpdb is available

App idea, Any idea on implementation?

2008-02-04 Thread Dr Mephesto
Hi Guru's, As a python newb, I was thinking about trying to implement a program that converts whistled music into midi; the idea coming from a proposed application in the Mydreamapp competition hosted last year, more details here: http://stratfordisland.com/whistler/ So, does anyone have a

Windows - remote system window text

2008-02-04 Thread rdahlstrom
OK - I know how to get the text/title of the windows on a local system by using the window handle. What I want to do is to get the text/ title of the windows on a remote system. Enumerating the window handles will of course not work remotely, I know that. Does anyone know anything short of a

Re: Unexpected timing results with file I/O

2008-02-04 Thread rdahlstrom
On Feb 4, 1:12 pm, Carl Banks [EMAIL PROTECTED] wrote: On Feb 4, 12:53 pm, rdahlstrom [EMAIL PROTECTED] wrote: On Feb 4, 10:17 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: After reading an earlier thread about opening and closing lots of files, I thought I'd do a

Re: Windows - remote system window text

2008-02-04 Thread rdahlstrom
On Feb 4, 2:17 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, i guess you will need a process on each machine you need to monitor, and then you do have a client server setup. This can be easily accomplished with fx Pyro (http:// pyro.sourceforge.net/) for communication, and the Win32

MySQLdb: commit before cursor close, or after?

2008-02-04 Thread John Nagle
I'm getting some wierd commit-related behavior from MySQLdb. I'm using InnoDB, so transactions really matter. I'm currently doing cursor = db.cursor() cursor.execute(...) cursor.close()

Re: polling for output from a subprocess module

2008-02-04 Thread jakub . hrozek
On 4 Ún, 11:49, Thomas Bellman [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: try: test = Popen(test_path, stdout=PIPE, stderr=PIPE, close_fds=True,

Re: MySQLdb: commit before cursor close, or after?

2008-02-04 Thread Steve Holden
Carsten Haese wrote: On Mon, 2008-02-04 at 19:53 +0100, Frank Aune wrote: No, you obviously need to commit your changes before closing the cursor. I'm surprised if your code above even works if adding content to the db. Why is that obvious? Is this some MySQL-specific oddity? In other

Re: Pysqlite issue no attribute 'autocommit'

2008-02-04 Thread Paul McNett
Andy Smith wrote: Im trying to run a Python based program which uses MySQL with python-sqlite and Im recieving this error, 'Connection' object has no attribute 'autocommit' I´ve had a google for this and its seems like it may be a bug python-sqlite or sqlite bug , but also I

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread Carsten Haese
On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database. The entry google.com disappears, and is replaced by www.google.com. This must indicate a hanging transaction that wasn't committed. But that transaction didn't come from the Python IDLE

Re: Unexpected timing results with file I/O

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 10:18:39 -0800, rdahlstrom wrote: On Feb 4, 1:12 pm, Carl Banks [EMAIL PROTECTED] wrote: On Feb 4, 12:53 pm, rdahlstrom [EMAIL PROTECTED] wrote: You have 500,000 people to fit through a door. Here are your options: 1. For each person, open the door, walk through the

Re: Windows - remote system window text

2008-02-04 Thread [EMAIL PROTECTED]
Well, i guess you will need a process on each machine you need to monitor, and then you do have a client server setup. This can be easily accomplished with fx Pyro (http:// pyro.sourceforge.net/) for communication, and the Win32 Python library (https://sourceforge.net/projects/pywin32/) for

Re: Linux Journal Survey

2008-02-04 Thread Florian Diesch
Albert van der Horst [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Russ P. [EMAIL PROTECTED] wrote: On Jan 23, 7:42 pm, George Sakkis [EMAIL PROTECTED] wrote: On Jan 23, 8:14 pm, [EMAIL PROTECTED] wrote: The annual Linux Journal survey is online now for any Linux users who want

Re: Project naming suggestions?

2008-02-04 Thread [EMAIL PROTECTED]
On 4 fév, 18:26, Kay Schluehr [EMAIL PROTECTED] wrote: On Feb 3, 7:17 pm, [EMAIL PROTECTED] wrote: I'm considering writing a little interpreter for a python-like language and I'm looking for name suggestions. :-) Basically, I don't want to change a whole lot about Python. In fact, I

Pysqlite issue no attribute 'autocommit'

2008-02-04 Thread Andy Smith
Hi there, Im trying to run a Python based program which uses MySQL with python-sqlite and Im recieving this error, 'Connection' object has no attribute 'autocommit' I´ve had a google for this and its seems like it may be a bug python-sqlite or sqlite bug , but also I tried searching for

Very weird behavior in MySQLdb execute

2008-02-04 Thread John Nagle
This has me completely mystified. Some SELECT operations performed through MySQLdb produce different results than with the MySQL graphical client. This failed on a Linux server running Python 2.5, and I can reproduce it on a Windows client running Python 2.4. Both are running MySQL 2.5. The

Re: Unexpected timing results with file I/O

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 15:53:11 -0200, rdahlstrom [EMAIL PROTECTED] escribi�: On Feb 4, 10:17 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: Suppose you have a whole lot of files, and you need to open each one, append a string, then close them. There's two obvious ways to do

Re: extending python with array functions

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 18:44:42 -0200, Janwillem [EMAIL PROTECTED] escribió: I want to make numerical functions that can be called from python. I am programming in pascal the last few decades so I had a look at python for delphi (P4D). The demo09 gives as example add(a,b) using integers and

Dynamic Lookup in C#

2008-02-04 Thread bearophileHUGS
It seems C# 4.0 may become a bit closer to dynamic languages, especially closer to the Boo language (that is mostly static): http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx As it develops, and its VM gains the method inlining capabilities of HotSpot, it will be faster. Static

Re: Problem with Image: Opening a file

2008-02-04 Thread Graham Dumpleton
On Feb 4, 6:51 pm, mcl [EMAIL PROTECTED] wrote: I am obviously doing something stupid or not understanding the difference between HTML file references and python script file references. I am trying to create a thumbnail of an existing .jpg file. It is in the directory 'temp', which is below

Re: App idea, Any idea on implementation?

2008-02-04 Thread Dr Mephesto
thanks for the pointers! I just found a program that does more or less what I want, but I would still like to have a go myself. The link is: http://www.akoff.com/music-composer.html I gave the program a go, as there is a free trial. I found that it had a hard time doing the conversion (or I am

Re: Windows - remote system window text

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 17:25:00 -0200, rdahlstrom [EMAIL PROTECTED] escribió: On Feb 4, 2:17 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, i guess you will need a process on each machine you need to monitor, and then you do have a client server setup. Crap, that's what I didn't want to

Re: Mysterious xml.sax Encoding Exception

2008-02-04 Thread JKPeck
On Feb 2, 12:56 am, Jeroen Ruigrok van der Werven [EMAIL PROTECTED] nomine.org wrote: -On [20080201 19:06], JKPeck ([EMAIL PROTECTED]) wrote: In both of these cases, there are only plain, 7-bit ascii characters in the xml, and it really is valid utf-16 as far as I can tell. Did you mean to

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread John Nagle
Carsten Haese wrote: On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database. The entry google.com disappears, and is replaced by www.google.com. This must indicate a hanging transaction that wasn't committed. But that transaction didn't

Re: Windows - remote system window text

2008-02-04 Thread rdahlstrom
On Feb 4, 2:50 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I can understand that. But look at the bright side, you don't have to rely on windows authentication, you just need an open port. Now i don't know what you are building, but with a client/server setup you can also get to other data

(websearch) script ?

2008-02-04 Thread Stef Mientki
hello, Being very satisfied with Python as a general program language, and having troubles with a number of PHP scripts, moving to another provider, I wanted to replace the PHP scripts with Python Scripts. The most important one is a PHP script that searches text in all documents on my

extending python with array functions

2008-02-04 Thread Janwillem
I want to make numerical functions that can be called from python. I am programming in pascal the last few decades so I had a look at python for delphi (P4D). The demo09 gives as example add(a,b) using integers and pyarg_parsetuple. That works! However, I cannot figure out what to do when a, b

Re: type, object hierarchy?

2008-02-04 Thread Steve Holden
Christian Heimes wrote: 7stud wrote: The output suggests that Dog actually is a subclass of type--despite the fact that issubclass(Dog, type) returns False. In addition, the output of dir(type) and dir(object): No, type is the meta class of the class object: issubclass(object, type)

Re: Module/package hierarchy and its separation from file structure

2008-02-04 Thread NickC
On Jan 31, 12:27 am, Gabriel Genellina [EMAIL PROTECTED] wrote: Python stores filename and line number information in code objects (only). If you have a reference to any code object (a method, a function, a traceback...) inspect can use it to retrieve that information. Aside from general

Re: MySQLdb: commit before cursor close, or after?

2008-02-04 Thread John Nagle
Steve Holden wrote: Carsten Haese wrote: On Mon, 2008-02-04 at 19:53 +0100, Frank Aune wrote: No, you obviously need to commit your changes before closing the cursor. I'm surprised if your code above even works if adding content to the db. Why is that obvious? Is this some MySQL-specific

Re: Client side GUI-like web framework ?

2008-02-04 Thread Michael L Torrie
USCode wrote: [EMAIL PROTECTED] wrote: You just described what XUL aims to be http://developer.mozilla.org/en/docs/The_Joy_of_XUL http://developer.mozilla.org/en/docs/XULRunner At present it lacks for sure documentation (or maybe it isn't organized really well) Just took a look at XUL

Re: Spawn new process - get pid

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 20:59:16 -0200, breal [EMAIL PROTECTED] escribió: I have a soap server written in Python that acts as an intermediary between a web service and an InDesign server. The indesign server is non-threaded, so when all instances are used up I want to create a new instance,

Re: Spawn new process - get pid

2008-02-04 Thread breal
On Feb 4, 3:34 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 04 Feb 2008 20:59:16 -0200, breal [EMAIL PROTECTED] escribió: I have a soap server written in Python that acts as an intermediary between a web service and an InDesign server. The indesign server is non-threaded, so

Re: Unexpected timing results with file I/O

2008-02-04 Thread Steven D'Aprano
On Mon, 04 Feb 2008 17:08:02 +, Marc 'BlackJack' Rintsch wrote: Surprisingly, Method 2 is a smidgen faster, by about half a second over 500,000 open-write-close cycles. It's not much faster, but it's consistent, over many tests, changing many of the parameters (e.g. the number of files,

Spawn new process - get pid

2008-02-04 Thread breal
I have a soap server written in Python that acts as an intermediary between a web service and an InDesign server. The indesign server is non-threaded, so when all instances are used up I want to create a new instance, get the pid, use the process, then kill it. What is the best way to do this?

Re: Mysterious xml.sax Encoding Exception

2008-02-04 Thread John Machin
On Feb 5, 9:02 am, JKPeck [EMAIL PROTECTED] wrote: On Feb 2, 12:56 am, Jeroen Ruigrok van der Werven [EMAIL PROTECTED] nomine.org wrote: -On [20080201 19:06], JKPeck ([EMAIL PROTECTED]) wrote: In both of these cases, there are only plain, 7-bit ascii characters in the xml, and it really

Re: Client side GUI-like web framework ?

2008-02-04 Thread USCode
Michael L Torrie wrote: But it is served up in the firefox web browser. A good example is: http://www.faser.net/mab/chrome/content/mab.xul That's pretty slick, but unfortunately then you're locked into only the Firefox web browser, which many folks don't use. You're trading OS lock-in

Re: Client side GUI-like web framework ?

2008-02-04 Thread Eric
On Feb 4, 9:45 am, USCode [EMAIL PROTECTED] wrote: Wouldn't it be handy if there was a web framework that allowed you to create pages and control the interface like you would using a client-side GUI framework such as Tkinter? The framework would need a small, fast web server that would

Make Money

2008-02-04 Thread GorskiKamil . 1993
Hello, do you want make money? Its easy :)) Just register on alertpay.com.Register on http://bux.to/?r=kimozek ( pls dont delete kimozek ) . While you do it, just click on links and get money!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Client side GUI-like web framework ?

2008-02-04 Thread Michael L Torrie
USCode wrote: Michael L Torrie wrote: But it is served up in the firefox web browser. A good example is: http://www.faser.net/mab/chrome/content/mab.xul That's pretty slick, but unfortunately then you're locked into only the Firefox web browser, which many folks don't use. You're trading

future multi-threading for-loops

2008-02-04 Thread castironpi
Some iterables and control loops can be multithreaded. Worries that it takes a syntax change. for X in A: def f( x ): normal suite( x ) start_new_thread( target= f, args= ( X, ) ) Perhaps a control-flow wrapper, or method on iterable. @parallel for X in A: normal suite( X )

Re: Client side GUI-like web framework ?

2008-02-04 Thread USCode
Michael L Torrie wrote: Which is a heck of lot better than OS lock in. Of course you can use xul-runner or something. Gecko and XUL are both open source, so I'm not quite sure what this lock in really is, though. Lock-in in the sense that your application would only run in the Firefox

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread Steve Holden
John Nagle wrote: Carsten Haese wrote: On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database. The entry google.com disappears, and is replaced by www.google.com. This must indicate a hanging transaction that wasn't committed. But that

Binary file Pt 1 - Only reading some

2008-02-04 Thread Mastastealth
I'm trying to create a program to read a certain binary format. I have the format's spec which goes something like: First 6 bytes: String Next 4 bytes: 3 digit number and a blank byte --- Next byte: Height (Number up to 255) Next byte: Width (Number up to 255) Next byte: Number 0 - 5 Every 2

Re: Client side GUI-like web framework ?

2008-02-04 Thread jay graves
On Feb 4, 11:45 am, USCode [EMAIL PROTECTED] wrote: Wouldn't it be handy if there was a web framework that allowed you to create pages and control the interface like you would using a client-side GUI framework such as Tkinter? What about GWT? http://code.google.com/webtoolkit/ Or its python

Re: (websearch) script ?

2008-02-04 Thread Bernard
On 4 fév, 17:17, Stef Mientki [EMAIL PROTECTED] wrote: hello, Being very satisfied with Python as a general program language, and having troubles with a number of PHP scripts, moving to another provider, I wanted to replace the PHP scripts with Python Scripts. The most important one is a

Re: Elementary string-parsing

2008-02-04 Thread Odysseus
In article [EMAIL PROTECTED], Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Mon, 04 Feb 2008 09:43:04 GMT, Odysseus [EMAIL PROTECTED] declaimed the following in comp.lang.python: Thanks, that will be very useful. I was casting about for a replacement for PostScript's for loop, and

Re: Binary file Pt 1 - Only reading some

2008-02-04 Thread Jared Grubb
You should look into the struct module. For example, you could do the same thing via (using the variable names you used before): header_str = info.read(13) a,b,c,d,e = struct.unpack(6s4sBBB, header_str) After that, you will probably be able to get the integers by (doing it one at a time...

Re: Client side GUI-like web framework ?

2008-02-04 Thread USCode
jay graves wrote: On Feb 4, 11:45 am, USCode [EMAIL PROTECTED] wrote: Wouldn't it be handy if there was a web framework that allowed you to create pages and control the interface like you would using a client-side GUI framework such as Tkinter? What about GWT?

Re: Spawn new process - get pid

2008-02-04 Thread Gabriel Genellina
On 4 feb, 22:21, breal [EMAIL PROTECTED] wrote: On Feb 4, 3:34 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 04 Feb 2008 20:59:16 -0200, breal [EMAIL PROTECTED] escribió: I have a soap server written in Python that acts as an intermediary between a web service and an InDesign

Re: future multi-threading for-loops

2008-02-04 Thread castironpi
On Feb 4, 9:22 pm, [EMAIL PROTECTED] wrote: Some iterables and control loops can be multithreaded.  Worries that it takes a syntax change. for X in A:     def f( x ):         normal suite( x )     start_new_thread( target= f, args= ( X, ) ) Perhaps a control-flow wrapper, or method on

Re: Elementary string-parsing

2008-02-04 Thread Odysseus
In article [EMAIL PROTECTED], Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: snip The term global usually means module global in Python. Because they're like the objects obtained from import? [T]he functions depend on some magic data coming from nowhere and it's much harder to follow

  1   2   >