Re: PYTHON LOOSING FOR JAVA???????

2005-11-08 Thread Istvan Albert
PYTHON LOOSING FOR JAVA??? Yes, Python is already looser than Java. -- http://mail.python.org/mailman/listinfo/python-list

Re: Addressing the last element of a list

2005-11-08 Thread Steven D'Aprano
On Tue, 08 Nov 2005 01:43:43 -0800, [EMAIL PROTECTED] wrote: But if lst[42][pos] happens to hold an integer value, then a = lst[42][pos] will _copy_ that integer value into 'a', right? Changing 'a' will not change the value at lst[42][pos] Not quite. Don't think of Python names as being

Re: which feature of python do you like most?

2005-11-08 Thread Michele Simionato
which feature of python do you like most? It makes easy things easy, while keeping hard things possible. -- http://mail.python.org/mailman/listinfo/python-list

Re: Application monitor

2005-11-08 Thread dcrespo
Personally, I use init as an app monitor. It doesn't need monitoring What's init? Sorry about my ignorance. -- http://mail.python.org/mailman/listinfo/python-list

Re: recursive function call

2005-11-08 Thread bruno at modulix
Nicolas Vigier wrote: Hello, I have in my python script a function that look like this : def my_function(arg1, arg2, opt1=0, opt2=1, opt3=42): if type(arg1) is ListType: How should it behave with tuples or subclasses of List ? Or if it's any other iterable ? Testing against the

Re: Underscores in Python numbers

2005-11-08 Thread Dave Hansen
On 7 Nov 2005 18:02:09 -0800 in comp.lang.python, Gustav Hållberg [EMAIL PROTECTED] wrote: I tried finding a discussion around adding the possibility to have optional underscores inside numbers in Python. This is a popular option available in several competing scripting langauges, that I would

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Robert Kern
Matt Feinstein wrote: On Tue, 08 Nov 2005 12:30:35 GMT, Raymond L. Buvel [EMAIL PROTECTED] wrote: http://calcrpnpy.sourceforge.net/clnumManual.html Unless you're using Windows. Why? Have you tried compiling it and failed? -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the

Re: XML GUI

2005-11-08 Thread kyriakos
if gtk is your toolkit of choice (using pygtk) you can design your user interface in glade (which saves it as an xml file) and then load it during runtime using libglade for more information check pygtk.org iand the faq http://www.async.com.br/faq/pygtk/index.py?req=all (-- especially section 22

Re: which feature of python do you like most?

2005-11-08 Thread bruno at modulix
[EMAIL PROTECTED] wrote: which feature of python do you like most? I've heard from people that python is very useful. Many people switch from perl to python because they like it more. I am quite familiar with perl, I've don't lots of code in perl. Now, I was curious and interested in the

Re: XML GUI

2005-11-08 Thread py
how about wxPython? I am interested in something that will look native on various operating systems (win, mac, *nix). any good tutorial on using wxPython with XML? -- http://mail.python.org/mailman/listinfo/python-list

Re: Lie Hetland book: Beginning Python..

2005-11-08 Thread Magnus Lycka
Vittorio wrote: Nonetheless, I was unable to find any documentation about such a different behaviour between Pysqlite and Pysqlite2; from my beginner point of view the Pysqlite (Magnus' version) paramstyle looks a better and more pythonic choice and I don't grasp the Pysqlite2 developers'

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Matt Feinstein
On Tue, 08 Nov 2005 06:43:51 -0800, Robert Kern [EMAIL PROTECTED] wrote: Matt Feinstein wrote: On Tue, 08 Nov 2005 12:30:35 GMT, Raymond L. Buvel [EMAIL PROTECTED] wrote: http://calcrpnpy.sourceforge.net/clnumManual.html Unless you're using Windows. Why? Have you tried compiling it and

Re: Diff. between Class types and classic classes

2005-11-08 Thread bruno at modulix
venk wrote: Hi, can some one properly explain the differences between class types and classic classes? ... Still face problems in identifying what is what. I'm not sure I understand your question. Are you talking about the diff between old-style and new-style classes, or the diff between

Re: XML GUI

2005-11-08 Thread [EMAIL PROTECTED]
I had to do something like this for a project I was working on a while ago, it was a program based on alota plugins that would use a config file that looked sorta like an Xorg configuration, it seemed kinda hard at the time but it's acctually pretty fun and easy, the hard part is functionality you

Re: XML GUI

2005-11-08 Thread Brendan
py wrote: how about wxPython? I am interested in something that will look native on various operating systems (win, mac, *nix). any good tutorial on using wxPython with XML? The wxPython distribution comes with XRCed, which is a graphical gui-builder that serializes to XRC (wxWidgets XML

Re: XML GUI

2005-11-08 Thread py
wxPython sounds like it might be the ticket...especially with the XRC files. I plan on defining the GUI via XML, and actions in my python app. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Which Version of Linux

2005-11-08 Thread vinjvinj
I would strongly recomend ubuntu server 5.1. I installed it on about 15 servers. Its secure out of the box. no ports are open. It comes with python 2.4.1 and a ton of python modules. The install requires only 1 cd and uses only 400 mb. -- http://mail.python.org/mailman/listinfo/python-list

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Robert Kern
Matt Feinstein wrote: On Tue, 08 Nov 2005 06:43:51 -0800, Robert Kern [EMAIL PROTECTED] wrote: Matt Feinstein wrote: On Tue, 08 Nov 2005 12:30:35 GMT, Raymond L. Buvel [EMAIL PROTECTED] wrote: http://calcrpnpy.sourceforge.net/clnumManual.html Unless you're using Windows. Why? Have you

Re: XML GUI

2005-11-08 Thread Juergen Kareta
py schrieb: how about wxPython? I am interested in something that will look native on various operating systems (win, mac, *nix). any good tutorial on using wxPython with XML? look at http://wiki.wxpython.org/index.cgi/UsingXmlResources --

Re: XML GUI

2005-11-08 Thread dcrespo
www.wxpython.org Look for the Docs and examples file. It has a full list of interesting examples, including the way for loading GUIs from xrc files. The xrc files can be generated from DialogBlocks, XRCEditor, wxDesigner. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: How to convert a number to hex number?

2005-11-08 Thread dcrespo
And if you want only the hex number, try: hex(255)[2:] 'ff' -- http://mail.python.org/mailman/listinfo/python-list

Re: Underscores in Python numbers

2005-11-08 Thread Roy Smith
Dave Hansen [EMAIL PROTECTED] wrote: Of course, I write _far_ more code in C than Python. But I've seen enough bugs of the sort where someone wrote 120 when they meant 1200, that I see great value in being able to specify 12_000_000. I'll admit that being able to write 12_000_000

Re: Pywin32: How to import data into Excel?

2005-11-08 Thread Marco Aschwanden
PyXLWriter might be at your service: http://pyxlwriter.sourceforge.net/ Have a nice day, Marco -- http://mail.python.org/mailman/listinfo/python-list

user account logon from python

2005-11-08 Thread Philippe C. Martin
Hi, I am attempting to write a linux logon manager with python. Can python access login APIs (which module ?) or do I need to write a wrapper ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: image

2005-11-08 Thread Steve Holden
Shi Mu wrote: On 11/8/05, Fredrik Lundh [EMAIL PROTECTED] wrote: Shi Mu wrote: why the following code report the error: Traceback (most recent call last): File C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in

Re: XML GUI

2005-11-08 Thread jmdeschamps
Brendan wrote: py wrote: how about wxPython? I am interested in something that will look native on various operating systems (win, mac, *nix). any good tutorial on using wxPython with XML? The wxPython distribution comes with XRCed, which is a graphical gui-builder that serializes

urllib2 Opener and Proxy/Authentication issues

2005-11-08 Thread Ray Slakinski
Hello, I have defined a function to set an opener for urllib2, this opener defines any proxy and http authentication that is required. If the proxy has authencation itself and requests an authenticated file I get a HTTP status code of 401 (Unauthorized access of the file being requested) I do

Re: [OTAnn] Feedback

2005-11-08 Thread Steve Holden
shenanigans wrote: I was interested in getting feedback from current mail group users. We have mirrored your mail list in a new application that provides a more aggregated and safe environment which utilizes the power of broadband. Roomity.com v 1.5 is a web 2.01 community webapp. Our

Re: PYTHON LOOSING FOR JAVA???????

2005-11-08 Thread Thorsten Kampe
* Fcamattti (2005-11-07 22:04 +0100) Hello for everybody So I have a doubt. I'd like to know what do you think about the joint of efforts of Sun Microsystems and the Google to create a office web based. I sincerely enjoy the idea althoug I'd like to know what will be the future of this

Re: How to convert a number to hex number?

2005-11-08 Thread Paul Rubin
dcrespo [EMAIL PROTECTED] writes: hex(255)[2:] 'ff' '%x'%255 is preferable since the format of hex() output can vary. Try hex(33**33). -- http://mail.python.org/mailman/listinfo/python-list

Invoking Python from Python

2005-11-08 Thread John Henry
Hi all, I have a need to create a Python script on the fly from another Python program and then execute the script so created. Do I need to invoke Python through os.spawnl or is there a better way? Thanks, -- John -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Python from Python

2005-11-08 Thread Thomas Guettler
Am Tue, 08 Nov 2005 08:10:25 -0800 schrieb John Henry: Hi all, I have a need to create a Python script on the fly from another Python program and then execute the script so created. Do I need to invoke Python through os.spawnl or is there a better way? Hi, creating source code with a

Re: SPE IDE for Python

2005-11-08 Thread Detlev Offenbach
py wrote: Anyone here use SPE (http://www.stani.be/python/spe/blog/). ...the IDE? Also, anyone know if it supports CVS or has a plugin for CVS? If not, what do you use to get your code into CVS (via an IDE preferably)? I use eric3 (http://www.die-offenbachs.de/detlev/eric3.html). It is an

Re: which feature of python do you like most?

2005-11-08 Thread George Sakkis
[EMAIL PROTECTED] wrote: [snipped] i've read a few chapters of a python tutorial book. The things are much like the perl one. I have no idea why people are so facinating with python. Because they can write a program or module longer than 100 lines and be actually able to read, debug,

Re: which feature of python do you like most?

2005-11-08 Thread Thomas Guettler
Am Tue, 08 Nov 2005 04:21:52 -0800 schrieb [EMAIL PROTECTED]: which feature of python do you like most? I've heard from people that python is very useful. Many people switch from perl to python because they like it more. It gives you a stacktrace if something is wrong. Exceptions are

Re: Newbie Alert: Help me store constants pythonically

2005-11-08 Thread Brendan
Thanks for all the suggestions everyone. After a bit of googling on the c.l.p. group, I see that building config files is one of those 'Everyone has a favourite way of doing it' types of problems, with lots of reimplementations. I should change the thread topic to Yet Another Config File

Re: which feature of python do you like most?

2005-11-08 Thread Alex Stapleton
On 8 Nov 2005, at 12:21, [EMAIL PROTECTED] wrote: which feature of python do you like most? I think this question might be a bit like asking whether you love your mum or your dad most to a lot of people ;) People like Python as a whole usually. It's not like C++ or PHP or anything where

Re: which feature of python do you like most?

2005-11-08 Thread Paul Rubin
Alex Stapleton [EMAIL PROTECTED] writes: People like Python as a whole usually. It's not like C++ or PHP or anything where it's generally usable and occasionally pisses you off. As somebody once said about Lisp, you can feel the bits between your toes. --

Re: which feature of python do you like most?

2005-11-08 Thread Sion Arrowsmith
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: which feature of python do you like most? A different thing every time I encounter the corresponding misfeature in another language. But a lot of it boils down to the cleanliness of syntax when handling complex datastructures aggregated from basic types,

debugger

2005-11-08 Thread mclaugb
Is there a decent debugger to use with IDL? I have briefly about PDB but this looks pretty limited in features and difficult to use. Any suggestions? Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: user account logon from python

2005-11-08 Thread jepler
login APIs vary widely from system to system. Classic Unix systems use calls like getpwent and crypt to check passwords, and then call setuid, setgid and setgroups to set the identity of the user who is logging in. These are all available in stock Python, check the library reference for more

Re: Text Auto-fill

2005-11-08 Thread Jorgen Grahn
On 7 Nov 2005 18:41:39 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It's common in web browsers to have a text auto-fill function for personal information or passwords or whatnot. The flavor that I'm referring to is the kind that pops up as you're typing the word, not the kind that fills

Re: user account logon from python

2005-11-08 Thread Philippe C. Martin
That helps a lot, thanks. Regards, Philippe [EMAIL PROTECTED] wrote: login APIs vary widely from system to system. Classic Unix systems use calls like getpwent and crypt to check passwords, and then call setuid, setgid and setgroups to set the identity of the user who is logging in.

Re: debugger

2005-11-08 Thread Benji York
mclaugb wrote: Is there a decent debugger to use with IDL? I have briefly about PDB but this looks pretty limited in features and difficult to use. You might like Winpdb: http://www.digitalpeers.com/pythondebugger/ -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Re: which feature of python do you like most?

2005-11-08 Thread Luis M. Gonzalez
I've never used Perl, but I know other c-like laguages, and I can tell you what I like about python: - It is concise, clear and to the point. - No useless characters like curly braces and semicolons cluttering it syntax,. - Very readable and elegant. - One obvious way to do each task, not

Re: Newbie Alert: Help me store constants pythonically

2005-11-08 Thread Stefan Rank
on 08.11.2005 17:40 Brendan said the following: [snip config/properties file needs] I've checked out ConfigParser, ConfigObj, Pickle, PyYaml and gnossis.xml.serialize, and none meet all the above criteria (though they're all neat). So I've decide to use ...drumroll please plistlib (

Re: which feature of python do you like most?

2005-11-08 Thread Jeffrey Schwab
[EMAIL PROTECTED] wrote: which feature of python do you like most? I've heard from people that python is very useful. Many people switch from perl to python because they like it more. I am quite familiar with perl, I've don't lots of code in perl. Now, I was curious and interested in the

Re: how to present Python's OO feature in design?

2005-11-08 Thread Jorgen Grahn
On 6 Nov 2005 23:17:09 -0800, Kay Schluehr [EMAIL PROTECTED] wrote: pcmanlin wrote: because i have a problem that python's oo feature is so great, but maybe when the project become larger, python's no-declaration cannot mapping the design to practice? I am not sure about it. As far

Re: Invoking Python from Python

2005-11-08 Thread Cameron Laird
In article [EMAIL PROTECTED], Thomas Guettler [EMAIL PROTECTED] wrote: . . . creating source code with a script, is no good solution. Once I had to maintain lisp code which stored its data in lisp code, too (incl.

Re: user account logon from python

2005-11-08 Thread Philippe C. Martin
Jeff, 1- I cannot find getpwent in the documentation 2- crypt will not work if the system does not have shadow pw 3- Even as root I get Operation not permitted using setuid and setgid ... but I assume it is because I cannot get 1 and/or 2 to work. Can you direct me to some link that would

Re: which feature of python do you like most?

2005-11-08 Thread Micah Elliott
[EMAIL PROTECTED] wrote: What do you use in your dairy work with python? Cows hate snakes! which feature of python do you like most? Various success stories: http://pythonology.org/success Eric Raymond: http://pythonology.org/successstory=esr Bruce Eckel:

Re: how to write a blog system with Python

2005-11-08 Thread Damjan
I am a fresh here , and I have no idea of it. Do you have any comments? Take a look at aether, a single CGI script and it's easy to understand. http://www.logarithmic.net/pfh/aether -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Pylab and pyserial plot in real time

2005-11-08 Thread googlinggoogler
Juho Schultz: Thanks for that, havent got time to modify it for my needs at the moment, but im sure it'll work as i've just tried it Jeremy Sanders: Cheers for that, i'll check it out. thanks to everyone else to! Thanks David -- http://mail.python.org/mailman/listinfo/python-list

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-08 Thread Russell E. Owen
In article [EMAIL PROTECTED], Kevin Walzer [EMAIL PROTECTED] wrote: I'm a Tcl/Tk developer who has been dabbling with Python for some time,... Well, I have finally found a good reason to learn Python in more depth:... Any advice, particularly from other programmers with a lot of experience in

Re: debugger

2005-11-08 Thread robert . dowell
Benji York wrote: mclaugb wrote: Is there a decent debugger to use with IDL? I have briefly about PDB but this looks pretty limited in features and difficult to use. You might like Winpdb: http://www.digitalpeers.com/pythondebugger/ -- Benji York Not Found The requested URL

Re: which feature of python do you like most?

2005-11-08 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: which feature of python do you like most? I've heard from people that python is very useful. Many people switch from perl to python because they like it more. I am quite familiar with perl, I've don't lots of code in perl. Now, I was curious and interested in the

Re: how to modify code while debugging it without having to stop and then restart debugger

2005-11-08 Thread python
thanks for all that have replied so far. i still find it __very__ hard to believe that i cannot edit code inside a function while debugging it. as i mentioned even micro$soft can do this using statically type languages like visual basic and csharp. also, both visualbasic and csharp have goto

Re: debugger

2005-11-08 Thread Benji York
[EMAIL PROTECTED] wrote: Benji York wrote: You might like Winpdb: http://www.digitalpeers.com/pythondebugger/ Not Found The requested URL /pythondebugger/-- was not found on this server. Apache/2.0.52 (Red Hat) Server at www.digitalpeers.com Port 80 shrug Works for me. -- Benji York --

Re: user account logon from python

2005-11-08 Thread Philippe C. Martin
getting there, this sequence creates a file with the correct uid and gid test_user_ids = 504 print os.setreuid(test_user_ids,0) print os.setregid(test_user_ids,0) print os.setuid(test_user_ids) print os.setgid(test_user_ids) print os.getuid() f = open(/tmp/toto,w) f.write(titi) f.close()

Re: debugger

2005-11-08 Thread robert . dowell
Benji York wrote: [EMAIL PROTECTED] wrote: Benji York wrote: You might like Winpdb: http://www.digitalpeers.com/pythondebugger/ Not Found The requested URL /pythondebugger/-- was not found on this server. Apache/2.0.52 (Red Hat) Server at www.digitalpeers.com Port 80 shrug Works

Re: PYTHON LOOSING FOR JAVA???????

2005-11-08 Thread Steve Horsley
Jarek Zgoda wrote: Computing is large area. Much larger than aunt Tilly's laptop. You clearly haven't seen the size of Aunt Tilly's lap! Sorry, couldn't resist it. Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Python from Python

2005-11-08 Thread Jeffrey Schwab
John Henry wrote: Hi all, I have a need to create a Python script on the fly from another Python program and then execute the script so created. Do I need to invoke Python through os.spawnl or is there a better way? Could you import the generated script? This might be the way to go if,

PNG processing with only base python install

2005-11-08 Thread Iain King
My web server supports python CGI scripts, but I can't install anything else there - I can just use what they've provided. I want to process some PNG images - any ideas how I can do this with just the basic modules? Is there an image processing module written purely in Python? Iain --

Get the pid of a os.startfile(filename)

2005-11-08 Thread dcrespo
Hi to all, How can I get the Process ID (PID) of an application started because of os.startfile(filename)? Or, better, How can I get the PID of a running program, suposing I know the name of the running application? Many thanks. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: which feature of python do you like most?

2005-11-08 Thread James
Most of the responses are of the Why Python is more pleasant than C++ variety, but the original poster specifically said he had experience with Perl. As such, arguments like automatic memory management don't carry any weight. From my experience as both a Perl and Python user--and I do prefer

Re: Using python for writing models: How to run models in restricted python mode?

2005-11-08 Thread Magnus Lycka
vinjvinj wrote: I have an application which allows multiple users to write models. These models get distributed on a grid of compute engines. users submit their models through a web interface. I want to 1. restrict the user from doing any file io, exec, import, eval, etc. I was thinking of

Re: __new__

2005-11-08 Thread Steven Bethard
James Stroud wrote: Hello All, I'm running 2.3.4 I was reading the documentation for classes types http://www.python.org/2.2.3/descrintro.html And stumbled on this paragraph: __new__ must return an object. There's nothing that requires that it return a new object that is an

Re: urllib2 Opener and Proxy/Authentication issues

2005-11-08 Thread John J. Lee
Ray Slakinski [EMAIL PROTECTED] writes: [...] ps: settings.GlobalProxySetting is defined as a string, for example: non-authenticated proxy: http://192.168.1.1:3128; authenticated proxy: http://user:[EMAIL PROTECTED]:3128 [...] IIRC urllib2 is slightly broken wrt proxy auth and the @ syntax.

Re: PNG processing with only base python install

2005-11-08 Thread Szabolcs Nagy
use pil for image processing in python (http://www.pythonware.com/products/pil/) if pil is not installed then i don't think you can process png files (well at least there is a pure python jpeg decoder: http://davidf.sjsoft.com/files/pyjpeg/) --

[ANN] SMC - State Machine Compiler v. 4.3.0

2005-11-08 Thread rapp
SMC - The State Machine Compiler v. 4.3.0 Requires: Java 1.4.1 SE (Standard Edition) or better. Download: http://sourceforge.net/projects/smc Home Page: http://smc.sourceforge.net = What's New?

Re: web interface

2005-11-08 Thread John J. Lee
Jorge Godoy [EMAIL PROTECTED] writes: Ajar [EMAIL PROTECTED] writes: I have a stand alone application which does some scientific computations. I want to provide a web interface for this app. The app is computationally intensive and may take long time for running. Can someone suggest me

sqlite3 decode error

2005-11-08 Thread David Pratt
Recently I have run into an issue with sqlite where I encode strings going into sqlite3 as utf-8. I guess by default sqlite3 is converting this to unicode since when I try to decode I get an attribute error like this: AttributeError: 'unicode' object has no attribute 'decode' The code and

Re: Web automation

2005-11-08 Thread qwweeeit
Hi all, answering to Mike Meyer who replied to the following assertion on my part: but I supposed the everyone knew that web automation (and in general automation) is only a problem in Linux. with...: I don't know it. I don't believe it, either. I automate web tasks on Unix systems (I don't

Re: Is mod_python 3.1 good for commercial blogging/CMS?

2005-11-08 Thread John J. Lee
Ben Sizer [EMAIL PROTECTED] writes: [...] It as not easy to work with the CGI-style code in a WYSIWYG web editor as it is to edit a template, which is probably the main reason for their use. Also, coding everything with req.write() means that each [...] You seem to believe CGI is incompatible

Re: Invoking Python from Python

2005-11-08 Thread Martin Miller
John Henry wrote: Hi all, I have a need to create a Python script on the fly from another Python program and then execute the script so created. Do I need to invoke Python through os.spawnl or is there a better way? When doing something similar to this I used the built-in 'execfile()'

Re: PYTHON LOOSING FOR JAVA???????

2005-11-08 Thread Bill Mill
On 11/7/05, Martin v. Löwis [EMAIL PROTECTED] wrote: Fcamattti wrote: Hello for everybody So I have a doubt. I'd like to know what do you think about the joint of efforts of Sun Microsystems and the Google to create a office web based. I sincerely enjoy the idea althoug I'd like to

Re: sqlite3 decode error

2005-11-08 Thread Jean-Paul Calderone
On Tue, 08 Nov 2005 16:27:25 -0400, David Pratt [EMAIL PROTECTED] wrote: Recently I have run into an issue with sqlite where I encode strings going into sqlite3 as utf-8. I guess by default sqlite3 is converting this to unicode since when I try to decode I get an attribute error like this:

Re: which feature of python do you like most?

2005-11-08 Thread Pierre Quentel
[EMAIL PROTECTED] a écrit : what is the thing that python makes you happy? I discovered Python 5 years ago and I remember very well that what attracted me first was indentation. I had learnt JavaScript and rudiments of Java and couldn't decide on a consistent way of indenting my code, so

Re: Map of email origins to Python list

2005-11-08 Thread Alan Kennedy
[Claire McLister] I've made the script available on our downloads page at: http://www.zeesource.net/downloads/e2i [Alan Kennedy] I look forward to the map with updated precision :-) [Claire McLister] Me too. Please let me know how we should modify the script. Having examined your script,

Re: which feature of python do you like most?

2005-11-08 Thread Mike Meyer
James [EMAIL PROTECTED] writes: Most of the responses are of the Why Python is more pleasant than C++ variety, but the original poster specifically said he had experience with Perl. As such, arguments like automatic memory management don't carry any weight. From my experience as both a Perl

random number generator thread safety

2005-11-08 Thread Mike Brown
I have questions about thread safety in the 'random' module. When using the random.Random class (be it Mersenne Twister or Wichmann-Hill based), is it sufficiently thread-safe (preserving entropy and guarding against attack) to just have each thread work with its own random.Random instance? Or

Re: How to convert a number to hex number?

2005-11-08 Thread Steve Holden
Paul Rubin wrote: dcrespo [EMAIL PROTECTED] writes: hex(255)[2:] 'ff' '%x'%255 is preferable since the format of hex() output can vary. Try hex(33**33). ? You're usually smarter than this, or am I missing some joke? hex(33*33) '0x441' hex(33*33)[2:] '441' 33*33 1089 %x %

Re: How to convert a number to hex number?

2005-11-08 Thread Paul Rubin
Steve Holden [EMAIL PROTECTED] writes: Try hex(33**33). You're usually smarter than this, or am I missing some joke? hex(33*33) '0x441' You used only one * (multiplication), I used two *'s (exponentiation). hex(33**33) '0x5857366DCE0162CB5DDCD1BF0FC7C03A6438304421L' --

Re: how to compile c-extensions under WinXP?

2005-11-08 Thread Scott David Daniels
Steve Holden wrote: [EMAIL PROTECTED] wrote: What should I do to be able to compile C-extensions (with python 2.4, winXP)? I get an error message, approximately The .NET Framework SDK needs to be installed; I tried to get something from the Microsoft web site, but maybe not the right

Re: Web automation

2005-11-08 Thread Mike Meyer
[EMAIL PROTECTED] writes: answering to Mike Meyer who replied to the following assertion on my part: but I supposed the everyone knew that web automation (and in general automation) is only a problem in Linux. with...: I don't know it. I don't believe it, either. I automate web tasks on

cx_Oracle callproc output parameters

2005-11-08 Thread infidel
I have a stored procedure that has a single output parameter. Why do I have to pass it a string big enough to hold the value it is to receive? Why can't I pass an empty string or None? import cx_Oracle as oracle connection = oracle.connect('usr/[EMAIL PROTECTED]') cursor =

Re: Get the pid of a os.startfile(filename)

2005-11-08 Thread Do Re Mi chel La Si Do
Hi ! With W2K or WXP : tasklist /FI IMAGENAME eq exename.exe And, with Python, how capture this information : def findPID(exename): import os a = os.popen4('tasklist /FI IMAGENAME eq '+exename+'') a[0].flush() try: info=a[1].readlines()[3].split() except:

Re: How to convert a number to hex number?

2005-11-08 Thread Steve Holden
Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: Try hex(33**33). You're usually smarter than this, or am I missing some joke? hex(33*33) '0x441' You used only one * (multiplication), I used two *'s (exponentiation). hex(33**33)

Re: os.path.getmtime on winXP

2005-11-08 Thread Bengt Richter
On Tue, 08 Nov 2005 13:33:12 +0100, =?ISO-8859-1?Q?Jorg_R=F8dsj=F8?= [EMAIL PROTECTED] wrote: Bengt Richter wrote: By 'getmtime' you mean os.path.getmtime(fer_shure_or_absolute_path_to_file) right? Doesn't that get you an integer number of seconds? What GUI or win32file is showing you

Re: Web automation

2005-11-08 Thread Mike Meyer
Paul Boddie [EMAIL PROTECTED] writes: Mike Meyer wrote: Paul Boddie [EMAIL PROTECTED] writes: The problem on non-Windows systems is the lack of a common (or enforced) technology for exposing application object models OS X has AppleScript. VM/CMS has Rexx. The Amiga had ARexx when MS was

Re: Python doc problem example: gzip module (reprise)

2005-11-08 Thread Mike Meyer
Xah Lee [EMAIL PROTECTED] writes: Newsgroups: comp.lang.perl.misc PS: I won't cross-post as I'm not subscribed to the Python group. Very wisely done. Then from Xah Lee, we get; I have cross posted it for you. Proving once again that he's stupider than spam. Please help google find him that

Re: How to convert a number to hex number?

2005-11-08 Thread Bengt Richter
On 08 Nov 2005 08:07:34 -0800, Paul Rubin http://[EMAIL PROTECTED] wrote: dcrespo [EMAIL PROTECTED] writes: hex(255)[2:] 'ff' '%x'%255 is preferable since the format of hex() output can vary. Try hex(33**33). Not to mention ([EMAIL PROTECTED] deleted ;-) hex(-255)[2:] 'xff' hex(-255)

Re: Storing empties

2005-11-08 Thread Aahz
In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: Aahz [EMAIL PROTECTED] wrote: Alex: Aahz: Alex: the canonical idiom when you need such distinction is: _not_there = object() What's your preferred idiom when you're dealing with storable objects? What's a storable object?

Re: SPE IDE for Python

2005-11-08 Thread Brendan
SPE doesn't yet integrate with CVS, but it's in active development. CVS support may come sooner than later. I have been demoing Komodo which integrates with CVS, SVN and perforce. I've been very impressed. http://aspn.activestate.com/ASPN/docs/Komodo/3.1/komodo-doc-scc.html On my pc I just use

plugin interface / list

2005-11-08 Thread webograph
hi, i'm about to write a script to play various audio files. what i want to write is a directory (module) containing wrappers around various players that supply a player object (inheriting from a general player object defined earlier) and an entry in a list of mime types (which player is for

Regular Expressions and Dividing Strings

2005-11-08 Thread James Colannino
Hey everyone, I have a file containing the following type of data (only an example): root:root What I want to do is take this line and divide it into two separate strings (the ':' character would divide the two strings, so the result of the example above would be root and root.) The names

Re: Regular Expressions and Dividing Strings

2005-11-08 Thread Christoph Haas
On Tuesday 08 November 2005 23:59, James Colannino wrote: Hey everyone, I have a file containing the following type of data (only an example): root:root What I want to do is take this line and divide it into two separate strings (the ':' character would divide the two strings, so the result

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-08 Thread Cameron Laird
In article [EMAIL PROTECTED], Russell E. Owen [EMAIL PROTECTED] wrote: . [acute observations] . . Features of Python that are well integrated and well worth using include: - objects - collection classes

Re: random number generator thread safety

2005-11-08 Thread Raymond Hettinger
Mike Brown wrote: I have questions about thread safety in the 'random' module. When using the random.Random class (be it Mersenne Twister or Wichmann-Hill based), is it sufficiently thread-safe (preserving entropy and guarding against attack) to just have each thread work with its own

Re: Regular Expressions and Dividing Strings

2005-11-08 Thread James Colannino
Christoph Haas wrote: You probably mean: a=root:root b,c = a.split(:) b and c contain both sides of the colon. Thanks. That's exactly what I was looking for. james -- My blog: http://www.crazydrclaw.com/ My homepage: http://james.colannino.org/ A well regulated militia being necessary

<    1   2   3   >