On 4/14/07, Mike <[EMAIL PROTECTED]> wrote:
> While trying to write a recursive function involving lists, I came
> across some (to me) odd behavior which I don't quite understand. Here's
> a trivial function showing the problem.
from http://docs.python.org/ref/function.html :
Default parameter va
> I understand that this cannot be saved by pickle.
> My question is, is there another way of setting a callback that would
> agree with pickle?
> If not is there some way to make pickle ignore the problem attribute?
Try adding a __getstate__ method to your class:
http://docs.python.org/lib/pickl
[snip]
> So what's going on? We've run into a conflict between an assumption of Python
> and of the Plesk control panel. Plesk doesn't let the user create files
> in their own home directory. This installer assumes it can. Oops.
> (Plesk sets up a very locked down environment, which is a good
> How do you write Perl's
>
> print a ... z, A ... Z, "\n"' in Python
>
>
> In Python?
you might consider this cheating, but it's packed with zen goodness:
>>> import string
>>> print string.letters
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
--
http://mail.python.org/mailman/listi
> Did you think I was suggesting that you write a GUI version of
> java2python? Please carefully (re)?read the documentation link that I
> gave you. The idea is that with a simple variation of your setup.py
> build comamnd, you create a Windows installer for your existing
> package, and make it ava
> Hi Troy, Windows users don't really "want" to do that. They'd prefer
> to download a Windows installer, and "double-click on it".
Hi John,
Understood and agreed. I was thinking about Andy's problem, and I
realized that many users would benefit from a gui to do side-by-side
translation. If I e
> properly now (error free!! yay) and the j2py script is located under :
> C:\Documents and Settings\Ujjal Pathak\Desktop\java2python-0.2\build
> \scripts-2.5
that doesn't look right -- it looks like you found what the setup
script left behind. what you should look for is j2py in either (a)
your
> I have implemented it this way, may be, there should be a built in
> hiding somewhere in the standard libraries?
the itertools module might have what you're after. something similar
to your example:
>>> import itertools
>>> r = iter(range(100))
>>> n = itertools.dropwhile(lambda x:x<=13, r)
>>
> Three very simple questions then.
>
> 1. How do I find out a running applications process ID
import os
mypid = os.getpid()
> 2. How do I check if a process ID is bound to a running application.
this is os-specific. i'm sure there's a windows api provided for it.
> 3. There won't be any issue
On 23 Feb 2007 14:36:24 -0800, vj <[EMAIL PROTECTED]> wrote:
> Cool. Why is python 2.5 required, will it not work with python 2.4?
Short answer: because java2python produces python 2.5 syntax.
Long answer:
I wrote java2python specifically to translate the IB reference code.
That reference code
> The first time A starts, it should open a B process and start
> communicating with it. All other times an A instance starts it should
> simply talk with the B that already is open.
B should write its process id to a location known by both
applications. When A starts, it should read that PID fro
> Why do people sometimes use one leading underscore?
Many folks like to use the single leading underscore to emphasize that
the attribute isn't part of the normal way to use the class or
instance.
It's bad style in my opinion, but I'm probably in the minority.
--
http://mail.python.org/mailman/
n the release for details.
I'm very interested in your experience with IbPy. Please drop me an
note with any feedback you have.
Troy Melhase
mailto:[EMAIL PROTECTED]
.. _java2python: http://code.google.com/p/java2python/
__ http://www.interactivebrokers.com/en/general/about/about.p
> Hi Troy. What is the rationale for your project?
Hi Kay,
I maintain a python port of a java library. It finally got too
complicated to do by hand, so I wrote java2python to make my life
easier. I wrote more extensively about the library and this tool in
my blog:
http://blog.melhase.net/artic
No license
is assumed of (or applied to) translated source.
I'm very interested in your experience with java2python. Please drop me an
note with any feedback you have.
Troy Melhase
mailto:[EMAIL PROTECTED]
pgp7Fllr80es8.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
edback you have.
Troy Melhase
mailto:[EMAIL PROTECTED]
pgpf4KzxBwnWd.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On 14 Feb 2007 20:54:31 -0800, placid <[EMAIL PROTECTED]> wrote:
> class Test:
> def __init__(self):
> pass
>
> def puts(self, str):
> print str
>
> def puts(self, str,str2):
> print str,str2
you might look into the overloading module and its decorator. source
$ ipython
in [1]: __import__?
Type: builtin_function_or_method
Base Class:
String Form:
Namespace: Python builtin
Docstring:
__import__(name, globals, locals, fromlist) -> module
Import a module. The globals are only used to determine the context;
they are not
18 matches
Mail list logo