[python 3.0] reload() gone?

2007-08-31 Thread Bernard Lebel
I read in the Python 3.0 documentation that reload() was removed, without further explanations. http://docs.python.org/dev/3.0/whatsnew/3.0.html?highlight=reload So what are we supposed to do to reload modules? Thanks Bernard -- http://mail.python.org/mailman/listinfo/python-list

How much memory used by a name

2007-02-14 Thread Bernard Lebel
Hello, I would like to know if there is a way to know how much memory (bytes, kilobytes, megabytes, etc) a name is using. More specifically, I have this list of strings that I want to write to a file as lines. This list grows througout the script execution, and toward the end, the file is

Re: How much memory used by a name

2007-02-14 Thread Bernard Lebel
/14/07, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Bernard Lebel a écrit : Hello, I would like to know if there is a way to know how much memory (bytes, kilobytes, megabytes, etc) a name is using. More specifically, I have this list of strings that I want to write to a file as lines

pywin32 for Windows x64

2007-01-20 Thread Bernard Lebel
Hello, Softimage has gracefully released an x64 build of the pywin32 extension, free for download. http://webrel2.softimage.com/open/products/xsi/v6/pywin32-207.win64-py2.4.exe (if that link doesn't work, go to http://www.softimage.com/downloads/XSI6_EssAdv/default.aspx, and look for Python

Re: Restricting import file lookup for pyd, dll, ...

2006-12-11 Thread Bernard Lebel
Hello, It's been almost two months since I last investigated this issue, so now I wish to revive this conversation. To answer some of the questions raised by contributors [Gabriel Genellina] Try to shorten the PYTHONPATH to the really required directories (deleting those locations that

Re: Restricting import file lookup for pyd, dll, ...

2006-12-11 Thread Bernard Lebel
\Softimage\XSI_5.11\Data\Scripts Bernard On 12/11/06, Bernard Lebel [EMAIL PROTECTED] wrote: Hello, It's been almost two months since I last investigated this issue, so now I wish to revive this conversation. To answer some of the questions raised by contributors [Gabriel Genellina

Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Bernard Lebel
Hello, Running Python 2.4.0 on Windows. I have run a series of tests using Filemon (SysInternals), which logs the file system requests performed by the computer. By default, when I import a module in Python, Python looks for pyd, dll, py, then pyw and finally pyc file. In our company we do not

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Bernard Lebel
Hi, That's because I'm using Python through another application, via the pywin32 extensions. When that other application starts, it performs several thousands of file requests (we're talking 4,500, roughly) in the Python installation, locations where there are Python files, and in some other

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Bernard Lebel
expect not to have such files for example? Thanks Bernard On 10/19/06, Gabriel Genellina [EMAIL PROTECTED] wrote: At Thursday 19/10/2006 22:38, Bernard Lebel wrote: That's because I'm using Python through another application, via the pywin32 extensions. When that other application starts

Creating an executable installer on Windows

2006-08-25 Thread Bernard Lebel
Hello, I'd like to know how one can create a Windows installer executable. I have this bunch modules, html files, pictures and directories that I'd like to install in various places on a disk drive. When the executable is run, it's like pretty much any standard installation: user answers a few

Problem with sub-classing

2006-07-17 Thread Bernard Lebel
Hello, I have this problem when subclassing classes where I get this error: Traceback (most recent call last): File Script Block , line 344, in BBExportElementGranules_Execute from bb_pipeline import bb_exportelementgranules File

Re: Problem with sub-classing

2006-07-17 Thread Bernard Lebel
? Thanks Bernard On 7/17/06, Peter Otten [EMAIL PROTECTED] wrote: Bernard Lebel wrote: Hello, I have this problem when subclassing classes where I get this error: Traceback (most recent call last): File Script Block , line 344, in BBExportElementGranules_Execute from bb_pipeline

Re: Very nice python IDE (windows only)

2006-06-07 Thread Bernard Lebel
Not me. I'll probably sound pedantic but - the editor text looks awful, changing the editor options had no effect at all - there is no network access of UNC paths other than through File Open and Python Paths. all of my code is on a network location - expanding and collapsing directories is

Little question about Tkiner: window focus

2006-06-05 Thread Bernard Lebel
Hello, I have this Tkinter window that when you click on a certain button, another instance of Tk is created, and thus a new windows is spawned. That second windows holds a few widgets to browse files and directories. Now, as soon as I start browsing files and directories, the first window comes

Re: GUI Program Error

2006-06-05 Thread Bernard Lebel
On 6/5/06, John Salerno [EMAIL PROTECTED] wrote: What is dir(), btw? Is it a class for creating the application? [Bernard] In your Python documentation, dir() is described in the built-in functions (section 2.1) as well as the tutorial, in the Modules section (chapter 6). Unless you were being

Tkinter: select multiple entries in Listbox widget?

2006-06-01 Thread Bernard Lebel
Hello, Is there an option or a way to allow the selection of multiple entries in the Listbox widget? I could not find any, and would like to allow the end user to select multiple entries. Thanks Bernard -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: select multiple entries in Listbox widget?

2006-06-01 Thread Bernard Lebel
Oh, thanks a lot Rob. Bernard On 6/1/06, Rob Williscroft [EMAIL PROTECTED] wrote: Bernard Lebel wrote in news:mailman.6413.1149178158.27775.python- [EMAIL PROTECTED] in comp.lang.python: Hello, Is there an option or a way to allow the selection of multiple entries in the Listbox

Re: Running Python scripts under a different user

2006-05-29 Thread Bernard Lebel
Thanks Laszlo, I'll check it out. Bernard On 5/29/06, Laszlo Nagy [EMAIL PROTECTED] wrote: From what you wrote, I think that you need to change architecture. You should write your own service rather than write tricky programs. This way you can develop your own security system, and

Running Python scripts under a different user

2006-05-26 Thread Bernard Lebel
Hello, I would like to know if there is a way to run a Python file under a different user account than the one logged in. Allow me to explain. There are a bunch of people here, they are basic user, with limited permissions. Basically there are locations on the network where they can only read

Re: Running Python scripts under a different user

2006-05-26 Thread Bernard Lebel
On 5/26/06, Diez B. Roggisch [EMAIL PROTECTED] wrote: And as you refrain form telling us which OS you are running under [Bernard] The network file server is Red Hat Enterprise 4. The user workstation run through MS Windows XP Pro 32bit SP2, accessing the file server through Samba. one can

Re: Running Python scripts under a different user

2006-05-26 Thread Bernard Lebel
On 5/26/06, Laszlo Nagy [EMAIL PROTECTED] wrote: For Windows, you can use the 'runas.exe' program. But it requires a password too. From what you wrote, I think that you need to change architecture. You should write your own service rather than write tricky programs. This way you can develop

Re: Problems writing to file

2006-03-27 Thread Bernard Lebel
it, everything went back to normal! Anyone has a take on this behavior? Thanks Bernard On 3/21/06, Bernard Lebel [EMAIL PROTECTED] wrote: Hi Gary, That is actually what I do. Each time the program prints something to the file, it flushes the buffer. I also tried opening and closing the file, same

Problems writing to file

2006-03-21 Thread Bernard Lebel
Hello, I have this strange problem. I have written a program that writes a log to a log file. To start the program (I'm on Linux Fedora Core 3), I used a service. This service runs a bash file, wich in turn runs the Python top program file. Sooner or later the program stops writing to the log

Re: Problems writing to file

2006-03-21 Thread Bernard Lebel
: print '\nWARNING log.__output : Attempt %i to write to log file %s raised IO Error, next attempt in %s seconds.\n' % ( i+1, sLogFile, self.LOGWAITTIME ) Thanks Bernard On 3/21/06, Gary Herron [EMAIL PROTECTED] wrote: Bernard Lebel wrote: Hello

Re: get output of cmd-line command under MS windows

2006-02-08 Thread Bernard Lebel
You should give a go to os.popen( system command here ). Article 6.1.2 and 6.1.3 in the Python Library doc. I recently wrote a program that would create a pipe using the popen() method, and would enter a while loop. At each iteration, it would read one line of the pipe output, and the loop would

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-19 Thread Bernard Lebel
Thanks a lot for the explanations Alan. That really helped. Bernard On 1/19/06, Alan Franzoni [EMAIL PROTECTED] wrote: Bernard Lebel on comp.lang.python said: I'm absolutely flabbergasted. As I told you, i think this is related to the isolation level - I really think it's a feature

MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Bernard Lebel
Hello, I'm stumbled at a serious problem, and quite frankly getting desparate. This is a rather long-winded one so I'll try to get straight to the point. I have this Python program, that performs MySQL queries to a database. These queries are performed at regular intervals. Basically it is

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Bernard Lebel
Oops, sorry: link to sources http://www.bernardlebel.com/scripts/nonxsi/help/ Thanks again Bernard On 1/18/06, Bernard Lebel [EMAIL PROTECTED] wrote: Hello, I'm stumbled at a serious problem, and quite frankly getting desparate. This is a rather long-winded one so I'll try to get

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Bernard Lebel
Btw I have tried running much simpler versions of the query, like SELECT * FROM TB_CURRENT_JOBS WHERE Status = 'Pending', but yet again I get the same results. *sigh* Bernard On 1/18/06, Bernard Lebel [EMAIL PROTECTED] wrote: Oops, sorry: link to sources http://www.bernardlebel.com/scripts

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Bernard Lebel
head on that for almost 3 full days :-( Bernard On 1/18/06, Bernard Lebel [EMAIL PROTECTED] wrote: Btw I have tried running much simpler versions of the query, like SELECT * FROM TB_CURRENT_JOBS WHERE Status = 'Pending', but yet again I get the same results. *sigh* Bernard On 1/18/06

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Bernard Lebel
Hi Alan, On 1/18/06, Alan Franzoni [EMAIL PROTECTED] wrote: Il Wed, 18 Jan 2006 14:39:09 -0500, Bernard Lebel ha scritto: 1) It would be great if you didn't post four messages in less than an hour ^_^ Yeah I know :-) But like I said, I've been stuck for 3 days on that, so, I need to get

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-18 Thread Bernard Lebel
I'm absolutely flabbergasted. Your suggestion worked, the loop now picks up the changed values, and without the need to reconnect. It's the first time I have to commit after a query, up until I wrote this program, I used commit() was for UPDATE/INSERT types of commands only, and always got

Testing MySQLdb connection object

2006-01-09 Thread Bernard Lebel
Hello, First, this is my first post on this list! A little about myself: I'm the lead technical director in a 3D animation studio, in Montreal. A lot of the Python code I write is to be used in an application that embeds Python, that is, Softimage|XSI. Right now I'm re-writing the render farm