Re: python grammar

2007-01-22 Thread Tim Roberts
"tpochep" <[EMAIL PROTECTED]> wrote: > >In 'augop' non-terminal : > >http://docs.python.org/ref/augassign.html > >the delimiter '//=' was skipped. Why? Probably an oversight. //= is relatively new. >In 'Boolean operations': > >http://docs.python.org/ref/Booleans.html > >In 'expression' rule - wh

OT: Trolling for fun and profit

2007-01-22 Thread Steven D'Aprano
Oh the shame... I've been caught out by a troll. I received what I thought was a genuine email from a regular poster on this list (not one of the really high volume posters, but someone who is around enough that his name would be familiar) who, I thought, was trying to make a genuine point about p

Re: Help with 'popen'

2007-01-22 Thread Tim Roberts
James Stroud <[EMAIL PROTECTED]> wrote: >stephen_b wrote: > >> Can someone let me know why this won't work? Thanks. >> >from os import popen >popen('export asdfasdf=hello').read() >> '' >popen('echo $asdfasdf').read() >> '\n' > >Python starts a new shell for each command, so your envir

ANN: tk_happy, a framework for creating python Tk apps

2007-01-22 Thread charlietaylor
The main idea behind tk_happy is to allow a fully "wired" Tkinter application to be quickly created . The users main responsibility is to add logic to the Tkinter framework created by tk_happy.   http://tk-happy.sourceforge.net/   -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Windows Editors

2007-01-22 Thread [EMAIL PROTECTED]
Stef Mientki wrote: > there a too many (good) IDE's for Python ;-) FWIW the Zeus for Windows IDE has Python support: http://www.zeusedit.com/python.html Zeus has standard IDE features like syntax highlighting, integrated version control, project/workspace, class browsing etc, but it does sma

Re: Removing outdated files

2007-01-22 Thread Jan Danielsson
Gabriel Genellina wrote: >>I've been looking at the datetime.date class, but I can't see any >> easy way to parse the week number from it. I could calculate this >> information by brute force -- but I get a feeling that there are >> functions in Python to extract week numbers from a date. > >

Re: selective logger disable/enable

2007-01-22 Thread Gary Jefferson
Vinay Sajip wrote: > > BTW I would also advise reading PEP-282 to understand more about the > logging approach. You've been most helpful, Vinay. The PEP section on Filters states that I can do what I've been trying to do with filters, but doesn't provide enough information to do it (or, at leas

Re: Removing outdated files

2007-01-22 Thread Gabriel Genellina
At Tuesday 23/1/2007 02:17, Jan Danielsson wrote: I've been looking at the datetime.date class, but I can't see any easy way to parse the week number from it. I could calculate this information by brute force -- but I get a feeling that there are functions in Python to extract week numbers fr

Removing outdated files

2007-01-22 Thread Jan Danielsson
Hello all, I have a backup system which produces files using the following pattern: .. For instance: documents.2007-01-01.tar.bz2.gpg documents.2007-01-02.tar.bz2.gpg . . . system_files.2007-01-01.tar.bz2.gpg system_files.2007-01-02.tar.bz2.gpg . . . et

Passing Python socket objects to child processes in Windows

2007-01-22 Thread dan . jakubiec
I'm trying to write a Python app which accepts a socket connection and then spawns another Python process to handle it. I need it to run under both Linux and Windows. I have it working under Linux, but am having problems with the Windows implementation. My app uses the subprocess.Popen class to

Try to porting Python2.5 to Zaurus

2007-01-22 Thread ThomasC
Hi, I'm a python newbie, I learn it on my notebook, but it too heavy and too big. I try to porting python2.5 to my Zaurus, It running on Zaurus well, (just for my study, I didn't test all modules and functions.) If you have a Zaurus, and like python, welcome to use it. I post it on here: http://bea

Re: match nested parenthesis

2007-01-22 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | hi | i wish to find an reg exp for matching nested parenthesis of varying | level like | string = | "somewords1(words(somewords2)-(some(some)words3)somestuff)somestuff" | and be able to evaluate the pair starting from the inner most(th

Re: arrow keys don't work

2007-01-22 Thread Terry Reedy
"tac-tics" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> Have you changed your terminal (either the program itself or its config) | udlr yields ^[[A^[[B^[[C^[[D in the interactive python interpreter, but | like I said, works like it should outside the Python interpreter. If I re

match nested parenthesis

2007-01-22 Thread s99999999s2003
hi i wish to find an reg exp for matching nested parenthesis of varying level like string = "somewords1(words(somewords2)-(some(some)words3)somestuff)somestuff" and be able to evaluate the pair starting from the inner most(the deepest level) , ie (some) up till the outer most. What is a good reg ex

Symbols again

2007-01-22 Thread bearophileHUGS
Modifying another recipe, I have defined some symbols again: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/500273 I don't know if this may be useful for something real. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to document Python code...

2007-01-22 Thread Paddy
Scott Huey wrote: > I am working on a Python module and I would like to prepare some API > documentaiton. I managed to find epydoc after some searching online. > > Is there a standard way to document the API for Python modules? Is > epydoc the best way to go if there is no standard? Are there oth

Re: AES and Credit card number encryption

2007-01-22 Thread Tobiah
Paul Rubin wrote: > Tobiah <[EMAIL PROTECTED]> writes: >> I browsed this subject and thought I might use the 'AES' cypher >> scheme to do this. Would this be a good choice? > > There's more to it than that, but yes, AES is a good underlying > algorithm. Looking at the problem further, I am getti

Re: class explorer for automating IE

2007-01-22 Thread alex23
John wrote: > The problem is that this does not run javascript code it seems. > I got started with pamie, which seems to work till now. Have you seen IEC? http://www.mayukhbose.com/python/IEC/index.php I've used IEC and found it very straightforward. I had no call to test its ability to handle ja

Re: Getting to an SSH account over a HTTP proxy

2007-01-22 Thread Nanjundi
BJörn Lindqvist wrote: > I want to use Python to connect to a SSH account over a HTTP proxy to > automate some operations. I thought paramiko would be able to do that, > but it can not (it seems). > > Is there some other Python module that can do what I want? > > -- > mvh Björn Did you take a loo

Re: How to get self reference from within a module?

2007-01-22 Thread Gabriel Genellina
At Monday 22/1/2007 20:26, Lavoie Érick wrote: > i would like to now how to get a self > reference from within a module. The goal is to > be able to generate a list of all declared function within the module. From inside the module, use globals() - that includes all defined symbols (classes

Re: Are there sprintf in Python???

2007-01-22 Thread Nanjundi
> Are there any sprintf in Python? Refer module StringIO - just like file input/output operations. cStringIO is another module (faster) Quick intro: from StringIO import StringIO s = StringIO() s.write('hello') s.seek(0) print s.read() -N -- http://mail.python.org/mailman/listinfo/python-lis

Re: Best way to document Python code...

2007-01-22 Thread Stuart D. Gathman
On Mon, 22 Jan 2007 17:35:18 -0500, Stuart D. Gathman wrote: > The HTML generated by pydoc doesn't link to standard modules properly. > They are generated as relative links. So it can't be used without > modification for generating docs for a web page about a python package. > > I'm struggling

Re: arrow keys don't work

2007-01-22 Thread tac-tics
It looks like I got readline working. Thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: arrow keys don't work

2007-01-22 Thread tac-tics
> Have you changed your terminal (either the program itself or its config) > so that it is no longer sending the correct codes? I doubt this is the case. Everything works for the bash shell and common lisp. It's just python acting up. > When you hit the arrow key, what happens? Do you just get no

Re: How to use time.clock() function in python

2007-01-22 Thread Steven D'Aprano
On Mon, 22 Jan 2007 15:32:58 -0800, samuel.y.l.cheung wrote: > File "/usr/lib/python2.4/timeit.py", line 188, in repeat > t = self.timeit(number) > File "/usr/lib/python2.4/timeit.py", line 161, in timeit > timing = self.inner(it, self.timer) > File "", line 6, in inner > NameError:

Re: arrow keys don't work

2007-01-22 Thread Steven D'Aprano
On Mon, 22 Jan 2007 14:53:01 -0800, tac-tics wrote: > I've noticed that in Python 2.5, the interactive prompt does not > support intelligent use of arrow keys like 2.4 did (up/down for > previous/next statement, left/right for moving the cursor). It works perfectly for me. > What > exactly is t

Re: arrow keys don't work

2007-01-22 Thread tac-tics
Robert Kern wrote: > tac-tics wrote: > > I've noticed that in Python 2.5, the interactive prompt does not > > support intelligent use of arrow keys like 2.4 did (up/down for > > previous/next statement, left/right for moving the cursor). What > > exactly is the reason for this and is there an easi

Re: How to get self reference from within a module?

2007-01-22 Thread Gary Herron
Lavoie Érick wrote: > Hi, > > i would like to now how to get a self reference from within a > module. The goal is to be able to generate a list of all declared > function within the module. > > Thanks, > > Erick I think this is what you're asking for: If you import a module, say import sys

Re: SQLObject 0.8.0b2

2007-01-22 Thread James Stroud
Oleg Broytmann wrote: > Hello! > > I'm pleased to announce the 0.8.0b2 release of SQLObject. > > > What is SQLObject > = > > SQLObject is an object-relational mapper. Your database tables are described > as classes, and rows are instances of those classes. SQLObject is meant t

Re: How to use time.clock() function in python

2007-01-22 Thread samuel . y . l . cheung
Thanks. I have a fuction called 'func1'. def func1: # logic of the function When my script just call 'func1()' it works. func1() But when put it under timerit.Timer, like this: t = timeit.Timer("func1()","") t.repeat(1, 10) # want to time how long it takes to run 'func1' 10 times, I get a

How to get self reference from within a module?

2007-01-22 Thread Lavoie Érick
Hi, i would like to now how to get a self reference from within a module. The goal is to be able to generate a list of all declared function within the module. Thanks, Erick -- http://mail.python.org/mailman/listinfo/python-list

Re: beep or sound playing under linux

2007-01-22 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, hg wrote: > Is there a way to do that ? Maybe this helps: http://paste.pocoo.org/show/316/ Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: arrow keys don't work

2007-01-22 Thread Robert Kern
tac-tics wrote: > I've noticed that in Python 2.5, the interactive prompt does not > support intelligent use of arrow keys like 2.4 did (up/down for > previous/next statement, left/right for moving the cursor). What > exactly is the reason for this and is there an easier fix than > downgradinig to

Re: beep or sound playing under linux

2007-01-22 Thread Chuck Rhode
hg wrote this on Mon, Jan 22, 2007 at 04:12:50PM +0100. My reply is below. > Is there a way to do that? (Make noise.) In Gnome there is: gtk.gdk.beep() -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 28° — Wind WSW 10 mph — Sky overcast. -- http://mail.python

arrow keys don't work

2007-01-22 Thread tac-tics
I've noticed that in Python 2.5, the interactive prompt does not support intelligent use of arrow keys like 2.4 did (up/down for previous/next statement, left/right for moving the cursor). What exactly is the reason for this and is there an easier fix than downgradinig to 2.4? Thanks. -- http://m

Re: module check

2007-01-22 Thread Larry Bates
Victor Polukcht wrote: > Can anybody suggest a correct way of checking in python module exists > and correctly installed from python program. > Not sure I understand the question, but I'll try: try: import yourmodule except: print "Can't import yourmodule" -Larry -- http://mail.python.org

Re: beep or sound playing under linux

2007-01-22 Thread hg
hg wrote: > Hi, > > Is there a way to do that ? > > Regards, > > hg PS: I'm actually under wpPython -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Windows Editors

2007-01-22 Thread Stef Mientki
Jarek Zgoda wrote: > Stef Mientki napisał(a): > >> Any text editor is only as good as the >>> programmer who uses it. ;) >>> >> Yes but an IDE is different ;-) > > Would it make me better Fortran programmer? ;) > I can't judge for you, ... ... maybe you are already at the top ;-) I can only spe

Re: Best way to document Python code...

2007-01-22 Thread Stuart D. Gathman
On Mon, 22 Jan 2007 20:40:57 +, Adonis Vargas wrote: > But a quick look at pydoc (not to be confused with epydoc) > which is part of the standard library allows you to generate > documentation in HTML format, and/or serve it over web with its built-in > HTTP server. > > pydoc: http://docs.

Re: How to use time.clock() function in python

2007-01-22 Thread Steven D'Aprano
On Mon, 22 Jan 2007 14:05:16 -0800, [EMAIL PROTECTED] wrote: > Hi, > > I am following this python example trying to time how long does an > operation takes, like this: > > My question is why the content of the file (dataFile) is just '0.0'? > I have tried "print >>dataFile, timeTaken" or "print

Re: How to use time.clock() function in python

2007-01-22 Thread Gabriel Genellina
At Monday 22/1/2007 19:05, [EMAIL PROTECTED] wrote: I am following this python example trying to time how long does an operation takes, like this: My question is why the content of the file (dataFile) is just '0.0'? I have tried "print >>dataFile, timeTaken" or "print >>dataFile,str( timeTaken)

beep or sound playing under linux

2007-01-22 Thread hg
Hi, Is there a way to do that ? Regards, hg -- http://mail.python.org/mailman/listinfo/python-list

How to use time.clock() function in python

2007-01-22 Thread [EMAIL PROTECTED]
Hi, I am following this python example trying to time how long does an operation takes, like this: My question is why the content of the file (dataFile) is just '0.0'? I have tried "print >>dataFile, timeTaken" or "print >>dataFile,str( timeTaken)", but gives me 0.0. Please tell me what am I miss

Re: How to convert a string into an integer

2007-01-22 Thread Ravi Teja
[EMAIL PROTECTED] wrote: > Can you please tell me why the following code does not work in python? > My guess is I need to convert 'count' from a string to an integer. How > can I do that? > And my understanding is python is a dynamic type language, should > python convert it for me automatically?

Re: mmap caching

2007-01-22 Thread Ross Ridge
George Sakkis wrote: > It's around 400MB. On Windows you may not be able to map a file of this size into memory because of virtual address space fragmentation. A Win32 process has only 2G of virtual address space, and DLLs tend to get scattered through out that address space. > As I said, I cann

Re: Python Windows Editors

2007-01-22 Thread Jarek Zgoda
Stef Mientki napisał(a): > Any text editor is only as good as the >> programmer who uses it. ;) >> > Yes but an IDE is different ;-) Would it make me better Fortran programmer? ;) -- Jarek Zgoda http://jpa.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Building extensions with vc8

2007-01-22 Thread Martin v. Löwis
Howard Lightstone schrieb: > Has there been any progress on being able to build extensions with MSVC8 > (aka Visual Studio 2005)? No. No progress will happen throughout the release of Python 2.5. To get the facts straight: it *might* be possible to build an extension with msvc8 (thus linking with

Re: How to convert a string into an integer

2007-01-22 Thread Tobiah
> count = sys.argv[2] > for i in range(count): > #do some stuff for i in range(int(count)): -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

How to convert a string into an integer

2007-01-22 Thread [EMAIL PROTECTED]
Can you please tell me why the following code does not work in python? My guess is I need to convert 'count' from a string to an integer. How can I do that? And my understanding is python is a dynamic type language, should python convert it for me automatically? count = sys.argv[2] for i in range(

Re: mmap caching

2007-01-22 Thread Martin v. Löwis
Nick Craig-Wood schrieb: > So presumably it is python generating a MemoryError. It is asking for > a new bit of memory and it is failing so it throws a MemoryError. > > Could memory allocation under windows be affected by a large chunk of > mmap()ed file which is physically swapped in at the time

Re: AES and Credit card number encryption

2007-01-22 Thread Paul Rubin
Tobiah <[EMAIL PROTECTED]> writes: > I browsed this subject and thought I might use the 'AES' cypher > scheme to do this. Would this be a good choice? There's more to it than that, but yes, AES is a good underlying algorithm. > So my real question is, how do I go about generating the best key. >

Re: mmap caching

2007-01-22 Thread Martin v. Löwis
Laszlo Nagy schrieb: > >> In fact, memory that is read in because of mmap should *never* cause >> a MemoryError. > This is certainly not true. You can run out of virtual address space by > reading data from a memory mapped file. That is true, but not what I said. I said you cannot run out of mem

Building extensions with vc8

2007-01-22 Thread Howard Lightstone
Has there been any progress on being able to build extensions with MSVC8 (aka Visual Studio 2005)? Since the "free" compiler from Microsoft is now VC8, I *assume* this will be the new method. 2.5 itself rebuilds using PCbuild8, as do tkinter (but using Tcl 8.4.14 and Tk 8.4.14) however no

Re: Best way to document Python code...

2007-01-22 Thread Gabriel Genellina
At Monday 22/1/2007 17:48, Boris Ozegovic wrote: Does Python has API just like in Java, for example http://java.sun.com/j2se/1.5.0/docs/api/allclasses-noframe.html ctrl-f and than click on class you are searching for, and finally you get clean list of all fields and methods. Where can I find si

Re: Best way to document Python code...

2007-01-22 Thread bearophileHUGS
Boris Ozegovic: > Does Python has API just like in Java, for example > http://java.sun.com/j2se/1.5.0/docs/api/allclasses-noframe.html ctrl-f and > than click on class you are searching for, and finally you get clean list > of all fields and methods. Where can I find similar in Python, for > examp

Re: Getting to an SSH account over a HTTP proxy

2007-01-22 Thread Jorgen Grahn
On Mon, 22 Jan 2007 14:40:49 +0100, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > BJörn Lindqvist wrote: > >> I want to use Python to connect to a SSH account over a HTTP proxy to >> automate some operations. I thought paramiko would be able to do that, >> but it can not (it seems). >> >> Is there

Re: instancemethod

2007-01-22 Thread Gert Cuykens
Reading all of the above this is the most simple i can come too. import MySQLdb class Db: def __init__(self,server,user,password,database): self._db=MySQLdb.connect(server , user , password , database) self._db.autocommit(True) self.cursor=self._db.cursor() def e

Re: Is any python like linux shell?

2007-01-22 Thread Jorgen Grahn
On Sun, 21 Jan 2007 22:10:17 -0800, James Stroud <[EMAIL PROTECTED]> wrote: > Frank Potter wrote: >> I learned some python in windows. >> And now I've turned to linux. >> I read a book and it teaches how to write shell script with bash, >> but I don't feel like the grammar of bash. ... > My strong

Re: Best way to document Python code...

2007-01-22 Thread Boris Ozegovic
Adonis Vargas wrote: > Then Python will generate a quick help interface for your module. I Hi Does Python has API just like in Java, for example http://java.sun.com/j2se/1.5.0/docs/api/allclasses-noframe.html ctrl-f and than click on class you are searching for, and finally you get clean list o

AES and Credit card number encryption

2007-01-22 Thread Tobiah
I browsed this subject and thought I might use the 'AES' cypher scheme to do this. Would this be a good choice? I came across a "Python Cryptography Toolkit" http://www.amk.ca/python/code/crypto which has a nice AES implementation, but in the example, a simple string is passed as the key: obj=

Re: Best way to document Python code...

2007-01-22 Thread Adonis Vargas
Scott Huey wrote: > I am working on a Python module and I would like to prepare some API > documentaiton. I managed to find epydoc after some searching online. > > Is there a standard way to document the API for Python modules? Is > epydoc the best way to go if there is no standard? Are there othe

Re: SQLObject 0.8.0b2

2007-01-22 Thread Dejan Rodiger
Robert Hicks said the following on 22.1.2007 21:02: > Where is Oracle support? > What about DB2 UDB and DB2/400 >:o -- Dejan Rodiger - PGP ID 0xAC8722DC Delete wirus from e-mail address -- http://mail.python.org/mailman/listinfo/python-list

Re: mmap caching

2007-01-22 Thread Laszlo Nagy
> It's around 400MB. As I said, I cannot reproduce the MemoryError > locally since I have 1GB physical space but IIRC the user who reported > it had less. Actually I am less concerned about whether a MemoryError > is raised or not in this case and more about the fact that even if > there's no exce

Re: mmap caching

2007-01-22 Thread Laszlo Nagy
> In fact, memory that is read in because of mmap should *never* cause > a MemoryError. This is certainly not true. You can run out of virtual address space by reading data from a memory mapped file. > Python calls MapViewOfFile when mmap.mmap is invoked, > at which point the operating commits t

Re: Program eating memory, but only on one machine? (Solved, sort of)

2007-01-22 Thread Robert Kern
Per B.Sederberg wrote: > Per B.Sederberg princeton.edu> writes: > >> I'll see if I can make a really small example program that eats up memory on >> our cluster. That way we'll have something easy to work with. > > Now this is weird. I figured out the bug and it turned out that every time > y

Re: Does eval has the same features as Perl's?

2007-01-22 Thread J. Clifford Dyer
The python editor won't "get exit." It will raise an exception. With or without an eval, you can catch the exception. try: x = 1/0 except ZeroDivisionError: x = "infinity" Jm lists wrote: > Hello members, > > I want to know does the "eval" in python have the same features as in > Perl

Re: mmap caching

2007-01-22 Thread George Sakkis
Dennis Lee Bieber wrote: > On 21 Jan 2007 13:32:19 -0800, "George Sakkis" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > The file is written once and then opened as read-only, there's no > > flushing. So if caching is completely up to the OS, I take it that my > >

Re: Are there sprintf in Python???

2007-01-22 Thread rzed
"questions?" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Are there any sprintf in Python? > I know you can print to files(or redefine sys.stout) and later > open the file content. > > Are there similar function to sprintf in C? Something like this? x = 9 vbl = "One digit: %d, four d

Are there sprintf in Python???

2007-01-22 Thread questions?
Are there any sprintf in Python? I know you can print to files(or redefine sys.stout) and later open the file content. Are there similar function to sprintf in C? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLObject 0.8.0b2

2007-01-22 Thread Robert Hicks
Where is Oracle support? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Windows Editors

2007-01-22 Thread Stef Mientki
Any text editor is only as good as the > programmer who uses it. ;) > Yes but an IDE is different ;-) cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Program eating memory, but only on one machine? (Solved, sort of)

2007-01-22 Thread Per B.Sederberg
Per B.Sederberg princeton.edu> writes: > I'll see if I can make a really small example program that eats up memory on > our cluster. That way we'll have something easy to work with. Now this is weird. I figured out the bug and it turned out that every time you call numpy.setmember1d in the lat

Re: Python Windows Editors

2007-01-22 Thread Jarek Zgoda
W. Watson napisał(a): > I downloaded python-2.5.msi and installed it. I believe its editor is > IDE. I understand there's a Win editor called pythonwin. I believe it's > in the download pywin32-210.win32-py2.5.exe, but I'm not sure if this > exe file has just the editor or all of Python. Comments?

Re: instancemethod

2007-01-22 Thread Bruno Desthuilliers
Gert Cuykens a écrit : > import MySQLdb > > class Db: (snip) >def excecute(self,cmd): >self._cursor.execute(cmd) >self._db.commit() > What about autocommit and automagic delegation ? import MySQLdb class Db(object): def __init__(self,server, user, password, database):

Re: closing a "forever" Server Socket

2007-01-22 Thread Gabriel Genellina
At Monday 22/1/2007 14:49, alessandro wrote: Oh my God! it's really so complicated? 3 modules (threading, SocketServer, select) only for design a way to shutdown a TCP server ...but they told me that python was easy... :) You already have the answer: replace serve_forever with your own lo

Re: (newbie) new version install (winXP) ?

2007-01-22 Thread Gabriel Genellina
At Monday 22/1/2007 15:58, you wrote: Can I install only the higher version of a certain package ? Is that done by simply copying them ? You should read the install instructions given in the package, but usually it's as easy as: - extract the .zip into a temporary directory - open a command

Best way to document Python code...

2007-01-22 Thread Scott Huey
I am working on a Python module and I would like to prepare some API documentaiton. I managed to find epydoc after some searching online. Is there a standard way to document the API for Python modules? Is epydoc the best way to go if there is no standard? Are there other ways to document a Python

(newbie) new version install (winXP) ?

2007-01-22 Thread Stef Mientki
I've been started with Python on winXP, by installing the "Enthought" edition (about half a year old). This works like a charm. As a regular windows user, I'm not used to install partial packages. Now I find interesting application, that require higher versions of certain packages. Can I install o

Re: closing a "forever" Server Socket

2007-01-22 Thread Laszlo Nagy
alessandro írta: > Oh my God! it's really so complicated? > > 3 modules (threading, SocketServer, select) only for design a way to > shutdown a TCP server > ...but they told me that python was easy... :) > I believe that SockerServer was created for testing purposes, although there are some

Re: Is any python like linux shell?

2007-01-22 Thread Donn Cave
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: ... > Paddy wrote:' > > Frank, > > IPython is great, but it is not a replacement for a shell like bash. If > > you have a Linux system then you still need to know the rudiments of > > bash > > Or better yet, csh. ;) Careful

Re: Is there a better way to implement this:

2007-01-22 Thread Paul Boddie
Michael Yanowitz wrote: > >I guess I am looking for something portable (both > Windows and Linux) where I can abort a function after > a certain time limit expires. Doing a search for "timeout function Python" on Google reveals a number of approaches. Using signals: * http://nick.vargish.o

SQLObject 0.8.0b2

2007-01-22 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.8.0b2 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started

SQLObject 0.7.3b1

2007-01-22 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.3b1 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started w

Re: Program eating memory, but only on one machine?

2007-01-22 Thread Wolfgang Grafen
I had a similar problem with an extension module on Solaris years ago. My problem at that time: I requested memory and released it and requested more memory in the next step and so on. The reason that the memory was eaten up: An answer out of this group was that the operating system doesn't releas

Re: closing a "forever" Server Socket

2007-01-22 Thread alessandro
Oh my God! it's really so complicated? 3 modules (threading, SocketServer, select) only for design a way to shutdown a TCP server ...but they told me that python was easy... :) I'm working on a simulator and I have a monitor server that collects information. I can shutdown it using Ctrl-C fro

Re: closing a "forever" Server Socket

2007-01-22 Thread Laszlo Nagy
alessandro írta: > thanks > > infact the server_forever() method is only a serve() method inside an > infinite loop. > > many thanks again, > Here is a snipped that show a "software terminateable threading TCP socker server". The "server" object is a SocketServer instance, server_stopped is a

RE: Is there a better way to implement this:

2007-01-22 Thread Michael Yanowitz
Thanks. I suppose I could have used time.sleep(seconds) here. I did it in 0.01 because in an earlier verion, I did something else between the sleeps. I guess I am looking for something portable (both Windows and Linux) where I can abort a function after a certain time limit expires. -Or

Re: Is there a better way to implement this:

2007-01-22 Thread Benjamin Niemann
Michael Yanowitz wrote: > Hello: > >I wrote the code below (much irrelevant code removed). > This doesn't quite work. What I wanted it to do was > a) Execute function ftimed, which takes a function and a timeout > in seconds. > b) This will also execute function abort() as a thread. >

Re: closing a "forever" Server Socket

2007-01-22 Thread alessandro
thanks infact the server_forever() method is only a serve() method inside an infinite loop. many thanks again, Alessandro Matimus ha scritto: > > I want to ask if someone knows a better way for closing a "forever > > server" or if there is a lack in my design. > > Generally you don't create a

Re: Program eating memory, but only on one machine?

2007-01-22 Thread Per B.Sederberg
Wolfgang Draxinger darkstargames.de> writes: > > > So, does anyone have any suggestions for how I can debug this > > problem? > > Have a look at the version numbers of the GCC used. Probably > something in your C code fails if it interacts with GCC 3.x.x. > It's hardly Python eating memory, thi

Re: OpenOffice 2.0 UNO update Links; need help

2007-01-22 Thread Thomas Guettler
Sells, Fred wrote: > I've got a ~100 page document I assemble from ~30 OOo .odt files with some > search and replace functions. I then produce a PDF. So far so good. > > Now I need to get a barcode from our internal website and insert that. The > barcode will vary based on some parameters. Our

Is there a better way to implement this:

2007-01-22 Thread Michael Yanowitz
Hello: I wrote the code below (much irrelevant code removed). This doesn't quite work. What I wanted it to do was a) Execute function ftimed, which takes a function and a timeout in seconds. b) This will also execute function abort() as a thread. This function just runs for the specif

Re: GetBoundingMetrics

2007-01-22 Thread BartlebyScrivener
BartlebyScrivener wrote: > I don't get it if I just launch > firefox from the commandline. Only when I use the Python module. I spoke too soon. I do get it from the command line if firefox is not already running. Same is true with the Python script. Must be a Gnome or Debian thing. Sorry for th

Re: Program eating memory, but only on one machine?

2007-01-22 Thread Wolfgang Draxinger
Per B. Sederberg wrote: > Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03) > [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on > [linux2 Type "help", "copyright", "credits" or "license" for > more information. Doesn't eat up. > Python 2.4.3 (#1, Apr 7 2006, 10:54:33) > [GCC 4.0.1 (Apple C

Re: OpenOffice 2.0 UNO update Links; need help

2007-01-22 Thread m.banaouas
Sells, Fred a écrit : > I've got a ~100 page document I assemble from ~30 OOo .odt files with some > search and replace functions. I then produce a PDF. So far so good. > > Now I need to get a barcode from our internal website and insert that. The > barcode will vary based on some parameters.

Re: module check

2007-01-22 Thread [EMAIL PROTECTED]
I'm at work so I can't test this, but I do beleive the inspect module can help you out. If it can't you can always try import the module in a try-catch statement, catching ImportError, however ImportError may be raised if the module you imported has trouble loading another module, but it shouln't b

Re: module check

2007-01-22 Thread [EMAIL PROTECTED]
I'm at work so I can't test this, but I do beleive the inspect module can help you out. If it can't you can always try import the module in a try-catch statement, catching ImportError, however ImportError may be raised if the module you imported has trouble loading another module, but it shouln't b

Re: Is it possible to fasten the import of cgi?

2007-01-22 Thread Jorgen Grahn
On Thu, 18 Jan 2007 14:15:44 -0300, Gabriel Genellina <[EMAIL PROTECTED]> wrote: ... > I'll try to explain better: the cgi *protocol* (I'm not talking about the > cgi *module*) requires a *new* python process to be created on *each* > request. Try to measure the time it takes to launch Python, th

module check

2007-01-22 Thread Victor Polukcht
Can anybody suggest a correct way of checking in python module exists and correctly installed from python program. -- http://mail.python.org/mailman/listinfo/python-list

GetBoundingMetrics

2007-01-22 Thread BartlebyScrivener
Hi, I have been moving from Windows XP to Debian Etch. Most of my Python scripts work fine with minor modifications. However, I have a script that launches a browser and goes to various sites using the Python module webbrowser.open ("url-goes-here") On Debian Etch, Firefox (or IceWeasel, I guess)

  1   2   >