On Sat, 31 Dec 2005 14:42:36 -0600, Kirk Strauser wrote:
> I wrote this article which was published in Free Software Magazine:
>
> http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/
>
> It's intended as a high-level overview of the language, and therefore
> glosses over some
On Sat, 31 Dec 2005 09:01:44 -0800, MKoool wrote:
> Hi everyone,
>
> I am doing several operations on lists and I am wondering if python has
> anything built in to get every member of several objects that are in an
> array, for example, if i have a class like the following:
>
> class myClass:
>
I'm getting realy tired of learning new languages.
And especially frustrated at the 'syntax errors' when switching
between them.
There are basically only a few common concepts needed for
all the languages. Hence linux's p2c: Pascal to C translator.
A good IDE could hide the irrelevant details
On Sun, 01 Jan 2006 03:34:33 +0100, Claudio Grondi wrote:
>> Please send me comments, suggestions and ideas.
>
> Now, after the contest is over I analysed the outcome of it and have
> come to the conclusion, that there were two major factors which
> contributed to squeezing of code:
>
>(1)
Patch / Bug Summary
___
Patches : 382 open ( +3) / 3003 closed ( +1) / 3385 total ( +4)
Bugs: 903 open (-11) / 5479 closed (+27) / 6382 total (+16)
RFE : 203 open ( -1) / 195 closed ( +2) / 398 total ( +1)
New / Reopened Patches
__
NotImplem
Chris Smith <[EMAIL PROTECTED]> writes:
>> "J" == J D Leach <[EMAIL PROTECTED]> writes:
> I'm stupider; I can't ATFQ for you.
> But last night I stayed at a Holiday Inn Express, and can recommend
>
> http://projects.edgewall.com/python-sidebar/
>
> Which, assuming you've got connectivity, is
On Sat, 31 Dec 2005 21:21:29 +, Dennis Lee Bieber wrote:
> On Sat, 31 Dec 2005 11:37:38 +1100, Steven D'Aprano
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>>
>> Do you mean something like this?
>>
>> # Module care_and_feeding
>>
>> import birds
>> import foods
>>
> Please send me comments, suggestions and ideas.
Now, after the contest is over I analysed the outcome of it and have
come to the conclusion, that there were two major factors which
contributed to squeezing of code:
(1). usage of available variants for coding of the same thing
(2). sqeez
Hans Nowak wrote:
>... for u in(3,14,10))
>
> can be written as:
>
>... for u in 3,14,10)
>
> which would shave off a character. Tuples don't always need parentheses...
This would work with a list comprehension.
Doesn't work with a generator expression
(thought of it, too, and the l
André wrote:
> Hans Nowak wrote:
>
>>André wrote:
>
>
>>I don't know if this suggestion has been made already, but it seems to
>>me that the end of the expression
>>
>> ... for u in(3,14,10))
>>
>>can be written as:
>>
>> ... for u in 3,14,10)
>>
>>which would shave off a character. Tuple
Hans Nowak wrote:
> André wrote:
>
> I don't know if this suggestion has been made already, but it seems to
> me that the end of the expression
>
>... for u in(3,14,10))
>
> can be written as:
>
>... for u in 3,14,10)
>
> which would shave off a character. Tuples don't always need paren
> "J" == J D Leach <[EMAIL PROTECTED]> writes:
J> OK, I'm stupid. I have been unable to discern (even Googled) a
J> way to set the PYTHONDOCS variable to point to where the HTML
J> files are. What to do? I need to know the process and where
J> theses variables are stored. -- J
> "Diez" == Diez B Roggisch <[EMAIL PROTECTED]> writes:
Diez> Chris Smith schrieb:
>> Hola, pythonisas: The documentation for the logging module is
>> good, but a bit obscure. In particular, there seems to be a
>> lot of action at a distance. The fact that getLogger() can
J. D. Leach wrote:
> OK, I'm stupid. I have been unable to discern (even Googled) a way to set
> the PYTHONDOCS variable to point to where the HTML files are. What to do? I
> need to know the process and where theses variables are stored.
It's an environment variable. In my case:
PYTHONDOCS=/us
Thanks to all of you guys, I could resolve my problem using the
logarithms as proposed by Robert. I needed to calculate the factorial
for genomic data, more specifically for the number of genes in the
human genome i.e. about 30.000 and that is a big number :-)
I didn't know gmpy
Thanks a lot, real
André wrote:
> Christian Tismer wrote:
>>It seems to be very hard to improve. No idea if this is
>>possible: One might try to re-order the character string
>>a bit to change moduli, trying to get one more number in
>>
>>(3,14,10)
>>
>>to be one-digit. Haven't tried, yet, and chances are small.
>>
so you recommend using some sort of for statement with the html parser
where i tell it to only parse stuff found in the tag for instance?
Ravi Teja wrote:
> Regular Expressions are the most common way.
> http://docs.python.org/lib/module-re.html
>
> HTML parser is another
> http://docs.python.org
OK, I'm stupid. I have been unable to discern (even Googled) a way to set
the PYTHONDOCS variable to point to where the HTML files are. What to do? I
need to know the process and where theses variables are stored.
--
J. D. Leach
Columbus, Indiana USA
Linux/Open Source Computer using:
Mandrakelinu
Martin Vilcans wrote:
> Hi, I'm new to this mailing list and fairly new to Python as well. I'm
> working on a prototype for a 3D game using OpenGL, and take this
> opportunity to learn Python better.
>
> I'm looking for a good library for vector math. I need to do vector
> addition, cross prod
Christian Tismer wrote:
> André wrote:
> > For the few that might be interested, I will be posting the details of
> > a 117 character long solution to the challenge on my blog
> > http://aroberge.blogspot.com/.
>
...
> It seems to be very hard to improve. No idea if this is
> possible: One might t
Kirk Strauser wrote:
> I wrote this article which was published in Free Software Magazine:
>
> http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/
>
> It's intended as a high-level overview of the language, and therefore
> glosses over some of the details. For example, I descr
And then more!
I started out using cgtypes from the cgkit. Lots of other graphics
goodies in there also:
http://cgkit.sourceforge.net/doc/cgtypes.html
In the end I ended up rolling my own to better understand the whole
thing.
--
http://mail.python.org/mailman/listinfo/python-list
I wrote this article which was published in Free Software Magazine:
http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/
It's intended as a high-level overview of the language, and therefore
glosses over some of the details. For example, I describe its function
calling mechanis
[EMAIL PROTECTED] writes:
> I have looked at the options for developing the client for these
> "electronic job sheets" and have decided upon Microsoft Pocket PC and
> the .net compact framework. It seems the easiest environment for
> developing and the PDA's can be obtained very cheaply as a packa
Hi all,
I want to create a mobile field worker data solution.
Let me explain...
I work for a company that has some software used by call takers to
enter information into a database about faults with electrical
appliances they manufacture, sell to customers, and then provide
maintenance contracts
chuck wrote:
> Every once in awhile I run across a python module that might have
> statements like:
>
> for c in sys.modules[module].__dict__.values():
Straight-forwardly imported modules wind up in sys.modules,
keyed by their module name. So "t = sys.modules['name']"
is like "import name as t"
Martin Vilcans wrote:
> Hi, I'm new to this mailing list and fairly new to Python as well. I'm
> working on a prototype for a 3D game using OpenGL, and take this
> opportunity to learn Python better.
>
> I'm looking for a good library for vector math. I need to do vector
> addition, cross produ
"MKoool" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi everyone,
>
> I am doing several operations on lists and I am wondering if python has
> anything built in to get every member of several objects that are in an
> array,
<-snip->
>
Here's some sample code to show you how list
Eric S. Johansson wrote:
> are there any simple examples of how to do record locking with bsddb3?
got this far with sample code from the activeware site
filename = 'fruit'
# Get an instance of BerkeleyDB
db_env = db.DBEnv()
db.set_lk_detect(db.DB_LOCK_YOUNGEST)
db_env.open("/tmp/bsddb3",db.DB_IN
Jay,
Couple of points that may help you.
1) A serial port does not have data ports 0-n. A serial port takes a
byte (8 bits), then shifts them down a single pipe using a chip called a
UART (feel free to google for unfamiliar terms).
example
Bit pattern 1010 1010
would be shifted one bit at a
Rodney schrieb:
> I actually tried both SOAPpy and ZSI but both return a error message with
> the incoming SOAP message that basicly said it was not a proper SOAP
> message.
Can you show us an actual working (or _not_ working) example of how and
what you're trying? My mind-reading-skills aren't
Chris Smith schrieb:
> Hola, pythonisas:
> The documentation for the logging module is good, but a bit obscure.
> In particular, there seems to be a lot of action at a distance.
> The fact that getLogger() can actually be a call to Logger.__init__(),
> which is mentioned in para 6.29.1, also bea
I actually tried both SOAPpy and ZSI but both return a error message with
the incoming SOAP message that basicly said it was not a proper SOAP
message.
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Rodney schrieb:
>> Hi again, thanks for the help with figur
MKoool wrote:
> Hi everyone,
>
> I am doing several operations on lists and I am wondering if python has
> anything built in to get every member of several objects that are in an
> array, for example, if i have a class like the following:
>
> class myClass:
>a = 0.0
>
> And lets say I populate
Hola, pythonisas:
The documentation for the logging module is good, but a bit obscure.
In particular, there seems to be a lot of action at a distance.
The fact that getLogger() can actually be a call to Logger.__init__(),
which is mentioned in para 6.29.1, also bears stressing on 6.29. I
grasp
Xah Lee wrote:
> i had the pleasure to read the PHP's manual today.
>
> http://www.php.net/manual/en/
>
> although Pretty Home Page is another criminal hack of the unix lineage,
> but if we are here to judge the quality of its documentation, it is a
> impeccability.
>
> it has or possesses propert
Hi everyone,
I am doing several operations on lists and I am wondering if python has
anything built in to get every member of several objects that are in an
array, for example, if i have a class like the following:
class myClass:
a = 0.0
And lets say I populate the "a" element in an array of
are there any simple examples of how to do record locking with bsddb3?
the bsddb3 documentation is reasonably opaque. For example, the DB
initialization requires a DBEnv instance for certain environmental
features such as locking. but if you want locking, what happens next?
I suspect the patt
martin,
pyformex has a vector module as well.
its not very pythonic, but it could help you out creating a version of
your own.
worth checking out
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>, Ernst Noch <[EMAIL PROTECTED]>
wrote:
> Couldn't you just, for every access to a member of your object, first
> try to treat is as an access to an operation? If this fails (you
> mentioned the db will throw an error if this is an attribute instead of
> an operat
Extension:
---
pyshapelib 0.3 with Python 2.4
Problem:
-
D:\Python24\Lib\site-packages\shapelib\setup>pytest.py
Traceback (most recent call last):
File "D:\Python24\Lib\site-packages\shapelib\setup\pytest.py", line
1, in ?
import shapelib, dbflib, shptree
File "D:\P
I am not a regular user of the libraries that you mention, but I played
around with some of them because I need a replacement for Matlab.
Numeric, NumArray and SciPy should be more or less compatible. All the
functions you mention should be in there, or otherwise should be
trivial to implement. Ha
Roy Smith wrote:
> I think I know the answer to this, but I'll ask it just in case
> there's something I hadn't considered...
>
> I'm working on a python interface to a OODB. Communication with the
> DB is over a TCP connection, using a model vaguely based on CORBA.
> I'll be creating object hand
Every once in awhile I run across a python module that might have
statements like:
for c in sys.modules[module].__dict__.values():
or
import __builtin__
__builtin__.__dict__['_'] = lambda x: x
Snurf also does some strange import trickory (see
http://bdash.net.nz/svn/snurf/trunk/snurf/dataStore/
André wrote:
> For the few that might be interested, I will be posting the details of
> a 117 character long solution to the challenge on my blog
> http://aroberge.blogspot.com/.
Congratulations!
I'm very impressed by this elegant solution.
It seems to be very hard to improve. No idea if this is
p
Hi, I'm new to this mailing list and fairly new to Python as well. I'm
working on a prototype for a 3D game using OpenGL, and take this
opportunity to learn Python better.
I'm looking for a good library for vector math. I need to do vector
addition, cross products, dot products etc. and probabl
[EMAIL PROTECTED] wrote:
>
> I was playing with python encodings and noticed this:
>
> [EMAIL PROTECTED]:~$ python2.4
> Python 2.4 (#2, Dec 3 2004, 17:59:05)
> [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
unicode('\x9d',
On Sat, 31 Dec 2005 09:23:05 +0100, Just wrote:
> There's no need to declare _cache as global, since you're not assigning
> to it. So this global isn't all that pesky after all...
It is still a global variable, with all the potential Badness thereof,
even if you don't have to declare it.
--
On Fri, 30 Dec 2005 21:08:29 -0800, Raymond Hettinger wrote:
> Steven D'Aprano wrote:
>> I was playing around with simple memoization and came up with something
>> like this:
[snip]
> Try something like this:
>
> def func(x, _cache={}):
> if x in cache:
> return cache[x]
> resul
PyObjC ( http://pyobjc.sourceforge.net ) is what you are looking for.
--
http://mail.python.org/mailman/listinfo/python-list
just> I actually prefer such a global variable to the default arg
just> trick. The idiom I generally use is:
just> _cache = {}
just> def func(x):
just> result = _cache.get(x)
just> if result is None:
just> result = x + 1 # or a time consuming calculati
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
| I was playing with python encodings and noticed this:
|
| [EMAIL PROTECTED]:~$ python2.4
| Python 2.4 (#2, Dec 3 2004, 17:59:05)
| [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2
| Type "help", "copyright", "credits" or "license" for more i
Just wrote:
> Duh, sorry, it's early. 118 is better than 119. Printable or not :)
> Still, a 119 bytes version that is fully printable is pretty cool.
No, you're right, I also somehow missed the point. I believed "»" to be
"printable" (opposed to control char's) but technically speaking, the
co
Tom Sheffler schrieb:
>
> This may have been discussed before, so I apologize.
>
> Does Java have generators? I am aware of the "Iterator" interface,
> but it seems much more restrictive. Python generators are useful
> for many more things than simply list enumeration, but the Java
> Iterator s
In article <[EMAIL PROTECTED]>,
Lin-Chieh Shangkuan <[EMAIL PROTECTED]> wrote:
> It's known that combining GTK+ or Qt with Python could enable the
> GUI design with pygtk/pyqt.
>
> In Mac OSX, it's suggested that use Cocoa be the GUI framework.
> Is there py-cocoa framework?
PyObjC.
Just
--
h
So, testosterone wins again!
We get to boast:
"Mine's smaller than your's"
Lets wait for Pythonic to go to bed, then sneak downstairs, go to that
tripple-X rated 'shortest solutions' website, and 'whack-off' some
solutions.
Unghhh, my solution... its coming!!!
Well don't forget to clean up be
It's known that combining GTK+ or Qt with Python could enable the
GUI design with pygtk/pyqt.
In Mac OSX, it's suggested that use Cocoa be the GUI framework.
Is there py-cocoa framework?
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Just <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> > Mark Dickinson wrote:
> > > Here's a variant of André's brilliant idea that's
> > > 119 characters long, and fully printable:
> > >
> > > j='
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> I was playing around with simple memoization and came up with something
> like this:
>
> _cache = {}
> def func(x):
> global _cache
There's no need to declare _cache as global, since you're not assigning
to it. So
In article <[EMAIL PROTECTED]>,
Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Mark Dickinson wrote:
> > Here's a variant of André's brilliant idea that's
> > 119 characters long, and fully printable:
> >
> > j=''.join;seven_seg=lambda z:j(j(' _ | |_ _|_|'
> > [ord('^r|=Zm.:v\r'[int(a)])%u*
60 matches
Mail list logo