Re: Disable automatic interning

2009-03-18 Thread Daniel Fetchinson
7; is 'x' being always True. The relationship between u1 and u2, and u2 and u1 would be represented by additional data so the difference between the first u1 and the second u1 would be clear once this additional data is available, because it would be used in the comparison explicitly.

Re: How complex is complex?

2009-03-18 Thread Daniel Fetchinson
F the appropriate answer will be mailed back to you. Now you should be able to open up your favorite editor and hack away knowing full well that nobody and nothing can stop you, ever! Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: How complex is complex?

2009-03-19 Thread Daniel Fetchinson
se (titled "Help me", with no >> content, or "i need to write a program and don't know where to start >> can someone write it for me?") >> >> I think Daniel's joke was on the rest of us, who each had to chime in >> with our favorite dict pr

Re: Organize large DNA txt files

2009-03-20 Thread Daniel Fetchinson
ng a lightweight database solution? Sqlite is a really simple, zero configuration, server-less db and a python binding for it comes with python itself. I'd give it a try, it will simplify tasks like these a great deal. http://docs.python.org/library/sqlite3.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: what features would you like to see in 2to3?

2009-03-22 Thread Daniel Fetchinson
ion) it didn't know what to do with string exceptions. I'd suggest converting # py 2 raise 'my string' to # py 3 raise Exception( 'my string' ) And notifying the user that this conversion has been done so that he/she can take appropriate action, i.e. this con

Re: what features would you like to see in 2to3?

2009-03-22 Thread Daniel Fetchinson
oved > in Python 2.6 ( > http://docs.python.org/whatsnew/2.6.html#porting-to-python-2-6) and 2to3 was > meant for valid 2.6+ code, so this isn't really a problem. Thanks, I overlooked the fact that 2to3 should only be used on 2.6 code. Cheers, Daniel > In terms of potential enh

safely rename a method with a decorator

2009-03-22 Thread Daniel Fetchinson
#x27; in dir( myclass ) is False assert 'hello' in dir( myclass ) is True Any ideas? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: safely rename a method with a decorator

2009-03-22 Thread Daniel Fetchinson
>> > What is your use case? Why don't you just give the method the right name > in the first place? :-) The use case is that I'm writing a turbogears application in which the URLs are determined by the method names. People might want to change these names if they want to ch

Re: safely rename a method with a decorator

2009-03-22 Thread Daniel Fetchinson
# prints 'ok' >> myclass.method # raise an AttributeError >> myclass.hello # prints >> assert 'method' in dir( myclass ) is False >> assert 'hello' in dir( myclass ) is True >> >> Any ideas? >> >> Cheers, >> Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the difference between generating a value and returning a value?

2009-03-24 Thread Daniel Dalton
n generate a value by operating on something, but I guess this does imply returning a value, because the function returning the value is generating a new value... But, I know for sure that when you return a value it is the information the function returns to the caller after operating on either no, or so

Re: Python 3 consistency proposal

2009-03-24 Thread Daniel Fetchinson
Guido would approve this is less than 10^(-26). Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Puzzling: local variable in recursive function made global?

2009-03-26 Thread Daniel Oberski
re this is documented. The complete program with usage examples as a doctest is listed below. Thank you very much in advance, Daniel - graph.py --- """ # The null graph: >>> Node('null node').is_terminal() 1 >>> # An

Re: Puzzling: local variable in recursive function made global?

2009-03-26 Thread Daniel Oberski
ersistent object upon the first time it is called. > sorry for the shouting, but someone asks this EVERY DAY AND I CAN'T TAKE > ANY MORE. No problem, thanks for answering anyway. all the best, daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzling: local variable in recursive function made global?

2009-03-26 Thread Daniel Oberski
Hi Diez, Great, this totally clears it up. Thank you! - daniel On Thu, 26 Mar 2009 17:50:20 +0100, Diez B. Roggisch wrote: > > That's not a local variable, that is a default argument. Which is in > fact only created once for each function, yes.> > http://effbot.org/p

Re: Puzzling: local variable in recursive function made global?

2009-03-26 Thread Daniel Oberski
s explicitly passed in the initial call... Thanks to everyone for responding, this really helped me understand better! Best regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Any way to use a range as a key in a dictionary?

2009-03-26 Thread Daniel Fetchinson
> I would like to use a dictionary to store byte table information to > decode some binary data. The actual number of entries won't be that > large, at most 10. That leaves the other 65525 entries as 'reserved' > or 'other' but still need to be somehow accounted for when > referenced. > > So there

Re: Python AppStore / Marketplace

2009-03-27 Thread Daniel Fetchinson
setuptools, pip, zc.buildout and a couple other similar packages I don't recall now? Have you considered joining one of these efforts in order to not fragment the "packaging and distribution" arena? Have you evaluated these solutions in detail and have found that they are not appropriate

numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
So far I was working under the assumption that the numpy array implementation can be used as a drop-in replacement for native python lists, i.e. wherever I see a list 'a' and I want to speed up my numerical calculations I just replace it with 'numpy.array( a )' and everything will work just as befo

Re: numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
mpy.array( a ) >> numpyarray.sort( ) >> print numpyarray >> >> ##### > > > What is the output? > In the first case: [[0, 0], [1, 0], [1, 1]] While in the second: [[0, 0], [0, 1], [1, 1]] Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
ault to the value that corresponds to python list behaviour? That would make lot of sense I think. Or retaining compatibility with python lists is not really a goal of numpy.array? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Bullshit Generator

2009-03-29 Thread Daniel Fetchinson
"Bullshit Generator" script in Python (see below). It > generates English sentences at random, talking about leading-edge Web-based > technologies. +1 for inclusion in stdlib :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy array sorting weirdness

2009-03-29 Thread Daniel Fetchinson
; > Not at all. It's an entirely different data structure. > Thanks a lot! Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

2.5/2.4 multiprocessing backport doc typo

2009-03-29 Thread Daniel Fetchinson
Whoever wrote the multiprocessing backport for 2.4/2.5, a big thank you! Just one note: on the page http://pypi.python.org/pypi/multiprocessing/ there is a news item from the future: === Changes === 2.6.1.1 -- 2009-12-07 I guess it should be 2008-12-07 :) Cheers, Daniel

Re: Python AppStore / Marketplace

2009-03-29 Thread Daniel Fetchinson
March/087590.html [2] http://mail.python.org/pipermail/python-dev/2009-March/087834.html [3] http://mail.python.org/pipermail/python-dev/2009-March/087656.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: methods and class methods

2009-03-31 Thread Daniel Fetchinson
its first argument while an ordinary method receives the instance as its first argument. This fact is reflected in the convention that for class methods the first argument typically is called cls while for ordinary methods it's called self. Cheers, Daniel -- Psss, psss, put it down! - http://www

Re: HTML Generation

2009-04-03 Thread Daniel Fetchinson
ope. > > The reason I'm posting is I'm curious what people think, I've been starting > to perfer this style and am curious if a similar solution exists or if this > is a good idea :) > > I'll proberly finish it as a learning experience regardless. > > I appreciate any responses :) You might find the following helpful: http://wiki.python.org/moin/Templating HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Compatible JS Lib for Django

2009-04-04 Thread Daniel Fetchinson
> Does anyone have experience with using JS Libraries with Django? > Do some work better than others and are easier to code with? You might want to ask this on the django list. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/m

decorator module in stdlib?

2009-04-06 Thread Daniel Fetchinson
something similar too. Was the issue whether to include this module in the stdlib raised? If yes, what were the arguments against it? If not, what do you folks think, shouldn't it be included? I certainly think it should be. Cheers, Daniel [1] http://pypi.python.org/pypi/decorator -- Psss, psss

Re: decorator module in stdlib?

2009-04-06 Thread Daniel Fetchinson
a good idea on python-dev, and there is > also a PEP: > > http://www.python.org/dev/peps/pep-0362/ > > However, AFAIK, the PEP is still in draft status. > Perhaps people wanting this should make some noise > on python-dev. I've posted it to python-dev: http://mail.python.org/pipermail

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread Daniel Fetchinson
n't wort (can't figure out what is it) Have you tried http://pyserial.wiki.sourceforge.net/pyParallel ? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommendations on Pythonic tree data structure design techniques

2009-04-09 Thread Daniel Fetchinson
ent, next, previous, and child 'pointers'. > The node objects will be stored in a dictionary where node > 'pointers' correspond to incrementally assigned numeric keys. http://www.google.com/search?q=python+tree+data+structure HTH, Daniel -- Psss, psss, put it down! - ht

Re: Open source web crawler with mysql integration

2009-04-09 Thread Daniel Fetchinson
handle this? Have a look at http://nikitathespider.com/python/ HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] accurate errors for "magic" methods

2009-04-09 Thread Daniel Fetchinson
as __got it, Tom!__ (4a) in case the newbie is called Tom, he will only assume 'it' refers to his mind, i.e. will naturally conclude the error message is the evil way of the python interpreter that it managed to take control of his mind because what else can these undersc

Re: Open source web crawler with mysql integration

2009-04-10 Thread Daniel Fetchinson
"it's useless!" so your reputation will not be damaged. Actually, since you say the code is working and there are not many good open source web crawlers out there, I'm sure people will be quite happy with it. Your worry that 90% of the people will only be frustrated by it will not happen I think if you put it on uselesspython because the expectations will not be high anyway. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

storing variable value

2009-04-11 Thread Daniel Dalton
make the script check if it has already ran before? eg. can I write to a variable on one run of the program, and on the next read that value that was written? Thx! Daniel. signature.asc Description: Digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: storing variable value

2009-04-13 Thread Daniel Dalton
Yes. I used a file, thanks. On Sat, Apr 11, 2009 at 09:30:40AM -0400, Dave Angel wrote: > > > Daniel Dalton wrote: >> Hi! >> >> I'm writing a program to provide me with battery warnings when my >> battery hits certain levels. It just checks the current level

Help with run command + variable.

2009-04-14 Thread Daniel Holm
sixa") prf.show () As you can see I also have a notifications on when the profile has been changed, which also shows the chosen profile. How do I do either of these? /Daniel Holm http://www.danielholm.se -- http://mail.python.org/mailman/listinfo/python-list

Re: History of python syntax development?

2009-04-14 Thread Daniel Fetchinson
the same info for that language, that would be great too! I'm pretty sure you will find this useful: http://python-history.blogspot.com/ written by Guido. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

[OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
of animals in the zoo without join(s)? Cheers, Daniel [/off but interesting topic] -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
support join (if I'm wrong I'd be happy to be corrected). So for example on GAE, how would I represent my data of zoos, cages, animals, legs? Or any other data structure that in a traditional RDBMS uses joins? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
>> Hi folks, I've come across many times the claim that 'joins are bad' >> for large databases because they don't scale > > IMO that's bull... If you think that's bull, why do you think the google app engine or bigtable doesn't support joins?

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
r >> bigtable doesn't support joins? > > "Large database" is not synonymous with "distributed database". Yes, sorry for using the wrong words, my question then is how do I solve a problem similar to my zoo/cage/animal/leg problem with distributed databases? Chee

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
ins. True! I gave a use case that can easily be represented in a relational database, and what I'm wondering now is how I would represent it in a bigtable (not relational database) in such a way that I can easily do the lookups I did when I represented it in a relational database. Cheer

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
>> [off but interesting topic] > > >> What would be the corresponding database layout that would scale and I >> could get the total number of legs in the zoo or total number of >> animals in the zoo without join(s)? >> >> Cheers, >> Daniel >>

Re: [OT] large db question about no joins

2009-04-17 Thread Daniel Fetchinson
iven artist. This would also involve joins. How would I do these queries if I can't have joins or in other words how would I lay out my data storage? Thanks by the way for your help and replies, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] large db question about no joins

2009-04-17 Thread Daniel Fetchinson
;t have joins or in other words >> how would I lay out my data storage? >> >> Thanks by the way for your help and replies, >> Daniel >> > > What actually is happening here is that feature x which is usually in an > abstraction layer (like a RDBM) is not available

Re: Programming in Python with a view to extending in C at a later date.

2009-04-20 Thread Daniel Stutzbach
lways outweighed the cost of later translating some of the code. Hope that helps, -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Packages : A looming problem? packages might no longer work? (well not on your platform or python version anyway)

2009-04-22 Thread Daniel Fetchinson
> The scope of the framework will be: > > * to check that each package can be installed on all the relevant > platforms >using the setup.py script > > * to run the built in tests within the package > > * to check that the package can be de-installed on the relevant platforms > Have a look at http://www.snakebite.org/ Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Packages : A looming problem? packages might no longer work? (well not on your platform or python version anyway)

2009-04-22 Thread Daniel Fetchinson
correspondence with them. I'd think if you write them an email they will be happy to respond. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Packages : A looming problem? packages might no longer work? (well not on your platform or python version anyway)

2009-04-22 Thread Daniel Fetchinson
until a real person runs into them. Or they could clearly state what platform and python versions the code runs on for sure and on what platforms and python versions the code fails. This would be a great advantage to developers. Actually, the OP's suggestion is a really good one, the people behind snakebite.org realized this already some time ago. To me the idea is very clear and obviously would make the life of developers a whole lot easier and consequently the life of users as well. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Packages : A looming problem? packages might no longer work? (well not on your platform or python version anyway)

2009-04-23 Thread Daniel Fetchinson
combination > of platforms and versions. Yes, an automated process for all packages and all platforms and all versions would be foolish. >> Actually, the OP's suggestion is a really good one, the people behind >> snakebite.org realized this already some time ago. To me the idea is >> very clear and obviously would make the life of developers a whole lot >> easier and consequently the life of users as well. > > Snakebite certainly sounds beneficial for development of Python. I'm not > sure that it would scale to every developer with a package on PyPI, but > maybe someday. That is why the proposal is an important one. Let's say snakebite is not suitable for PyPI. What can be done on PyPI that helps developers with multiplatform/multiversion testing? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Packages : A looming problem? packages might no longer work? (well not on your platform or python version anyway)

2009-04-23 Thread Daniel Fetchinson
currently if they decide to support multiple versions and platform they don't have any help from python.org or PyPI. It would be great if after a developer decided to support some platforms and some versions there was some infrastructural help in place. Cheers, Daniel -- Psss, psss, put it d

Re: python list handling and Lisp list handling

2009-04-27 Thread Daniel Stutzbach
e called the "blist" that has the same methods as a Python list, but has better asymptotic performance for many operations. That way I can write use the list in the most natural way without having to worry about accidentally hitting a O(n) method. http://pypi.python.org/pypi/blist/ --

Re: bug with os.rename in 2.4.1?

2009-04-28 Thread Daniel Fetchinson
ppens occasionally. Most of the time it works just fine. Unless you send a minimal version of the code you use and the complete traceback when an error occurs it will be impossible to help you. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.or

Re: Tools for web applications

2009-04-28 Thread Daniel Fetchinson
ython.org/moin/GuiProgramming The same comments as above apply, you need to detail your requirements before an informed advice can be given. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Tools for web applications

2009-04-29 Thread Daniel Fetchinson
cation framework: http://dabodev.com/ Or you >> perhaps mean a GUI framework? Have a look at >> http://wiki.python.org/moin/GuiProgramming The same comments as above >> apply, you need to detail your requirements before an informed advice >> can be given. >> >> Chee

Re: Screenshot of a web page

2009-04-29 Thread Daniel Fetchinson
> Are you aware of any python module that automatically gives you a > screenshot of a web page? http://mail.python.org/pipermail/tutor/2008-December/065847.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/

Re: Tools for web applications

2009-04-29 Thread Daniel Fetchinson
hon but you enjoy using a GUI maybe Wing IDE or Eclipse with the pydev plugin will be to your liking. Cheers, Daniel > "Daniel Fetchinson" wrote in message > news:mailman.4767.1241024136.11746.python-l...@python.org... >>>>> What easyToLearn tools you suggest f

Re: is it possible to traverse two lists simulatenously using python

2009-05-01 Thread Daniel Fetchinson
> Python > for i,j in topgirls, richgirls: > print i,j for i, j in zip( topgirls, richgirls ): print i,j HTH, Daniel > Cheetah > #for $i,$j in $topgirls, $richgirls$i, $j > #end for > This doesnt work -- Psss, psss, put it down! - http://www.cafepress.

Re: [Python-Dev] [RELEASED] Python 3.1 beta 1

2009-05-07 Thread Daniel Fetchinson
een? I know that there are several ordered dictionary implementations for 2.x but they are all a little bit different from the one going into 3.1, hence my question. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python and xml.dom.minidom

2009-05-08 Thread Daniel Fetchinson
ling apache > with the newer version of expat. > > Apache's configure utility (I'm using httpd version 2.2.11) doesn't > explicitly describe an expat library option. > > Also, if libexpat is version 1.95.2, wouldn't I have to get version > 2.0 to be compatible wit

Re: How to get Exif data from a jpeg file

2009-05-16 Thread Daniel Fetchinson
Have you tried http://sourceforge.net/projects/exif-py/ ? HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Performance java vs. python

2009-05-19 Thread Daniel Fetchinson
ticular application simply because there are about a gazillion different ways of using a web framework. So the best you can do is simply test the bottleneck part of your application and see for yourself, otherwise you will be left with comments like "django is used at work because it's

Re: P2P text chat engine

2009-05-20 Thread Daniel Fetchinson
>>> > If you have the source code of a p2p text chat engine please send to me >>> >>> I found that & a pot of gold under my bed. Care to give me your address >>> so that I can send it to you? >>> >>> SCNR, >>> Diez >> >> Hello, can you sent it to me ? >> ave...@gmail.com >> Many thanks!!! > > I nee

PEP 315: Enhanced While Loop

2009-06-04 Thread Daniel Cotton
condition. I also wondered if 'or while' might be better, so that you could add different types of prefix to a while condition, i.e. 'and while'. I'm a python novice so this could well be something you want to ignore but I wasn't doing anything anyway. Let me know what you think. --Daniel. -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing list/tuple elements on separate lines

2009-06-04 Thread Daniel Fetchinson
['asd', 'asd', 'asd', 'asd', 'asd', '']] >> >> desired output: >> >> [['asd', 'asd', 'asd', 'asd', 'asd', ''] >> ['asd', 'asd', 'asd', 'asd', 'asd', ''] >> ['asd', 'asd', 'asd', 'asd', 'asd', '']] By slightly modifying your requirements this might be good too: print '\n'.join( [ 'aa', 'bbb', '', '', '' ] ) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there no single/uniform RDBMS access API module for Python ?

2008-05-12 Thread Daniel Fetchinson
lementations > of that ? For sqlite: http://oss.itsystementwicklung.de/trac/pysqlite/ if you have python < 2.5 for 2.5 and up it is included in the stdlib For mysql: http://sourceforge.net/projects/mysql-python There are a tons more, including postgresql, oracle, etc: http://wiki.python.

Re: Python and Flaming Thunder

2008-05-13 Thread Daniel Fetchinson
you considered other options? Like releasing the source as GPL or something similar and offering technical support for money, training developers or selling of support material like documentation, etc? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http

Re: What is self.file = file for?

2008-05-13 Thread Daniel Fetchinson
on.org/mailman/listinfo/tutor -- where you'll get detailed explanations on basic OOP and python topics. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread Daniel Fetchinson
I (unless you count web apps). Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: How do *you* use Python in non-GUI work?

2008-05-19 Thread Daniel Fetchinson
ng command line utilities and "libraries" as examples of projects that don't need a GUI. Just kidding :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Flaming Thunder

2008-05-21 Thread Daniel Fetchinson
and check for errors: >> >> Read data from "input.txt". >> If data is an error then go to ... > > Arf ! A goto ! You are surely aware of the fact that the C source of python also uses goto at tons of places. Is that Arf! too? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

backport of 'set' to python 2.3?

2008-05-21 Thread Daniel Fetchinson
mance doesn't matter, any implementation that does exactly the same as the builtin 'set' in 2.5 would be great. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: backport of 'set' to python 2.3?

2008-05-21 Thread Daniel Fetchinson
> You then know that 'set' refers to the set type from that point on (or > you're not on a version of Python that has a 'set' type at all). Thanks Ben! I should have checked the docs Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Keep a script running in the background

2008-06-03 Thread Daniel Fetchinson
ate.com/ASPN/Cookbook/Python/Recipe/66012 Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Handling some isolated iso-8859-1 characters

2008-06-03 Thread Daniel Mahoney
I'm working on an app that's processing Usenet messages. I'm making a connection to my NNTP feed and grabbing the headers for the groups I'm interested in, saving the info to disk, and doing some post-processing. I'm finding a few bizarre characters and I'm not sure how to handle them pythonically.

Re: Help need with subprocess communicate

2008-06-03 Thread Daniel Klein
ternatively, you can use std.write() and stdout.read() (without universal_newlines) but this means you need to create your own IPC protocol (like netstrings). Hope this helps, Daniel Klein -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling some isolated iso-8859-1 characters

2008-06-04 Thread Daniel Mahoney
> No, it's not you, those headers are formatted following RFC 2047 > > Python already has support for that format, use the email.header class, > see Excellent, that's exactly what I was looking for.

Re: Handling some isolated iso-8859-1 characters

2008-06-04 Thread Daniel Mahoney
> ... print ord(c), unicodedata.name(c) > ... > 65 LATIN CAPITAL LETTER A > 110 LATIN SMALL LETTER N > 97 LATIN SMALL LETTER A > 239 LATIN SMALL LETTER I WITH DIAERESIS > 115 LATIN SMALL LETTER S Looks like I need to explore the unicodedata class. Thanks! -- http://mail.python.org/mailman/listin

Re: Help need with subprocess communicate

2008-06-05 Thread Daniel Klein
On Tue, 3 Jun 2008 23:48:38 -0700 (PDT), [EMAIL PROTECTED] wrote: >On Jun 3, 11:23 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On Tue, 3 Jun 2008 18:04:40 -0700 (PDT), [EMAIL PROTECTED] declaimed the >> following in comp.lang.python: >> >> >> >

Re: Need help porting Perl function

2008-06-07 Thread Daniel Fetchinson
eturn ret x = range(10,20) print x r = mod( x ) print r print x HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: access variables from one Python session to another on the same machine?

2008-06-09 Thread Daniel Fetchinson
. Depending on what 'limited control' means, the simplest choice would be writing stuff to a plain text file from the master and reading it from the slave. This may or may not work depending on your environment though. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for the web

2008-06-10 Thread Daniel Fetchinson
option. [1] http://www.djangoproject.com/ [2] http://turbogears.org/ [3] http://docs.turbogears.org/1.0 [4] http://turbogears.org/2.0/docs/index.html [5] http://zope.org/ [6] http://code.google.com/p/modwsgi/ [7] http://modpython.org/ Cheers, Daniel -- Psss, psss, put it down! - http://www.cafep

PKG-INFO encoding?

2008-06-11 Thread Daniel Holth
.encode('utf-8') in setup.py) Thanks, Daniel Holth -- http://mail.python.org/mailman/listinfo/python-list

Re: howto split string with both comma and semicolon delimiters

2008-06-12 Thread Daniel Fetchinson
ultisplit( s, seps ): words = [ ] word = '' for char in s: if char in seps: if word: words.append( word ) word = '' else: word += char if word: words.append( word ) return words

Re: Configuration files

2008-06-14 Thread Daniel Fetchinson
> What is the most Pythonic way to maintain a configuration file? > Are there any libraries mimicking registry / ini file writing that many > windows programming languages/environments offer? Check this out: http://www.voidspace.org.uk/python/configobj.html Cheers, Daniel -- Psss, pss

Re: question relateding to parsing dbf files.

2008-06-18 Thread Daniel Mahoney
On Wed, 18 Jun 2008 18:20:20 +0530, Krishnakant Mane wrote: > hello all. > I need to parse some dbf files through python. > the reason being that I have to migrate some old data from dbf files > to postgresql. > all that I need to know is if some one has got a working code sample > using dbfpy. >

Re: Connecting a Desktop App to a Web App

2008-06-21 Thread Daniel Fetchinson
. (2) You need to figure out the API of the web app you want to connect to. Once you have that use the stdlib modules to create the appropriate http requests just as above. HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Connecting a Desktop App to a Web App

2008-06-21 Thread Daniel Fetchinson
ell maintained public API you would look at the html source of the upload page and see what name:value pairs are sent along with the file from the form that does the upload. Then you would create such a POST request from python. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.

Re: Connecting a Desktop App to a Web App

2008-06-23 Thread Daniel Fetchinson
> >> If it's just a random website without a well maintained public API you >> would look at the html source of the upload page and see what >> name:value pairs are sent along with the file from the form that does >> the upload. Then you would create such a POST requ

Re: MD5 hash for url and utf unicode converting to ascii

2008-06-23 Thread Daniel Pitts
cally 128 bits long, not 64, but the calculation for collision is more complicated than that. -- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/> -- http://mail.python.org/mailman/listinfo/python-list

Re: Porn Addiction

2008-06-24 Thread Daniel Pitts
issed days from work because of this addiction. I'm going to the porn as a way to avoid unwanted feelings or procrastination and then it just takes over. What can I do to end this horrible addiction? -Hugh visit notpron <http://www.deathball.net/notpron/> -- Daniel Pitts' Te

automatically import modules upon interpreter invocation

2008-06-25 Thread Daniel Fetchinson
ove whenever it starts up so that I don't have to type it all the time? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: automatically import modules upon interpreter invocation

2008-06-25 Thread Daniel Fetchinson
: complete") >> >> Is there a way of making python execute the above whenever it starts >> up so that I don't have to type it all the time? >> >> Cheers, >> Daniel >> > environment variable PYTHONSTARTUP can be set to a python file that

Re: I Need A Placeholder

2008-06-26 Thread Daniel Mahoney
On Thu, 26 Jun 2008 10:03:47 -0700, Ampedesign wrote: > I'm trying to build a try/except case, and I want to have the except > function like such: > > try: > # Do some code here > var = 1 # For example > except: > #Do nothing here > > The only problem is if I leave a co

warning for unused packages/modules/objects

2008-06-26 Thread Daniel Fetchinson
decides to change things and consequently delete the line with the import, etc, etc. As a result there can stay packages/modules/objects that are in the end not used. It would be great if python would issue a warning once the program finishes. Cheers, Daniel -- Psss, psss, put it down! - http

Re: Times where one would use new style classes vs classic classes

2008-07-02 Thread Daniel Fetchinson
> point me somewhere more appropriate? As a general rule one always uses new style classes. In fact, in python 3.0 old style classes will cease to exist which fact alone justifies their abandonment from 2.x code too. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python with Ecmascript

2008-07-05 Thread Daniel Fetchinson
Is there a way to do similar things on linux? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python with Ecmascript

2008-07-06 Thread Daniel Fetchinson
irefox, from an external software. Wow, mozlab is amazing! Thanks, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining when a file has finished copying

2008-07-09 Thread Daniel Mahoney
> Thanks for your replies, they are helpful. I should have included in > my initial question that I don't have as much control over the program > that writes (pgm-W) as I'd like. Otherwise, the write to a different > filename and then rename solution would work great. There's no way to > tell from

<    8   9   10   11   12   13   14   15   16   17   >