Greetings.
What is the implication of the error message 'cannot import
name .'? It occurs when executing the line:
from nBaseTest import nBaseTest
The file exists and the class within it exists. Changing it to
from nBaseTest import x
gives me the same result so it is as though th
The TurboGears app from Outer Space...
Sam the Gardener
http://samfeltus.com/as3/codetalking3.html
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>, fscked wrote:
> The traceback is as follows:
>
> Traceback (most recent call last):
> File "createXMLPackage.py", line 35, in ?
> for boxid, mac, activated, hw_ver, sw_ver, heartbeat, name,
> address, phone, country, city, in csvreader:
> _csv.Error: string with NUL
Carlos Hanson wrote:
> It looks like you need __init__.py in MyPackage. Then you can import
> starting with MyPackage. For example, you might use one of the
> following:
>
> import MyPackage
> from MyPackage.Common import *
> etc
>
that means that MyPackage must be in the sys path too?
On May 3, 9:29 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, fscked wrote:
> > The traceback is as follows:
>
> > Traceback (most recent call last):
> > File "createXMLPackage.py", line 35, in ?
> > for boxid, mac, activated, hw_ver, sw_ver, heartbeat, name
walterbyrd a écrit :
> On May 2, 5:38 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>> You're mixing apples, fishes, and cars here. Joomla is a content
>> management system, Django a framework and Python a language.
>
> Yes, I know, but they are all ways to create a website. If I wanted
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Very simply, PEP 328 explains:
> """
> Relative Imports and __name__
>
> Relative imports use a module's __name__ attribute to determine that
> module's position in the package hierarchy. If the module's name does
> not c
On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > As Larry said, this most likely means there are null bytes in the CSV file.
> >
> > Ciao,
> > Marc 'BlackJack' Rintsch
>
> How would I go about identifying where it is?
A hex editor might be easiest.
You could also use Python:
Per the pysqlite installation instructions, this is the test I ran to
confirm that pysqlite installed correctly
>from pysqlite2 import test
>test.test()
and I got output similar to what the docs say should happen:
>ran 101 tests in 0.182s
My python book, "Beginning Python: From Novice to Profes
On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > As Larry said, this most likely means there are null bytes in the CSV
> > > file.
>
> > > Ciao,
> > > Marc 'BlackJack' Rintsch
>
> > How would I go about identifying where it is?
>
On May 2, 11:59 pm, [EMAIL PROTECTED] (Alex Martelli) wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>...
>
> > >>> import gmpy
> > >>> gmpy.mpz(11)
> > mpz(11)
> > >>> gmpy.mpz('11',10)
> > mpz(11)
> > >>> gmpy.mpz(11,10)
>
> > Traceback (most recent call last):
> > File "", line 1,
On May 3, 9:41 am, Trans <[EMAIL PROTECTED]> wrote:
> I'm taking a pole on how best to name programming library packages.
Well, the Poles have been wrong before.
> If you have a second, please have a look.
>
> http://7ranscode.blogspot.com/2007/05/library-poll.html
>
> Thanks,
> T.
--
http://
On May 3, 8:37 am, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote:
>
> If all tests ran fine then pysqlite can see your sqlite installation.
> How are you importing sqlite? It's usually something like "from
> pysqlite2 import dbapi2 as sqlite" not simply "import sqlite".
>
I just checked the errata fo
Greetings Group-
I'm trying to put together a pattern matching script that scans a
directory tree for tif images contained in similar folder names, but
running into a NewB problem already. Is it the way I'm trying to join
multiple paths? Any help would be greatly appericated. Thanks, J!
import gl
On Thu, May 03, 2007 at 10:28:34AM -0700, [EMAIL PROTECTED] wrote:
> On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> > On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > > As Larry said, this most likely means there are null bytes in the CSV
> > > > file.
> >
> > > > Ciao,
> > > >
[EMAIL PROTECTED] (Alex Martelli) wrote:
> Duncan Booth <[EMAIL PROTECTED]> wrote:
>
>> means in pure Python code the string has python methods, but in
>> Python using the CLR it gains the CLR methods. Presumably in Ruby
>> code it looks like a Ruby string and so on, but (and this is what's
>> ne
Dear Python/DCOM experts,
I just tried to do a remote dispatch of Google Earth in DCOM, but it didn't
work:
import pythoncom, win32com.client
clsctx=pythoncom.CLSCTX_LOCAL_SERVER
i = win32com.client.DispatchEx("GoogleEarth.ApplicationGE", "IAD-PC10",
clsctx=clsctx)
On May 3, 1:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On May 3, 9:41 am, Trans <[EMAIL PROTECTED]> wrote:
>
> > I'm taking a pole on how best to name programming library packages.
>
> Well, the Poles have been wrong before.
I don't know what's worse, my misspelling or your joke ;-)
Ben Collver wrote:
> I rewrote my code in Python and I found myself running into many of the
> same hassles that I run into with other languages: inaccurate and
> incomplete documentation, a maze of little platform-specific quirks to
> work around in the base classes, and a macho community of us
Alex Martelli wrote:
> Laurent Pointal <[EMAIL PROTECTED]> wrote:
>
>> Casey Hawthorne wrote:
>>
>> > PC-cillin flagged this as a dangerous web site.
>>
>> Maybe PC-cillin tag as dangerous all sites about Python, the famous
>> snake.
>>
>>
>> PS. And why does it tag my laboratory work page as
Thanks for posting.
pythonpath = .;c:\maxq\bin\testScripts; c:\maxq\bin;c:\maxq\jython
Both files are in c:\maxq\bin\testScripts. Also I do not get the
message "no module named...:
File nCreateIncident.py, the importer:
from PyHttpTestCase import PyH
Hello, this is my first time in the mailing list so
bear with me.
Basically what I did was I followed this site:
http://surguy.net/articles/speechrecognition.xml
So I installed microsoft speech SDK 5.1 and then used
pythonwin COM MakePy utility for it and it worked out
fine. However, I need to c
On May 3, 12:38 pm, J <[EMAIL PROTECTED]> wrote:
> Greetings Group-
>
> I'm trying to put together a pattern matching script that scans a
> directory tree for tif images contained in similar folder names, but
> running into a NewB problem already. Is it the way I'm trying to join
> multiple paths?
John Machin wrote:
> On May 3, 8:55 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> On Wed, 02 May 2007 15:03:24 -0700, Tobiah wrote:
>>
>>> >>> elegant_solution([1,2,3,4,5,6,7,8,9,10])
>>> [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]
>> Wow! That's impressive. What version of Python are you usin
André wrote:
> Fortunately, Python has incorporated some newbie-unfriendly features,
> like metaclasses and, to a lesser extent, decorators which, at last,
> make use of a special character. There should be more of these, to
> make Python something more challenging to learn.
After reading the en
On May 3, 1:29 pm, Dave Lim <[EMAIL PROTECTED]> wrote:
> Hello, this is my first time in the mailing list so
> bear with me.
>
> Basically what I did was I followed this
> site:http://surguy.net/articles/speechrecognition.xml
>
> So I installed microsoft speech SDK 5.1 and then used
> pythonwin CO
[EMAIL PROTECTED] wrote:
> I'm guessing that your file is in UTF-16, then -- Windows seems to do
> that a lot. It kind of makes it *not* a CSV file, but oh well. Try
>
> print open("test.csv").decode('utf-16').read().replace("\0",
> ">>>NUL<<<")
>
> I'm not terribly unicode-savvy, so I'll
[EMAIL PROTECTED] wrote:
> On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote:
>> A simple
>>
>> if s:
>> print "not empty"
>> else:
>> print "empty"
>>
>> will do.
>
> How do you know that s is a string?
Seems like a fair assumption given the OP's question and example.
--
http://ma
Nameless wrote:
«
Python has readable syntax, a huge library, and bindings for what
seems like every major in linux. Perl has CPAN. It seems with those
languages if you want to do something all you have to do is import
functionality from a library someone had written and use that.
In lisp you'd ha
Hi,
I have started to work on a python-based robot, and am interested in your
feedback:
http://realtimebattle.sourceforge.net/
www.snakecard.com/rtb
hg
--
http://mail.python.org/mailman/listinfo/python-list
Hello!
If I do
import uno
localContext=uno.getComponentContext()
then localContext is of type
I guess it's a new type provided by PyUNO extension.
localContext.__class__ is None
Is there any way to list all methods of that new type, via Python C
API or through interpreter (other then dir(localC
miah_gbg wrote:
> Hi there!
>
> Just wanted to let people know in this group that I have recently
> (April 24th) published an introductory article on wxPython and Mac OS
> X. It is available here: http://www.macdevcenter.com/
>
> Hope someone finds it useful.
>
> Regards,
>
> Jeremiah
>
F
Xah Lee <[EMAIL PROTECTED]> writes:
> (if there is some demand, i will add a concrept, little programing
No. There ain't.
- M
--
http://mail.python.org/mailman/listinfo/python-list
miah_gbg wrote:
> Hi there!
>
> Just wanted to let people know in this group that I have recently
> (April 24th) published an introductory article on wxPython and Mac OS
> X. It is available here: http://www.macdevcenter.com/
>
> Hope someone finds it useful.
>
> Regards,
>
> Jeremiah
>
N
I was messing around with adding methods to a class instance at
runtime and saw the usual code one finds online for this. All the
examples I saw say, of course, to make sure that for your method that
you have 'self' as the first parameter. I got to thinking and thought
"I have a lot of arbitrary me
James Stroud wrote:
> miah_gbg wrote:
>
>> Hi there!
>>
>> Just wanted to let people know in this group that I have recently
>> (April 24th) published an introductory article on wxPython and Mac OS
>> X. It is available here: http://www.macdevcenter.com/
>>
>> Hope someone finds it useful.
>>
>> R
HMS Surprise wrote:
> Greetings,
>
> I need to peform some simple queries via MySQL. Searching the list I
> see that folks are accessing it with python. I am very new to python
> and pretty new to MySQL too. Would appreciate it if you could point me
> to some documentation for accessing MySQL via
In the above example 'addm' should be 'AddMethod'
superdict = AddMethod(dict(), lambda self, d:
myUtils.HasDrive(d),"hasdrive")
--
http://mail.python.org/mailman/listinfo/python-list
Mike wrote:
> I was messing around with adding methods to a class instance at
> runtime and saw the usual code one finds online for this. All the
> examples I saw say, of course, to make sure that for your method that
> you have 'self' as the first parameter. I got to thinking and thought
> "I have
hlubenow wrote:
> There's even another approach: ...
On the other hand you may be better off with the "mysql-python"-module.
Anyway, here's a nice overview over the most commonly used MySQL-commands
(The commands should speak for themselves, even if the explanations are in
German):
http://www.l
> Let's suppose
> s='12345 4343 454'
> How can I replace the last '4' character?
If the last '4' will not always be the last character in the string,
you could do:
'X'.join(s.rsplit('4',1))
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 2:03 pm, John Salerno <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On May 2, 3:49 pm, Basilisk96 <[EMAIL PROTECTED]> wrote:
> >> A simple
>
> >> if s:
> >> print "not empty"
> >> else:
> >> print "empty"
>
> >> will do.
>
> > How do you know that s is a string?
>
> Se
On May 3, 5:20 am, hg <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have started to work on a python-based robot, and am interested in your
> feedback:
>
> http://realtimebattle.sourceforge.net/www.snakecard.com/rtb
>
> hg
This is not necessarily a response to your effort, but just a note
(rant) about re
"John Nagle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Ben Collver wrote:
|| > from the person who closed it. I get the unspoken message: bug
reports
| > are not welcome.
|
| That's the problem with bug reporting systems which let developers
| close bugs arbitrarily.
I
"Ben Collver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I rewrote my code in Python and I found myself running into many of the
| same hassles that I run into with other languages: inaccurate and
| incomplete documentation, a maze of little platform-specific quirks to
| work ar
* Paul Boddie (3 May 2007 07:27:11 -0700)
> On 3 Mai, 15:49, Ben Collver <[EMAIL PROTECTED]> wrote:
> > I installed Cygwin on a Windows machine. I try to quit from an
> > interactive Python session. It tells me that on my platform, I must
> > press Control-Z to exit. I press Control-Z and it mak
Hi,
Currently i am developing a python script that will be executed in Gnome.
This script uses the PyGTK library, however i have a question: How can I
make my application to remember the last window size when it was closed?
This behavior is natural for the majority of Gnome applications (i think)
On May 3, 9:44 am, Johny <[EMAIL PROTECTED]> wrote:
> On May 3, 4:37 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > On May 3, 9:27 am, Johny <[EMAIL PROTECTED]> wrote:
>
> > > Let's suppose
> > > s='12345 4343 454'
> > > How can I replace the last '4' character?
> > > I tried
> > > string.replace(s,s[len(s
At Amd Turion 64, it gives:
('32bit', 'ELF')
--
http://mail.python.org/mailman/listinfo/python-list
Ah, so the firefighters were in on the conspiracy!
--
http://mail.python.org/mailman/listinfo/python-list
Dave Borne wrote:
Let's suppose
s='12345 4343 454'
How can I replace the last '4' character?
If the last '4' will not always be the last character in the string,
you could do:
'X'.join(s.rsplit('4',1))
from string import rfind
def replaceLast_X_with_Y( s, x, y ):
lastX =
I do see one problem there...
if __name__ == 'main':
t = nBaseTest('nBaseTest')
t.logon()
That should be:
if __name__ == "__main__":
t = nBaseTest('nBaseTest')
t.logon()
It should be like that in both files.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> I am on a hp 11.11 machine doing a 64 bit python 2.5 build. When I get
> my python executable created and run it, I get the error:
>
> "import site failed"
> OverflowError: signed integer is greater than the maximum.
Are you sure about the error message? That error is
>>> "import site failed"
>>> OverflowError: signed integer is greater than the maximum.
>> - what is the value of ival?
> ival: 4294967295
I see. This is 0x, which would be -1 if it were of type
int. So perhaps some value got cast incorrectly at some point,
breaking subsequent computation
Terry Reedy wrote:
> "John Nagle" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | Ben Collver wrote:
> || > from the person who closed it. I get the unspoken message: bug
> reports
> | > are not welcome.
>
> | Getting through the process requires a year or so.
>
> Ben got a
On May 4, 3:40 am, [EMAIL PROTECTED] wrote:
> On Thu, May 03, 2007 at 10:28:34AM -0700, [EMAIL PROTECTED] wrote:
> > On May 3, 10:12 am, [EMAIL PROTECTED] wrote:
> > > On Thu, May 03, 2007 at 09:57:38AM -0700, fscked wrote:
> > > > > As Larry said, this most likely means there are null bytes in the
On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle
<[EMAIL PROTECTED]> wrote:
>Ah, so the firefighters were in on the conspiracy!
No, but the firefighters are very much aware that there is more to
9/11 than has been officially revealed.
This is even more true at Pentagon. The firefighters there broug
On May 3, 10:52 pm, Mike <[EMAIL PROTECTED]> wrote:
> I was messing around with adding methods to a class instance at
> runtime and saw the usual code one finds online for this. All the
> examples I saw say, of course, to make sure that for your method that
> you have 'self' as the first parameter.
On May 4, 12:26 am, Josef Dalcolmo <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have tried this only on Windows XP.
>
> in Python 2.4 os.path.getmtime() used to return an integer representing
> the local time.
The docs say "seconds since the epoch". Noting that the epoch is
usually defined with refer
[EMAIL PROTECTED] schrieb:
> Hello!
>
> If I do
>
> import uno
> localContext=uno.getComponentContext()
>
> then localContext is of type
> I guess it's a new type provided by PyUNO extension.
> localContext.__class__ is None
> Is there any way to list all methods of that new type, via Python C
I'm filling an array with user input, I want an empty string to be
returned when nothing is entered; ie return key hit twice... How do I
do that?
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 8:43 pm, [EMAIL PROTECTED] wrote:
> I'm filling an array with user input, I want an empty string to be
> returned when nothing is entered; ie return key hit twice... How do I
> do that?
use raw_input(), not input(). input() attempts to evaluate the
result, assuming it is a valid python
On May 3, 7:50 pm, André <[EMAIL PROTECTED]> wrote:
> On May 3, 8:43 pm, [EMAIL PROTECTED] wrote:
>
> > I'm filling an array with user input, I want an empty string to be
> > returned when nothing is entered; ie return key hit twice... How do I
> > do that?
>
> use raw_input(), not input(). input(
On Thursday 03 May 2007 01:10, SamG wrote:
> If anyone has a x86_64 machine and is running a 32bit OS on top of
> that could you tell me what output would you get for the following
> program
>
> #==
> import platform
> print platform.processor()
> print platform.architectu
>>> s = ['a','b']
>>> s
['a', 'b']
>>>
This is what I want so that I can put it in a module then import that
module to work with my variable.
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 8:00 pm, [EMAIL PROTECTED] wrote:
> >>> s = ['a','b']
> >>> s
> ['a', 'b']
>
> This is what I want so that I can put it in a module then import that
> module to work with my variable.
Sorry for that typo in the title...
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 8:01 pm, [EMAIL PROTECTED] wrote:
> On May 3, 8:00 pm, [EMAIL PROTECTED] wrote:
>
> > >>> s = ['a','b']
> > >>> s
> > ['a', 'b']
>
> > This is what I want so that I can put it in a module then import that
> > module to work with my variable.
>
> Sorry for that typo in the title...
I foun
I realize that in today's MVC-everything world, the mere mention of
generating HTML in the script is near heresy, but for now, it's what I ened
to do. :)
That said, can someone recommend a good replacement for HTMLGen? I've found
good words about it (http://www.linuxjournal.com/article/2986), but
On May 3, 8:24 pm, [EMAIL PROTECTED] wrote:
> On May 3, 8:01 pm, [EMAIL PROTECTED] wrote:
>
> > On May 3, 8:00 pm, [EMAIL PROTECTED] wrote:
>
> > > >>> s = ['a','b']
> > > >>> s
> > > ['a', 'b']
>
> > > This is what I want so that I can put it in a module then import that
> > > module to work with
On Thu, 03 May 2007 13:53:39 +0100, Eeyore
<[EMAIL PROTECTED]> wrote:
>
>
>Peter Webb wrote:
>
>> > Ask yourself WHY havn't I seen this footage before?
>> >
>> >
>>
>> OK, why haven't you seen this footage before?
>
>Nice response !
>
>Graham
>
You're an utter retard
On Thu, 03 May 2007 10:38:31 -0700, J wrote:
> Greetings Group-
>
> I'm trying to put together a pattern matching script that scans a
> directory tree for tif images contained in similar folder names, but
> running into a NewB problem already. Is it the way I'm trying to join
> multiple paths? An
Okay does anyone know how to decorate class member functions?
The following code gives me an error:
Traceback (most recent call last):
File "decorators2.py", line 33, in
s.update()
File "decorators2.py", line 13, in __call__
retval = self.fn.__call__(*args,**kws)
TypeError: update()
On 3 May 2007 08:53:39 -0700, malibu <[EMAIL PROTECTED]> wrote:
>On May 3, 12:18 am, Eric Gisse <[EMAIL PROTECTED]> wrote:
>> On May 2, 10:14 pm, malibu <[EMAIL PROTECTED]> wrote:
>>
>> > On May 2, 9:46 pm, Eric Gisse <[EMAIL PROTECTED]> wrote:
>>
>> > > On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]
I have a variable names actions in a module named qt_actions.py
Well this is what I get:
>>> import qt_actions
>>> qt_actions.actions
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'actions'
--
http://mail.python.org/mailman/listinfo/py
Oh I should mention the decorator needs to have some notion of state
(such as with the above class)
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 9:21 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
> Okay does anyone know how to decorate class member functions?
>
> The following code gives me an error:
>
> Traceback (most recent call last):
> File "decorators2.py", line 33, in
> s.update()
> File "decorators2.py", line 13, in
are you sure your variable isn't in some code block that wouldn't be
read on import? Such as:
if __name__ == "__main___":
actions = 1
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 03 May 2007 18:08:31 -0500, quasi <[EMAIL PROTECTED]> wrote:
>On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle
><[EMAIL PROTECTED]> wrote:
>
>>Ah, so the firefighters were in on the conspiracy!
>
>No, but the firefighters are very much aware that there is more to
>9/11 than has been officiall
On May 3, 9:36 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
> are you sure your variable isn't in some code block that wouldn't be
> read on import? Such as:
>
> if __name__ == "__main___":
> actions = 1
No Andy, I have not put the variable in any code block
--
http://mail.python.org/mailman
On May 3, 9:33 pm, Virgil Dupras <[EMAIL PROTECTED]> wrote:
> On May 3, 9:21 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
>
>
>
> > Okay does anyone know how to decorate class member functions?
>
> > The following code gives me an error:
>
> > Traceback (most recent call last):
> > File "decorators
walterbyrd wrote:
>If I wanted to build a website with forums, news feeds, galleries,
>event calander, document managment, etc. I do so in Joomla easily.
>
>But, I would perfer to use django/python, if that would be at all
>practical.
>
>I suppose I could put python scripts into django, if those s
On May 3, 11:08 am, Bruno Desthuilliers wrote:
> I'm not sure integrating CakePHP stuff into something like Joomla or
> Drupal will be that easy.
I don't know either. But, there are projects called "jake" and "drake"
which are specifically geared toward intergrating cakephp with joomla
and drupa
On May 3, 9:21 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
> Okay does anyone know how to decorate class member functions?
>
> The following code gives me an error:
>
> Traceback (most recent call last):
> File "decorators2.py", line 33, in
> s.update()
> File "decorators2.py", line 13, in
On May 3, 7:49 pm, John Draper <[EMAIL PROTECTED]> wrote:
> I admit, Joomla is easy to use I admit, but very easy to vector into
> a root exploit.
I had no idea. Thank you for posting that.
One thing I really like about joomla is the 1600+ extensions. But, I
don't need those kinds of security
Roel Schroeven wrote:
>
> I might be wrong of course, but can't you just use atan2? Only problem
> is that it returns negative angles for quadrants 3 and 4, but that is
> easily solved. In Python:
>
> from math import atan2, pi, fmod
> def vectorAngle(x, y):
> return fmod(atan2(y, x) + 2*pi
Nameless wrote:
> Why should I keep on learning lisp when there are python and perl?
Lisp compilers are much more advanced, for one thing.
Xah Lee wrote:
> (if there is some demand, i will add a concrept, little programing
> example, that shows, how lisp's symbols and macros concepts, set it
> ap
I just need to keep the state around. I make a call to some function
that is pretty expensive so I want to save it as a member during the
__init__ of the decorator.
Yeah I'm afraid it can't be done either, that's why I asked the group.
--
http://mail.python.org/mailman/listinfo/python-list
Andy Terrel <[EMAIL PROTECTED]> writes:
> I just need to keep the state around. I make a call to some function
> that is pretty expensive so I want to save it as a member during the
> __init__ of the decorator.
>
> Yeah I'm afraid it can't be done either, that's why I asked the group.
Have you lo
not quite as elegant but here is a workaround... Thanks Virgil for
taking some time to think about it.
---
class Bugger (object):
def __init__ (self, module):
print "Entering __init__"
self.module = module
self.verb = 0
def instrument (module_name):
def wrapper(f)
On May 4, 6:39 am, [EMAIL PROTECTED] wrote:
> On May 3, 9:36 pm, Andy Terrel <[EMAIL PROTECTED]> wrote:
>
> > are you sure your variable isn't in some code block that wouldn't be
> > read on import? Such as:
>
> > if __name__ == "__main___":
> > actions = 1
>
> No Andy, I have not put the var
On Thu, 03 May 2007 18:27:12 -0700, noagbodjivictor wrote:
> I have a variable names actions in a module named qt_actions.py
>
> Well this is what I get:
import qt_actions
qt_actions.actions
> Traceback (most recent call last):
> File "", line 1, in
> AttributeError: 'module' object
En Thu, 03 May 2007 16:52:55 -0300, Mike <[EMAIL PROTECTED]> escribió:
> I was messing around with adding methods to a class instance at
> runtime and saw the usual code one finds online for this. All the
> examples I saw say, of course, to make sure that for your method that
> you have 'self' as
I will give a simplified example of the problem at hand --
I have a case in which I have two listboxes - listbox1 and listbox2,
if I click on an item in listbox1 the item gets highlighted as
expected. Now if I click on an item in listbox2 the selected item in
listbox1 loses its highlight. My quest
Laurent Pointal <[EMAIL PROTECTED]> wrote:
...
> > It's an excellent quick-reference card, BTW (though I don't quite
> > understand why even-numbered pages are flipped upside-down).
>
> At work I print it on horizontal A4/USLetter, with recto-back, and with
> binding (reliure in french) on smal
En Thu, 03 May 2007 10:15:52 -0300, <[EMAIL PROTECTED]> escribió:
> Thanks for the replyHow do i accept the filename is a
> parameter and avoid the error.Can you elaborate.
To get the arguments passed to the script, use sys.argv[]
Most introductory texts should cover it, like the Python t
On Thu, 03 May 2007 19:28:52 -0700, Andy Terrel wrote:
> I just need to keep the state around. I make a call to some function
> that is pretty expensive so I want to save it as a member during the
> __init__ of the decorator.
>
> Yeah I'm afraid it can't be done either, that's why I asked the gro
[EMAIL PROTECTED] wrote:
> I will give a simplified example of the problem at hand --
>
> I have a case in which I have two listboxes - listbox1 and listbox2,
> if I click on an item in listbox1 the item gets highlighted as
> expected. Now if I click on an item in listbox2 the selected item in
> l
Hi folks,
EasyExtend is a grammar based preprocessor generator and
metaprogramming system for Python written in Python. After reworking
an initial release for 11 months (!) it's time to present now
EasyExtend 2.0-alpha1.
You find EasyExtend on the projects homepage:
http://www.fiber-space.de/Eas
En Thu, 03 May 2007 10:49:26 -0300, Ben Collver <[EMAIL PROTECTED]>
escribió:
> I tried to write portable Python code. The zlib CRC function returned
> different results on architectures between 32 bit and 64 bit
> architectures. I filed a bug report. It was closed, without a comment
>
Andy Terrel wrote:
> Okay does anyone know how to decorate class member functions?
>
> The following code gives me an error:
>
> Traceback (most recent call last):
> File "decorators2.py", line 33, in
> s.update()
> File "decorators2.py", line 13, in __call__
> retval = self.fn.__ca
101 - 200 of 223 matches
Mail list logo