simple send only command line jabber client in python?

2005-10-25 Thread fuzzylollipop
I want to be able to send jabber messages from an subversion
post-commit hook script. All I need is a simple library to connect to a
server and send a message.

I looked at all the half-finished and overly complex projects and can't
find anything that fits the bill. What I did find I can't get to work
correctly, probably because everything is 2 years old and out of date.

Any ideas?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: simple send only command line jabber client in python?

2005-10-26 Thread fuzzylollipop
thanks, I found that but I can't get it to work with the server I am
using. I installed the lastest verison of the Jive Messaging Server and
it just won't authenticate against it. All my desktop clients work with
it, I can't get xmppy to work on OSX or Linux.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help! Host is reluctant to install Python

2005-01-25 Thread fuzzylollipop
find a new host, if they can't handle simple tasks like this or simple
security tasks like limiting permissions, how can you be sure anything
else they do is secure or correct?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Boss wants me to program

2005-06-28 Thread fuzzylollipop
you need to find another place to work

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread fuzzylollipop
lazy newbie programmers, that is what the world needs more of for sure!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Obfuscator for Python Code

2005-08-17 Thread fuzzylollipop
i guess you didn't find anything using Google?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python compiled?

2005-09-05 Thread fuzzylollipop
there are "noob" questions and there are uneducated questions, yours
are of the latter ( actually yours are STATEMENTS not questions ), and
just trolling for what it is worth, if you would take the time to read
what Python is and why it is you would not be asking these "questions".

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: DrPython debugger

2005-09-05 Thread fuzzylollipop
you havent tried Komodo then :-)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: DrPython debugger

2005-09-05 Thread fuzzylollipop
oh I forgot about PyDev also, which is Free!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why doesn't IDLE editor windows have horizontal scrollbars?

2005-09-16 Thread fuzzylollipop
you assume wrong, most people DONT use it that is why it is in the
crappy state it is in
there ARE MUCH BETTER ALTERNATIVES, just pick one

-- 
http://mail.python.org/mailman/listinfo/python-list


having troubleing finding package for Twisted 1.3 for Mac OS X 10.3.x

2005-02-17 Thread fuzzylollipop
just got a Powerbook and need to do twisted development on it, but I
can't find a simple straight foward instructions on installing Twisted
1.3 on it.

Also the package manager at undefined.org has 1.1.0 and it doesn't work
with 10.3.x ( pre-installed Python )

any help is welcome

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: having troubleing finding package for Twisted 1.3 for Mac OS X 10.3.x

2005-02-18 Thread fuzzylollipop
nope I was hoping there was a more "mac" way of doing that :-)

I will research that and see what I can get to work, I am born-again
Mac user ( last machine was a 7200 ) just got a PowerBook so I am in
re-learn mode again ( am familiar with Unix that is why I wanted the
PowerBook as a change of pace )

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: why python is slower than java?

2004-12-06 Thread fuzzylollipop
yeah, but a lie unanswered by the truth becomes the truth.

you state opinon as fact and someone comes along reads your statement
that Python is so much slower and believes it is true because there is
no disententing voice to say, wait just a sec, this guy is clueless and
has no idea what he is talking about and here is why.

learn how to ask questions instead of stateing opinions as fact and you
might get a better response.

if you had said, is Python really as slow vs Java as these 3 year old
benchmarks seem to suggest, and then post what your own findings were
and that might prove DISCUSSION instead of posting in a Trolling sort
of way.

No matter how many times you say you are not trolling and continue to
post trolling style posts will make it true.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: opinions comments needed for improving a simple template engine.

2004-12-08 Thread fuzzylollipop
the ONLY way to tell what is slow is to actually profile each of the
operations, that said, start with examining object creation / memory
allocation. string concationation usually does both . . .

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how do I "peek" into the next line?

2004-12-13 Thread fuzzylollipop
reads are not destructive there is nothing to "put back" becuase it is
never removed to begin with.
just change your logic and thing of about what you really need to do

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python IDE

2004-12-15 Thread fuzzylollipop
TruStudio for Eclipse is nice for those everything must be free
socialists.
ActiveState Komodo is probably the best commerical Python IDE
and the ActiveState Python plugin for Visual Studio is great for those
that do VS.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Request for Help in OpenSourcing a Project

2004-12-17 Thread fuzzylollipop
www.sourceforge.net

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how do I "peek" into the next line?

2004-12-14 Thread fuzzylollipop
read the orginal poster's SPECIFIC question he make only reference to a
FILE or STDIN which can't be destructively read, either way he don't
not requre the look-ahead to do what he wants. So my advice is still
valid. Think about it in a different way.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python IDE

2004-12-16 Thread fuzzylollipop
no it was a sideways remark at all the software socialists that thing
EVERYTHING should be free, never said anything about Eclipse, just the
people that insist ALL software should be free.

-- 
http://mail.python.org/mailman/listinfo/python-list


How to fix this error in the example in 6.1.4 Files and Directories

2005-04-15 Thread fuzzylollipop
the following code is from the Python 2.3.5 docs (
http://www.python.org/doc/2.3.5/lib/os-file-dir.html )

import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print root, "consumes",
print sum([getsize(join(root, name)) for name in files]),
print "bytes in", len(files), "non-directory files"
if 'CVS' in dirs:
dirs.remove('CVS')  # don't visit CVS directories

every time I try and run it I get the following error

print sum([getsize(join(root,name)) from name in files]),
   ^

the only change I made was the path supplied to os.walk()
I think this has to do something with the list comprehension syntax
and I am trying to learn that part, using this example which seems to
be broken.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to fix this error in the example in 6.1.4 Files and Directories

2005-04-15 Thread fuzzylollipop
I am running 2.3.5

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to fix this error in the example in 6.1.4 Files and Directories

2005-04-15 Thread fuzzylollipop
can't see the forest for the trees, that seems to be the problem,
thanks for pointing out the obvious ( that I couldn't see ) :-(

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Determine ip address

2005-04-15 Thread fuzzylollipop
import socket
print socket.gethostbyname( socket.gethostname() )

-- 
http://mail.python.org/mailman/listinfo/python-list


Faster os.walk()

2005-04-20 Thread fuzzylollipop
I am trying to get the number of bytes used by files in a directory.
I am using a large directory ( lots of stuff checked out of multiple
large cvs repositories ) and there is lots of wasted time doing
multiple os.stat() on dirs and files from different methods.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Faster os.walk()

2005-04-20 Thread fuzzylollipop
du is faster than my code that does the same thing in python, it is
highly optomized at the os level.

that said, I profiled spawning an external process to call du and over
the large number of times I need to do this it is actually slower to
execute du externally than my os.walk() implementation.

du does not return the value I need anyway, I need files only not raw
blocks consumed which is what du returns. also I need to filter out
some files and dirs.

after extensive profiling I found out that the way that os.walk() is
implemented it calls os.stat() on the dirs and files multiple times and
that is where all the time is going.

I guess I need something like os.statcache() but that is deprecated,
and probably wouldn't fix my problem. I only walk the dir once and then
cache all bytes, it is the multiple calls to os.stat() that is kicked
off by the os.walk() command internally on all the isdir() and
getsize() and what not.

just wanted to check and see if anyone had already solved this problem.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Faster os.walk()

2005-04-20 Thread fuzzylollipop
ding, ding, ding, we have a winner.

One of the guys on the team did just this, he re-implemented the
os.walk() logic and embedded the logic to the S_IFDIR, S_IFMT and
S_IFREG directly into the transversal code.

This is all going to run on unix or linux machines in production so
this is not a big deal.
All in all we went from 64+k function calls for 7070 files/dirs to 1
PER dir/file.

the new code is just a little bit more than twice as fast.

Huge improvement!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python as a Server vs Running Under Apache

2005-12-30 Thread fuzzylollipop
as great as mod_python is, there are lots of restrictions and
limitations to what youc an do with it because of limitations of apache
itself, and I am refereing to apache 2.x as well as 1.x, like others
are saying if you don't need apache specific things it will just be one
more thing to work around the design constraints it causes, twisted
will be you best bet

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python as a Server vs Running Under Apache

2006-01-04 Thread fuzzylollipop
there are lots of things you can't do or can't do easily or can't do at
efficiently in Apache using python as cgi or as anyone would more
likely assume mod_python. anything that requires any shared state or
shared resources in Apache is next to impossible. Doing similar things
in an app server or network application framework like twisted is
trivial.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Accessors in Python (getters and setters)

2006-07-20 Thread fuzzylollipop

Ed Jensen wrote:
> Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> > Ah, you mean like in JAVA
>
> Java is not an acronym.  That is: it's "Java", not "JAVA".
>
> > where the compiler prevents you from accessing
> > private variables, but the runtime allows access to these very variables
> > via reflection?
>
> Java does not allow access to private members via reflection.

Actually it does.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: function v. method

2006-07-20 Thread fuzzylollipop

danielx wrote:
> Bruno Desthuilliers wrote:
> > danielx wrote:
> > > At first I was going to post the following:
> > >
> > > 
> > >
> > (snip)
> > >
> > > 
> > >
> > > but then I tried this:
> > >
> > >
> > res = Foo.__dict__['func']
> > res is dan
> > >
> > > True
> > >
> > > And it all started to make sense. The surprising thing turned out to be
> > > not so surprising: When the expression Foo.func gets evaluated, we get
> > > a method which is just a wrapper around dan. Therefore, f is not dan!
> > > This is still a little bit of magic,
> >
> > FWIW, the function class implements the descriptor protocol... Here's
> > the "magic".
> >
> > > which gets me thinking again about
> > > the stuff I self-censored. Since the dot syntax does something special
> > > and unexpected in my case,
> >
> > "unexpected" ? Did you ever wondered how the instance or class was
> > passed as first arg when doing method calls ?
>
> Not knowing what's going on during method calls is exactly what
> motivated me to post.
>
> >
> > > why not use some more dot-magic to implement
> > > privates?
> >
> > What for ? What makes you think we need language-inforced access
> > restriction ?
>
> I knew someone would bring this up. The motivation would not be to
> provide restriction, but to help maintain clean api's. If you intended
> for users to use only a subset of the methods in your class, why not
> help them learn your api by presenting the stuff they can use not along
> side the stuff they should not?
>
> Obviously, such things would be omitted from your docs, but users also
> learn by interacting with Python, which is really one of Python's great
> virtues. When supporting documents aren't sufficient to learn an api
> (I'm sure this never happens, so just humor me), you can always turn to
> interactive Python. This is exactly what it's there for. If nothing is
> hidden, a user could be easily mislead to believe he can use a method
> when he really shouldn't.
>


if you prefix with a single underscore, that tells the user, DON'T MESS
WITH ME FROM OUTSIDE! I AM AN IMPLEMENTATION DETAIL!

and it gets ommited from all the doc generation

if you prefix with a double underscore, then they have to go even
FARTHER out of their way to shoot themselves in the foot.

Python takes the stance of "personal responsiblity" when it comes to
access control. Which in NO WAY dimishes its "robustness" or anything
else.

just read the DailyWTF.com, incompentent people will abuse any language
features in any language, and will figure out how to break programatic
access control no matter how it is implemented. Matter of fact, Java
which in another thread someone was ADAMANT that did not expose private
anything from reflection ( and was wrong ) specifically allows you to
access all the private members, functions, everything. You just need to
tell it to turn all the "safeties" off.

>From the api:

public void setAccessible(boolean flag)
throws SecurityException

Set the accessible flag for this object to the indicated boolean value.
A value of true indicates that the reflected object should suppress
Java language access checking when it is used. A value of false
indicates that the reflected object should enforce Java language access
checks.

Setting the accessible flag in a reflected object permits sophisticated
applications with sufficient privilege, such as Java Object
Serialization or other persistence mechanisms, to manipulate objects in
a manner that would normally be prohibited.

so anything added to Python to enforce "access control" would
immediately be forced to provide some means to over-ride the checks for
pickle and the like. Not to even mention the argument that it would
break crap loads of existing code base.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: function v. method

2006-07-21 Thread fuzzylollipop

Antoon Pardon wrote:

> Suppose I am writing my own module, I use an underscore, to
> mark variables which are an implementation detail for my
> module.
>
> Now I need to import an other module in my module and need access
> to an implementation variable from that module. So now I have
> variables with an underscore which have two different meanings:

you don't understand what "implementation detail" means, it means it is
NOT part of the public API and no client code should ever use it.

If you reference _vara in your code and it is in someone elses module
you don't understand YOU ARE NOT SUPPOSED TO DO THAT!

>   1) This is an implemantation detail of this module, It is the
>  users of my module who have to be extra carefull using it.

Users of your module should NEVER KNOW any of the _ or __ stuff exists
to begin with.

>   2) This is an implemantation detail of the other module,
>  I should be extra carefull using it.

You should NEVER use it.

> And I find variable starting or ending with an underscore ugly. :-)
>
> --
> Antoon Pardon

But like my previous post states, you can mark stuff private in Java
all you want, you can still access. Having the compiler or runtime
enforce that just adds an extra step to turn that enforcement off.

You can do the same thing, in C++.

So WHY does a language need this enforcement.

And the "large code base" needs the "robustness" is not a valid
argument.

Since Apple has proven this NOT to be the case with Cocoa which is in
Objective-C and "knows about access control but doesn't really use
them"

Anyone that things a language HAS to have these constructs enforced by
the compiler or runtime, lacks disipline.

Python has exactly what every other language EFFECTIVELY has, a common
way to document  or "tag" what is _private but might need "Friend"
access, and what is REALLY __private.

If you don't like this, then that is your problem go use a language
that gives you that false sense of secuirty, don't expect it to change.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: An optparse question

2006-07-21 Thread fuzzylollipop

T wrote:
> I have a short program using optparse.OptionParser that prints out help
> message with -h flag:
>
> % myprog.py -h
> usage: myprog.py [options] input_file
>
> options:
>   -h, --help show this help message and exit
>   -v, --verboseprint program's version number and exit
>   -o FILE   Output file
>
>
> My question is, is there a way to print a blank line (or any string)
> before "usage: myprog.py [options] input_file" ?  I tried using
> callbacks without success.  I think somehow I need to modify the
> behavior of optparse.OptionParser.print_usage() function?

you can make the usage line anything you want.

...
usage = 'This is a line before the usage line\nusage %prog [options]
input_file'
parser = OptionsParser(usage=usage)
parser.print_help()
...

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: function v. method

2006-07-24 Thread fuzzylollipop

Gerhard Fiedler wrote:
> On 2006-07-22 16:32:38, danielx wrote:
>
>  ...and source code...
> >>>
> >>> *shudders* What happened to all the goodness of abstraction?
> >>
> >> Abstraction as you seem to use it requires complete docs of the interface.
> >> Which is what you said you don't have... So the original abstractor broke
> >> the abstraction when publishing insufficient docs, not the one who looks
> >> into the sources to find out what actually happens.
> >
> > Absolutely. I didn't mean the user was breaking abstraction (let's not
> > blame the victim). I was saying that we should really have more
> > sympathy for him.
>
> I have all the sympathy in the world for him... after all, he's me :)
>
> But one reason why I try to write (and insist on as much as possible from
> people writing for or with me) self-documenting code is that wherever you
> have documentation and code separated (which is the case of API docs), you
> can bet (without losing) that sooner or later code and doc will diverge.
> This has a probability that approaches 1 :)
>
> So, I agree with you that good API docs are a good thing, as they tell me
> everything I need to know without having to wade through tons of
> implementation details that may be interesting but don't serve my immediate
> need (of having to use the API). But reality seems to be (and mine so far
> definitely is) that these docs, even the good ones, are not completely in
> alignment with the reality of the code. (We all know that code has bugs...
> and the API always describes, at best, how the code /should/ work. It never
> describes how it actually works, including the bugs  (this
> notwithstanding the bugs that have been elevated to features and henceforth
> been described in the API docs).
>
> So... the final authority /is/ the code. I don't see an alternative. For
> me, good abstraction doesn't mean I don't have to read the sources; good
> abstraction means (among other things) that I can read the sources easily.
>
> Gerhard

having auto generated docs, which means the documentatin is in the code
as doc strings, javadoc, reflex, or whatever format is the BEST way of
doing API documentation, period.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: function v. method

2006-07-24 Thread fuzzylollipop

Antoon Pardon wrote:
> On 2006-07-21, fuzzylollipop <[EMAIL PROTECTED]> wrote:
> >
> > Antoon Pardon wrote:
> >
> >> Suppose I am writing my own module, I use an underscore, to
> >> mark variables which are an implementation detail for my
> >> module.
> >>
> >> Now I need to import an other module in my module and need access
> >> to an implementation variable from that module. So now I have
> >> variables with an underscore which have two different meanings:
> >
> > you don't understand what "implementation detail" means, it means it is
> > NOT part of the public API and no client code should ever use it.
> >
> > If you reference _vara in your code and it is in someone elses module
> > you don't understand YOU ARE NOT SUPPOSED TO DO THAT!
>
> Why do you assume that in my example the other module is
> not understood?
>
> >>   1) This is an implemantation detail of this module, It is the
> >>  users of my module who have to be extra carefull using it.
> >
> > Users of your module should NEVER KNOW any of the _ or __ stuff exists
> > to begin with.
> >
> >>   2) This is an implemantation detail of the other module,
> >>  I should be extra carefull using it.
> >
> > You should NEVER use it.
>
> Well that may be your view, but AFAICS it is not the view of
> the python community. Because each time some mechanism is
> proposed for real private variable, people oppose it, they
> want people to have access to what are supposed to be
> private variables.
>
> --
> Antoon Pardon

actually you are really way off base, the _ and __ convention IS the
INTENDED way of doing private and "really private" documentation of
members in Python.

I didn't make this up, it is in the official Python documentation.

You need to read my previous response for COMPREHENSION one more time.
There is LESS THAN ZERO value in having a runtime enforcement of member
access control.

Python does have ALREADY have an OFFICAL mechanism for private members,
prefix your names with _ or __. Both are ommited from autogenerated
docuementation and both are OFFICALLY not supposed to be used.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Announcing Switch, the CSS Preprocessor!

2006-08-09 Thread fuzzylollipop

Dave wrote:
> Powered by Mod_Python, Switch CSS is a full featured, production ready

>
> The sourceforge project link follows. We could really use some tire
> kickers... This group was invaluable in the early development process,
> so we're announcing it officially here, and on mod_python first.
>
> https://sourceforge.net/projects/switchcss/
>
> Thanks,
> Dave Worley

Is there any documentation or anything available? The sourceforge home
page is empty?

-- 
http://mail.python.org/mailman/listinfo/python-list


Anyone have a link handy to an RFC 821 compliant email address regex for Python?

2006-08-16 Thread fuzzylollipop
I want to do email address format validations, without turning to ANTLR
or pyparsing, anyone know of a regex that is COMPLIANT with RFC 821.
Most of the ones I have found from google searches are not really as
robust as I need them to be.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python to use a non open source bug tracker?

2006-10-04 Thread fuzzylollipop

Giovanni Bajo wrote:
> Hello,
>
> I just read this mail by Brett Cannon:
> http://mail.python.org/pipermail/python-dev/2006-October/069139.html
> where the "PSF infrastracture committee", after weeks of evaluation, 
> recommends
> using a non open source tracker (called JIRA - never heard before of course)
> for Python itself.
>
> Does this smell "Bitkeeper fiasco" to anyone else than me?
> --
> Giovanni Bajo

No just ignorance you your part!

Jira is given away for free to open source projects that want to use
it. And it just happens to be one of the best issue trackers on the
market, free or paid or opens source or not.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 10GB XML Blows out Memory, Suggestions?

2006-06-06 Thread fuzzylollipop

K.S.Sreeram wrote:
> Diez B. Roggisch wrote:
> > What the OP needs is a different approach to XML-documents that won't
> > parse the whole file into one giant tree - but I'm pretty sure that
> > (c)ElementTree will do the job as well as expat. And I don't recall the
> > OP musing about performances woes, btw.
>
>
> There's just NO WAY that the 10gb xml file can be loaded into memory as
> a tree on any normal machine, irrespective of whether we use C or
> Python. So the *only* way is to perform some kind of 'stream' processing
> on the file. Perhaps using a SAX like API. So (c)ElementTree is ruled
> out for this.
>
> Diez B. Roggisch wrote:
> > No what exactly makes C grok a 10Gb file where python will fail to do so?
>
> In most typical cases where there's any kind of significant python code,
> its possible to achieve a *minimum* of a 10x speedup by using C. In most
> cases, the speedup is not worth it and we just trade it for the
> increased flexiblity/power of the python language. But in this situation
> using a bit of tight C code could make the difference between the
> process taking just 15mins or taking a few hours!
>
> Ofcourse I'm not asking him to write the entire application in C. It
> makes sense to just write the performance critical sections in C, and
> wrap it in Python, and write the rest of the application in Python.


you got no idea what you are talking about, anyone knows that something
like this is IO bound.
CPU is the least of his worries. And for IO bound applications Python
is just as fast as any other language.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 10GB XML Blows out Memory, Suggestions?

2006-06-06 Thread fuzzylollipop

[EMAIL PROTECTED] wrote:
> Paul,
>
> This is interesting. Unfortunately, I have no control over the XML
> output. The file is from Goldmine. However, you have given me an
> idea...
>
> Is it possible to read an XML document in compressed format?

compressing the footprint on disk won't matter, you  still have 10GB of
data that you need to process and it can only be processed
uncompressed.

I would just export the data in smaller batches, there should not be
any reason you can't export subsets and process them that way.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 10GB XML Blows out Memory, Suggestions?

2006-06-07 Thread fuzzylollipop

Fredrik Lundh wrote:
> fuzzylollipop wrote:
>
> > you got no idea what you are talking about, anyone knows that something
> > like this is IO bound.
>
> which of course explains why some XML parsers for Python are a 100 times
> faster than other XML parsers for Python...
>

dependes on the CODE and the SIZE of the file, in this case

processing 10GB of file, unless that file is heavly encrypted or
compressed will, the process will be IO bound PERIOD!

And in the case of XML unless the PARSER is extremely inefficient, and
I assume, that would be an edge case, the parser is NOT the bottle neck
in this case.

The relativel performance of Python XML parsers is irrelvant in
relationship to this being an IO bound process, even the slowest parser
could only process the data as fast as it can be read off the disk.

Anyone saying that using C instead of Python will be faster when 99% of
the time in this case is just waiting on the disk to feed a buffer, has
no idea what they are talking about.

I work with TeraBytes of files, and all our Python code is just as fast
as equivelent C code for IO bound processes.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 10GB XML Blows out Memory, Suggestions?

2006-06-08 Thread fuzzylollipop

[EMAIL PROTECTED] wrote:
> Thanks guys for all your posts...
>
> So I am a bit confusedFuzzy, the code I saw looks like it
> decompresses as a stream (i.e. per byte). Is this the case or are you
> just compressing for file storage but the actual data set has to be
> exploded in memory?
>

it wasn't my code.

if you zip the 10GB and read from the zip into a DOM style tree, you
haven't gained anything, except adding additional CPU requirements to
do the decompression. You still have to load the entire thing into
memory.

There are differences in XML Parsers, IN EVERY LANGUAGE a poorly
written parser is a poorly written parser. Using the wrong IDIOM is
more of a problem than anything else. DOM parsers are good when you
need to read and process every element and attribute and the data is
"small". Granted, "small" is relative, but no body will consider 10GB
"small".

SAX style or a pull-parser has to be used when the data is "large" or
when you don't really need to process every element and attribute.

This problem looks like it is just a data export / import problem. In
that case you will either have to use a sax style parser and parse the
10GB file. Or as I suggested in another reply, export the data in
smaller chunks and process them separately, which in almost EVERY case
is a better solution to do batch processing.

You should always break processing up into as many discreet steps as
possible. Make for easier debugging and you can start over in the
middle much easier.

Even if you just write a simple SAX style parser to just break the file
up into smaller pieces to actually process it you will be ahead of the
game.

We have systems that process streaming data coming from sockets in XML
format, that run in Java with very little memory footprint and very
little CPU usage. At 50 megabit a sec, that is about 4TB a day. C
wouldn't read from a socket any faster than the NBIO, actually it would
be harder to get the same performance in C because we would have to
duplicate all the SEDA style NBIO.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 10GB XML Blows out Memory, Suggestions?

2006-06-08 Thread fuzzylollipop

Fredrik Lundh wrote:
> fuzzylollipop wrote:
>
> > SAX style or a pull-parser has to be used when the data is "large" or
> > when you don't really need to process every element and attribute.
> >
> > This problem looks like it is just a data export / import problem. In
> > that case you will either have to use a sax style parser and parse the
> > 10GB file. Or as I suggested in another reply, export the data in
> > smaller chunks
>
> or use a parser that can do the chunking for you, on the way in...
>
> in Python, incremental parsers like cET's iterparse and the one in Amara
> gives you *better* performance than SAX (including "raw" pyexpat) in
> many cases, and offers a much simpler programming model.
>
> 

thats good to know, I haven't worked with cET yet. Haven't had time to
get it installed :-(

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pros/Cons of Turbogears/Rails?

2006-08-27 Thread fuzzylollipop

[EMAIL PROTECTED] wrote:

Looks like you mixing comparisons.

> Ruby:
> + More mature system. More stable? More features?

uh, no, Python predates Ruby by a good bit
Rails might be "older" than Turbogears but it still JUST went 1.0
officially.
It can't be called "mature' by any defintition.

> + Much better documented. This is a biggie.

Rails has no documentation, period. The authors acknowledge this
openly.

> + Built-in Rubydoc system would make documenting the
> system easier. (IMHO, developers almost always
> underestimate the need for good documentation that
> is written along withe the system.) Is there a
> Python doc system that has received Guido's blessing
> yet? D'oxygen would seem an obvious choice.

Pydoc IS standard. This has been around for a long time.

> + Better coordination with Javascript helper code?

Again, is this a Python vs Ruby or Turbogears vs Rails post, you seem
highly confused on the distinctions between language vs framework.

> I was initially leaning towards Rails due to maturity,
> but the most recent version of TurboGears seem to have
> fixed a lot of the "ad hoc" feeling I got from previous
> versions. But I'm still very much up in the air.
>

again, Ruby can't be considered 'mature' by any definition.

> Thanks,
> Ken
>
> P.S. If I wanted to provide an image by streaming the
> file data directly over the connection, rather than by
> referring to an image file, how would I do that? I'd
> like to build code that would allow images to be assembled
> into a single-file photo album (zip or bsddb file), and
> so can't refer to them as individual image files.

??

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop

Paul Boddie wrote:
> > fuzzylollipop wrote:
> > > uh, no, Python predates Ruby by a good bit
> > > Rails might be "older" than Turbogears but it still JUST went 1.0
> > > officially.
> > > It can't be called "mature' by any defintition.
>
> Version numbers are a fairly useless general metric of project
> maturity, taken in isolation.
>

But 1.0 releases do mean something, it means the DEVELOPER of the
package things it is just now ready for general consumption. That means
something regardless of what the number is.
Matter of fact, all major version releaese mean that, it is generally
understood thing. x.0 means this is now ready for non-beta general use.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop

Ray wrote:
> fuzzylollipop wrote:
> > uh, no, Python predates Ruby by a good bit
> > Rails might be "older" than Turbogears but it still JUST went 1.0
> > officially.
> > It can't be called "mature' by any defintition.
>
> But at least in most developers' perception ... 

nobody is talking about perception

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop

Paul Boddie wrote:
> fuzzylollipop wrote:
> > Paul Boddie wrote:
> > > > fuzzylollipop wrote:
> > > > > uh, no, Python predates Ruby by a good bit
> > > > > Rails might be "older" than Turbogears but it still JUST went 1.0
> > > > > officially.
> > > > > It can't be called "mature' by any defintition.
> > >
> > > Version numbers are a fairly useless general metric of project
> > > maturity, taken in isolation.
> >
> > But 1.0 releases do mean something, it means the DEVELOPER of the
> > package things it is just now ready for general consumption. That means
> > something regardless of what the number is.
>
> In various open source circles, the mere usage of 1.0 may indicate some
> kind of stability, but not necessarily maturity, or at least the desire
> of the developers to persuade users that the code is ready for them to
> use.

nope in GENERAL usage, 1.x means that the developer is designating a
version that is feature complete and stable. I never ever mentioned
comparing version numbers between differing packages.

MY POINT was the developers of Rails JUST RECENTLY decided that it was
ready for general consumption compared to all the PREVIOUS Rails
releases.

And NONE of these frameworks has been used to power anything along the
scale of what I work with on a daily basis.

And speaking from experience, autogenerated "Active Object Pattern"
frameworks dont' scale. And Rails is no exception. It didn't work 10
years ago when all the ORM vendors were selling ridiculously price
"point and click" database application builders, what makes people
think it will now?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop

Sam Smoot wrote:
big rant snipped since Google Groups has what I responding to:

> So if you decide to reply, might I suggest spending a few minutes with
> Google to get your facts straight next time? Oh, and keeping an eye on
> the actual topic might be a good idea too.

I got my facts straight, Ruby is not tested in production environments.
And I am speaking from a BIG internet site scale. Apache is mature,
there is a definition of mature tested in the wild in production, and
you qualified your opinion by excluding edge cases, the internet is
NOTHING BUT EDGE CASES. Just look at the SMTP and HTTP RFC's they are
nothing but edge cases.

And read the entire thread, I am the one that specifically stated that
the original poster was confused on what he was asking about. Let me
make it really clear. Neither Ruby NOR Rails is "mature" by ANY
REASONABLE definition.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IDE

2006-09-06 Thread fuzzylollipop

Aravind wrote:
> hi,
>
> i am a newbie to python but used with some developement in c++ and VB. Can
> anyone suggest me a good IDE for python for developing apps...? i've seen Qt
> designer.. some of my friends said it can be used for python also but they r
> not sure.
>
> pls help...
>
> thanks in advance


Active State Komodo
Runs on Windows, Linux and Mac OS X
there is even a cheap $29 personal version available.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is there a maximum length of a regular expression in python?

2006-01-24 Thread fuzzylollipop
this should really be posted to http://www.thedailywtf.com/, I wonder
if they have a german version of TheDailyWTF.com?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Dealing with marketing types...

2005-06-10 Thread fuzzylollipop
get your resume in order and start looking . . .

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Dealing with marketing types...

2005-06-10 Thread fuzzylollipop
i think he was actually referering the the architecture astronauts that
Joel Spolskyl was talking about

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Dealing with marketing types...

2005-06-10 Thread fuzzylollipop
I was completely serious, he is _NOT_ going to win this one. He has
already lost. I have been on both sides of this scenario, the "new
guys" were brought in and will win since they are the new "experts from
out of town". There may be some other _VALID_ business reason that
management has already made up their mind to hire these Java people.
Probably because they want to sell the company or merge with someone or
something and having a Java product would make them more attractive.

There are 2 things he can do.

1. Get your resume ready and approach the CEO or whomever and say. Why
is this happening? Since I can guarantee you they have already decided
to port this app to Java.

2. Be quiet, keep his head down, learn Java fatt, start agreeing
with the new party line and get on the bandwagon if he really wants to
stay at this company ( I wouldn't )

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Dealing with marketing types...

2005-06-13 Thread fuzzylollipop
I agree about the stiffing the guys that brought you to the party, that
was 100% the DotCom plan, offer crap salary and tonnes of "options"
then fire/replace all the people that worked for _FREE_ practically
when the next round of funding comes in, rinse, repeat.

Either way . . . I think the guy needs to move on. I know I would.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Dealing with marketing types...

2005-06-13 Thread fuzzylollipop
man this is the worst advice I have ever heard, you can't "walk away
with code" someone else paid you to write. Regardless of what your
perceived slight is.

NEVER take code you were paid to write unless you have it in writing
that you can, you will lose that one everytime.

-- 
http://mail.python.org/mailman/listinfo/python-list


What is wrong with the Python home page?

2006-05-02 Thread fuzzylollipop
I am using FireFox 1.5.2 on OS X 10.4.6 and the www.python.org ends up
being only text with just the nasa picture with the guy in the space
suit.

It looks like the CSS is hosed or something.

And trying to go to the module docs for the current release is broken
as well

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: which is better, string concatentation or substitution?

2006-05-07 Thread fuzzylollipop
niether .join() is the fastest

-- 
http://mail.python.org/mailman/listinfo/python-list


How to log only one level to a FileHandler using python logging module.

2006-05-16 Thread fuzzylollipop
I want a FileHandler to only log a single level say for example
logging.INFO, and nothing else.
do I need to create a custom Handler for this or is this doable with
some magic that is not documeneted somewhere?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Simple DAV server?

2006-05-20 Thread fuzzylollipop
webfolders is broken, I have worked on webdav support at the isp level
( for millions of customers to use ) webfolders is NOT something you
should base compliancey on. It is broken so badly that we decided to
just not even test against it. We provide our customers with our own
application with which to map drive letters to mount webdav our webdav
store so we don't have to even worry about Web Folders not working.

-- 
http://mail.python.org/mailman/listinfo/python-list