ANN: JpyDbg V0.0.12

2005-09-21 Thread Jean-Yves Mengant
JpyDbg is a Python/Jython IDE/Debugging environnement pluggin for JEdit editor.(http://www.jedit.org) Version 0.0.12 of JpyDbg has been released. Check the Home page : http://jpydbg.sourceforge.net for details   blog page : http://jpydbg.blogspot.com/ What's new in V0.012 : + BIG

What am I doing wrong?

2005-09-21 Thread keithlackey
I'm relatively new to python and I've run into this problem. DECLARING CLASS class structure: def __init__(self, folders = []): self.folders = folders def add_folder(self, folder): self.folders.append(tuple(folder)) Now

What am i doing Wrong?

2005-09-21 Thread keithlackey
I'm relatively new to python and I've run into this problem. DECLARING CLASS class structure: def __init__(self, folders = []): self.folders = folders def add_folder(self, folder): self.folders.append(tuple(folder)) Now I try to make an instance of this

Newbie Question on ctypes

2005-09-21 Thread Efrat Regev
Hello, (I apologize in advance if I'm posting to the wrong group. If so, could you please instruct me which is appropriate?) I'm trying to use uTidyLib, HTML-tidy's python binding. When I import tidy Python says it can't import ctypes. Since I'm using FC4, I looked for a FC4

Re: What am I doing wrong?

2005-09-21 Thread Sybren Stuvel
keithlackey enlightened us with: def __init__(self, folders = []): self.folders = folders Read all about this very common mistake at http://docs.python.org/tut/node6.html#SECTION00671 def add_folder(self, folder):

Re: Newbie Question on ctypes

2005-09-21 Thread Sybren Stuvel
Efrat Regev enlightened us with: My question is, therefore, if I can build ctypes locally. I tried rpm -i python-ctypes-0.9.1-1.rf.src.rpm That _installs_ the source package, not build it as you intended. Read the RPM manual: rpm --rebuild python-ctypes-0.9.1-1.rf.src.rpm Sybren -- The

Re: What am i doing Wrong?

2005-09-21 Thread Aldo Cortesi
Thus spake keithlackey ([EMAIL PROTECTED]): class structure: def __init__(self, folders = []): ^ Here's your problem. To understand what's going on, you need to know two things: - Default arguments are only evaluated ONCE

webbrowser failing

2005-09-21 Thread Thomas Thomas
Hi All, import webbrowserurl=''webbrowser.open(url) giving the error Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32Type "help", "copyright", "credits" or "license" for more information. ## working on region in file

Re: slicing functionality for strings / Python suitability forbioinformatics

2005-09-21 Thread Steven D'Aprano
On Mon, 19 Sep 2005 19:40:12 -0700, jbperez808 wrote: Having to do an array.array('c',...): x=array.array('c','ATCTGACGTC') x[1:9:2]=array.array('c','') x.tostring() 'AACAGACATC' is a bit klunkier than one would want, but I guess the efficient performance is the silver

Re: Question About Logic In Python

2005-09-21 Thread Steven D'Aprano
On Mon, 19 Sep 2005 22:31:05 +, Bengt Richter wrote: On Mon, 19 Sep 2005 23:46:05 +1000, Steven D'Aprano [EMAIL PROTECTED] wrote: Are there actually any usage cases for *needing* a Boolean value? Any object can be used for truth testing, eg: [snip] making an index (it's an int subclass),

Re: Question About Logic In Python

2005-09-21 Thread Steven D'Aprano
On Tue, 20 Sep 2005 03:03:15 +, Ron Adam wrote: Steven D'Aprano wrote: Are there actually any usage cases for *needing* a Boolean value? Any object can be used for truth testing, eg: [snip] Of course if any of the default False or True conditions are inconsistent with the logic you

Re: print there!

2005-09-21 Thread Steven D'Aprano
On Tue, 20 Sep 2005 14:06:23 +0200, Fredrik Lundh wrote: Godwin Burby wrote: print 'c:\godwin\bl.csv', for i,row in enumerate(reader): # inserts or updates the database print i, This displays on the screen as : c:\godwin\bl.csv 1 2 3 4 5 6 7 8 ^ But i want it to

Re: Question about smtplib, and mail servers in general.

2005-09-21 Thread Steve Holden
Peter Hansen wrote: Steve Holden wrote: Peter Hansen wrote: In any case, unless the mail server will allow relaying, which most don't these days (to prevent spamming), then it won't work the way you are hoping unless *all* the 100 addresses are local ones, to be delivered to users on the

Re: print there!

2005-09-21 Thread Fredrik Lundh
Godwin Burby wrote: i think u've misunderstood my question. Your solution will print on a new line as below: c:\godwin\bl.csv 1 c:\godwin\bl.csv 2 c:\godwin\bl.csv 3 But i want this number to diplay their value increase on the same line on the same sport itself without printing the

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Fredrik Lundh
Martijn Iseger wrote: Domain-specific modeling makes software development 5-10 times faster than approaches based on UML or MDA. It accelerates development and reduces complexity by automatically generating full code from higher-abstraction design models. Wow, look everyone! A silver

Re: webbrowser failing

2005-09-21 Thread Fredrik Lundh
Thomas Thomas wrote: import webbrowser url='http://www.cnn.com' webbrowser.open(url) giving the error WindowsError: [Errno 2] The system cannot find the file specified: 'http://www.cnn.com' So you have a Windows install that don't understand HTTP paths, most likely because you (or

Re: print there!

2005-09-21 Thread davbrow
It's possible you will need to run python -u for this to behave as expected. Otherwise python may buffer the output until it sees a newline so you only see the last result. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Free seminar on domain-specific modeling

2005-09-21 Thread bryan rasmussen
I just wonder about that 5-10 times faster. that's a really wide range. :) On 9/21/05, Fredrik Lundh [EMAIL PROTECTED] wrote: Martijn Iseger wrote: Domain-specific modeling makes software development 5-10 times faster than approaches based on UML or MDA. It accelerates development and

Re: webbrowser failing

2005-09-21 Thread Fredrik Lundh
(trying again) Thomas Thomas wrote: import webbrowser url='http://www.cnn.com' webbrowser.open(url) giving the error WindowsError: [Errno 2] The system cannot find the file specified: 'http://www.cnn.com' you have a Windows install that don't understand HTTP paths, most likely because

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Martijn Iseger
if you don't understand the silver bullet reference, you're not qualified to use phrases like makes software development 5-10 times faster. You could reverse that as well: http://www.dsmforum.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Premature wakeup of time.sleep()

2005-09-21 Thread Erich Schreiber
Thank you every body for your comments. Especially Jeff Epler for your hint about NTP. You're right. I see a (constant but somewhat huge)time drift of about 1 ms/min which I can correct for. Thank you Steve Horsley for the clarification of the interrupts that would end the delay. I didn't think

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Steve Holden
Martijn Iseger wrote: if you don't understand the silver bullet reference, you're not qualified to use phrases like makes software development 5-10 times faster. You could reverse that as well: http://www.dsmforum.org Having taken the time to educate myself (following the repeated

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Michael Sparks
Michael J. Fromberger wrote: ... Since ARC4 is a stream cipher, the keystream changes over time -- with ARC4, after each character enciphered. To decrypt successfully, you need to make sure the decrypting keystream exactly matches the encrypting one. ... from Crypto.Cipher import ARC4 as

Re: Digest MD5 authentication over using ZSI

2005-09-21 Thread Jakob Simon-Gaarde
Just for the record. After accepting that pythons build-in digest authentication (HTTPDigestAuthHandler) does *NOT* work, I made my own digest authentication handler and built it into ZSI, they have recieved and accepted the patch so it should be part of the next ZSI release (current 1.7). I

spe stani collapse all method?

2005-09-21 Thread [EMAIL PROTECTED]
hello, I wonder if anyone used spe stani, I'm looking for how to collapse all code fold, but can't find. pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Paul Rubin
Michael Sparks [EMAIL PROTECTED] writes: I'm looking at using this library and to familiarise myself writing small tests with each of the ciphers. When I hit Crypto.Cipher.ARC4 I've found that I can't get it to decode what it encodes. This might be a case of PEBKAC, but I'm trying the

How to copy a file from one machine to another machine

2005-09-21 Thread Nico Grubert
Hi there, I would like to copy a file from one machine (machine #01) to another (machine #02). machine #01: Suse Linux 9.2, Samba 3, Python 2.3.5 machine #02: Windows Machine, Destination Dir: Share\temp\files\ Both machines are in one network so they can communicate each other. In order to

Re: Would you pls tell me a tool to step debug python program?

2005-09-21 Thread Stephen Kellett
Johnny Lee wrote: Hi, I've met a problem to understand the code at hand. And I wonder whether there is any useful tools to provide me a way of step debug? Just like the F10 in VC... Not single stepping, but flow tracing, complete with variables, parameters and return values. Python Bug

send mail through webmail

2005-09-21 Thread Enrique Palomo Jiménez
Hello all, i'd like to send mails from my account. At office it's easy because, i can access directly to the mail server and smpt works fine. but now, i'm working out of office and i can access via web, login, ... is there a way to send mails by microsoft outlook web access? thanks --

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Martijn Iseger
Hello Steve, 1. Any organisation that can talk about a leap in productivity of 400% from Assembler to BASIC as though nothing occurred in between suffers such a total disconnect from computing history that it's hard to take other utterances seriously. I believe the point being made by the

Re: Windows paths, Java, and command-line arguments, oh my!

2005-09-21 Thread Neil Benn
Steve M wrote: Well, apparently I fried my brain trying to sort this out. There is a typo in my example code in the post but not in my real program. (I know it is a no-no when asking help on c.l.py but I simplified some details from the real code in order not to confuse the issues. Probably

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-21 Thread thomas Armstrong
Hi Skip. Thank you very much for your answer. If LDD: [EMAIL PROTECTED] /]# ldd /usr/lib/python2.3/site-packages/_mysql.so libmysqlclient.so.10 = /usr/lib/mysql/libmysqlclient.so.10 (0xf6fb3000) libcrypt.so.1 = /lib/libcrypt.so.1 (0xf6f84000) libnsl.so.1 = /lib/libnsl.so.1

Re: Would you pls tell me a tool to step debug python program?

2005-09-21 Thread Steve Holden
Johnny Lee wrote: Hi, I've met a problem to understand the code at hand. And I wonder whether there is any useful tools to provide me a way of step debug? Just like the F10 in VC... Thanks for your help. Regards, Johnny The pdb module is a basic starting point for Python's

RE: How to copy a file from one machine to another machine

2005-09-21 Thread Tim Golden
[Nico Grubert] | I would like to copy a file from one machine (machine #01) to another | (machine #02). | | machine #01: Suse Linux 9.2, Samba 3, Python 2.3.5 | machine #02: Windows Machine, Destination Dir: Share\temp\files\ | | Both machines are in one network so they can communicate each |

Re: How to copy a file from one machine to another machine

2005-09-21 Thread Steve Holden
Nico Grubert wrote: Hi there, I would like to copy a file from one machine (machine #01) to another (machine #02). machine #01: Suse Linux 9.2, Samba 3, Python 2.3.5 machine #02: Windows Machine, Destination Dir: Share\temp\files\ Both machines are in one network so they can

scipy for python 2.4 on windows

2005-09-21 Thread Z.L.
I am a newbie to python, and have not so much experiences on package installation and related issues. I am looking for Scipy binaries for python 2.4 on windows. Could somebody here kindly give some suggestion to this? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: slicing functionality for strings / Python suitability forbioinformatics

2005-09-21 Thread Tom Anderson
On Wed, 21 Sep 2005, Steven D'Aprano wrote: On Mon, 19 Sep 2005 19:40:12 -0700, jbperez808 wrote: Having to do an array.array('c',...): x=array.array('c','ATCTGACGTC') x[1:9:2]=array.array('c','') x.tostring() 'AACAGACATC' is a bit klunkier than one would want, but I guess

Perl's documentation come of age

2005-09-21 Thread Xah Lee
Perl's documentation has come of age: http://perldoc.perl.org/ Python morons really need to learn: • ample example codes. • example codes are linked to the appropriate doc location for each code word in the example. • written in a task-oriented style, or manifest-functionality style. That is,

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Steve Holden
Martijn Iseger wrote: Hello Steve, 1. Any organisation that can talk about a leap in productivity of 400% from Assembler to BASIC as though nothing occurred in between suffers such a total disconnect from computing history that it's hard to take other utterances seriously. I believe the

RE: How to copy a file from one machine to another machine

2005-09-21 Thread Tim Golden
[Steve Holden] | Nico Grubert wrote: | Hi there, | | I would like to copy a file from one machine (machine #01) | to another (machine #02). | | machine #01: Suse Linux 9.2, Samba 3, Python 2.3.5 | machine #02: Windows Machine, Destination Dir: Share\temp\files\ | One possibility would

epydoc, variables and encoding

2005-09-21 Thread Michele Petrazzo
I found a problem on epydoc. If I specify an encoding, epydoc not find my global variables, and if I remove it, it work well. code.py: #!/usr/bin/env python # -*- coding: utf-8 -*- MY_VAR = None class foo(object): def __init__(self, foo): Some text @param foo: Pass me what you want @type foo:

Re: How to copy a file from one machine to another machine

2005-09-21 Thread Markus Rosenstihl
Hi I think scp is also a solution. I am sure there exist free sshserveres for windows. THat would make the stuff a bit more secure, and the login can be automated via public-key. Regards Markus -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl's documentation come of age

2005-09-21 Thread Rudy Schockaert
snip• Do think clearly before writing. /snipYou should start thinking before you write something. Do you really think anyone takes you serious the way you talk?I haven't seen anything constructive yet from your side. You always have to comment, why don't you start writing documentation yourself

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Magnus Lycka
Martijn Iseger wrote: Before slashing down in ignorance - educate yourself on www.dsmforum.org. After that: feel free to comment. I will make you look a lot more intelligent Peter Hansen. Talk about throwing stones in glass houses! -- http://mail.python.org/mailman/listinfo/python-list

Writing a parser the right way?

2005-09-21 Thread beza1e1
I'm writing a parser for english language. This is a simple function to identify, what kind of sentence we have. Do you think, this class wrapping is right to represent the result of the function? Further parsing then checks isinstance(text, Declarative). --- class Sentence(str):

Re: scipy for python 2.4 on windows

2005-09-21 Thread beliavsky
Z.L. wrote: I am a newbie to python, and have not so much experiences on package installation and related issues. I am looking for Scipy binaries for python 2.4 on windows. Please see the recent thread use SciPy with Python 2.4.1? for discussion of this. --

Re: Perl's documentation come of age

2005-09-21 Thread Steve Holden
Rudy Schockaert wrote: snip • Do think clearly before writing. /snip You should start thinking before you write something. Do you really think anyone takes you serious the way you talk? I haven't seen anything constructive yet from your side. You always have to comment, why

Re: C#3.0 and lambdas

2005-09-21 Thread Serhiy Storchaka
Roel Schroeven wrote: Fredrik Lundh schreef: meanwhile, over in python-dev land: Is anyone truly attached to nested tuple function parameters; 'def fxn((a,b)): print a,b'? /.../ Would anyone really throw a huge fit if they went away? I am willing to write a PEP for their

Re: How to copy a file from one machine to another machine

2005-09-21 Thread Nico Grubert
This isn't really a Python question, as this problem would exist irrespective of the language you are using. One possibility would be to run Samba (www.smaba.org) on the Linux machine so it offered a share to the Windows machine. Then you could just write to a UNC path

Re: scipy for python 2.4 on windows

2005-09-21 Thread Z.L.
Thank you. But that thread cannot provide the information on Scipy binaries for python 2.4 on Windows. And the python interpreter installed on my machine is downloaded from www.python.org, not the cygwin version. In fact, all I need is just weave part of Scipy, not all bundle of whole Scipy.

Re: C#3.0 and lambdas

2005-09-21 Thread Christophe
Serhiy Storchaka a écrit : Roel Schroeven wrote: Fredrik Lundh schreef: meanwhile, over in python-dev land: Is anyone truly attached to nested tuple function parameters; 'def fxn((a,b)): print a,b'? /.../ Would anyone really throw a huge fit if they went away? I am willing

Re: Writing a parser the right way?

2005-09-21 Thread Ben Sizer
beza1e1 wrote: I'm writing a parser for english language. This is a simple function to identify, what kind of sentence we have. Do you think, this class wrapping is right to represent the result of the function? Further parsing then checks isinstance(text, Declarative). ---

Re: C#3.0 and lambdas

2005-09-21 Thread Fredrik Lundh
Christophe wrote: def drawline(p1, p2): # draw a line from p1 to p2 foo(*p1) bar(*p2) That one is stupid. I don't see how you can make it work without some global storing the p1 information in foo which I would consider as very ugly code. if you cannot see how that

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Michael Sparks
Paul Rubin wrote: Michael Sparks [EMAIL PROTECTED] writes: I'm looking at using this library and to familiarise myself writing small tests with each of the ciphers. When I hit Crypto.Cipher.ARC4 I've found that I can't get it to decode what it encodes. This might be a case of PEBKAC, but I'm

Re: C#3.0 and lambdas

2005-09-21 Thread Steve Holden
Christophe wrote: Serhiy Storchaka a écrit : Roel Schroeven wrote: [...] or def drawline(p1, p2): # draw a line from p1[0], p1[1] to p2[0], p2[1] foo(p1[0], p1[1]) bar(p2[0], p2[1]) def drawline(p1, p2): # draw a line from p1 to p2 foo(*p1) bar(*p2) That

Re: Using Python with COM to communicate with proprietary Windows software

2005-09-21 Thread Paul Casteels
Joakim Persson wrote: On Tue, 13 Sep 2005 10:15:18 +0200, Thomas Heller [EMAIL PROTECTED] wrote: This _shouldn't_ be too difficult -- I know which methods must be implemented (basically just some kind of event handling to deal with randomly arriving log points, should be implemented as

Re: Perl's documentation come of age

2005-09-21 Thread Ed Hotchkiss
please feed the trolls. On 9/21/05, Steve Holden [EMAIL PROTECTED] wrote: Rudy Schockaert wrote: snip • Do think clearly before writing. /snip You should start thinking before you write something. Do you really think anyone takes you serious the way you talk? I haven't seen anything constructive

Re: C#3.0 and lambdas

2005-09-21 Thread Christophe
Fredrik Lundh a écrit : Christophe wrote: def drawline(p1, p2): # draw a line from p1 to p2 foo(*p1) bar(*p2) That one is stupid. I don't see how you can make it work without some global storing the p1 information in foo which I would consider as very ugly code. if you

Re: C#3.0 and lambdas

2005-09-21 Thread Christophe
Steve Holden a écrit : Christophe wrote: Serhiy Storchaka a écrit : Roel Schroeven wrote: [...] or def drawline(p1, p2): # draw a line from p1[0], p1[1] to p2[0], p2[1] foo(p1[0], p1[1]) bar(p2[0], p2[1]) def drawline(p1, p2): # draw a line from p1 to p2

Re: testing a website from python

2005-09-21 Thread Benji York
matt wrote: Here's something I did recently at work. It contains unittest code and is using urllib2. http://blog.spikesource.com/pyhton_testcases.htm If you want to test web sites, you might be interested in zope.testbrowser (currently Zope 3 only, but fixing that is on my to do list).

Re: Perl's documentation come of age

2005-09-21 Thread Michael Ekstrand
On Wednesday 21 September 2005 05:41, Xah Lee wrote: One easy way to test this, is for Pythoners to read Perl docs and vice versa. Pythoners will find that, you really don't know what the fuck the Perlers are talking about. Same with Perler with Python docs. At the risk of feeding the troll

Python win32com com_error: (-2147418113

2005-09-21 Thread g.franzkowiak
I'm trying to use a proprietary windows software with COM and win32com. The result is everytime the error message com_error: (-2147418113, 'Catastrophic failure', None, None) I've read this in some e-mails, but can't find the solution and I have not enough experience with Windows and COM. Can

Re: sorting tuples...

2005-09-21 Thread nidhog
Thank you very much. I'll look into this immediately. I edited my code earlier and came up with stringing the groups (200501202010, sender, message_string) into one string delimited by '%%%'. I could then sort the messages with the date string at the beginning as the one being sorted with the

Re: What am I doing wrong?

2005-09-21 Thread Larry Bates
You have been bitten by a well known feature. You used a mutable as default value in your argument list for __init__. See: http://www.nexedi.org/sections/education/python/tips_and_tricks/python_and_mutable_n/view It would be better to write: class structure: def __init__(self, folders =

ANN: Leo 4.3.3 released

2005-09-21 Thread Edward K. Ream
Leo 4.3.3 final is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo 4.3.3 fixes several bugs reported in Leo 4.3.2 final. To learn about Leo, see: http://webpages.charter.net/edreamleo/intro.html The highlights of 4.3.3 (and 4.3.2)

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-21 Thread skip
thomas There is no libmysql, but I've got no idea where it is: Sorry, libmysqlclient.so is the right beastie. So, look in libmysqlclient.so for a mysql_rollback function (using the nm command). Is it possible you have a _mysql.so file that was built with MySQL 4.x include files but is now

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Michael Sparks
Martijn Iseger wrote: ... I believe the point being made by the organization is that during computing history the most successful shifts in productivity were achieved by similar shifts in raising the abstraction level on which developers specify solutions. The alternate point is that during

Syntax error in files with with 'iso-8859-15' coding header

2005-09-21 Thread Berthold Höllmann
I have a default coding header # -*- coding: iso-8859-15 -*- in my python files. I now have Problems with this settings. I swithched to Python 2.4.1 under Windows. When I import files with the above coding header I get frequent syntax errors with files that work flawlessly under Linux. The

Re: Finding where to store application data portably

2005-09-21 Thread Steven D'Aprano
On Tue, 20 Sep 2005 23:03:52 +0100, Tony Houghton wrote: I'm using pygame to write a game called Bombz which needs to save some data in a directory associated with it. In Unix/Linux I'd probably use ~/.bombz, in Windows something like C:\Documents And Settings\user\Applicacation Data\Bombz.

wxPython Notebook crash when pressing alt key

2005-09-21 Thread Kreedz
Hi I've got some really weird issue with a sizer, a text field and a notebook. Here's an example: import wx class A(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent) self.noteBook = wx.Notebook(self, -1) self.panel = wx.Panel(self.noteBook,

Re: slicing functionality for strings / Python suitability forbioinformatics

2005-09-21 Thread Steven D'Aprano
On Wed, 21 Sep 2005 11:37:38 +0100, Tom Anderson wrote: There's a special hell for people who override builtins. [slaps head] Of course there is, and I will burn in it for ever... -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Classes derived from dict and eval

2005-09-21 Thread Kent Johnson
Jeremy Sanders wrote: Hi - I'm trying to subclass a dict which is used as the globals environment of an eval expression. For instance: class Foo(dict): def __init__(self): self.update(globals()) self['val'] = 42 def __getitem__(self, item):

Re: C#3.0 and lambdas

2005-09-21 Thread Steve Holden
Christophe wrote: Steve Holden a écrit : Christophe wrote: Serhiy Storchaka a écrit : Roel Schroeven wrote: [...] or def drawline(p1, p2): # draw a line from p1[0], p1[1] to p2[0], p2[1] foo(p1[0], p1[1]) bar(p2[0], p2[1]) def drawline(p1, p2): # draw a line from p1 to

Re: Finding where to store application data portably

2005-09-21 Thread Steve Holden
Steven D'Aprano wrote: On Tue, 20 Sep 2005 23:03:52 +0100, Tony Houghton wrote: I'm using pygame to write a game called Bombz which needs to save some data in a directory associated with it. In Unix/Linux I'd probably use ~/.bombz, in Windows something like C:\Documents And

Re: wxPython Notebook crash when pressing alt key

2005-09-21 Thread Steve Holden
Kreedz wrote: Hi I've got some really weird issue with a sizer, a text field and a notebook. Here's an example: import wx class A(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent) self.noteBook = wx.Notebook(self, -1) self.panel =

distutils and decorators

2005-09-21 Thread Robert Brewer
We're trying to get CherryPy 2.1 RC 1 out the door, but setup.py is giving us some problems. In our test suite, we want to test a decorator that we provide. Of course, decorators won't work in Python 2.3, so I put the actual decorated functions into a separate module, and import it into the test

Re: C#3.0 and lambdas

2005-09-21 Thread Roel Schroeven
Christophe schreef: Steve Holden a écrit : Christophe wrote: Serhiy Storchaka a écrit : Roel Schroeven wrote: [...] or def drawline(p1, p2): # draw a line from p1[0], p1[1] to p2[0], p2[1] foo(p1[0], p1[1]) bar(p2[0], p2[1]) def drawline(p1, p2): # draw a line

using variable-value

2005-09-21 Thread Tor Erik Sønvisen
Hi In php I can assign a value to a variable and use this varaible to access a property in some object: $var = 'property'; $object-{$var} This will transelate to $object-property... Is this possible in Python? # Prints help on methods in Canvas-instance for method in dir(self.canvas):

Re: C#3.0 and lambdas

2005-09-21 Thread Christophe
Steve Holden a écrit : Christophe wrote: Steve Holden a écrit : Christophe wrote: Serhiy Storchaka a écrit : Roel Schroeven wrote: [...] or def drawline(p1, p2): # draw a line from p1[0], p1[1] to p2[0], p2[1] foo(p1[0], p1[1]) bar(p2[0], p2[1]) def drawline(p1,

Re: using variable-value

2005-09-21 Thread bruno modulix
Tor Erik Sønvisen wrote: Hi In php I can assign a value to a variable and use this varaible to access a property in some object: $var = 'property'; $object-{$var} This will transelate to $object-property... Is this possible in Python? Not directly, but there's a way: getattr(obj,

Re: distutils and decorators

2005-09-21 Thread Benji York
Robert Brewer wrote: We're trying to get CherryPy 2.1 RC 1 out the door, but setup.py is giving us some problems. I don't know anything about distutils, so I can't help you there, but I never-the-less can't resist speaking up... In our test suite, we want to test a decorator that we

Re: Question About Logic In Python

2005-09-21 Thread Bengt Richter
On Wed, 21 Sep 2005 09:03:00 +1000, Steven D'Aprano [EMAIL PROTECTED] wrote: On Tue, 20 Sep 2005 03:03:15 +, Ron Adam wrote: Steven D'Aprano wrote: Are there actually any usage cases for *needing* a Boolean value? Any object can be used for truth testing, eg: [snip] Of course if any of

Re: What am I doing wrong?

2005-09-21 Thread Scott David Daniels
keithlackey wrote: I'm relatively new to python and I've run into this problem. This has two very standard mistakes: First, as noted by Sybren, messages should just use spaces in order to be readable. After correcting that one: class structure: def __init__(self, folders = []):

Calling Access module functions from python

2005-09-21 Thread kayakerjess
Hi, I have an Access Data Project (.adp) that I am trying to open and execute from Python. I am using the win32com.client, and I have successfully opened the application, but I'm getting an exception when I try to execute the function (actually a Sub that returns void, but that shouldn't

Re: wxPython Notebook crash when pressing alt key

2005-09-21 Thread Kreedz
I have written the import wx in my message. You press F key while holding down Alt while focusing on the tab? Python 2.4.1, wxPython 2.6.1.0 -- http://mail.python.org/mailman/listinfo/python-list

Calling Access module functions from python

2005-09-21 Thread kayakerjess
Hi, I have an Access Data Project (.adp) that I am trying to open and execute from Python. I am using the win32com.client, and I have successfully opened the application, but I'm getting an exception when I try to execute the function (actually a Sub that returns void, but that shouldn't

Re: Perl's documentation come of age

2005-09-21 Thread Ed Hotchkiss
I'm new to Python, not programming. I agree with the point regarding the interpreter. what is that? who uses that!? Why are most examples like that, rather than executed as .py files? Another problem that I have (which does get annoying after awhile), is not using foo and bar. Spam and Eggs

Re: C#3.0 and lambdas

2005-09-21 Thread Fredrik Lundh
Christophe wrote: if you cannot see how that can work, you clearly haven't done much graphics programming in your days... You should probably notice that graphics library have changed a lot in the last 20 years. yeah, nobody uses things like OpenGL and PDF and SVG and similar APIs these

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Paul Rubin
Michael Sparks [EMAIL PROTECTED] writes: Rather than re-inventing wheels I thought I'd pick a library sit down and see how pycrypt's meant to be used before actually going anyway. (Amongst other reasons, this is why I suspected me, rather than the library :-) Pycrypt doesn't operate at

Re: Perl's documentation come of age

2005-09-21 Thread Benji York
Ed Hotchkiss wrote: I'm new to Python, not programming. I agree with the point regarding the interpreter. I couldn't (with a quick skimming) find any references to the interpreter in the thread, so I'll guess the original assertion was something like showing new-comers the interpreter is

Re: C#3.0 and lambdas

2005-09-21 Thread Scott David Daniels
Roel Schroeven wrote: ... Christophe schreef: ... And what about a function which computes the line length ? That would have been a better example indeed, since the *p1 trick doesn't work there. def euclidian_distance((x1, y1), (x2, y2)): return math.sqrt((x2 - x1)**2 + (y2 -

Re: Perl's documentation come of age

2005-09-21 Thread Robert Kern
Ed Hotchkiss wrote: I'm new to Python, not programming. I agree with the point regarding the interpreter. what is that? who uses that!? I spend most of my work day at the interpreter. I don't write programs; I write libraries which I control with the interpreter. It's a fantastically useful and

Re: Perl's documentation come of age

2005-09-21 Thread Jeremy Jones
Ed Hotchkiss wrote: I'm new to Python, not programming. I agree with the point regarding the interpreter. what is that? who uses that!? Why are most examples like that, rather than executed as .py files? I think showing examples at the Python interpreter prompt is *very* helpful and IMHO a

Re: C#3.0 and lambdas

2005-09-21 Thread Robert Kern
Christophe wrote: Steve Holden a écrit : and consequently the second version of drawline is exactly equivalent to the first. So, if the second one is useless then so is the first. Well, sorry about that but you are perfectly right. The point I was trying to defend though was that such

Re: vendor-packages directory

2005-09-21 Thread Colin J. Williams
Terry Reedy wrote: Rich Burridge [EMAIL PROTECTED] wrote in message Until now we've been using /usr/lib/python2.4/site-packages as the directory to install the various Python files that these packages use. My impression is that this is exactly the intended place for general-use support

Re: Organising a python project

2005-09-21 Thread baoilleach
Thanks for the info, guys. Noel -- http://mail.python.org/mailman/listinfo/python-list

Re: Organising a python project

2005-09-21 Thread baoilleach
Thanks for the info, guys. Noel -- http://mail.python.org/mailman/listinfo/python-list

Re: C#3.0 and lambdas

2005-09-21 Thread Christophe
Dennis Lee Bieber a écrit : On Wed, 21 Sep 2005 17:08:14 +0200, Christophe [EMAIL PROTECTED] declaimed the following in comp.lang.python: No unpack trick ( that I know of ) can be used here. You only have 1 way to do it without the unpack in function parameters syntax : def length(p1,

Re: Finding where to store application data portably

2005-09-21 Thread Jeff Schwab
Steven D'Aprano wrote: As a Linux user, I really am sick of every damn application, script and program under the sun filling the top level of my home directory with dot-files. I wish the Linux Standard Base folks would specify that settings files should all go into a subdirectory like

I am not able to setup pydb2 ! Any help !

2005-09-21 Thread vj
When I run the setup.py script , it throws an error Traceback (most recent call last): File C:\vijay\db2\utils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py, line 57, in -toplevel- libraries=[ db2lib ], File C:\Python24\lib\distutils\core.py, line 137, in setup raise SystemExit,

  1   2   >