point was that using native widgets is not in itself
enough to ensure a native experience. There are conventions
about *how* the widgets are used, and other things about
the behaviour that don't relate to widgets at all.
Native widgets are certainly a better thing to start
from, though
self' and
a reference to the underlying function. This is known
as a "bound method".
(You also get an instancemethod if you look the method
up in the class, i.e.
A.method
but in that case the instancemethod doesn't contain
a value for 'self', and is known as an
y of today's desktop unix systems.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
James Harris wrote:
> With that the time would range to +/- 9000
> quintillion years (18 digits)
Use the Big Bang as the epoch, and you won't have
to worry about negative timestamps.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ontained -- Aqua buttons just don't
scale down like that. :-(
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith wrote:
> greg <[EMAIL PROTECTED]> wrote:
> > Then you get a bug report, you fix it, and you add a test
> > for it so that particular bug can't happen again.
> The TDD zealots would tell you you've got the order wrong. Instead of
> "fix,
add to it over time
to cover any bugs that turn up.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
, 1, 1) ;
>> return chr($firstval) . chr($lastval) ;
>>
>> }
>
>2. What does shift do above?
'shift' accesses the first argument passed to the function, in this case
the value of length($msg)
>3. is the '.' operator just + in python?
In principle yes.
--
Greg Armer
[EMAIL PROTECTED]
http://www.codelounge.org
If it would be cheaper to repair the old one, the
company will insist on the latest model.
--
http://mail.python.org/mailman/listinfo/python-list
On 5/21/07, John Machin <[EMAIL PROTECTED]> wrote:
> Is there not a similar trick on MacOS X?
It's called a symlink:
ln -s /Users/gdonald /foo
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
When I use os.popen(cmd,'w'), I find that under windows, the stdout
of the child process disappears, instead of appearing in the DOS window
the script is invoked from. eg:
C:\> type foo.py
import os
import sys
file = os.popen("nslookup", 'w')
file.write("google.com\n")
file
On 2007-05-09, Greg Corradini <[EMAIL PROTECTED]> wrote:
>
> Hello all,
> I'm having trouble understanding why the following code evaluates as it
> does:
>
>>>> string.find('020914A','.') and len('020914A') > 10
>
Thank you Diez and Antoon for demystifing this problem. I see where I've been
going wrong.
Diez B. Roggisch-2 wrote:
>
> Greg Corradini wrote:
>
>>
>> Hello all,
>> I'm having trouble understanding why the following code evaluates as it
>> does:
&
d."
Based on what is said above, shouldn't my first expression (
string.find('020914A','.') and len('020914A') > 10) evaluate to
false b/c my 'x' is false? And shouldn't the second expression evaluate to
True?
Thanks for your help
Gr
Thanks for you help Grant
Grant Edwards wrote:
>
> On 2007-05-08, Greg Corradini <[EMAIL PROTECTED]> wrote:
>
>> I'm running descriptive stats on mileages from a database
>> (float numbers, about a million records). My sum returns
>> 1.#QNAN, which I unde
planation about the cause of this problem. Any ideas?
Thanks
Greg Corradini
--
View this message in context:
http://www.nabble.com/1.-QNAN-Solution-tf3710941.html#a1037
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
nt me
> to some documentation for accessing MySQL via python. Something of the
> "Python and MySQL for Dummies" caliber would be about my speed, but of
> course I will be thankful for anything offered.
http://mysql-python.sourceforge.net/
--
Greg Donald
http://destiney.com/
Steve Holden wrote:
>
> Greg Corradini wrote:
> [actually, her wrote it here but I moved it to the bottom]
>> Steve Holden wrote:
>>> Greg Corradini wrote:
>>>> Hello All,
>>>> A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB.
&
unded.
Thanks again
Greg Corradini
Steve Holden wrote:
>
> Greg Corradini wrote:
>> Hello All,
>> A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB. Among
>> other things, both scripts create new tables, perform a query and then
>> populate the tables
Thanks for you help kyosohma,
Unfortunately, the data I'm using isn't chaning either. I've reused data
that these scripts have successfully used before, but that won't work with
them now.
kyosohma wrote:
>
> On Apr 18, 1:36 pm, Greg Corradini <[EMAIL PROTECTED]&g
cute('An SQL Statement'), then call my insert statement in the
Python Shell and it works fine.
I just can't figure out how to reconcile this problem. Has anybody run into
this before?
Thanks
Greg Corradini
--
View this message in context:
http://www.nabble.com/Help-Understanding
Ahh. I figured it out. I resolved the issue by using a MANIFEST.in
file.
Greg
On Apr 17, 1:19 pm, Greg Copeland <[EMAIL PROTECTED]> wrote:
> Okay, I have an application which is frozen via pyinstaller. That is
> all working great. I now want to create an RPM using distutils&
Okay, I have an application which is frozen via pyinstaller. That is
all working great. I now want to create an RPM using distutils'
bdist_rpm facilities. I seem to be running into trouble. No matter
what, I only seem to get three files within my RPM (setup.py,
README.txt, and PKG_INFO).
My ap
On 4/13/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Except for real programmers...
That's correct. We use:
# dd if=/dev/tty of=/dev/hda1
and such.
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
On 4/13/07, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Thanks God
No problem.
> , there's no "PIDA for Emacs".
Pet Industry Distributors Association ?
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
On 13 Apr 2007 12:54:08 -0700, azrael <[EMAIL PROTECTED]> wrote:
> try wing ide. i tried it and i love it. it's available for windows as
> well for linux
Good thing those are the only two operating system out there.. err..
I meant, good thing there's Emacs.
--
Greg Dona
Hello all,
In a script i just wrote, my code calls a function createTables(), which
checks for an existing table and then creates it, and then immediately calls
selectSQL(), which selects from a different table and inserts on the table I
just created (see below).
However, I continue to get an In
Bruno,
Your help is much appreciated. I will give this a try tomorrow morning and
get back on how it works.
Bruno Desthuilliers wrote:
>
> Greg Corradini a écrit :
>> Hello All,
>> I'm attempting to create multiple dictionaries at once, each with unique
>>
count = 0
for i in returnedlist:
if count < len(returnedlist):
# then create a dictionary (beginning with variable dic) and add a
unique ending such that
# my final dictionary name would be dic + count for each i
Any ideas about this?
Greg
--
View this message in contex
count = 0
for i in returnedlist:
if count < len(returnedlist):
# then create a dictionary (beginning with variable dic) and add a
unique ending such that
# my final dictionary name would be dic + count for each i
Any ideas about this?
Greg
--
View this message in contex
count = 0
for i in returnedlist:
if count < len(returnedlist):
# then create a dictionary (beginning with variable dic) for each i
with a unique name such that
# my unique name would be dic + count
Any ideas about this?
Greg
--
View this message in context:
http://www.na
On 4/6/07, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> For one liners, wouldn't
>
> ECHO the text line >the.file
>
> be more appropriate?
# dd if=/dev/tty of=/dev/hda1
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Steve,
Once again your advice solved the problem
Greg
Steve Holden wrote:
>
> Greg Corradini wrote:
>> Hello all,
>> I'm having trouble inserting an SQL selection into a new MS Access table.
>> I
>> get a parameter error on my insert statement when I
Hello all,
I'm having trouble inserting an SQL selection into a new MS Access table. I
get a parameter error on my insert statement when I try this (see below for
code and error msg). I'm not sure if 'insert' or 'update' is the route I
should be taking.
CODE:
#Import Pythond Standard Library Modu
On 4/5/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> > NameError: name 'env' is not defined
>
> Try os.environ
Thanks.
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
---
exceptions.NameError Traceback (most
recent call last)
/Users/destiney/
NameError: name 'env' is not defined
Thanks,
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
e and Insert.
Thanks to all
Greg Corradini
Steve Holden wrote:
>
> Greg Corradini wrote:
>> Hello,
>> Lately I've been using the mx.ODBC module to query Access (mdb) tables.
>> For
>> the life of me, I can't get the 'create table' sql command
Hello,
Lately I've been using the mx.ODBC module to query Access (mdb) tables. For
the life of me, I can't get the 'create table' sql command to work. I use
this command in Oracle and I've seen other mx.ODBC users weave into their
scripts for Access. But I still can't get this simple test run belo
od to
request a revision to the DBAPI specification to specifically address
loss of DB connection and error handling in this regard?
Greg
--
http://mail.python.org/mailman/listinfo/python-list
xception when using tls
server.quit()
except:
pass
Is there some other way to tear down the connection besides calling quit() ?
Thanks,
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
ks like a bug in gcc to me -- what do people
think?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
t where the system version was
installed.
http://en.wikipedia.org/wiki/Path_%28computing%29
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
ike /usr/local and put
/usr/local/bin ahead of your other paths.
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
> Any ideas why this is happening?
Are you sure it is not timing out, waiting for a DNS reply?
Greg
--
http://mail.python.org/mailman/listinfo/python-list
M_xml__dom__NodeFilter.cM_xml__sax.c
M_xml__dom__NodeFilter.oM_xml__sax___exceptions.c
As you can see, minidom is being frozen and M_xml__dom__minidom.o is
compiled. Likewise, I can confirm it linked into the application.
What do I need to do to get this to work with a frozen application?
Greg
--
http
I seem to recall several different applications which can create
standalone binaries for python on Linux. I know freeze.py and
cx_Freeze.py exist. Are these still the preferred methods of creating
a stand alone binary out of a python application on Linux?
Greg
--
http://mail.python.org
Steve Holden wrote:
> >>> basestring
>
You're right, I'm not sure what made me think it
was a tuple. Maybe because people used to write
isinstance(x, (str, unicode)) before basestring
existed.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ll as just a single type.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
way, such as semantic analysis and/or code generation.
That stuff has to be done anyway, and validation sort of comes
out of that for free. So inserting an extra validation step
might not be of any advantage.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ince one object is being
shared between all instances.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
John Nagle wrote:
> and when we get to
> Unicode-only strings, "str" will never raise a conversion exception.
On *strings*, maybe, but objects can implement __str__ in
arbitrary ways, so you can't say anything in general about
what str() will do.
--
Greg
--
http://ma
rent use cases.
It's usually not appropriate for __init__ calls,
because an __init__ method generally doesn't have
the same signature as that of its base class(es).
You're better off calling the base __init__
directly, then you know exactly which method
you're calling and what s
On 15 Mar 2007 14:56:13 -0700, Bert Heymans <[EMAIL PROTECTED]> wrote:
> >>> ^[OA^[OC^[OD
Is your python built with readline support?
Also, you might check out iPython.
--
Greg Donald
http://destiney.com/
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> The 5th number is not "random".
More precisely, the fifth number is not *independent*
of the others. You can't have five independent random
numbers that sum to 50; only four independent numbers
plus a dependent one.
--
Greg
--
http://mail.python.or
to be *random* at all... or,
equivalently, they can have a very skewed
distribution. :-)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
splay* it rounded
to the number of digits you want using formatting,
e.g.
>>> "%.2f" % x
'0.15'
Alternatively, use the Decimal module, which stores
numbers as decimal and does arithmetic in ways that
will match your calculator. It's slower, though.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
list of N non-random
numbers that sum to M, and then adjust them up or down
by random amounts. By performing up/down adjustments in
pairs, you can maintain the sum invariant at each step.
So then it's just a matter of how long you want to go
on fiddling with them.
--
Greg
--
http://mail
te you. Adding and
removing is thread safe but don't treat the list as locked between
operations unless you specifically do your own locking. You still
need to be on the lookout for race conditions.
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On 8 Mar, 15:35, "Giles Brown" <[EMAIL PROTECTED]> wrote:
> On 8 Mar, 22:19, "Greg Copeland" <[EMAIL PROTECTED]> wrote:
>
> > I'm using SQLAlchemy and have a need to call an Oracle function; which
> > is not the same as a stored proced
> Giles
Very nice. That exactly answered by question. It works! Also, I
didn't know about the sqlalchemy group so I appreciate the heads up.
Thanks,
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ectly on that?
Thanks,
Greg
--
http://mail.python.org/mailman/listinfo/python-list
I have a need to call an Oracle function, which is not the same thing
as a stored procedure. Can SQLAlchemy do this directly? Indirectly?
If so, an example would be appreciated. If not, how do I obtain the
raw cx_Oracle cursor so I can use that directly?
Thanks,
Greg
--
http
, which is to ensure SO_REUSEADDR is disabled
unless you absoluetely understand what you're buying by enabling it.
Greg
--
http://mail.python.org/mailman/listinfo/python-list
"a new kind of integer" that
is not compatible with other integers.
Pascal and Modula just had a fixed set of numeric
types with various predefined compatibility
rules, not much different from C.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Maybe we can concoct a cross between Python and Haskell, and call it
> "Paskell" after the philosopher Blaise ;-).
No, we name it after Pascall's confectionery:
http://www.homesick-kiwi.com/productpage.php?id=51
Lots of syntactic sugar.
ace operators
to the language was held up for a long time until
the present compromise was devised. You might not
like it, but it's here to stay.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
mething
in the code.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
it makes a lot of sense to consider whether Python itself
could be used.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
(self)
self.c = 42 # <--- Not allowed!
You could get around this by temporarily de-initializing
it, i.e.
def __init__(self):
NothingNew.__init__(self)
del self.__dict__['initialized']
self.c = 42
self.initialized = True
but that'
r, but if you can find a formula, you should be
able to use similar techniques to "vectorize" it
using Numeric.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
How does one get access to the class that imported a module. For example:
foo imports bar -- how does bar access foo?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
ecause it will do the right thing
for the platform, which might not be so simple
in all cases.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
at way.
There's a description of the NFA-to-DFA algorithm
here:
http://www.gamedev.net/reference/articles/article2170.asp
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ou need it. Whether that's better or
not will depend on how frequently you need the value.
--
Greg
>
> totalgia keeps incrementing when this code is used under mod_python.
>
> We most certainly are in 'murky waters of accidental concurrent access'.
> A life vest would
table objects.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t help feeling that this JIT business is over-hyped.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
+ i][x] = buffer[y + i][x + i] = "*"
for i in range(4):
buffer[y + 3][x + i] = "*"
print_sierpinski(2)
###
By making the recursion explicit, I think this brings out the
self-similarity better than any of the other solution
.
>
> A generic function helps on using it on objects of any kind - like
> len()
> Perhaps it was more important with old style classes.
It also avoids intruding on the method namespace of the
object. That's important -- I like the way that the
namespace of a brand-new cla
st about any sequence of
non-letters as an infix operator, but it has no notion
of precedence, even for the built-in operators.
I think SNOBOL may have had something for defining new
operators, but I can't remember the details.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
main class as inheriting from all of them. That
avoids the monkeypatching-like behaviour of what
you're doing -- the main class definition makes it
clear what parts it's made up of -- and it uses
only standard Python techniques, so it doesn't
harbour any surprises.
--
Greg
--
http://
[EMAIL PROTECTED] wrote:
> class Point(object):
> def _init_(self, x, y):
The name of the __init__ method needs *two* underscores
at each end, i.e.
def __init__(self, x, y):
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
s, but with Python you wouldn't have to spend a
couple of weeks sitting and thinking before starting
to type that line...
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
"duplicating" is
actually from the wrong root? And also we have
"bifurcation", which means splitting in two rather
than multiplication by two -- or does that come
down to the same thing?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ble to find out
what you need to know from those.
> would it be possible to include some optional positioning
> parameters, something like left,center,right,top,middle,bottom to
> show_text()).
Yes, I'm considering something like that.
> All in all thanks a lot for PyGUI,
Glad yo
gonzlobo wrote:
> 2. Decimate an Excel file & write... say every other line (user
> selectable)... to a new file.
Every other line would be bicimating or something,
wouldn't it?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Jonathan Curran wrote:
> Greg,
> You have managed to peak my interest.
I think the word you're after here is "pique"
(although I suppose "peak" kind of makes sense
as well:-).
--
Greg (a different one)
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> You haven't addressed why the limitation isn't arbitrary.
It's not arbitrary because there is a built-in meaning
for infix minus, but not for infix tilde.
Python doesn't go out of its way to provide operators
which aren't used by at least
Pyrex 0.9.5.1a is now available:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
This is a glitch-fix nanorelease to correct a problem
with the setup.py file. The list of packages to install
is now calculate dynamically, so that it will work with
or without the testing files.
What is
ickens *wink*
Or Mr. Luxury-Yacht, which as we all know is
pronounced Throatwarbler-Mangrove. With a
silent hyphen.
--
Greg Psmith (pronounced You-ing)
--
http://mail.python.org/mailman/listinfo/python-list
Pyrex 0.9.5.1 is now available:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
This is a minor release to fix a few bugs introduced
in 0.9.5. See the CHANGES for details.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix
wds):
...
Without that, your Python subclass would have to define
its own __new__ method which accepts the extra args
and strips them out, e.g.
class MySpam(Spam):
def __new__(cls, name1=None, name2=None):
return Spam.__new__(cls)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
for lexical analysis that
provides similar functionality to Lex and Flex.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Pyrex 0.9.5 is now available:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
Warning Elimination
Extensive changes have been made in this version in an
effort to eliminate most of the C compiler warnings that
used to occur when compiling with distutils.
There are also numerous other
I have released a small update to Plex to fix the
problem of assignment to None causing syntax warnings
or errors in Python 2.3 and later.
What is Plex?
Plex is a Python module for lexical analysis that
provides similar functionality to Lex and Flex.
--
Greg
--
http://mail.python.org/mailman
ist affects is what order
the strings and agents are processed in.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
d size *and* immutable -- and the list, for
everything else.
So it's not really that lists are intended *only* for
homogeneous collections, but for anything that can't be
represented as a tuple for whichever reason.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
se them that way, but if
you use them differently, you're on your own
and can't complain if they don't have all the
features you want.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Richard Jones wrote:
> Actually, to clarify the DEFAULT configuration for Trac is to leave it open
> to spam.
That sounds like a really bad choice of default.
A bit like the way Windows comes with all the
"let anyone in the world send me a virus"
options turned on...
of these accounts letting them know what you've done and how
to get it re-enabled. Just shutting it down without any word
could be seen as a bit rude.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ot that they're shutting down existing ones.
Unless *my* reading comprehension skills have completely
abandoned me.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
x27;, 'refresh', 'delete'))
],
title = 'Barebones RSS Reader v1.0')
self.channels = [
parse_rss_from_url(url) for url in [
'http://planet.lisp.org/rss20.xml',
'http://feeds.theonion.com/theonion/daily']]
def add_feed(self):
...
def delete_feed(self):
...
# etc.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
801 - 900 of 1190 matches
Mail list logo