WIG list. There are lots of Python hackers on the list, too. So
don't be afraid to ask fairly Python-centric questions either.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
imagine that
this is a cookbook type thing, and if there are any references on how
to do this, I'd greatly appreciate it (I couldn't come up with the
right Google magic words).
Thanks in advance for any help.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
ter.Canvas before I can safely subclass it (and assign attributes
> to an instance of the subclass) or clear attribute names as I outlined
> above?
>
> Chris Marshall
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
nc, *targs, **kargs)
register a function to be executed upon normal program termination
func - function to be called at exit
targs - optional arguments to pass to func
kargs - optional keyword arguments to pass to func
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
; among them, do I need transfer the coordinates?
Transfer the coordinates of what?
When you go from the standard right-handed system to the system used
in computer graphics, you use these simple formulas:
max_x, max_y = image size
screen_x = original_x
screen_y = max_y - original_y - 1
HTH
-
he screen.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
> This has a light code smell for me though -- can anyone see a simpler
> way of writing this?
How's about:
def ntf(x, y):
if x is None and y is None: return None
if x == True or y == True: return True
return False
# Then...
reduce(ntf, )
You might need to make sure that you init
the builtin behavior back.
Am I barking up the wrong tree with __import__?? Where should I look
for this answer?
Thanks.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
I'm in a situation where it would be nice to have access to this
value. I've been looking for it all afternoon and can't find anything.
Thanks.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
isons for each item. But in cases where I'm only trying
a single getattr (for example), using "if" might be a cheaper way to
go.
What do I mean by "cheaper"? I'm basically talking about the number
of instructions that are necessary to set up and execute a try bl
is a way to tell Python to
link to arbitrary libraries, but I don't know how to turn off the
building of the "custom" Expat that comes with Python.
Thanks for any tips, pointers, and insight.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
On 7/19/05, Bernhard Herzog <[EMAIL PROTECTED]> wrote:
> This sounds like this bugreport on sourceforge:
> http://python.org/sf/1075984
Thanks! I applied the workaround posted by `bos' and things seem to work now.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org
I think the tutorial offered at www.python.org/tut/tut.html is as good
a starting place as any.
I wouldn't be able to suggest a "non-trivial" project without knowing
more about your background. Can you do a flashcard program? recipe
organizer? [EMAIL PROTECTED] client? (I think you see where this
Oops. The correct URL is http://docs.python.org/tut/tut.html
On Tue, 22 Feb 2005 16:48:48 -0700, Steve Juranich <[EMAIL PROTECTED]> wrote:
> I think the tutorial offered at www.python.org/tut/tut.html is as good
> a starting place as any.
>
> I wouldn't be able to
#x27;t do what I want it to do (with nested templated classes and
the like).
Many thanks in advance.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
thon for about six years now, and I never have found out how to do
this.
Thanks a lot.
--
Steve Juranich
Tucson, AZ
--
http://mail.python.org/mailman/listinfo/python-list
object.c in the Python
source as a reference for how to do this.
I've had a couple of questions about how to implement new types that I
posted to the list, and never got much help, so I started using the
Python source as a reference. I've gotten most of what I needed to
know from there.
HTH
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
):
print "Standard: " + self.standard
print "decField: " + self.decField
super(MSD, self).printer()
HTH
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
oo
>>> b = Bar()
>>> b.foo()
bar
foo
So nothing jumps out to me that you did obviously wrong, sorry. But
in general my advice would be to switch to using "new-style" classes.
HTH
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
tay up.
>
> How can I achieve the desired behavior?
You'll probably need to take a look at the `signal' and `atexit' modules.
These will allow you to write hooks that will get called when your A script
is terminated either by a signal or by reaching one of the "natura
init__()
> self.tag = tag
> self.attrib = attrib
I haven't put a lot of study into what you've done, but right off the bat,
your use of "super" is incorrect. It should look like:
super(XmlNode, self).__init__()
Not sure if that will fix your problem, though.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
npythonic. Many others have stated so on the list.
That's why it's great that you're free to ignore that variable. I suggest
that you do so (as I have chosen to do). I'm sure that there are
situations where you *MUST* have this kind of capability, but I haven't
bumped in
d signal modules will be your friend.
> I'll be willing to PayPal $10 to anyone who completely figures this out
> for me :)
1) I wouldn't want to spoil the fun.
2) My time writing code costs much more than that. :-)
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
) class. Change your class
definition to look more like what I have above and things should start
working.
If you're willing to post the code, we could pinpoint the problems much
faster.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
since this is a reference to the base class, so if
it's inherited from some other class, you'll need to know from which class
the member is inherited.
HTH
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
the mangled member. Then (I forgot this part), you can just call the
mangled member from `self'. Example follows.
class A(object):
def __init__(self):
self.__foo = lambda x, y : x + y
class B(A):
def __init__(self, x, y):
# Make sure you're calling th
be given a executable mode, or permission, using the
> chmod command:
>
> $ chmod +x myscript.py"
This is a Unix-specific command (POSIX-specific, actually). It won't work
on a Windows box.
To run the script from a command line,
`python C:\path\to\script\myscript.py' sho
re proven to be
> compatible/incompatible etc?
We've used Swig 1.3.21 with a couple version of Python now (2.3.3,
2.3.4, 2.4, and now 2.4.1) without any problems. You might want to
take a look at the code that Swig generates to see if that's really
where your problems are coming from.
Goo
lder python-mode.el or the newer python.el?
>
> I am using eamcs 21.4.1 under dabian testing.
I use python-mode.el v. 4.63 with Emacs 21.3 (I haven't made the switch to
21.4 yet). When I'm running an interactive *Python* buffer inside of Emacs
and get a stack trace, I then use pdb.p
to know how can I import and then manage xml.dom.minidom.* objects
> using Python C API.
>
> thanks,
> Gabriele
>
Have you looked at the PyImport_* functions?
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
/ZopeBook/2_6Edition/view). Don't
worry about the version (2.6) of the book. It's the latest they have (I
think they're working on a new one for z3). You can skip the bits about
DTML, but keep them handy.
You should also take a look at the Zope user list:
http://mail.zope.org/m
uld look at to get an idea of what z3 has that 2.9
(which I'm currently still cutting my teeth on) doesn't? I've looked at
the documentation on the main Zope page (zope.org) and all of the documents
I've seen are apparently geared towards Zope 2.X. Where are the Zope3
docs?
T
types of
> graphical operations.
Have you seen matplotlib?
http://matplotlib.sourceforge.net
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
Jacob Kroon wrote:
> Is there another way to make python delete objects which were
> created in the global scope upon exit ?
Check out the `atexit' module.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
LabWINC wrote:
> If i type help scipy.filter it give me an error
>
> help scipy.filter
> File "", line 1
> help scipy.filter
> ^
> SyntaxError: invalid syntax
You need parentheses:
help(scipy.filter)
--
Steve Juranich
Tucson, AZ
USA
--
.. so alpha that it actually
loops back around to *OMEGA*."
Cheers.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
supported natively and makes image
processing work a lot easier in some respects.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
nclude OurToolsPython.h and
link against libOurToolsPythyon.so
Am I thinking about this the right way, or am I *completely* twisted around
the axle here (which is kind of how I feel)?
Thanks in advance for any comments, corrections, and directions.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
osted.
Thanks much.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
ur
problem description, that's probably not what you want.
I'd just process the each line, either making modifications or not, then put
the processed line on an "out" buffer (list of strings), then write that
list to a file. If you do it right, all the comments and things wil
is much more efficient than the Ruby VM. So if you want
fast code, I'd stick with Python. However, if you regularly build large
applications in memory from an interactive interpreter, then perhaps Ruby
is the way for you to go. :-)
Cheers.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
t crystal balls are for seeing the future, not for mind-reading. No, to
do proper mind reading you need youself a pointy hat and (preferably) a
deck of cards.
Sorry, weird day at work. Had to vent.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
for myself -- the allow my subconscious to reveal
> my inclinations based upon the cards' meanings)
Who said anything about tarot? I'm talking about the old "Pick a card, any
card..." bit.
Cheers.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
files??
>
> Thanks, Vasili
>
http://www.swig.org/Doc1.3/SWIGDocumentation.html#Python
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
> convert the remaining number from hex to dec.
>
> I have been trying to figure this out for a while..I am fairly new so
> please any help would be greatly appreciated.
line = '"DcaVer"=dword:0640'
value = int(line.split(':')[1], 16)
Note that no re
45 matches
Mail list logo