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
://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/
choice. Go after what you really want, and you will too.
--
Benji York
Sr. Software Engineer
Zope Corporation
--
http://mail.python.org/mailman/listinfo/python-list
):
for x in gen:
if x % 2 == 0:
yield x
numbers = even(count(1, 999))
first = numbers.next()
second = numbers.next()
print second
--
Benji York
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
technique: http://www.siteexperts.com/tips/contents/ts13/page1.asp.
--
Benji York
Sr. Software Engineer
Zope Corporation
--
http://mail.python.org/mailman/listinfo/python-list
Josh wrote:
I need someone to explain to me how to output a Code39 barcode to a
Reportlab PDF.
This may not help you directly, but I've made use of it in the past: a
very nice and totally free 3 of 9 TrueType font.
http://www.barcodesinc.com/free-barcode-font/
--
Benji
--
threads here about connecting to Access.
I don't mind working hard to learn how to do it I just want to
know if Python is a good choice or not!
I'd definitely say so. Have fun!
--
Benji York
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
a coincidence of the implementation.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
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
[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
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
']
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
ODBTP project sometime after the new year.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
ADO. It presents a standard DB-API 2.0 interface. I've
had good luck with it.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
appear that the parser reads \377 as a single character and
\378 as two (\37 and the 8 character). I'm somewhat surprised you're
seeing a heart and an 8. What OS/language combination are you using?
If you're using English Windows you can get a heart and an 8 with
print '\38'.
--
Benji York
[EMAIL
is equivalent to
len('H', 'e', 'l', 'l', 'o', '!')
Which gives the same error:
Traceback (most recent call last):
File stdin, line 1, in ?
TypeError: len() takes exactly one argument (6 given)
If the * is removed, it works correctly:
apply(len, blah)
6
--
Benji York
[EMAIL PROTECTED]
--
http
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
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
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
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
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
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
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
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
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
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
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
.
--
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
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
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
... print X
...
2
--
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
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
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
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
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
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
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
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
in pagetext:
print 'yes'
else:
print 'no'
--
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
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
{'a': 1, 'c': 3, 'b': 2}
v = d.values()
v
[1, 3, 2]
v.sort()
v
[1, 2, 3]
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
What I want to know is how Mangus wrote an entire message fully
justified. I looked for extra spaces and other cheats but only
found a couple of superfluous exclamation marks. Well done! He
must be a justification wizard. I wish I could do that too. :)
--
Benji York
--
http://mail.python.org
+ string?
Note that recommended form is to build a list of strings and then use
''.join(all_my_strings) to form the final result.
After saying all that, here's a better way:
dirList = ['depth1','depth2','depth3', 'position']
print ' '.join(dirList)
--
Benji York
--
http://mail.python.org/mailman
Ognjen Bezanov wrote:
Is there anywhere where I can find out about queues, for people who know
python but have not had a lot of experience with threaded programs? Cheers
FOLDOC to the rescue:
http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?queue
--
Benji York
--
http://mail.python.org/mailman
not match mine, but if it points to something other than the standard
library, you've found the problem.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
return property(fget, fset)
It doesn't have the one-liner appeal of the lambda version, but it
reads well.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
object (which is more
likely), you can do this:
class C:
... pass
...
c = C()
setattr(c, x, 8)
c.my_var
8
code = 'print ' + x
exec(code)
Getting the value would be like this, respectively:
print globals()[x]
7
getattr(c, x)
8
HTH
--
Benji York
--
http://mail.python.org/mailman
rewarded by
a large enough improvement to make it worth it.
It could be an economy of one unuseful test by loop.
If by economy you mean optimization, then I would suggest that the
difference would be unnoticeable.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
harold fellermann wrote:
s=print 'hello Xah Lee :-)'
exec(s)
hello Xah Lee :-)
Note that because exec is a statement, the parentheses above are
superfluous.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
. I've generally stuck with
wxPython.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
://wiki.python.org/moin/PythonHosting.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
True, False. Of course the
fix is easy, but it still must be applied before the code will run.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Ivan Van Laningham wrote:
And what defines a python activist anyway? Blowing up Perl
installations worldwide?
+1 QOTW
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
('a_file')
1119615705
os.system('cat a_file')
0
os.path.getmtime('a_file')
1119615705
os.path.getatime('a_file')
1119615758
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
']
dict.fromkeys(a_list)
{'a': None, 1: None, 2: None, 3: None, 'c': None, 'b': None}
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
vm wrote:
Hi, for some reason my POST is not working properly.
Look at the URL again, you missed a character. You had:
httpSess.request(POST,/,params,headers)
It should be:
httpSess.request(POST,/q,params,headers)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
, lets you select
subsets of the tests to run, as well as control verbosity.
And, if you feel experimental you might want to preview the new Zope
test runner currently under development
(svn://svn.zope.org/repos/main/zope.testing).
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
on QuickEdit Mode on the
Options tab. Then you can drag with your left mouse button to select
an area of text, right click to copy, then right click again to paste.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Fuzzyman wrote:
Also, can anyone explain any tangible benefit of inheriting from
object, when not explicitly using any features of new style classes ?
One reason is that properties won't work correctly.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
near the
maturity (or speed) of OZ/Mozart. OTOH, I can actually get things
done with the logilab code. But that might say more about me than
Mozart. :)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Graham Fawcett wrote:
keep-your-stick-on-the-ice'ly yours,
Is that a Red Green reference? Man, I didn't think this could get any
more off-topic. :)
python-needs-more-duct-tape'ly yours,
Benji
--
http://mail.python.org/mailman/listinfo/python-list
Nathan Pinno wrote:
Does Python have a random function? If so, can you show me an example
using it?
http://docs.python.org/lib/module-random.html
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
If anyone has an idea, how to I catch exceptions globally, please write me.
I believe there is an example of this in the demo that comes with
wxPython (don't have an install handy to check).
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Dark Cowherd wrote:
I want some feedback on folllwing:
anybody who has experience in writing [...] data
entry heavy web applications.
Any suggestions?
You might be interested in Zope 3's ability to generate data entry/edit
forms via schemas.
--
Benji York
--
http://mail.python.org/mailman
.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Stian Søiland wrote:
Yes, and we can make
someunknownlist[] = 2
magically do someunknownlist = list() and append 2.
I hope you're being sarcastic. :)
If not, why don't you like:
some_list = [2]
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Ron Adam wrote:
if extraargs: would evaluate to if None:, which would evaluate to
if: which would give you an error.
In what way is if None: equivalent to if:?
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Gustavo Niemeyer wrote:
**python-constraint** [1]_ is a Python module offering solvers for
Constraint Solving Problems (CSPs) over finite domains in simple
and pure Python.
Very cool! I can't wait to get some time to play with this.
--
Benji York
--
http://mail.python.org/mailman
Joseph Chase wrote:
In the past, I have noticed that I have spent a lot of time managing my C++
libraries.
The main thing you need are good tests.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
When: July 13, 7:30-9:00 PM
Where: Zope Corp offices
(513 Prince Edward Street; Fredericksburg, VA 22408)
Details at http://www.zope.org/Members/poster/fxbgzpug_announce_2
Hope to see you there!
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
to translate the above code into Python (see
http://docs.python.org/lib/module-re.html), you should know that the
regex above will not validate all possible email addresses. In general
it is a fools errand to try to anyway.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
This gives me hope, but what I really need to do is to send keystrokes
to an already existing console window.
That's exactly what the code does. Try it out, you'll see how it works
quickly enough.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
MarkE wrote:
The answer appears to be:
An example command line for running the script was written in a word
document. The Autocorrect (sic) feature in word replaces a normal
dash
There is a lesson there I wish more people would learn: Word is not a
text editor. :)
--
Benji York
--
http
[EMAIL PROTECTED] wrote:
I think the lesson there is 'dont depend on getopt, write your own
command line parser'. I always write my own, as it's so easy to do.
While I'll agree that getopt isn't ideal, I find optparse to be much better.
--
Benji York
--
http://mail.python.org/mailman/listinfo
the ordinal
values of the single quote and double quote characters
Steven, your reply was one of the most subtle and hilarious things I've
read in a long time. Unfortunately I couldn't tell if it was
intentional or not. :)
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
if you prefer) generating input
forms, validating them, applying the results to an object, etc.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
, in ?
AttributeError: 'function' object has no attribute 'g'
f(1)
f.g
function g at 0xb7df3e2c
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger wrote:
[Benji York]
Note that when using this technique, f.g will not be bound until after
you call the function:
That is a feature, not a bug. The inner function isn't even created
until the outer function is run.
I'm fully aware of that. I just didn't want the OP
(short for
no hangup, as in the HUP signal). You would run it like so:
nohup python script.py
see man nohup and info coreutils nohup for more info.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
return property(**locals())
You can remove any of fget, fset, fdel, or doc without changing any
other lines, and there are no extra entries in the class's name space.
--
season-to-taste-ly yours,
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
sure someone would be able to help, but they'll
need better information about what your specific question is.
Perhaps this would help: http://www.catb.org/~esr/faqs/smart-questions.html
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 166 matches
Mail list logo