Re: Parrot Project for Python

2005-11-04 Thread Swaroop C H
See http://pirate.tangentcode.com/ - Swaroop -- http://mail.python.org/mailman/listinfo/python-list

Re: re sub help

2005-11-04 Thread Mike Meyer
[EMAIL PROTECTED] writes: > hi > > i have a string : > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" > > inside the string, there are "\n". I don't want to substitute the '\n' > in between > the [startdelim] and [enddelim] to ''. I only want to get rid of the > '\n

Re: re sub help

2005-11-04 Thread Mike Meyer
[EMAIL PROTECTED] writes: > hi > > i have a string : > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" > > inside the string, there are "\n". I don't want to substitute the '\n' > in between > the [startdelim] and [enddelim] to ''. I only want to get rid of the > '\n

Re: NTFS reparse points

2005-11-04 Thread Roger Upole
You should be able to use win32file.DeviceIoControl with winioctlcon.FSCTL_SET_REPARSE_POINT to do this. (winioctlcon was added in build 205) The hard part is going to be constructing the REPARSE_GUID_DATA_BUFFER struct to pass in as the buffer. hth Roger "Stanislaw Findeisen" <[EMAIL P

re sub help

2005-11-04 Thread s99999999s2003
hi i have a string : a = "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" inside the string, there are "\n". I don't want to substitute the '\n' in between the [startdelim] and [enddelim] to ''. I only want to get rid of the '\n' everywhere else. i have read the tutorial

Re: putting an Icon in "My Computer"

2005-11-04 Thread Roger Upole
There's an example of how to add an item to the shell namespace in the Pywin32 demos: \win32comext\shell\demos\servers\shell_view.py hth Roger "yaipa" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > All, > > I've been asked by my boss to put an Icon in WinXP's "My Compute

Re: import statement / ElementTree

2005-11-04 Thread Carl Banks
[EMAIL PROTECTED] wrote: > O/S: Windows 2K > Vsn of Python: 2.4 > > Currently: > > 1) Folder structure: > > \workarea\ <- ElementTree files reside here > \xml\ > \dom\ > \parsers\ > \sax\ First point, XML DOM comes packaged with Python 2.4. (IIRC, Python XML is, or was, a seperate p

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > Next you get some performance gain by using gmpy to handle the long int > > arithmetic, > > Then whatever happens next will be my own stupid fault for prematurely > optimising code. Huh? There's nothing premature about using gmpy if you need bett

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 20:41:31 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> It also allows you to do something like this: >> >> class ExpertGame(Game): >> current_level = 100 > >> and then use ExpertGame anywhere you would have used Game with no problems. > > Well

Parrot Project for Python

2005-11-04 Thread Cai Wenliang
Hello Python folks, I got the message that there is a project to port Python on Parrot runtime. (http://www.parrotcode.org) Could anybody provide more detailed info? Thanks! -William -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-04 Thread Steve Holden
Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>It also allows you to do something like this: >> >>class ExpertGame(Game): >>current_level = 100 > > >>and then use ExpertGame anywhere you would have used Game with no problems. > > > Well, let's say you set, hmm, current

Re: GMPY: divm() memory leak revisited

2005-11-04 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Since the following discussion took place (unresolved), > > > > I've ke

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Paul Rubin writes: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> It also allows you to do something like this: >> class ExpertGame(Game): >> current_level = 100 > >> and then use ExpertGame anywhere you would have used Game with no problems. > Well, let's say you s

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
[EMAIL PROTECTED] (Bengt Richter) writes: > On 04 Nov 2005 17:53:34 -0800, Paul Rubin wrote: >>[EMAIL PROTECTED] (Bengt Richter) writes: >>> Hm, "the" fix? Why wouldn't e.g. treating augassign as shorthand for >>> a source transformation (i.e., asstgt = expr becomes by si

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > It also allows you to do something like this: > > class ExpertGame(Game): > current_level = 100 > and then use ExpertGame anywhere you would have used Game with no problems. Well, let's say you set, hmm, current_score = 100 instead of current_lev

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
-- http://mail.python.org/mailman/listinfo/python-list

Re: python gc performance in large apps

2005-11-04 Thread Bryan Olson
Robby Dermody wrote: > [...] However, on a > simulated call center environment (constant 50 conversations, switching > every 300 seconds) the director component still consumes an average of > 1MB more per hour and the harvester is taking an average of 4MB more per > hour. With the director, 2/3

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 12:10:11 +, Antoon Pardon wrote: >> There are good usage cases for the current inheritance behaviour. I asked >> before what usage case or cases you have for your desired behaviour, and >> you haven't answered. Perhaps you missed the question? Perhaps you haven't >> had a c

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 13:52:22 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> Follow the logical implications of this proposed behaviour. >> >> class Game: >> current_level = 1 >> # by default, games start at level one > > That's bogus. Initialize the current

Re: Cheapest pocket device to code python on

2005-11-04 Thread adDoc's networker Phil
On 3 Nov 2005 19:55:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:What is the cheapest/affordable pocket device that I can code python on? I think the closest I have seen is pocketpc from this page:http://www.murkworks.com/Research/Python/PocketPCPython/Overview Cameron Laird < [EMA

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 20:55:48 -0500, Chris F.A. Johnson wrote: So that people reading your reply know what you are commenting about. (Now, imagine that you're reading from a newsgroup where Chris' post has disappeared off the server, or perhaps never showed up at all.) -- Steven. -- http://

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Sat, 05 Nov 2005 00:25:34 +, Bengt Richter wrote: > On Fri, 04 Nov 2005 02:59:35 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >>On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote: >> >>> Fine, we have the code: >>> >>> b.a += 2 >>> >>> We found the class variable, because t

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On Fri, 04 Nov 2005 10:28:52 -0500, Christopher Subich <[EMAIL PROTECTED]> wrote: >Antoon Pardon wrote: >>>Since ints are immutable objects, you shouldn't expect the value of b.a >>>to be modified in place, and so there is an assignment to b.a, not A.a. >> >> >> You are now talking implementati

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On 04 Nov 2005 17:53:34 -0800, Paul Rubin wrote: >[EMAIL PROTECTED] (Bengt Richter) writes: >> Hm, "the" fix? Why wouldn't e.g. treating augassign as shorthand for >> a source transformation (i.e., asstgt = expr becomes by simple >> text substitution asstgt = asstgt exp

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 16:06:45 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> A basic usage case: >> >> class Paper: >> size = A4 >> def __init__(self, contents): >> # it makes no sense to have class contents, >> # so contents go straight into the

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On Fri, 04 Nov 2005 09:24:41 -0500, Christopher Subich <[EMAIL PROTECTED]> wrote: >Steven D'Aprano wrote: >> On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote: >> >> >>>Fine, we have the code: >>> >>> b.a += 2 >>> >>>We found the class variable, because there is no instance variable, >>>

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 18:20:56 -0500, Mike Meyer wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> equal? Some things are a matter of objective fact: should CPython use a >> byte-code compiler and virtual machine, or a 1970s style interpreter that >> interprets the source code directly? > > F

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread [EMAIL PROTECTED]
Alex Martelli wrote: > It would still be easier to respond to your posts if you didn't > top-post, though (i.e., if you didn't put your comments BEFORE what > you're commenting on -- that puts the "conversation" in a weirdly > distorted order, unless one give up on quoting what you're commenting >

import statement / ElementTree

2005-11-04 Thread mirandacascade
O/S: Windows 2K Vsn of Python: 2.4 Currently: 1) Folder structure: \workarea\ <- ElementTree files reside here \xml\ \dom\ \parsers\ \sax\ 2) The folder \workarea\ is in the path. 3) A script (which is working) makes calls to the Element(), SubElement(), tostring() and XML() meth

Re: how to call basic browser functions?

2005-11-04 Thread Peter Hansen
BLElliott wrote: > I think this is a very basic question, so feel free to direct me to a > FAQ or other resource to go and get myself educated, if that's the best > answer. > > Can I perform web browser functions from a script, for example, doing > file downloads, if I can construct the file UR

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread [EMAIL PROTECTED]
Chris F.A. Johnson wrote: >If I want to read that way, I just tell my newsreader not to >display the quoted material (actually it displays the first line of >each block). > >Or I press TAB to jump to the next original material. My news reader is through Google, web browser. So ther

how to call basic browser functions?

2005-11-04 Thread BLElliott
I think this is a very basic question, so feel free to direct me to a FAQ or other resource to go and get myself educated, if that's the best answer. Can I perform web browser functions from a script, for example, doing file downloads, if I can construct the file URL within my script? As an e

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
[EMAIL PROTECTED] (Bengt Richter) writes: > On Thu, 03 Nov 2005 13:37:08 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: > [...] >>> I think it even less sane, if the same occurce of b.a refers to two >>> different objects, like in b.a += 2 >> >>That's a wart in +=, nothing less. The fix to that is to

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On 4 Nov 2005 11:09:36 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: [...] > >Take the code: > > lst[f()] += 1 > >Now let f be a function with a side effect, that in succession >produces the positive integers starting with one. > >What do you think this should be equivallent to: > > t = f() > ls

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread Chris F.A. Johnson
On 2005-11-04, [EMAIL PROTECTED] wrote: > > Alex Martelli wrote: >> It would still be easier to respond to your posts if you didn't >> top-post, though (i.e., if you didn't put your comments BEFORE what >> you're commenting on -- that puts the "conversation" in a weirdly >> distorted order, unless

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
[EMAIL PROTECTED] (Bengt Richter) writes: > Hm, "the" fix? Why wouldn't e.g. treating augassign as shorthand for > a source transformation (i.e., asstgt = expr becomes by simple > text substitution asstgt = asstgt expr) be as good a fix? Then > we could discuss what Consider "a[f()] += 3". You d

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread [EMAIL PROTECTED]
Björn Lindström wrote: > Anyway, if you keep more than a pageful of the previous message, you're > probably not cutting it hard enough. Just keep what's needed to keep the > context. > Sometimes it is easy(like this). Sometimes, it is not easy and cutting in any part of the original message would

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread [EMAIL PROTECTED]
Jorge Godoy wrote: > I'm more of the type that wouldn't read on if I have no context to what I'm > reading... Specially if there's a mix of top posts with bottom posts... > That just means different people have different reading style. Just like some find one-liner easier to read, some find step

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On 04 Nov 2005 11:04:58 +0100, Stefan Arentz <[EMAIL PROTECTED]> wrote: >Antoon Pardon <[EMAIL PROTECTED]> writes: > >> Op 2005-11-03, Mike Meyer schreef <[EMAIL PROTECTED]>: >> > Antoon Pardon <[EMAIL PROTECTED]> writes: >> >>> What would you expect to get if you wrote b.a = b.a + 2? >> >> I woul

Re: Calling Class' Child Methods

2005-11-04 Thread Steve Holden
Andrea Gavana wrote: > Hello NG, > > this may seem a stupid (or even impossible) question, but my knowlegde > of Python is quite limited. I have basically a simple graphical user > interface that contains a Panel, another panel (child of the main panel) and > a custom widget (child of the main

Re: C extension + libm oddity [fmod(2.0, 2.0) == nan ?!]

2005-11-04 Thread Lonnie Princehouse
> Have you compiled the C extension with all optimization turned off? Yes. The C extension's objects are compiled only with the debugging flag and -fPIC for position indepdendent code, necessary for shared objects. No optimization. The only things that have any optimization are Python and glib

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On Thu, 03 Nov 2005 13:37:08 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: [...] >> I think it even less sane, if the same occurce of b.a refers to two >> different objects, like in b.a += 2 > >That's a wart in +=, nothing less. The fix to that is to remove += >from the language, but it's a bit late

Re: C extension + libm oddity [fmod(2.0, 2.0) == nan ?!]

2005-11-04 Thread Paul Rubin
"Lonnie Princehouse" <[EMAIL PROTECTED]> writes: > Now, fmod(2.0, 2.0) should be 0.0. The problem? ans is getting > assigned nan! I have stepped through it in the debugger now dozens of > times. Either fmod is putting the wrong return value on the stack, or > the stack is getting corrupted by s

Re: python gc performance in large apps

2005-11-04 Thread Paul Rubin
Robby Dermody <[EMAIL PROTECTED]> writes: > t = 120 seconds (1st run after being fully initialized): > list alloced: 2394620, freed: 17565, max in use: 2377056 > dict alloced: 2447968, freed: 67999, max in use: 2379969 This looks like a garden variety memory leak. I think the next thi

C extension + libm oddity [fmod(2.0, 2.0) == nan ?!]

2005-11-04 Thread Lonnie Princehouse
I've been trying to debug this for two days now, and it's a longshot but I'm hoping that someone here might recognize a solution. I've got a C extension which calls a function in a C library, which calls another function in another library, which calls another function, which calls fmod from the s

GMPY: divm() memory leak revisited

2005-11-04 Thread [EMAIL PROTECTED]
Since the following discussion took place (unresolved), I've kept it in the back of my mind as

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On Fri, 04 Nov 2005 02:59:35 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote: > >> Fine, we have the code: >> >> b.a += 2 >> >> We found the class variable, because there is no instance variable, >> then why is the class variable not i

re:help with sending data out the parallel port

2005-11-04 Thread john_walczak
I may have a solution to your problem that involves a small piece of hardware plugged into the serial port. contact me if interested in details. [EMAIL PROTECTED] Sent via Archivaty.com -- http://mail.python.org/mailman/listinfo/python-list

Calling Class' Child Methods

2005-11-04 Thread Andrea Gavana
Hello NG, this may seem a stupid (or even impossible) question, but my knowlegde of Python is quite limited. I have basically a simple graphical user interface that contains a Panel, another panel (child of the main panel) and a custom widget (child of the main panel). Basically is something l

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > A basic usage case: > > class Paper: > size = A4 > def __init__(self, contents): > # it makes no sense to have class contents, > # so contents go straight into the instance > self.contents = contents So add: s

Re: Class Variable Access and Assignment

2005-11-04 Thread Magnus Lycka
Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>Follow the logical implications of this proposed behaviour. >> >>class Game: >>current_level = 1 >># by default, games start at level one > > > That's bogus. Initialize the current level in the __init__ method > where

python tutorials

2005-11-04 Thread Mostapha Amenchar
http://www.awaretek.com/tutorials.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter- New Window

2005-11-04 Thread James Stroud
On Friday 04 November 2005 10:01, Tuvas wrote: > Okay, never mind about my first question, I got that answer by using > Toplevel. However, there' s still a question to be answered. > > I popped up this new window with the intent to have something like > this: > > "what is your question" > _

Python Exercises for Newbee

2005-11-04 Thread Mostapha Amenchar
http://www.upriss.org.uk/python/PythonCourse.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > equal? Some things are a matter of objective fact: should CPython use a > byte-code compiler and virtual machine, or a 1970s style interpreter that > interprets the source code directly? For the record, I've only seen one interpreter that actually inte

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > Op 2005-11-04, Mike Meyer schreef <[EMAIL PROTECTED]>: >> Antoon Pardon <[EMAIL PROTECTED]> writes: >>> Op 2005-11-03, Mike Meyer schreef <[EMAIL PROTECTED]>: Antoon Pardon <[EMAIL PROTECTED]> writes: >> What would you expect to get if you wrote

Re: exec behaviour

2005-11-04 Thread N. Pourcelot
Thanks for you reply. I added locals() to my exec statment, so it worked, but I wasn't so sure about my interpretation of the problem. Fredrik Lundh wrote: > N. Pourcelot wrote: > > >>I can't understand some specific behaviour of the exec statment. >> >>For example, say that I create such a cl

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > Op 2005-11-04, Mike Meyer schreef <[EMAIL PROTECTED]>: >> >>> Would it be too much to ask that in a line like. >>> >>> x = x + 1. >>> >>> both x's would resolve to the same namespace? >> >> Yes. That's to much bondage for programmers who've become ac

Re: Class Variable Access and Assignment

2005-11-04 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> I've already argued that the kludges suggested to "solve" this problem >> create worse problems than this. > The most obvious solution is to permit (or even require) the > programmer to list the instance varia

Re: pycrypto rsa inverse of p modulo q

2005-11-04 Thread [EMAIL PROTECTED]
jt wrote: > Looking up into Crypto.PublicKey.RSA, I see there is a computed value > named "u" for which I can't see the use. The value of "u" is the > inverse of p modulo q, in the code: > obj.u = pubkey.inverse(obj.p, obj.q) > Can someone tell me where this value could be used in the RSA sche

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread Björn Lindström
Jorge Godoy <[EMAIL PROTECTED]> writes: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > >> oops. I developed this habit because I found I like to read it this >> way. As I usually would read just the first few lines to see if I >> want to read on. top post serve me well for this purpose. And I

Re: How do you do this in python?

2005-11-04 Thread George Yoshida
[EMAIL PROTECTED] wrote: > Pass your script to Perl via standard input: > echo "print 'Hello, world'" | perl - $ echo "print 'hello, world'" | python - hello, world Cheers, -- george -- http://mail.python.org/mailman/listinfo/python-list

Bugfix release 2.3.6 ?

2005-11-04 Thread Robert
A bugfix release 2.3.6 would also be a good idea. I suffered at once from 2 severe bugs pending in 2.3 (fixed in 2.4) when going back to 2.3.5 (because of the monster python24.dll issue): * httplib.HTTP(x)Connection inserts still double Content-length headers whichs breaks on many servers. * _s

Re: Monster python24.dll / stripping off asian codecs to separate package(s) ?

2005-11-04 Thread Robert
A bugfix release 2.3.6 would also be a good idea. I suffered at once from 2 severe errors pending in 2.3 (fixed in 2.4) when going back to 2.3.5 (because of the monster python24.dll issue): * httplib.HTTP(x)Connect inserts still double Content-length headers whichs breaks on many servers. * _ss

Re: Class Variable Access and Assignment

2005-11-04 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Follow the logical implications of this proposed behaviour. > > class Game: > current_level = 1 > # by default, games start at level one That's bogus. Initialize the current level in the __init__ method where it belongs. -- http://mail.pyt

Re: python gc performance in large apps

2005-11-04 Thread David Rushby
Robby Dermody wrote: > I have not yet run the director with COUNT_ALLOCS yet, due to a > problem dynamically loading in the kinterbasdb (Firebird SQL > interface) module. What're the specifics of the loading problem with kinterbasdb? AFAIK, kinterbasdb itself runs fine in a debug build of Python.

Re: How can I do this in Python?

2005-11-04 Thread [EMAIL PROTECTED]
I strongly suggest using redirect as David Wahler suggested. A note, Mozilla type browsers don't do an excellent job sending referer. You can't really trust that header anymore. If you want to go back after login, either: (1) Render the login page INSTEAD of the normal content at the same url. Fo

Re: where to download md5.py?

2005-11-04 Thread Jacob Hallen
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >"Bell, Kevin" wrote: > >> I've been looking around, but haven't found a place to download the >> md5.py module. I need it to run the dupinator.py > >md5 is a standard Python module (written in C). it's been in Python since

Re: How can I do this in Python?

2005-11-04 Thread Leif K-Brooks
Steve Holden wrote: > Another alternative might be to serve a script that sent the browser > back 2 pages in its history, as long as server state hasn't changed in > the meantime. What about users with JavaScript disabled? -- http://mail.python.org/mailman/listinfo/python-list

Re: exec behaviour

2005-11-04 Thread Fredrik Lundh
N. Pourcelot wrote: > I can't understand some specific behaviour of the exec statment. > > For example, say that I create such a class A : > > class A: > def __init__(self): > self.n = 3 > self.m = None > def h(self, ini): > n = self.n > m = self.m >

Re: Pythonwin - Word automation - Removing watermark not working

2005-11-04 Thread Gregory Piñero
Is there a different group/mailing list I should try?  Does anyone know if there is a pythonwin group/list for example? On 11/3/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: I thought I'd take a shot and see if anyone knows the answer to this?  I've been stuck for a while now on this. Would anyone

Re: random number generator

2005-11-04 Thread Bryan Olson
Fredrik Lundh wrote: >>How to generate a random number in Python. Is there any build in >>function I can call? > > > >>> import random > >>> help(random) If you need crypto-quality randomness: >>> import os >>> help(os.urandom) -- --Bryan -- http://mail.python.org/mailman/listinfo

Launching a curses script with screen -dm

2005-11-04 Thread Rob Thomas
Hey guys, Having a problem with a script using the curses module... It works fine if I start it like so: screen python script.py However, if I want to start it in detached mode (i restart it every day through cron, so I need to be able to do this), like so: screen -dm python script.py I get t

Re: I need Motivation

2005-11-04 Thread James Stroud
On Thursday 03 November 2005 23:26, [EMAIL PROTECTED] wrote: > Martin P. Hellwig wrote: > > [EMAIL PROTECTED] wrote: > > > I m not a python Expert or anythin > > > i need help, i m losin my motivation to continue with python > > > can anyone inspire me again.??? > > > > Ooh that is easy, start lear

Re: Filepath string manipulation help

2005-11-04 Thread robert . dowell
I just assumed he had heard of me and knew better than to take my advice. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: python gc performance in large apps

2005-11-04 Thread Robby Dermody
Hey guys, An update (along with a request for paid help at the end): Over the past week and a half I've improved the memory usage situation by quite a bit. Going to python 2.4, linux kernel 2.6, twisted 2.0 and altering some code have reduced the severity by an order of a magnitude. However, on

Re: fcntl.flock() not working when called from a function

2005-11-04 Thread thakadu
Thank you both for your replies. You are both quite correct and upon testing I get the desired results. I was mistakenly expecting the execution of the function to block at the fcntl.flock(f,fcntl.LOCK_EX) line. But I am slowly getting my head around it. Thanks -- http://mail.python.org/mailman

Re: strange sockets

2005-11-04 Thread Bryan Olson
Skink wrote: [...] > what's wrong here? Sion Arrowsmith is right about what causes the delay. Just in case your real code looks like this, I'll note: > len, = struct.unpack("!i", s.recv(4)) > data = s.recv(len) First, you almost certainly don't want to use the name 'len'. Ought not to b

Re: Python and Lotus Notes

2005-11-04 Thread thakadu
I have had success with jython using the notes.jar classes, for example: import lotus.domino import java.io import java.net import java.lang import java.util lotus.notes.NotesThread.sinitThread() S = lotus.notes.Session.newInstance(); db=S.getDatabase("server/domain","domlog.nsf") agent=db.getAge

Re: Web automation with twill

2005-11-04 Thread qwweeeit
Hi Michele, I only made the observation about Zope, because I hoped to hear a different point of view as you are/were involved in web development using Zope/Plone (as referred in your article...). Besides that, at a Linux Day, I followed a presentation of Zope/Plone framework, which stroke me a lot

Re: How do you do this in python?

2005-11-04 Thread Klaus Alexander Seistrup
[EMAIL PROTECTED] wrote: > perl -e 'print "Hello, world\n"' python -c 'print "Hello, world"' Cheers, -- Klaus Alexander Seistrup Copenhagen, Denmark http://seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

How do you do this in python?

2005-11-04 Thread casioculture
In bash, you'd do this with the perl interpreter Issue the perl command via -e switches on the shell command line: perl -e 'print "Hello, world\n"' or Pass your script to Perl via standard input: echo "print 'Hello, world'" | perl - How would you do the above with the python interpreter in bas

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Bengt Richter wrote: > > It might be interesting to have a means to push and pop objects > onto/off-of a name-space-shadowing stack (__nsstack__), such that the first > place > to look up a bare name would be as an attribute of the top stack object, i.e., > > name = name + 1 > Don't be

Re: XML DOM: XML/XHTML inside a text node

2005-11-04 Thread Alan Kennedy
[EMAIL PROTECTED] > In my program, I get input from the user and insert it into an XHTML > document. Sometimes, this input will contain XHTML, but since I'm > inserting it as a text node, xml.dom.minidom escapes the angle brackets > ('<' becomes '<', '>' becomes '>'). I want to be able to > overr

Re: fcntl.flock() not working when called from a function

2005-11-04 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, thakadu <[EMAIL PROTECTED]> wrote: >The following code works as expected when run in the main body of a >python script (ver 2.3.5) on OpenBSD v3.8. but when it is in the body >of a function definition it does not work. It does not raise any errors >but it simply does

Re: fcntl.flock() not working when called from a function

2005-11-04 Thread jepler
The file you open() may be closed as soon as it is no longer possible to refer to it. So in the first case, because the top-level variable 'f' continues to refer to the opened file, the file may not be closed. In the second case, no variable refers to the opened file after lock() returns, so P

Re: python, mssql and unicode

2005-11-04 Thread riek
Hi Diez :) I tried converting the query string to utf-16 but only got weird results. The problem might lie with the _mssql module (which pymssql is using, it's just a wrap around _mssql) that I am using... I'll post what I get from converting to utf-16 later, maybe you have an idea... -- http:/

fcntl.flock() not working when called from a function

2005-11-04 Thread thakadu
The following code works as expected when run in the main body of a python script (ver 2.3.5) on OpenBSD v3.8. but when it is in the body of a function definition it does not work. It does not raise any errors but it simply does not block as expected. I have repeated this in both a cgi envirnoment

Re: Tkinter- New Window

2005-11-04 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Tuvas <[EMAIL PROTECTED]> wrote: >Is there a way to make a new window pop up using Tkinter? I have some >functions that require more data in my interface than I have space for, >and would like to be able to pop up a new window to request this >information. Thanks! D

Re: Class Variable Access and Assignment

2005-11-04 Thread Bengt Richter
On 4 Nov 2005 08:23:05 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2005-11-03, Magnus Lycka schreef <[EMAIL PROTECTED]>: >> Antoon Pardon wrote: >>> There is no instance variable at that point. How can it add 2, to >>> something that doesn't exist at the moment. >> >> Because 'a += 1' is onl

control webbrowser remotely?

2005-11-04 Thread Martin Bless
Web browsers like Firefox have really cool abilities nowadays. Objects in the current document can be addressed and manipulated by Javascript. Not very comfortable and not easy to debug. Q: Is there a way to reach objects in the document from Python? That would be cool! Like for instance it's pos

Catch stderr in non-console applications

2005-11-04 Thread Bryan Olson
New and improved! Love Python's stack-tracing error messages, but hate the way GUI applications throw the messages away and crash silently? Here's a module to show Python error messages that would otherwise be lost in console-less programs. Graphical applications should not require console wind

Re: Shareware in Python

2005-11-04 Thread Magnus Lycka
Ivan Sas wrote: > I want to create some shareware program in Python. Can I distribute > this program with > python24.dll file from Python 2.4.2? I'm not sure if Python GPL > compatible license allowing for doing it. GPL compatible means "can be used as a component in GPL software". It doesn't imp

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread Jorge Godoy
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Alex Martelli wrote: > > It would still be easier to respond to your posts if you didn't > > top-post, though (i.e., if you didn't put your comments BEFORE what > > you're commenting on -- that puts the "conversation" in a weirdly > > distorted ord

Re: when and how do you use Self?

2005-11-04 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "Tieche Bruce A MSgt USMTM/AFD" <[EMAIL PROTECTED]> wrote: > I am new to python, > Could someone explain (in English) how and when to use self? > I have been reading, and haven't found a good example/explanation is a good explanati

Re: Class Variable Access and Assignment

2005-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2005 04:42:54 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> There are good usage cases for the current inheritance behaviour. > > Can you name one? Any code that relies on it seems extremely dangerous to me. Dangerous? In what way? A basic usage case

Monster python24.dll / stripping off asian codecs to separate package(s) ?

2005-11-04 Thread Robert
Martin v. Löwis schrieb: > Robert wrote: > > Wouldn't it be an issue to think about if future win-python distributions > > should keep on including the asian codecs in the main-dll? > > Indeed, it would. As I said before: if somebody defines a clear, fair > policy which finds agreement in the commu

Re: Getting Python Accepted in my Organisation

2005-11-04 Thread [EMAIL PROTECTED]
Alex Martelli wrote: > It would still be easier to respond to your posts if you didn't > top-post, though (i.e., if you didn't put your comments BEFORE what > you're commenting on -- that puts the "conversation" in a weirdly > distorted order, unless one give up on quoting what you're commenting >

generating a click event without actually clicking the button

2005-11-04 Thread Swarna Pulavarty
Hi all,   I need to retreive data from a website. For this, the user needs to click a button to get the actual data.   How can i do this programatically in python, wihtout any user involvement, generating a button click event and retreiving the data.   Any help is appreciated ! Swarna.     Enj

Re: Tkinter- checkbutton

2005-11-04 Thread Tuvas
That solved the problem. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >