://pypi.python.org/pypi/manuel.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations/
Does anybody know how to find the real IP address (e.g.: address visible to
internet) of a machine via Python? In other words I have a machine with an
IP address something like 192.168.1.5, an address given to me by a router.
The router's address (and thus my machine's address) to the outside
I'm going to look into the Internet Gateway Device protocol and see what it
has to offer. If it is more work than it is work I'm going with Steven's
suggestion (nice code BTW).
And yes, you guys understood what I was asking - I wanted the internet IP
address of my machine, not the local subnet
Hello, I'm a longtime lurker of python-list, python-C++ and a couple of
others.
I have a commercial project being prototyped in Python, brought to a very
fine level of completion and which needs to be ported to C++. I would like
to outsource this project - does anybody have any experience with
York
--
http://mail.python.org/mailman/listinfo/python-list
, without fixing the problem.
Anyone know if my guess is right, that the mx package isn't coming in as a
universal? And if so, if there's a way to force it to be universal, or
some other simple fix for my problem?
Thanks,
Ian
--
Ian York ([EMAIL PROTECTED]) http://www.panix.com/~iayork
Oh, that's right, the second arg is escaped by re compiler too.
Thank you, John.
York
John Machin wrote:
York wrote:
I have two backslash - a. and I want to replace them with one backslash,
but I failed:
import re
a = ''
re.sub(r'', '\\', '')
Traceback (most recent call
?
Thanks,
York
--
http://mail.python.org/mailman/listinfo/python-list
for a in range(2, len(foo)): print a
or maybe you need
for a in range(1, len(foo)): print a
?
York
bruce wrote:
hi..
basic foor/loop question..
i can do:
for a in foo
print a
if i want to do something like
for a, 2, foo
print foo
where go from 2, to foo..
i can't
BartlebyScrivener wrote:
Emacs must be dying if this thread could get all the way to 20 with
nobody arguing with the vi folks.
heh :)
Will the Windows vim and gvim users vouch for its stability on
Windows?
It's very stable on Windows.
--
Benji York
--
http://mail.python.org/mailman
Frank Millman wrote:
reader = csv.reader(open('trans.csv', 'rb'))
rows = []
for row in reader:
rows.append(row)
Why do you create a list of rows instead of just iterating over the
reader directly?
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
(an on-disk directory perhaps) and have the triggered program return
after doing that. Then you can have a separate, long-running program
process the messages.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
and complete control of the
environment on Linux.
I'm interested in what you mean here. My interpretation is that you
want to/are building a system to interact with a Linux desktop from a
Windows box leveraging the voice recognition built into Windows. Is
this right?
--
Benji York
--
http
not valid.
return False
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Subversion)
at svn://svn.zope.org/repos/main/zope.testing/trunk and browse the code
(including docs) at http://svn.zope.org/zope.testing/trunk/.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
John J Lee wrote:
Is there a page that describes the Zope SVN layout?
Not that I know of. It basically goes like this: if it's not a
top-level project (like zope.testing), it's either in Zope (for Zope 2
stuff) or Zope3 (for Zope 3 stuff).
--
Benji York
--
http://mail.python.org/mailman
://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
also quite different
from what he's probably expecting. On the up side, it's probably much
better than what he's expecting too. :)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
by opening a file (on disk), but it
doesn't make much sense to have to open a file just to see how big it
is.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
Now that I've learned much of Python, I'm sort of stuck with what to do
with it.
http://www.pythonchallenge.com/
You can (thank|curse) me later.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
mwql wrote:
It's really strange,
if
a = 1
b = 1
a is b == True
the same thing applies for strings
Not quite:
'abc' is 'abc'
True
'abc' is 'ab' + 'c'
False
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
(and they've paid off in a big way too). Obviously we test lots
of web apps and had to come up with something to allow us to do decent
doctests of them. Unsurprisingly it's documented with a doctest:
http://svn.zope.org/*checkout*/Zope3/trunk/src/zope/testbrowser/README.txt
--
Benji York
--
http
to control both with one keyboard and mouse.
Unfortunately neither x2vnc or Synergy really fulfill my needs though,
so I'm working on a replacement. Actually I'm writing this email
instead of working on it, back to the (Vim) mines.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Jarek Zgoda wrote:
How do I get a list of localized month names for current locale? The
first thing that came to my mind was an ugly hack:
import locale
locale.nl_langinfo(locale.MON_1)
'January'
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
or well documented
not-meant-for-documentation unit/functional/integration tests is terrific.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
kanchy kang wrote:
i browsed the following frameworks briefly: nose, OOBTest,
testosterone, py.test, Sancho ... and found out they do support
imediate screen-output only.
You can redirect stdout to a file.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
time may be
longer than requested by an arbitrary amount because of the
scheduling of other activity in the system.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
the same thing on several diverse machines elsewhere in
this thread), then yes, I'd agree that /something/ strange is going on.
Unfortunately this sounds like one of those things that will require
laying on of hands to diagnose. Good luck! Let us know how it turns
out, I'm curious. :)
--
Benji York
those and *so* much more.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
seriousness has been maintained.
To the OP: a serious editor is a basic necessity of coding, so pick
Emacs, Vim, or something equivalent. Just make sure it's customizable
and you enjoy customizing it because you'll want to.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
get_repeat_counter(limit)
while repeat(10):
print 'OK'
Without more work it doesn't allow nested loops though.
And for the record, if you're worrying about Python's counted loop
construct you need better things to worry about.
insert-smilies-as-appropriate
--
Benji York
--
http://mail.python.org
(most recent call last):
File stdin, line 1, in ?
AttributeError: 'module' object has no attribute 'interfaces'
Try this instead:
from zope.app.container import interfaces
interfaces.IContained
InterfaceClass zope.app.container.interfaces.IContained
--
Benji York
--
http
-specific, but I highly recommend Steve Oualline's Vim book
(http://www.amazon.com/gp/product/0735710015).
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
me, is
no different in programming.
It's apparently no different anywhere:
http://www.phule.net/mirrors/unskilled-and-unaware.html
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
in mind, so that this would work:
for chunk in iter('', f.read, blocksize): ...
But it's a bit late now.
How about this instead (will work in 2.5):
for chunk in iter(partial(f.read, blocksize), ''): ...
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Please join us January 11, 7:30-9:00 PM, for the seventh meeting of
the Fredericksburg, VA Zope and Python User Group (ZPUG). Squid and
Zope! Python and Zope roundtable! Free food!
* Andrew Sawyers will discuss using the open source cache server
Squid with Zope, including a discussion of the
Please join us January 11, 7:30-9:00 PM, for the seventh meeting of
the Fredericksburg, VA Zope and Python User Group (ZPUG). Squid and
Zope! Python and Zope roundtable! Free food!
* Andrew Sawyers will discuss using the open source cache server
Squid with Zope, including a discussion of the
Russell E. Owen wrote:
I disagree. Once you've picked a database (not trivial in itself, of
course), you typically only have a few options for talking to in in
Python.
Perhaps it's off-topic for this thread, but I think picking a database
is the first mistake most people make. It's a form
Ivan Voras wrote:
Are there any easy GUI builders for any Python-supported toolkits?
wxDesigner is a really good commercial product, it's pretty inexpensive,
too. http://www.roebling.de/
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Shane Hathaway wrote:
Benji York wrote:
OK, good. You won't have to worry about that. :)
You didn't give a reason for disliking it.
Oh, I don't particularly dislike it. I hadn't come up with a reason to
like or dislike it, other than a predilection for the status quo.
--
Benji York
and it helps quite a
bit.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Shane Hathaway wrote:
I'd like a way to import modules at the point where I need the
functionality, rather than remember to import ahead of time. This might
eliminate a step in my coding process. Currently, my process is I
change code and later scan my changes to make matching changes to
Shane Hathaway wrote:
Benji York wrote:
[a quicker, but still manual, way to handle adding new imports]
That's something the computer should do for me. It's busywork.
Eclipse practically eliminates this busywork when I'm writing Java
code: if I autocomplete a name, it also quietly adds
cause
problems, too.
Only if you don't know how decent editors behave. :)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
that I don't care. I'm not as diplomatic about tabs. :)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
I'll add my 2 cents to the mix:
default = object()
class A(object):
def __init__(self, n):
self.data = n
def f(self, x=default):
if x is default:
x = self.data
print x
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?
I can't imagine why you're confused.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
mclaugb wrote:
Is there a decent debugger to use with IDL? I have briefly about PDB but
this looks pretty limited in features and difficult to use.
You might like Winpdb:
http://www.digitalpeers.com/pythondebugger/
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Benji York wrote:
You might like Winpdb:
http://www.digitalpeers.com/pythondebugger/
Not Found
The requested URL /pythondebugger/-- was not found on this server.
Apache/2.0.52 (Red Hat) Server at www.digitalpeers.com Port 80
shrug Works for me.
--
Benji York
Please join us November 9, 7:30-9:00 PM, for the sixth meeting of the
Fredericksburg, VA Zope and Python User Group (ZPUG). Squid and
Zope! Using Zope for newspaper publishing! The dangers of object
oriented inheritance! Free food!
* Andrew Sawyers will discuss using the open source cache
a coincidence of the implementation.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
self._command
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
PyPK wrote:
now I want execute() function to get executed only once. That is the
first time it is accessed.
How about just calculating the value at import time?
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Google (then here if answers are not forthcoming).
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
in pagetext:
print 'yes'
else:
print 'no'
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
you can download (the demo can't save your
designs, but can generate code so you can try it out).
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Luis M. Gonzalez wrote:
If not Ironpython, Boo (which could be considered almost an static
version of Python for .NET) would be a great choice.
You could also use Python for .Net
(http://www.zope.org/Members/Brian/PythonNet).
--
Benji York
--
http://mail.python.org/mailman/listinfo/python
back to the previous build).
We don't do it this way, but because the buildout for a particular
project is itself versioned, you could just svn up to the previous
version and rebuild it and you'd be back to where you started.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Peck, Jon wrote:
I have Python code running in an application, and I would like to find
the full path of the process executable where it is running.
Like this?
import sys
sys.executable
'/usr/bin/python'
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
having to go about it in such a laborious fashion
Indeed. :)
cat_list = '|'.join(List)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
of
Microsoft) is for C++. You're looking for wxPython: http://wxpython.org/
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
by default.
You can always provide your own if you wish. Zope 3 is much more like
a normal Python library in this respect.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Berthold Höllmann wrote:
I'm sure ctypes doesnot work on Linux and Solaris, but my code has
to.
I've used ctypes to great effect on Linux.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
implementation of methods.
Take a look at PJE's generic function implementation. PyCon slides
here: http://www.python.org/pycon/2005/papers/53/PyCon05Talk.html.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Jan-Ole Esleben wrote:
That doesn't really give him a way of using the class variable inside a
method.
Oh! I must have misunderstood the question. I'd like to know more
about why the OP wants to do this; a small example would help narrow
down the possibilities.
--
Benji York
--
http
... print X
...
2
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
version at http://benjiyork.com/software.html. I'm
not using it any more, but have a more recent version that I really
should package up.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
to 2.3 compatible syntax instead.
Something like:
def foo():
pass
foo = cherrypy.expose(1)(foo)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
people might not find it that useful, but the
who uses that!? response is hard for me to understand.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Thank you, Tom.
-York
Tom Anderson wrote:
On Mon, 19 Sep 2005, Bruno Desthuilliers wrote:
York a écrit :
(snip)
I love python. However, as a biologist, I like some high-levels
functions in R. I don't want to spend my time on parse a data file.
http://www.python.org/doc/current/lib
direct 2'
bux = expose(1)(bar)
Here's it's output (2.4.1 on Linux):
% python /tmp/1.py
before decorator (no args)
direct
before decorator (with args)
decorator
before direct 1
direct
before direct 2
decorator
What am I missing?
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
(http://svn.zope.org/Zope3/branches/testbrowser-integration/src/zope/testbrowser/
and http://benjiyork.com/zope.testbrowser-0.1.tgz). See the README.txt
for general info and over_the_wire.txt for how to use it to access web
sites.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python
Benji York wrote:
You can also try the almost-publicly-available package zope.testbrowser
(http://svn.zope.org/Zope3/branches/testbrowser-integration/src/zope/testbrowser/
and http://benjiyork.com/zope.testbrowser-0.1.tgz).
I forgot to mention that it requires the ZopeInterface package
Achim Domma (SyynX Solutions GmbH) wrote:
Benji York wrote:
If there is any interest I'll try to package up a stand-alone version in
the next few days.
I think that would be a very usefull tool. Currently I'm using httpunit
with Jython but a python only tool would be much nicer.
I put
[EMAIL PROTECTED] wrote:
I want to call (execute) some python scripts from my C# program.
See http://www.zope.org/Members/Brian/PythonNet.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
a table of R data
into it.
Is there any python packages do similar things?
-York
--
http://mail.python.org/mailman/listinfo/python-list
Caleb Hattingh wrote:
York
Short answer: yes
Brilliant! and what are they?
We use python and R at work, and in general you will find python syntax
a little cleaner for functionality they have in common. R is better
for some of the more hard-wired stats stuff, though.
I love python
Your are right, a program cannot be smarter than its programmer. However
I need a program to parse any table-format data files offered by user. R
offer such a function, I hope python such a function too.
-York
While it may attempt to recognize the types, it in fact cannot
be more correct
Sybren Stuvel wrote:
def all(seq, pred=bool):
What's this? What is bool?
See http://docs.python.org/lib/built-in-funcs.html#l2h-10
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
:
/usr/local/lib/libgtkgl.so.4.0.0
/usr/local/lib/libgtkgl.so.4
Does anybody know a solution for this problem?
Thanks very much,
York
--
http://mail.python.org/mailman/listinfo/python-list
Artur M. Piwko wrote:
In the darkest hour on Fri, 16 Sep 2005 10:44:34 -0700,
York [EMAIL PROTECTED] screamed:
It seems Python cannot open/find the file libgtkgl.so.4, but it
definitely lies in the lib directory:
/usr/local/lib/libgtkgl.so.4.0.0
/usr/local/lib/libgtkgl.so.4
Does anybody
Please join us September 14, 7:30-9:00 PM, for the fourth meeting of
the Fredericksburg, VA Zope and Python User Group (ZPUG).
This meeting has three features of note.
- Fred Drake, Zope Corp Senior Software Engineer, Python core
developer, and Python documentation maintainer and editor will
Jan Gregor wrote:
I run python script on another computer and want to survive that
script after my logout.
Start at http://www.python.org/windows/win32/#NTServices.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
-functions.html
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
Benji York wrote:
It's not join that's getting you, it's the non-raw string
representation in path_to_scan. Use either 'd:\test_images' or
'd:\\test_images' instead.
Benji, you're confusing things: you probably meant r'd:\test_images'
in the above
Doh! I did indeed
to extend it in the
direction you're talking about.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
the non-raw string representation
in path_to_scan. Use either 'd:\test_images' or 'd:\\test_images' instead.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
)
sys.stderr.write('\n')
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
be enough.
yeah, see i didnt even think of that.
thanks man
That was either a very gracious way to take a public correction, or an
expertly executed bit of sarcasm, either way, placid, I applaud you.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
to own the resulting code, such that reusing it
in another framework would be a PITA.
This is much less the case for Zope 3, the separation between domain and
presentation code is much easier to maintain.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
instance has no attribute 'j'
Works for me (Python 2.4).
class foo2:
... def __init__(self):
... self.j = 5
...
h = foo2()
h.j
5
Perhaps there is some strange state in your interpreter.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
See http://docs.python.org/lib/typesmapping.html for a description of
the update method.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
referring to Zope 2 or 3 here? I ask because I consider the
Zope 3 code (at least the parts written in the last couple years) to be
some of the best (externally) documented code I've worked with.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Peter Maas wrote:
suffix = 'var'
vars()['a%s' % suffix] = 45
avar
45
Quoting from http://docs.python.org/lib/built-in-funcs.html#l2h-76 about
the vars built in:
The returned dictionary should not be modified: the effects on the
corresponding symbol table are undefined.
--
Benji York
Dan Stromberg wrote:
Is there a way, using python, to (voluntarily) log all activity in a
given shell, in a way that should work on pretty much all *ix's with a
port of python?
If it's just a simple transcript you're wanting see man script.
--
Benji York
--
http://mail.python.org/mailman
TonyHa wrote:
Does any one have using Python to write a Unix diff command for
Window?
No, but you can get the *actual* diff command for Windows:
http://unxutils.sourceforge.net/
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
even need to allow
multiplication. If you only allowed dictionaries with string keys and a
restricted set of types as values, you'd be pretty close. But once
you're at that point you might as well use your own parser and not use
eval at all. shrug
--
Benji York
--
http://mail.python.org
to solve.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 183 matches
Mail list logo