RE: Get OS name

2005-04-15 Thread Tim Golden
[codecraig] | where can I get wmi module, it doesnt come with Python right? | Sorry, should have said. http://timgolden.me.uk/python/wmi.html TJG This e-mail has been scanned for all viruses by Star. The service is power

http status response

2005-04-15 Thread Richard Eibrand
Hi guys, How do I go about getting the http response status as with the httplib method .getresponse() using urllib2? Thing is I need to authenticate with a server, which I can do with urllib2 (by passing credentials), but I also need to get the status response codes and not only when raised

Re: Get OS name

2005-04-15 Thread codecraig
where can I get wmi module, it doesnt come with Python right? thanks. -- http://mail.python.org/mailman/listinfo/python-list

IOError 11 CGI module

2005-04-15 Thread Anton Jansen
Hi list, I have troubles with some python scripts I use as cgi scripts with thttpd. At irregular intervals when a post is made an IOError is raised by the CGI module. My question is how and why does this happen? The exception looks like this: --- Traceback (most recent call last): File "teamad

Re: Using python from a browser/security hole

2005-04-15 Thread Philippe C. Martin
Thanks Jim, From all I hear, it looks like the client authentication will have tobe made "on the side of the browser", between the server and a specific program running on the client. Not as nice but Regards, Philippe On Friday 15 April 2005 08:52 am, James Carroll wrote: > I don't th

Re: Get OS name

2005-04-15 Thread codecraig
i guess i wanted the result in a nice string like Windows XP instead of 5.1 i guess i'll have to convert it myself, thanks -- http://mail.python.org/mailman/listinfo/python-list

RE: Get OS name

2005-04-15 Thread Tim Golden
[rbt] | | codecraig wrote: | > How can I get the OS Name, such as "Windows XP Pro". I | know I can do | > | > sys.getwindowsversion but that doesnt return a nice Windows XP Pro | > string. | > | > and os.name gives "nt" | > | > thanks. | > | | Read the docs... sys.getwindowsversion() should

Re: sort of a beginner question about globals

2005-04-15 Thread fred.dixon
:) unit test is something on my to-learn list. seems involved and i haven't seen any straight forward tutorials yet. as yet i still consider myself a hobbyist at best. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get OS name

2005-04-15 Thread rbt
codecraig wrote: How can I get the OS Name, such as "Windows XP Pro". I know I can do sys.getwindowsversion but that doesnt return a nice Windows XP Pro string. and os.name gives "nt" thanks. Read the docs... sys.getwindowsversion() should do the trick. AFAIK, there is no way to differentiate bet

Re: Is Python appropriate for web applications?

2005-04-15 Thread codecraig
for more information on web application frameworks check out http://pyre.third-bit.com/pyweb/ It is a project aimed at helping web app developers to figure out which frameworks to use, etc. good luck! -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python from a browser/security hole

2005-04-15 Thread Philippe C. Martin
I'll take a lok, thanks Roel Schroeven wrote: > Philippe C. Martin wrote: > >> Since I need to access a local/client device from the page and that I >> wish to be cross-platform; does that mean Java is my only way out ? > > Or you could try Jython (http://www.jython.org/). > -- http://mail.p

Re: Using python from a browser/security hole

2005-04-15 Thread James Carroll
I don't think Jython will help much here... you would have to embed jython in your applet which makes it big, which makes it take longer to download... (or you could install it ahead of time on each client.) I asked my friend who did some smartcard authentication at a previous job... and in his ca

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread gsmith
I do have a standard install of Python as well as Plone. Can you have two? I have run the mxInstaller for both instances however, whether I run the ide from my standard install or my plone install the pythonpath is the same (ie c:\...\plone 2\python). My machine registry now has the python

Re: Python - interpreted vs compiled

2005-04-15 Thread bruno modulix
codecraig wrote: Hi, I have a question about Python. I know that it is an interpreted language, Nope. A *language* is neither compiled nor interpreted. An *implementation* of a language can use strict interpretation, byte-code compilation + VM, or native code compilation (it could as well use

Get OS name

2005-04-15 Thread codecraig
How can I get the OS Name, such as "Windows XP Pro". I know I can do sys.getwindowsversion but that doesnt return a nice Windows XP Pro string. and os.name gives "nt" thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine ip address

2005-04-15 Thread rbt
codecraig wrote: hi, how can i use python to figure the ip address of the machine which the python script is running on? I dont mean like 127.0.0.1but i want the external IP address (such as ipconfig on windows displays). any ideas?? THanks To get the public IP (like when you're behind a wi

Re: Using python from a browser/security hole

2005-04-15 Thread Philippe C. Martin
Neil, Would Jpython let me do that ? Would java let me call an external Python script - which in turn would access my device ? Thanks Philippe Neil Hodgson wrote: > Philippe: > >> Since I need to access a local/client device from the page and >> that I wish to be cross-platform; does that m

Re: new to mac OS10

2005-04-15 Thread Jorl Shefner
If you simply want the latest python to run from the command line, then compiling the source code works fine on the mac. I just installed 2.4.1 on Os 10.3.8 last week without any problems. http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz "./configure" "make" "make install" J.S. -- http

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread Simon Brunning
On 4/15/05, Graham <[EMAIL PROTECTED]> wrote: > Thanks Simon > I have just installed mxODBC and tried one of their samples. > Am getting an error on trying to import mx.ODBC > > ImportError: No module named mx.ODBC > > After the install the mx folder has been place in my C:\Program Files\Plon

problem with py2exe !

2005-04-15 Thread Glauco Silva
Hi, I´m with problem to create a executable program in python. I´m using py2exe but i don´t know if it´s right. My setup.py:   from distutils.core import setupimport py2exefrom glob import glob   setup(    # The first three parameters are not required, if at least a    # 'version' is given

Re: Using python from a browser/security hole

2005-04-15 Thread Roel Schroeven
Philippe C. Martin wrote: > Since I need to access a local/client device from the page and that I wish > to be cross-platform; does that mean Java is my only way out ? Or you could try Jython (http://www.jython.org/). -- If I have been able to see further, it was only because I stood on the sho

Re: Is Python appropriate for web applications?

2005-04-15 Thread bruno modulix
Unknown User wrote: I am a Python programmer and I'm thinking about learning PHP, which is similar to C++ (quite different from Python). I want to start writing web applications. Do you think if I learn PHP I'll develop faster? Does PHP have more features? How about the speed of execution? Wh

Re: Determine ip address

2005-04-15 Thread Simon Brunning
On 15 Apr 2005 06:03:06 -0700, codecraig <[EMAIL PROTECTED]> wrote: > hi, >how can i use python to figure the ip address of the machine which > the python script is running on? I dont mean like 127.0.0.1but i > want the external IP address (such as ipconfig on windows displays). On Window

Determine ip address

2005-04-15 Thread codecraig
hi, how can i use python to figure the ip address of the machine which the python script is running on? I dont mean like 127.0.0.1but i want the external IP address (such as ipconfig on windows displays). any ideas?? THanks -- http://mail.python.org/mailman/listinfo/python-list

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread Graham
Thanks Simon I have just installed mxODBC and tried one of their samples. Am getting an error on trying to import mx.ODBC ImportError: No module named mx.ODBC After the install the mx folder has been place in my C:\Program Files\Plone 2\Python\lib\site-packages folder however when I browse th

key-logging capability using python ?

2005-04-15 Thread [EMAIL PROTECTED]
Hi, I am commanding a robot through a laptop keyboard and I would like to be able to record the different keys I hit in order to achieve a certain goal. I looked at PyHook, http://sourceforge.net/project/showfiles.php?group_id=65529&package_id=92632&release_id=307838 but it seems to only be availa

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-15 Thread Robin Becker
R. C. James Harlow wrote: On Thursday 14 April 2005 10:27, [EMAIL PROTECTED] wrote: Supercomputer and encryption and compression @ rate of 96% Dear Sir or Madam, I have received notification that you posted a compression algorithm on the newsgroup comp.lang.python on or about 10:27:26 on the

Re: Python - interpreted vs compiled

2005-04-15 Thread codecraig
thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python from a browser

2005-04-15 Thread bruno modulix
Philippe C. Martin wrote: Hi, What do you mean ? Is that a client-side or server-side script ? Client side So I can't help you... Where ? Programming Python - O'Reilly - 2nd edition - by Mark Lutz - Paragraph "Teaching IE about Python" - Pages 922-925 Thanks, I'll have a look one day. -- bruno

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread Simon Brunning
On 4/15/05, Graham <[EMAIL PROTECTED]> wrote: > I need a SQL Server or ODBC package for Python. Can anyone help please? > Have search the Python packages under Database and there is no reference to > either SQL Server or ODBC. Top of the line is probably mxODBC (

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-15 Thread R. C. James Harlow
On Thursday 14 April 2005 10:27, [EMAIL PROTECTED] wrote: > Supercomputer and encryption and compression @ rate of 96% Dear Sir or Madam, I have received notification that you posted a compression algorithm on the newsgroup comp.lang.python on or about 10:27:26 on the 04/14/2005. I am writ

Re: Python - interpreted vs compiled

2005-04-15 Thread Fredrik Lundh
"codecraig" wrote: > I have a question about Python. I know that it is an interpreted > language, meaning a python program is converted to binary on the fly > each time it is run, or compiled. > What would be the purpose of compiling? I guess the compiled python > code (question, is compiled p

eval function not working how i want it dag namn

2005-04-15 Thread robcarlton
hi everybody I've written this function to make a list of all of an objects attributes and methods (not for any reason, I'm just learning) def list_members(obj) l = dir(obj) return map(lambda x : eval('obj.'+x), l) but I get an error saying that obj isn't defined. As I understand it eval

MS SQL Server/ODBC package for Python

2005-04-15 Thread Graham
I need a SQL Server or ODBC package for Python. Can anyone help please? Have search the Python packages under Database and there is no reference to either SQL Server or ODBC. Thanks Graham -- http://mail.python.org/mailman/listinfo/python-list

Python - interpreted vs compiled

2005-04-15 Thread codecraig
Hi, I have a question about Python. I know that it is an interpreted language, meaning a python program is converted to binary on the fly each time it is run, or compiled. What would be the purpose of compiling? I guess the compiled python code (question, is compiled python code called byte c

Re: whitespace , comment stripper, and EOL converter

2005-04-15 Thread qwweeeit
Hi, I have no more need to corret my code's bugs and send to clp group a working application (I don't think that there was an eager expectation...). Your code is perfectly working (as you can expect from a guru...). Thank you and bye. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python from a browser/security hole

2005-04-15 Thread Neil Hodgson
Philippe: > Since I need to access a local/client device from the page and > that I wish to be cross-platform; does that mean Java is my only > way out ? Java is designed to be safe and not allow access to client devices. There is a mechanism where you can attempt to ask for permission from

Re: RE Engine error with sub()

2005-04-15 Thread André Søreng
The "Internal error in regular expression engine" occurs also in Python 2.4.0 when creating a regular expression containing more than or's ("|"). Dennis Benzinger wrote: Maurice LING schrieb: Hi, I have the following codes: from __future__ import nested_scopes > [...] Are you still using Pyth

Re: PIL pilfont.py

2005-04-15 Thread Daewon YOON
Daewon YOON wrote: > Hi. > > I tried to convert a bdf file using pilfont.py script. Instead producing > pretty font images, it complained like following. > > ** > daewian:~/fonting$ ./pilfont.py gulim24.bdf > gulim24.bdf... > Traceback (most recent call last): > File "./pilfont.py", line 47, in

Re: Tk Listbox - Selected Item ?

2005-04-15 Thread Peter Moscatt
Martin Franklin wrote: > Peter Moscatt wrote: >> Martin Franklin wrote: >> >> >>>Peter Moscatt wrote: >>> I am having trouble understanding the methods for the Listbox from Tk. If I was to select at item in the list using a mouse click (have already created the bind event) - wha

Re: curses for different terminals

2005-04-15 Thread TZOTZIOY
On Thu, 14 Apr 2005 19:38:26 +0200, rumours say that harold fellermann <[EMAIL PROTECTED]> might have written: >> 1. Are you doing an single process application that produces output on >> many terminals? ie the program is kind of like a service? >gotcha. I want to write a TCP server that handles

Re: Is Python appropriate for web applications?

2005-04-15 Thread Lorenzo Bolognini
Unknown User wrote: I have the choice. Thanks for your opinion, If you have a look at CherryPy (www.cherrypy.org) you will not want to go back to PHP again! ;-) Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: new to mac OS10

2005-04-15 Thread François Granger
Le 15/04/05 1:54, « Thomas Nelson » <[EMAIL PROTECTED]> a écrit : > I'm on a mac OS X (10.3.8), and I seem to have accidentally destroyed > the default python installation. How should I put it on? Do I need to > use the unix version? any help would be greatly appreciated. There is also a list

Re: RE Engine error with sub()

2005-04-15 Thread Dennis Benzinger
Maurice LING schrieb: Hi, I have the following codes: from __future__ import nested_scopes > [...] Are you still using Python 2.1? In every later version you don't need the "from __future__ import nested_scopes" line. So, if you are using Python 2.1 I strongly recommend upgrading to Python 2.4.1. [

Re: Is Python appropriate for web applications?

2005-04-15 Thread Peter Maas
Unknown User schrieb: I am a Python programmer and I'm thinking about learning PHP, which is similar to C++ wrong (quite different from Python). true I want to start writing web applications. Do you think if I learn > PHP I'll develop faster? Nobody but you can anawer this question. You'll have

Re: Tk Listbox - Selected Item ?

2005-04-15 Thread Martin Franklin
Peter Moscatt wrote: Martin Franklin wrote: Peter Moscatt wrote: I am having trouble understanding the methods for the Listbox from Tk. If I was to select at item in the list using a mouse click (have already created the bind event) - what method returns the text of the selected item ? Pete Pete,

Re: How to name Exceptions that aren't Errors

2005-04-15 Thread TZOTZIOY
On 7 Apr 2005 21:20:19 GMT, rumours say that Leo Breebaart <[EMAIL PROTECTED]> might have written: [Max about Leo] >> This guys famous in the alternative universe of >> alt.fan.pratchett. The little imp stopped moving the memory blocks around as soon as it heard the distinct click of the name "Br

Re: RE Engine error with sub()

2005-04-15 Thread André Søreng
Instead of using regular expressions, you could perhaps use a multiple keyword matcher, and then for each match, replace it with the correct string. http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/ contains the Aho-Corasick algorithm written in C with a Python extension. Maurice LING wrote: H

Re: A testcase for a Queue like class.

2005-04-15 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > The tube will have an open method, with as argument an > access parameter that will determine if the thread wants > to put things (write) on the queue or will get (read) things > from the queue (or both). Now what I want is that a thread that > opens the

Re: Web Application Client Module

2005-04-15 Thread Rogan Dawes
Raffi wrote: Hi All, I hope I'm posting this question to the correct newsgroups. We have a web based database application that's accessed using IE. The application opens a popup window to run in. With all the popup blockers and compromised browsers out there, I'm looking into developing a web based

Re: Tk Listbox - Selected Item ?

2005-04-15 Thread Peter Moscatt
Martin Franklin wrote: > Peter Moscatt wrote: >> I am having trouble understanding the methods for the Listbox from Tk. >> >> If I was to select at item in the list using a mouse click (have already >> created the bind event) - what method returns the text of the selected >> item ? >> >> Pete >>

A testcase for a Queue like class.

2005-04-15 Thread Antoon Pardon
I'm writing some sort of replacement for the Queue module. I'm calling the class I'm writing a tube. However I'm stuck in how I should write some testcases. The tube will have an open method, with as argument an access parameter that will determine if the thread wants to put things (write) on the

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

2005-04-15 Thread Paul Boddie
Simon Brunning <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On 4/14/05, Peter Hansen <[EMAIL PROTECTED]> wrote: > > Greg Ewing wrote: > > > (Darn. I finally say something that gets into Quote of the > > > Week, and it's attributed to someone else! :-) :-) :-) > > > > +1 on thi

<    1   2