attaching an excel file using MIME in smtp

2006-04-17 Thread Kun
does anyone know how to attach an excel file to send out using smtplib and MIME? -- http://mail.python.org/mailman/listinfo/python-list

Re: passing string from one file to another

2006-04-17 Thread Ant
I assume that you are trying to pass data from one 'standalone' cgi script to another cgi script (mail.py). Depending on what exactly you are trying to do, you could either set the information in a cookie, or simply have a hidden input (input type='hidden' name=data_to_pass_on value=bob) element

Re: How to pass variable to test class

2006-04-17 Thread Peter Otten
Podi wrote: Newbie question about unittest. I am having trouble passing a variable to a test class object. MyCase class will potentially have many test functions. By default a unittest.TestCase has only one test function called runTest. Therefore you have to add multiple instances of your

ANN: pyplusplus - v0.7.2

2006-04-17 Thread Roman Yakovenko
Hi. The next version of pyplusplus is available. Download page: http://www.language-binding.net/pyplusplus/download.html What is it? pyplusplus is an object-oriented framework for creating a code generator for boost.python library. Project home page:

ANN: pygccxml - 0.7.2

2006-04-17 Thread Roman Yakovenko
Hi. The next version of pygccxml is available. Download page: http://www.language-binding.net/pygccxml/download.html What is it? ...The purpose of the GCC-XML extension is to generate an XML description of a C++ program from GCC's internal representation. Since XML is easy to parse, other

Re: Async Sleep?

2006-04-17 Thread Tim Head
If your task is indeed to watch a directory for activity and thenact upon this activity then you would be much better of doing what Lawrence suggests. For linux there is the inotify bit in the kernel. As you are using win32com I'll assume you are using windows. This snippet in the cookbook seems

Re: passing string from one file to another

2006-04-17 Thread Lawrence D'Oliveiro
In article [EMAIL PROTECTED], Kun [EMAIL PROTECTED] wrote: I have a python-cgi form whose sole purpose is to email. It has the fields 'to', 'from', 'subject', 'body', etc. and if the user fills them out and clicks submit, it will invoke another file called mail.py which uses smtplib to send

Re: filling today's date in a form

2006-04-17 Thread Lawrence D'Oliveiro
In article [EMAIL PROTECTED], Kun [EMAIL PROTECTED] wrote: ... but i am wondering if there is a way to create a button which would automatically insert today's date in the date form field if the user chooses to use today's date. If you're going to have a button to do it, then the button

Re: __getattribute__ and __slots__

2006-04-17 Thread Peter Otten
[EMAIL PROTECTED] wrote: Python has both __getattribute__() and __getattr__(). While __getattribute__() will always be called if you ask for an attribute __getattr__() serves only as fallback if the attribute if not found by other means. I try to define a (new-style) class who: - have a

Re: XML-RPC server via xinetd

2006-04-17 Thread Nick Craig-Wood
Jos Vos [EMAIL PROTECTED] wrote: I'm trying to figure out how to implement a XML-RPC server that is called by xinetd i.s.o. listening on a TCP socket itself. I already have implemented a stand-alone XML-RPC server using SimpleXMLRPCServer, but I now want something similar, that is

Re: Validate XML against DTD and/or XML Schema?

2006-04-17 Thread Ravi Teja
http://xmlstar.sourceforge.net/ Not Python, but just the tool for the job. For Python, 4Suite has some validators. But parts of it were written in C and might not be helpful if you want to look at the Python source code. You might want to check

Re: Tkinter

2006-04-17 Thread Ravi Teja
Documentation isn't his only contribution, BTW. He wrote a whole bunch of highly useful modules for Python as well. http://effbot.org/downloads/ -- http://mail.python.org/mailman/listinfo/python-list

Re: attaching an excel file using MIME in smtp

2006-04-17 Thread Serge Orlov
Kun wrote: does anyone know how to attach an excel file to send out using smtplib and MIME? There is an example in the python documentation how to send entire content of a directory: http://docs.python.org/lib/node597.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Override on terminal

2006-04-17 Thread fivestars
ops..yes overwrite is what i would say!! thanks to all!! -- http://mail.python.org/mailman/listinfo/python-list

[newbie] help on audioop.rms()

2006-04-17 Thread Matte
Hi, I'm quite new to Python and I'm in need of help! I need to open an audio file, divide it into frame-based intervals and for each of those interval I have to analyze the sound level. audioop.rms() should do the trick, but I can't find a way to convert a frame interval (taken via

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 02:07:37AM +0200, Martin P. Hellwig wrote: If I understood it correctly you want the python server bind be depending on whatever is configured in xinetd.conf and not be defined in the your program itself? I tested a bit around with my FreeBSD machine but indeed the

Re: Python certification/training

2006-04-17 Thread Kent Johnson
Richard Marsden wrote: Aahz wrote: Then may I suggest that you subscribe to the tutor list? That will give you a good place to ask questions; as you learn Python, answering other people's questions will give you a good way to hone your own knowledge. Which is? :-)

Re: XML-RPC server via xinetd

2006-04-17 Thread Brian Quinlan
Jos Vos wrote: The problem is that I do not see how to let an SimpleXMLRPCServer instance *not* bind to a port or what other class I can use to just build a XML-RPC request handler reading/writing from stdin/stdout, i.s.o. carrying all the server class stuff with it. I think that the problem

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 12:10:15PM +0200, Brian Quinlan wrote: If you take a look at CGIXMLRPCRequestHandler (http://docs.python.org/lib/node564.html), you will see an example of how to write an XMLRPCRequestHandler without HTTP. Thanks, this might work for me, will try it. -- --Jos

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 03:30:04AM -0500, Nick Craig-Wood wrote: UTSL ;-) Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your distro) and in particular the definition of the CGIXMLRPCRequestHandler class. I did this before posting my question, in fact, but I did not look

Re: XML-RPC server via xinetd

2006-04-17 Thread Brian Quinlan
Jos Vos wrote: On Mon, Apr 17, 2006 at 03:30:04AM -0500, Nick Craig-Wood wrote: UTSL ;-) Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your distro) and in particular the definition of the CGIXMLRPCRequestHandler class. I did this before posting my question, in fact,

Re: XML-RPC server via xinetd

2006-04-17 Thread Fredrik Lundh
Nick Craig-Wood wrote: Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your distro) and in particular the definition of the CGIXMLRPCRequestHandler class. That looks as thought it almost, or maybe completely, does what you want, ie an XMLRPC subclass which reads from stdin

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 12:36:18PM +0200, Brian Quinlan wrote: I don't know exactly what your usage pattern is, but you might be able to use SimpleXMLRPCDispatcher directly e.g. s = SimpleXMLRPCDispatcher() s.register_function(pow) s._marshaled_dispatch('?xml version=1.0...) '?xml

CGI scripts

2006-04-17 Thread Jay
Can I use Python for CGI scripts. It is telling me to use Perl and I don't know any To be honest I don't really no what CGI scripts are (soz) I have purchased a domain name of my ISP PIPEX and 100MB space And I don't know what I can do with it now OPPs Jay Dee --

installation of jython program

2006-04-17 Thread Jan Gregor
Hello, I've done database console in jython called jydbconsole. It's now available on sourceforge. As you can guess console needs jdbc drivers. The script that runs jython itself doesn't public -cp option to add another classpaths. Yes I need to add jdbc drivers to classpath ... Of course I see

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 12:42:00PM +0200, Fredrik Lundh wrote: except that if the OP's expecting the other end to use an ordinary XML-RPC library, he needs to implement some minimal HTTP handling as well. Which makes me wondering why the classes (this also applies to BaseHTTPServer /

Re: CGI scripts

2006-04-17 Thread Daniel Nogradi
Can I use Python for CGI scripts. It is telling me to use Perl and I don't know any To be honest I don't really no what CGI scripts are (soz) I have purchased a domain name of my ISP PIPEX and 100MB space And I don't know what I can do with it now Will your pages be served by your ISP,

Re: CGI scripts

2006-04-17 Thread Daniel Nogradi
Can I use Python for CGI scripts. It is telling me to use Perl and I don't know any To be honest I don't really no what CGI scripts are (soz) I have purchased a domain name of my ISP PIPEX and 100MB space And I don't know what I can do with it now I just realized that you also

Re: locale, format monetary values

2006-04-17 Thread deelan
Rares Vernica wrote: Hi, Can I use locale to format monetary values? If yes, how? If no, is there something I can use? E.g., I have 1 and I want to get $10,000. try something like: import locale locale.setlocale(locale.LC_ALL, en-US) 'English_United States.1252'

Re: Python certification/training

2006-04-17 Thread aum
On Sun, 16 Apr 2006 06:13:51 -0700, chrisBrat wrote: Are there any certifications that are available for developers learning Python? Where? I'm specifically looking for distance/on-line courses or certifications but welcome any information available. Makes me wonder, just out of curiosity -

something similar to LWP::Simple mirror function

2006-04-17 Thread jnair
from the perl man pages of LWP::Simple mirror($url, $file) Get and store a document identified by a URL, using If-modified- since, and checking the Content-Length. Returns the HTTP response code. is there something similar in python regards jitya --

How do I use Code Context under Options in IDLE?

2006-04-17 Thread Phoe6
Hi all, I have this Code Context feature under Options in the IDLE. How should I use it? Are there folks here who use it regularly and find it useful. Please guide me. Thanks! Senthil -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC server via xinetd

2006-04-17 Thread Jean-Paul Calderone
On Mon, 17 Apr 2006 14:17:51 +0200, Jos Vos [EMAIL PROTECTED] wrote: On Mon, Apr 17, 2006 at 12:42:00PM +0200, Fredrik Lundh wrote: except that if the OP's expecting the other end to use an ordinary XML-RPC library, he needs to implement some minimal HTTP handling as well. Which makes me

Translate Cpp into python code

2006-04-17 Thread Fulvio
Hi there, I'd like to ask if is there any tool that's able to parse C++ code and convert it into Python script? Probalby entirely would be difficult, but a good percentage I think it would be possible and the remain asking to the user what to do. F --

Re: Python certification/training

2006-04-17 Thread Richard Marsden
Thanks Kent and Dan. I've just joined to see what it is like. It looks like it might be aimed more for people new to computer/programming science. In contrast, I'm new to Python and actually have quite a bit of programming experience! Perhaps I'll be able to help answer questions, as well as

Re: Translate Cpp into python code

2006-04-17 Thread Ravi Teja
If you are looking for ways to access C++ code in Python, there are several (Boost, SIP, CXX, SWIG, Weave etc). Unless your needs are somehow unique, this is the preferred approach. People usually convert higher level languages to lower level languages for performance (For example Python to

Re: Using Python To Create An Encrypted Container

2006-04-17 Thread John Hunter
Michael == Michael Sperlle [EMAIL PROTECTED] writes: Michael Is it possible? Bestcrypt can supposedly be set up on Michael linux, but it seems to need changes to the kernel before Michael it can be installed, and I have no intention of going Michael through whatever hell that

Re: Calling Python from Matlab

2006-04-17 Thread John Hunter
AgenteSegreto == AgenteSegreto [EMAIL PROTECTED] writes: AgenteSegreto I've been a Matlab user for years and have recently AgenteSegreto started using Python with matplotlib and NumPy for AgenteSegreto most of my work. The only thing I found that is AgenteSegreto still lacking

Re: filling today's date in a form

2006-04-17 Thread Tim Chase
Lawrence D'Oliveiro wrote: In article [EMAIL PROTECTED], Kun [EMAIL PROTECTED] wrote: ... but i am wondering if there is a way to create a button which would automatically insert today's date in the date form field if the user chooses to use today's date. If you're going to have a

Queue can result in nested monitor deadlock

2006-04-17 Thread Jonathan Amsterdam
I think there's a slight design flaw in the Queue class that makes it hard to avoid nested monitor deadlock. The problem is that the mutex used by the Queue is not easy to change. You can then easily get yourself into the following situation (nested monitor deadlock): Say we have a class that

Re: Python certification/training

2006-04-17 Thread gene tani
aum wrote: Makes me wonder, just out of curiosity - are there any universities actually teaching python (in anything bigger than a small elective module), or are they all still owned by Java, C++, C# and Visual Basic? like NLTK, maybe? http://www.ldc.upenn.edu/sb/home/papers/nltk.pdf --

Re: any update to this?

2006-04-17 Thread Paddy
Hi Mickle. A quick search on the www.python.org site leads to: http://wiki.python.org/moin/LanguageComparisons The thing about language comparisons are that they are all subjective/biased. Best to read other things by the author to know 'where they are coming from'. Oh, and check the dates of

Re: any update to this?

2006-04-17 Thread gene tani
[EMAIL PROTECTED] wrote: hi i was looking at this : http://www.python.org/doc/essays/comparisons.html on comparisons of python and other languages? are there any updates to this doc? or is there other reliable source for such comparison elsewhere? thanks lots of blogs out there, check

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Alex Martelli
Jonathan Amsterdam [EMAIL PROTECTED] wrote: ... As I'm new to the Python community, I'm not sure that this is the right forum for this suggestion. Is it the sort of thing one would put on the SourceForge bug list? Advice appreciated. Posting a patch and/or bug to Sourceforge is probably the

SSL client authentication

2006-04-17 Thread Lorenzo Allegrucci
Hi everybody, I'm developing a distributed application in Python and I intend to use SOAP over a SSL connection. I looked at the SOAPpy package and it seems to have all I need but client authentication; in other words I want my client certificate be sent to the server during the SSL handshake.

Java Developer Exploring Python

2006-04-17 Thread redefined . horizons
I've traditionally been a Java developer, although I play around with LISP. I recently migrated to Linux and I was exploring Mono as an option for development on Linux. However, I've had some problems with the maturity and support when working with Mono. So I was considering Python as an

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Paul McGuire
Jonathan Amsterdam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I think there's a slight design flaw in the Queue class that makes it hard to avoid nested monitor deadlock. The problem is that the mutex used by the Queue is not easy to change. You can then easily get yourself into

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Jonathan Amsterdam
If you don't want to call it deadlock, fine, but the program execution I describe will make no progress to the end of time. Thread 2 can never put anything in the queue, because Thread 1 holds M, and Thread 1 will never release M because that can only happen if someone puts something on the queue.

MySql -python 1.2.1_p2 and visual c++ toolkit

2006-04-17 Thread simen . haugen
Hi. I'm trying to use Python 2.4 with MySql 5.0, but I'm having installation problems. I've tried to follow the following articles to install mysql-python with the free visual c++ toolkit http://mail.python.org/pipermail/python-list/2004-December/255184.html

Re: Java Developer Exploring Python

2006-04-17 Thread Ravi Teja
I've traditionally been a Java developer, although I play around with LISP. For most java developers, understanding dynamic typing is a big step. Your Lisp background however would mean that you will pick up Python very quickly. I recently migrated to Linux and I was exploring Mono as an

Re: Fixing Python instalation in win2000 by hand

2006-04-17 Thread Sambo
BartlebyScrivener wrote: You may want to try disabling any anti-virus software you have running as they frequently cause software installation failures. NONE!! MSI Installers have a known issue with mapped network drives; please copy the installer to the c:\ root drive and try

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Jack Diederich
On Mon, Apr 17, 2006 at 09:41:37AM -0700, Jonathan Amsterdam wrote: If you don't want to call it deadlock, fine, but the program execution I describe will make no progress to the end of time. Thread 2 can never put anything in the queue, because Thread 1 holds M, and Thread 1 will never

How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-17 Thread [EMAIL PROTECTED]
How can a proprietary software developer protect their Python code? People often ask me about obfuscating Python bytecode. They don't want people to easily decompile their proprietary Python app. I suppose another idea is to rewrite entire Python app in C if compiled C code is harder to

Re: List operation: Removing an item

2006-04-17 Thread Miguel E
Steven D'Aprano wrote: On Sat, 15 Apr 2006 22:39:37 -0600, Miguel E. wrote: I am trying to create a function that removes an item as specified by the user. Apparently, the list operation del list[:] deletes the entire list. Below is the sample function. If you know the value of the item,

Re: Fixing Python instalation in win2000 by hand

2006-04-17 Thread Sambo
c:\temp1msiexec /I c:\temp1\python-2.4c1.msi /L*v install.log /L*v ok here it is... before downloading and installin the VB scripting crap.( in case it starts closing apps trying to reboot and clear all this typing I've done hehe. install.log === Verbose logging started: 17/04/2006

Re: How do I use Code Context under Options in IDLE?

2006-04-17 Thread [EMAIL PROTECTED]
Phoe6 wrote: Hi all, I have this Code Context feature under Options in the IDLE. How should I use it? Are there folks here who use it regularly and find it useful. Please guide me. Well, you could start by looking at the Help: Options Menu: Configure IDLE -- Open a configuration

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Duncan Booth
Jonathan Amsterdam wrote: If you don't want to call it deadlock, fine, but the program execution I describe will make no progress to the end of time. Thread 2 can never put anything in the queue, because Thread 1 holds M, and Thread 1 will never release M because that can only happen if

Re: Fixing Python instalation in win2000 by hand

2006-04-17 Thread BartlebyScrivener
the reason I can't move to brand new installation is because I am missing sound drivers. If I were you, I'd download the latest ActiveState version of Python from: http://www.activestate.com/Products/ActivePython/ I would install it from c:\ Who cares about sound drivers if all you want to

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-17 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How can a proprietary software developer protect their Python code? People often ask me about obfuscating Python bytecode. They don't want people to easily decompile their proprietary Python app. I suppose another idea is to rewrite

C FFI: easy conversion from list to argv?

2006-04-17 Thread Burton Samograd
Hi, I'm trying to update the fuse python bindings to my app and I was curious if there were any C utility functions that would turn a sys.argv into a C style argv array, or am I going to have to write those myself? Thanks. -- burton samograd kruhft .at. gmail

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Paul McGuire
Jonathan Amsterdam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you don't want to call it deadlock, fine, but the program execution I describe will make no progress to the end of time. Thread 2 can never put anything in the queue, because Thread 1 holds M, and Thread 1 will

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Terry Reedy
Jonathan Amsterdam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] As I'm new to the Python community, I'm not sure that this is the right forum for this suggestion. Is it the sort of thing one would put on the SourceForge bug list? Advice appreciated. As a sometimes bug reviewer

Re: Decode html, or is it unicode, how?

2006-04-17 Thread Ben C
On 2006-04-17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, I've done a bunch of searching in google and in python's help, but, I haven't found any function to decode a string like: Refresh#33; (ihenvyr) In to plain english. [...] I needed to do that the other day, and did it like

socket timeout error?

2006-04-17 Thread Jaap Spies
Hi, Running Fedora Core 4: Python 2.4.3 and Python 2.4.1. I'm getting: IOError: [Errno socket error] (2, 'No such file or directory') all the time. Trying to track down this problem: Python 2.4.1 (#1, May 16 2005, 15:19:29) [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2 Type help, copyright,

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Alan Morgan
In article [EMAIL PROTECTED], Jonathan Amsterdam [EMAIL PROTECTED] wrote: If you don't want to call it deadlock, fine, but the program execution I describe will make no progress to the end of time. Thread 2 can never put anything in the queue, because Thread 1 holds M, and Thread 1 will never

Re: MySql -python 1.2.1_p2 and visual c++ toolkit

2006-04-17 Thread BartlebyScrivener
I'm pretty new myself. But if you don't get anywhere using mysql-python, I can recommend mxODBC. I have connected to both MS Access DB and MySQL DB. You get it from: http://www.egenix.com/files/python/mxODBC.html But read the instructions carefully as I think there are two things to install.

piping question

2006-04-17 Thread Biggmatt
I have been working on a little frontend for newspost. It runs newspost just fine and gets it's output. The problem is that i want it to get the stdout as the program runs, not hold it all till it's finished. I've tried a few variations of popen , and others with no luck. Here is the subroutine

Re: C FFI: easy conversion from list to argv?

2006-04-17 Thread Burton Samograd
Burton Samograd [EMAIL PROTECTED] writes: I'm trying to update the fuse python bindings to my app and I was curious if there were any C utility functions that would turn a sys.argv into a C style argv array, or am I going to have to write those myself? Following up to myself again...found the

Threading problem

2006-04-17 Thread Aleksandar Cikota
Hi all, I have a problem with threading. The following part should be running in a mainprogramm all the time, but so that the main programm also works (like 2 seperate programms, butin one) How to integrate the Code-part in the main programm, so that the mainprogramm works? Code: import

Threating problem

2006-04-17 Thread Aleksandar Cikota
Hi all, I have a problem with threading. The following part should be running in a main programm all the time, but so that the main programm also works (like 2 seperate programms, but in one) How to integrate the part in the main programm? Code: import win32com.client import time import os

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-17 Thread gangesmaster
well, you can do something silly: create a c file into which you embed your code, ie., #includepython.h char code[] = print 'hello moshe'; void main(...) { Py_ExecString(code); } then you can compile the C file into an object file, and use regular obfuscators/anti-debuggers. of course

piping question

2006-04-17 Thread Biggmatt
I forgot to add that i'm running ubuntu with python 2.4, and the imports are: import os import pygtk pygtk.require('2.0') import gtk import gtk.glade -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (Apr 17)

2006-04-17 Thread Peter Otten
QOTW: Discussion about Python 3000 is heating up. What I haven't seen so far is a list of things that will be dropped from the language to make room for new ideas. - Greg Wilson The longer I work at writing software, the more I come to appreciate that people are the hardest thing to figure out. -

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-17 Thread Serge Orlov
[EMAIL PROTECTED] wrote: How can a proprietary software developer protect their Python code? People often ask me about obfuscating Python bytecode. They don't want people to easily decompile their proprietary Python app. I suppose another idea is to rewrite entire Python app in C if

Re: Why new Python 2.5 feature class C() return old-style class ?

2006-04-17 Thread Aahz
In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: Aahz [EMAIL PROTECTED] wrote: Method resolution order is the primary up-front difference, but introspective code can also have problems. The crucial difference between the old-style classes and the new ones is about how

Re: How do I use Code Context under Options in IDLE?

2006-04-17 Thread Phoe6
[EMAIL PROTECTED] wrote: --- Code Context -- Open a pane at the top of the edit window which shows the block context of the section of code which is scrolling off the top or the window. But what does that actually mean? Take this code fragment example (with line numbers added for

Re: Java Developer Exploring Python

2006-04-17 Thread redefined . horizons
Ravi Teja wrote: I've traditionally been a Java developer, although I play around with LISP. For most java developers, understanding dynamic typing is a big step. Your Lisp background however would mean that you will pick up Python very quickly. I recently migrated to Linux and I was

Re: MySql -python 1.2.1_p2 and visual c++ toolkit

2006-04-17 Thread simen . haugen
I tried mxODBC now, and it worked out of the box. Thanks for the tip! -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Jonathan Amsterdam
This is a reply to Alan Morgan, Paul McGuire and Duncan Booth. I need mutex M because I have other fields in my class that need to be thread-safe. The reason I want to use a Queue and not a list is that a Queue has additional synchronization besides the mutex. For instance, Queue.get() will

Re: XPath/Screen Scraping Gurus..

2006-04-17 Thread Steve Horsley
Peter Hansen wrote: bruce wrote: I'm not that familiar with Pythin, but I wasn wondering if there are any XPath/Python Gurus that I might be able to talk to regarding screen scraping applications... Since you mention XPath, it seems likely you are really interested in *web-scraping*.

Missing interfaces in Python...

2006-04-17 Thread redefined . horizons
I'm coming from a Java background, so please don't stone me... I see that Python is missing interfaces. The concept of an interface is a key to good programming design in Java, but I've read that they aren't really necessary in Python. I am wondering what technique I can use in Python to get the

Re: Socket Error: Connection Refused

2006-04-17 Thread Steve Horsley
[EMAIL PROTECTED] wrote: Dear c.l.p, I have recently been doing the tutorial of Python and everything is well, i'm upto the pass section. Anyway, when I try to launch idle now I get the error message: Socket Error: Connection Refused. I do not have a firewall, so I don't know what is

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Paul McGuire
Jonathan Amsterdam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This is a reply to Alan Morgan, Paul McGuire and Duncan Booth. I need mutex M because I have other fields in my class that need to be thread-safe. The reason I want to use a Queue and not a list is that a Queue has

Re: Missing interfaces in Python...

2006-04-17 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: I see that Python is missing interfaces. No it isn't. It just hasn't got them. The concept of an interface is a key to good programming design in Java, but I've read that they aren't really necessary in Python. In Java I would accomplish this by

Re: Missing interfaces in Python...

2006-04-17 Thread Jonathan Daugherty
# In Python, you would simply call the functions you need. No need to # make things that rigidly defined. Except when you need to handle exceptions when those methods don't exist. I think interfaces can definitely be useful. -- Jonathan Daugherty http://www.parsed.org --

Re: Missing interfaces in Python...

2006-04-17 Thread Fredrik Lundh
Jonathan Daugherty wrote_ # In Python, you would simply call the functions you need. No need to # make things that rigidly defined. Except when you need to handle exceptions when those methods don't exist. I think interfaces can definitely be useful. so with interfaces, missing methods

scanning through page and replacing all instances of 00:00:00.00

2006-04-17 Thread Kun
I have a python-cgi file that pulls data from an sql database, i am wondering what is the easiest way to remove all instances of '00:00:00.00' in my date column. how would i write a python script to scan the entire page and delete all instances of '00:00:00.00', would i use regular

Re: piping question

2006-04-17 Thread Steve Bergman
Have you tried running python with '-u'? That turns off most buffering within python at least. I'm not familiar with newspost, so I've no idea what to do about any output buffering it might be doing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing interfaces in Python...

2006-04-17 Thread Jonathan Daugherty
# so with interfaces, missing methods will suddenly appear out of thin # air ? With interfaces, the idea is that they're enforced; so, they'll appear because someone implements them. -- Jonathan Daugherty http://www.parsed.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing interfaces in Python...

2006-04-17 Thread Fredrik Lundh
Jonathan Daugherty wrote: # so with interfaces, missing methods will suddenly appear out of thin # air ? With interfaces, the idea is that they're enforced; so, they'll appear because someone implements them. enforced by whom, at what point ? /F --

Re: Missing interfaces in Python...

2006-04-17 Thread redefined . horizons
Thanks for the responses...Looks like I might have opened Pandora's box here. Could I accomplish the above with an abstract class? If the mechanic class had a fixIt() method defined, could I pass it any object I wanted, and then just call the method that I expect to find there, or do I need to

Re: Missing interfaces in Python...

2006-04-17 Thread Jonathan Daugherty
# enforced by whom, at what point ? In the case of Java, I think the JVM enforces interface implementation (probably at the parser level). -- Jonathan Daugherty http://www.parsed.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing interfaces in Python...

2006-04-17 Thread Jonathan Daugherty
# Thanks for the responses...Looks like I might have opened Pandora's # box here. Could I accomplish the above with an abstract class? Zope 3 has an interface system which is good. I recommend you look at that. -- Jonathan Daugherty http://www.parsed.org --

Re: scanning through page and replacing all instances of 00:00:00.00

2006-04-17 Thread Tim Chase
I have a python-cgi file that pulls data from an sql database, i am wondering what is the easiest way to remove all instances of '00:00:00.00' in my date column. how would i write a python script to scan the entire page and delete all instances of '00:00:00.00', would i use regular

Re: Threading problem

2006-04-17 Thread Faber
Aleksandar Cikota wrote: How to integrate the Code-part in the main programm, so that the mainprogramm works? Code: import win32com.client import time import os import threading Document = win32com.client.Dispatch('MaxIm.Document') Application =

Re: Missing interfaces in Python...

2006-04-17 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: If the mechanic class had a fixIt() method defined, could I pass it any object I wanted absolutely. and then just call the method that I expect to find there yes. or do I need to strictly define the type, or class, of an object that is passed to a method. no.

Re: Missing interfaces in Python...

2006-04-17 Thread Benji York
Jonathan Daugherty wrote: # Thanks for the responses...Looks like I might have opened Pandora's # box here. Could I accomplish the above with an abstract class? Zope 3 has an interface system which is good. I recommend you look at that. Zope 3's interface system is quite good, but it's

Re: scanning through page and replacing all instances of 00:00:00.00

2006-04-17 Thread Larry Bates
Kun wrote: I have a python-cgi file that pulls data from an sql database, i am wondering what is the easiest way to remove all instances of '00:00:00.00' in my date column. how would i write a python script to scan the entire page and delete all instances of '00:00:00.00', would i use

Re: Missing interfaces in Python...

2006-04-17 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Have a look at Zope 3. (http://www.zope.org/DevHome/Wikis/DevSite/Projects/ComponentArchitecture/FrontPage). It has an interface implementation. You can use this implementation with the apllication server Zope 3 or alone. Regards, Egon [EMAIL

Re: scanning through page and replacing all instances of 00:00:00.00

2006-04-17 Thread Fredrik Lundh
Kun wrote: I have a python-cgi file that pulls data from an sql database, i am wondering what is the easiest way to remove all instances of '00:00:00.00' in my date column. how would i write a python script to scan the entire page and delete all instances of '00:00:00.00', would i use

  1   2   >