Re: I am looking for some python script to compare two files

2005-11-08 Thread Miki Tebeka
Hello david, > The file can be PDF or Word format. Any help? If just like to know if they differ you can compare their md5 signature (or any other digital signature). If you want a real diff then convert them to text. * For PDF you can use pdftotext (comes with xpdf) or Acrobat COM object (if

Re: Cursor Position.

2005-11-08 Thread Samantha
I will be using Tkinter. All I need is a way to get the X,Y position from a mouse click. I am trying to have an image loaded to click on, but that seems to be a problem. So if I can just get the position from the screen of a graphics program, showing an image, it will work for me. S "Fredrik Lun

Re: How do I create a dir using Python.

2005-11-08 Thread Juho Schultz
sumi wrote: > How do i create a dir using python. > You could use os.mkdir("my_dir_name") -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I create a dir using Python.

2005-11-08 Thread limodou
8 Nov 2005 23:00:09 -0800, sumi <[EMAIL PROTECTED]>: > How do i create a dir using python. > import os os.mkdir(path) -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit -- http://mail.python.org/mailman/listinfo/python-list

How do I create a dir using Python.

2005-11-08 Thread sumi
How do i create a dir using python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cursor Position.

2005-11-08 Thread Fredrik Lundh
"Samantha" <[EMAIL PROTECTED]> wrote: > Looking at the goto(xy) thread. > Is there a way to get the X,Y position from a cursor click and then use the > position to apply something like a water mark on an image at that position? All GUI toolkits can handle the "click here" part. Which one are you

Re: overloading *something

2005-11-08 Thread Robert Kern
James Stroud wrote: > Does anyone else find the following annoying: > > py> from UserDict import UserDict > py> aud = UserDict({"a":1, "b":2}) > py> def doit(**kwargs): > ... print kwargs > ... > py> aud > {'a': 1, 'b': 2} > py> doit(**aud) > Traceback (most recent call last): > File "", line

Re: gmpy 1.01 rc near... anybody wanna test>

2005-11-08 Thread casevh
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > > Everything works fine with v1.16. I'm sure I was doing something wrong. > > I shouldn't be testing that late at night. ;-) > > > > It looks like the warning about "tp_compare" has been fixed. > > I didn't touch tp_compare specifically, so the

Re: Goto XY

2005-11-08 Thread Chris F.A. Johnson
On 2005-11-09, Grant Edwards wrote: > On 2005-11-09, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote: >> >>> Is there some command in python so that I can read a key's input and >>> then use a gotoxy() function to move the cursor on screen? e.g.: >>> (psuedo-code) >> >> You can use curses, but that m

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

2005-11-08 Thread Steve M
Even though its for any (not just Tcl) experienced programmer, and even though you've got all the appropriate resources, I'll mention that you should get a lot out of the book Dive Into Python, at http://www.diveintopython.org/ -- http://mail.python.org/mailman/listinfo/python-list

Cursor Position.

2005-11-08 Thread Samantha
Looking at the goto(xy) thread. Is there a way to get the X,Y position from a cursor click and then use the position to apply something like a water mark on an image at that position? Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: overloading *something

2005-11-08 Thread James Stroud
On Monday 07 November 2005 20:36, Alex Martelli wrote: > Ron Adam <[EMAIL PROTECTED]> wrote: > > James Stroud wrote: > > > Hello All, > > > > > > How does one make an arbitrary class (e.g. class myclass(object)) > > > behave like a list in method calls with the "*something" operator? What > > > I m

Re: Goto XY

2005-11-08 Thread Chris F.A. Johnson
On 2005-11-09, Jean-Paul Calderone wrote: > On Tue, 8 Nov 2005 22:33:47 -0500, "Chris F.A. Johnson" <[EMAIL PROTECTED]> > wrote: >> [snip] >> >> To read a single keystroke, see Claudio Grondi's post in the >> thread "python without OO" from last January. >> >> Function and cursor keys

Re: Goto XY

2005-11-08 Thread Grant Edwards
On 2005-11-09, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote: > >> Is there some command in python so that I can read a key's input and >> then use a gotoxy() function to move the cursor on screen? e.g.: >> (psuedo-code) > > You can use curses, but that may be more trouble than it's worth. In whic

Re: How to convert a number to hex number?

2005-11-08 Thread Bengt Richter
On Wed, 09 Nov 2005 00:42:45 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: > > >Bengt Richter wrote: >> On 08 Nov 2005 08:07:34 -0800, Paul Rubin wrote: >> >> >>>"dcrespo" <[EMAIL PROTECTED]> writes: >>> >>>hex(255)[2:] 'ff' >>> >>>'%x'%255 is preferable since

Hawaii Python Users Group?

2005-11-08 Thread o0O0o
Are there any users groups or other resources for Python near Honolulu? I just started learning Python recently and would like to meet other people who use Python. (Python, Zope, Plone, etc.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-08 Thread Jean-Paul Calderone
On Tue, 8 Nov 2005 22:33:47 -0500, "Chris F.A. Johnson" <[EMAIL PROTECTED]> wrote: > [snip] > > To read a single keystroke, see Claudio Grondi's post in the > thread "python without OO" from last January. > > Function and cursor keys return more than a single character, so > more w

Re: random number generator thread safety

2005-11-08 Thread Mike Brown
Raymond Hettinger wrote: > 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 h

Re: Newb ??

2005-11-08 Thread [EMAIL PROTECTED]
I would rather to do the loop as : max_try = 5 for x in xrange(max_try): g = int(raw_input(["Take a guess","Take another guess"][x != 0])) if g == number: print "bingo, hit it in %i tries" % x + 1 break elif g < number: print "try higher" else: print "try lower" else: print "sorry

Re: Newb ??

2005-11-08 Thread Steve Holden
Chad Everett wrote: > Hi all, I am new to the group. Trying to learn Python programming on my > own. I am working through Michael Dawson's Book Python Programming for the > absolute beginner. > > I am tring to write a program that is a number guessing game. I want to be > able to give the u

Re: which feature of python do you like most?

2005-11-08 Thread Steve Holden
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > >>I have no idea why people are so facinating with python. > > > Hey, I'm fascinating even without python! > And so modest, too :-) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.h

Re: Goto XY

2005-11-08 Thread Chris F.A. Johnson
On 2005-11-09, [EMAIL PROTECTED] wrote: > Is there some command in python so that I can read a key's input and > then use a gotoxy() function to move the cursor on screen? e.g.: > (psuedo-code) You can use curses, but that may be more trouble than it's worth. If you don't mind limiting y

I am looking for some python script to compare two files

2005-11-08 Thread david
hi: The file can be PDF or Word format. Any help? thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing empties

2005-11-08 Thread Jean-Paul Calderone
On Tue, 8 Nov 2005 19:28:36 -0800, Alex Martelli <[EMAIL PROTECTED]> wrote: >Aahz <[EMAIL PROTECTED]> wrote: > ... >> >For pickling, object() as a unique "nothing here, NOT EVEN a None" >> >marker (AKA sentinel) works fine. >> >> How does that work? Maybe I'm missing something obvious. >> >>

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

2005-11-08 Thread Anthony L.
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John J. Lee) wrote: > "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 ev

Re: Storing empties

2005-11-08 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: ... > >For pickling, object() as a unique "nothing here, NOT EVEN a None" > >marker (AKA sentinel) works fine. > > How does that work? Maybe I'm missing something obvious. > > sentinel = object() > class C: > def __init__(self, foo=sentinel): >

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

2005-11-08 Thread Anthony L.
In article <[EMAIL PROTECTED]>, Francois Lepoutre <[EMAIL PROTECTED]> wrote: > > 3. I am not very attracted to PSP because I want to separate the logic > > from the presentation as completely as possible [...] > > In view of your project why not consider cherrypy as well? It may > be an alte

Re: Newb ??

2005-11-08 Thread jmdeschamps
[EMAIL PROTECTED] wrote: > Chad Everett wrote: > > Hi all, I am new to the group. Trying to learn Python programming on my > > own. I am working through Michael Dawson's Book Python Programming for the > > absolute beginner. > > > > I am tring to write a program that is a number guessing game.

Re: Newb ??

2005-11-08 Thread [EMAIL PROTECTED]
Chad Everett wrote: > Hi all, I am new to the group. Trying to learn Python programming on my > own. I am working through Michael Dawson's Book Python Programming for the > absolute beginner. > > I am tring to write a program that is a number guessing game. I want to be > able to give the user

Re: SPE IDE for Python

2005-11-08 Thread Chris Spencer
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 used to use SPE quite frequently, until it went nearly unmaintained

Newb ??

2005-11-08 Thread Chad Everett
Hi all, I am new to the group. Trying to learn Python programming on my own. I am working through Michael Dawson's Book Python Programming for the absolute beginner. I am tring to write a program that is a number guessing game. I want to be able to give the user 5 tries to guess the number

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

2005-11-08 Thread Anthony L.
In article <[EMAIL PROTECTED]>, "Ben Sizer" <[EMAIL PROTECTED]> wrote: > Anthony L. wrote: > > 1. I want to use CGI through Publisher handler, instead of CGI handler > > or PSP. Despite the speed increase mod_python gives me, there is a > > problem of persistence that can be a problem when dealin

Re: Goto XY

2005-11-08 Thread jmdeschamps
Like David said above... ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-08 Thread jmdeschamps
Like David said below, you need to import WConio but then repemeber when you *import someLib* you have to use qualified names such as WConio.getkey() Example: import WConio s=WConio.getkey() if s == "right": WConio.gotoxy(10,10) WConio.putch("W") s=WConio.getch() -- http://mail.pytho

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

2005-11-08 Thread Robert Hicks
Ah, another one leaves the fold... : \ Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-08 Thread David Wahler
[EMAIL PROTECTED] wrote: > I assume I have to use a header somewhere (import WConio ?). If you had tried it, you would have discovered that "import WConio" is exactly what you need. Don't be afraid to experiment! -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-08 Thread ale . of . ginger
Thanks -- I downloaded WConio. When I just tried it out in the IDLE, it said: NameError: name 'WConio' is not defined I assume I have to use a header somewhere (import WConio ?). Or is there something I'm missing (I downloaded the Python 2.4 (I have 2.4.2) auto installer and it ran fine...) --

Re: which feature of python do you like most?

2005-11-08 Thread Raymond Hettinger
> which feature of python do you like most? Indentation -- http://mail.python.org/mailman/listinfo/python-list

Re: random number generator thread safety

2005-11-08 Thread Raymond Hettinger
> > Thread-safety has nothing to do with preserving entropy or guarding > > against attack. All of the entropy in an MT sequence is contained in > > the seed (upto 624 bytes) and that entropy is preserved through all > > subsequent calls. > > I think the concern is that there can be a thread switc

Re: Goto XY

2005-11-08 Thread jmdeschamps
WConio does this for Windows. See... getkey() and gotoxy() http://newcenturycomputers.net/projects/wconio.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-08 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Is there some command in python so that I can read a key's input and > then use a gotoxy() function to move the cursor on screen? e.g.: > (psuedo-code) > > When the right arrow is pushed, cursor gotoxy(x+1,y) You want curses. A version is included in the standard libr

Re: user account logon from python

2005-11-08 Thread Mike Meyer
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > Hi Mike, > Mike Meyer wrote: >>> 1- I cannot find getpwent in the documentation >> getpwent is a Unix library call. For python, you want the pwd >> module. The docs are http://docs.python.org/lib/module-pwd.html >. > I must be blind but still do no

Re: Goto XY

2005-11-08 Thread David Wahler
[EMAIL PROTECTED] wrote: > Is there some command in python so that I can read a key's input and > then use a gotoxy() function to move the cursor on screen? e.g.: > (psuedo-code) > > When the right arrow is pushed, cursor gotoxy(x+1,y) > > Thanks. On Unix-like platforms, this functionality is pr

Re: which feature of python do you like most?

2005-11-08 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I have no idea why people are so facinating with python. Hey, I'm fascinating even without python! -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Goto XY

2005-11-08 Thread Jean-Paul Calderone
On 8 Nov 2005 17:27:24 -0800, [EMAIL PROTECTED] wrote: >Is there some command in python so that I can read a key's input and >then use a gotoxy() function to move the cursor on screen? e.g.: >(psuedo-code) > >When the right arrow is pushed, cursor gotoxy(x+1,y) > You can uses curses for this, on

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread Peter Hansen
mo wrote: > "Fredrik Lundh" wrote: > >>works for me, when running it from a stock CPython interpreter in a > > windows > >>console window, with focus set to that window. >>what environment are you using? > > > I use IDLE 1.0.3, Python 2.3.4 > The same problem is when running in a win console.

Re: Addressing the last element of a list

2005-11-08 Thread Michael
[EMAIL PROTECTED] wrote: > Is there a way to make reference to the last element of a list, to use > as a shorthand: Yes. It's not wise to use, since this is brittle and will fail hard for you, but since you're interested, this is how you /could/ do it: (largely) # First of all create a mechanism

Goto XY

2005-11-08 Thread ale . of . ginger
Is there some command in python so that I can read a key's input and then use a gotoxy() function to move the cursor on screen? e.g.: (psuedo-code) When the right arrow is pushed, cursor gotoxy(x+1,y) Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: user account logon from python

2005-11-08 Thread Philippe C. Martin
Hi Mike, Mike Meyer wrote: >> 1- I cannot find getpwent in the documentation > > getpwent is a Unix library call. For python, you want the pwd > module. The docs are http://docs.python.org/lib/module-pwd.html >. > I must be blind but still do not see it - do you mean getpwnam ? >> 2- crypt w

Re: Invoking Python from Python

2005-11-08 Thread Mike Meyer
[EMAIL PROTECTED] (Cameron Laird) writes: > 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. conditions and loops). It was a n

Re: user account logon from python

2005-11-08 Thread Mike Meyer
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > Jeff, > > 1- I cannot find getpwent in the documentation getpwent is a Unix library call. For python, you want the pwd module. The docs are http://docs.python.org/lib/module-pwd.html >. > 2- crypt will not work if the system does not have shadow

Re: which feature of python do you like most?

2005-11-08 Thread jmdeschamps
James wrote: > 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 Pyt

Re: cPAMIE/Python String and Date Comparisons

2005-11-08 Thread RB
Here's an example: import cPAMIE import time from time import sleep search_txt = 'MSNBC Pairs Chung, Povich' date_txt = '8 November 2005' date_tuple = time.strptime(date_txt,'%d %B %Y') today_tuple = time.localtime() if date_tuple[:3] == today_tuple[:3]: print date_txt + ' is today\'s date

Re: which feature of python do you like most?

2005-11-08 Thread Ron Adam
[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 intereste

Re: plugin interface / list

2005-11-08 Thread Larry Bates
webograph wrote: > 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

Re: Application monitor

2005-11-08 Thread Mike Meyer
"dcrespo" <[EMAIL PROTECTED]> writes: >> Personally, I use init as an app monitor. It doesn't need monitoring > What's "init"? Sorry about my ignorance. init is the first Unix process, and all other processes are descended from it. It is the alpha and the omega of Unix processes. Uh, wait a second

Re: Diff. between Class types and classic classes

2005-11-08 Thread Bruno Desthuilliers
Colin J. Williams a écrit : > bruno at modulix wrote: > >> 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 talkin

Re: How to convert a number to hex number?

2005-11-08 Thread Ron Adam
Bengt Richter wrote: > On 08 Nov 2005 08:07:34 -0800, 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). > > > Not to mention ([E

Re: ANN: Circe 0.0.3b1 released

2005-11-08 Thread Nick D.
Matthew Nuzum gmail.com> writes: > > Hello, > > I'm curious, does Circe use threading? I have been frustrated that > some of the things I've wanted to do required threading, but haven't > found much documentation or good examples of using threading with > wxPy. > > I'm eager to disect the sour

Re: which feature of python do you like most?

2005-11-08 Thread Bengt Richter
On 8 Nov 2005 04:21:52 -0800, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: [...] >I have no idea why people are so facinating with python. >So I post this question: What do you use in your dairy work with >python? I don't do dairy work, but I imagine big snakes around cows might not be good for

Re: Diff. between Class types and classic classes

2005-11-08 Thread Colin J. Williams
bruno at modulix wrote: > 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 ne

Re: random number generator thread safety

2005-11-08 Thread Paul Rubin
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > Thread-safety has nothing to do with preserving entropy or guarding > against attack. All of the entropy in an MT sequence is contained in > the seed (upto 624 bytes) and that entropy is preserved through all > subsequent calls. I think the concer

Re: sqlite3 decode error

2005-11-08 Thread David Pratt
Hi Jean-Paul for some really good advice. I'll take a look at the project to see how this is handled. I was not aware of your wrapper project for SQLite - so this is something new to look at too. I have worked with SQLObject and also Django's db wrappers. In fact this question has come out o

Re: SPE IDE for Python

2005-11-08 Thread Peter Milliken
I use Emacs - it has cvs support and the next version (available from the GNU CVS archives) will support svn as well. Plus you can extend Emacs (assumes it doesn't quite do all you wish already :-)) via a python extension module where you can write your new edit commands in Python - see pymacs for

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 bei

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 ran

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: 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

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

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 whi

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 t

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 stor

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 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:]

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

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 ARe

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 >> showin

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) > '0x5857

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

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 = connection

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

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 th

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) '0x5857366DCE0162CB5DDCD1BF0FC7C03A6438304

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:] '44

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: 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

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 sc

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, s

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: 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 altho

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()' f

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 incompa

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 (

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 dat

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 > > som

[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: 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/) -- http://mail.python.org/mailman/listinfo/python-list

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

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 obj

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 thinkin

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

  1   2   3   >