Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Daniel Fetchinson
> I'm new to python, got 10-20 years perl and C experience, all gained on unix > alike machines hacking happily in vi, and later on in vim. > > Now it's python, and currently mainly on my kubuntu desktop. Welcome to the club! > Do I really need a real IDE, as the windows guys around me say I do,

Re: pygnomevfs get_local_path_from_uri replacement

2012-12-22 Thread Daniel Fetchinson
>> Hi folks, I realize this is slightly off topic and maybe belongs to a >> gnome email list but it's nevertheless python: >> >> I use an old python program that was written for gnome 2 and gtk 2 and >> uses the function get_local_path_from_uri. More specifically it uses >> gnomevfs.get_local_path_

pygnomevfs get_local_path_from_uri replacement

2012-12-22 Thread Daniel Fetchinson
Hi folks, I realize this is slightly off topic and maybe belongs to a gnome email list but it's nevertheless python: I use an old python program that was written for gnome 2 and gtk 2 and uses the function get_local_path_from_uri. More specifically it uses gnomevfs.get_local_path_from_uri. Now wi

Re: unpacking first few items of iterable

2012-12-13 Thread Daniel Fetchinson
Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable number

Re: unpacking first few items of iterable

2012-12-13 Thread Daniel Fetchinson
>>Hi folks, I swear I used to know this but can't find it anywhere: >> >>What's the standard idiom for unpacking the first few items of an >>iterable whose total length is unknown? >> >>Something like >> >>a, b, c, _ = myiterable >> >>where _ could eat up a variable number of items, in case I'm onl

unpacking first few items of iterable

2012-12-13 Thread Daniel Fetchinson
Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable number of items, in case I'm only interested in the

assign only first few items of a tuple/list

2012-12-04 Thread Daniel Fetchinson
Hi folks, I swear I used to know this but can't find it anywhere. Say I have a list x = [ 1,2,3,4,5 ] and only care about the first two items. I'd like to assign the first two items to two variables, something like, a, b, _ = x but the above will not work, of course, but what is the common idiom

Re: can we append a list with another list in Python ?

2012-10-23 Thread Daniel Fetchinson
> can we append a list with another list in Python ? using the normal routine > syntax but with a for loop ?? x = [1,2,3] y = [10,20,30] x.extend( y ) print x this will give you [1,2,3,10,20,30] which I guess is what you want. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress

Re: system tray or notification area in python

2012-10-17 Thread Daniel Fetchinson
>> So I thought I would write a brand new stand alone system tray or >> notification area in python. I guess I need to use gtk bindings or >> some such but don't really know what my options are. >> >> Where would I start something like this? >> Any pointers would be greatly

Re: Fwd: system tray or notification area in python

2012-10-17 Thread Daniel Fetchinson
Hi folks, So I thought I would write a brand new stand alone system tray or notification area in python. I guess I need to use gtk bindings or some such but don't really know what my options are. Where would I start something like this? Any pointers would be great

Fwd: system tray or notification area in python

2012-10-16 Thread Daniel Fetchinson
>> Hi folks, >> >> I'm using a stand alone window manager without gnome or kde or any >> other de. But I still would like to have a system tray or notification >> area and so far used stalonetray for this. Stalonetray is written in C >> and is a GTK application, works all right but sometimes it doe

system tray or notification area in python

2012-10-16 Thread Daniel Fetchinson
Hi folks, I'm using a stand alone window manager without gnome or kde or any other de. But I still would like to have a system tray or notification area and so far used stalonetray for this. Stalonetray is written in C and is a GTK application, works all right but sometimes it doesn't. For instanc

Re: terminate called after throwing an instance of 'CABRTException'

2012-10-02 Thread Daniel Fetchinson
>> I've noticed a strange thing with python lately: >> >> >> >> Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) >> [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. > def f(): print x >> ... > f() >> terminate called

terminate called after throwing an instance of 'CABRTException'

2012-10-02 Thread Daniel Fetchinson
I've noticed a strange thing with python lately: Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def f(): print x ... >>> f() terminate called after throwing an instance o

Re: lambda in list comprehension acting funny

2012-07-11 Thread Daniel Fetchinson
>> You should not be using lambda in this case >> .for x in [2, 3]: >> .funcs = [x**ctr for ctr in range( 5 )] >> .for p in range(5): >> .print x, funcs[p] >> .print > > If you change the requirements, it's always easy to solve problems. But > it is the wrong problem that you ha

Re: lambda in list comprehension acting funny

2012-07-11 Thread Daniel Fetchinson
>>> funcs = [ lambda x: x**i for i in range( 5 ) ] >>> print funcs[0]( 2 ) >>> >>> This gives me >>> 16 >>> >>> When I was excepting >>> 1 >>> >>> Does anyone know why? > >Just the way Python lambda expressions bind their variable > references. Inner 'i' references the outer scope's 'i' variabl

Re: lambda in list comprehension acting funny

2012-07-10 Thread Daniel Fetchinson
> funcs = [ lambda x: x**i for i in range( 5 ) ] > print funcs[0]( 2 ) > print funcs[1]( 2 ) > print funcs[2]( 2 ) > > This gives me > > 16 > 16 > 16 > > When I was excepting > > 1 > 2 > 4 > > Does anyone know why? And more importantly, what's the simplest way to achieve the latter? :) -- Psss,

lambda in list comprehension acting funny

2012-07-10 Thread Daniel Fetchinson
funcs = [ lambda x: x**i for i in range( 5 ) ] print funcs[0]( 2 ) print funcs[1]( 2 ) print funcs[2]( 2 ) This gives me 16 16 16 When I was excepting 1 2 4 Does anyone know why? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mail

Re: Namespace hack

2012-06-05 Thread Daniel Fetchinson
>> Funny, you got to the last line of "import this" but apparently >> skipped the second line: >> >> Explicit is better than implicit. >> >> And you didn't even post your message on April 1 so no, I can't laugh >> even though I'd like to. > > Can you be less condescending? Of course! :) Anyway, t

Re: Namespace hack

2012-05-24 Thread Daniel Fetchinson
> >From the Zen of Python ("import this"): > > Namespaces are one honking great idea -- let's do more of those! > > > Inspired by this, I have a decorator that abuses function closures to > create a namespace type with the following properties: > > - all methods are static methods that do not take

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-15 Thread Daniel Fetchinson
> Blatantly the pyjs ownership change turned out to be an awkward > operation (as reactions on that ML show it), but a fork could also have > very harmfully "split" pyjs-interested people, so all in all I don't > think there was a perfect solution - dictatorships never fall harmlessly. You say "f

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-09 Thread Daniel Fetchinson
> the original goal was to purchase a domain and fork -- > i made this very clear in my notes -- `uxpy.net`. however, the most > respectable member of the commit IMO convinced me otherwise. (I'm a total outsider, never used pyjs.) Anthony, you never explained what the reasoning behind the advice

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-09 Thread Daniel Fetchinson
It's also quite ironic that the initial complaining started from how the domain name www.pyjs.org is not available only pyjs.org is. At the same time the Rebel Chief's listed domain name on github, see https://github.com/xtfxme, gives you a server not found: http://the.xtfx.me/ :) On 5/9/12, ant

Re: Fetching data from a HTML file

2012-03-23 Thread Daniel Fetchinson
On 3/23/12, Sangeet wrote: > Hi, > > I've got to fetch data from the snippet below and have been trying to match > the digits in this to specifically to specific groups. But I can't seem to > figure how to go about stripping the tags! :( > > Sum class="green">24511 align='center'>02561.496 > [min]

Re: format a measurement result and its error in "scientific" way

2012-02-17 Thread Daniel Fetchinson
>> Hi folks, often times in science one expresses a value (say >> 1.03789291) and its error (say 0.00089) in a short way by parentheses >> like so: 1.0379(9) > > Before swallowing any Python solution, you should > realize, the values (value, error) you are using are > a non sense : > > 1.03789291 +

Re: format a measurement result and its error in "scientific" way

2012-02-17 Thread Daniel Fetchinson
>> Thanks, it's simpler indeed, but gives me an error for value=1.267, >> error=0.08: >> >> Traceback (most recent call last): >> File "/home/fetchinson/bin/format_error", line 26, in >>print format_error( sys.argv[1], sys.argv[2] ) >> File "/home/fetchinson/bin/format_error", line 9, in for

Re: format a measurement result and its error in "scientific" way

2012-02-16 Thread Daniel Fetchinson
On 2/16/12, Ian Kelly wrote: > On Thu, Feb 16, 2012 at 1:36 AM, Daniel Fetchinson > wrote: >>>> Hi folks, often times in science one expresses a value (say >>>> 1.03789291) and its error (say 0.00089) in a short way by parentheses >>>> like so: 1.0379(9

Re: format a measurement result and its error in "scientific" way

2012-02-16 Thread Daniel Fetchinson
>> Hi folks, often times in science one expresses a value (say >> 1.03789291) and its error (say 0.00089) in a short way by parentheses >> like so: 1.0379(9) >> >> One can vary things a bit, but let's take the simplest case when we >> only keep 1 digit of the error (and round it of course) and roun

format a measurement result and its error in "scientific" way

2012-02-15 Thread Daniel Fetchinson
Hi folks, often times in science one expresses a value (say 1.03789291) and its error (say 0.00089) in a short way by parentheses like so: 1.0379(9) One can vary things a bit, but let's take the simplest case when we only keep 1 digit of the error (and round it of course) and round the value corre

Re: SQLObject 1.2.0

2011-11-21 Thread Daniel Fetchinson
Thanks a million Oleg! Cheers, Daniel On 11/20/11, Oleg Broytman wrote: > Hello! > > I'm pleased to announce version 1.2.0, the first stable release of branch > 1.2 of SQLObject. > > > What is SQLObject > = > > SQLObject is an object-relational mapper. Your database tables are

OT

2011-08-19 Thread Daniel Fetchinson
I'll be 59 in a couple of months. -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: web hosting, first hand experiences?

2011-07-04 Thread Daniel Fetchinson
>> Hi folks, I know this comes up regularly but the thing is that the >> quality of service changes also quite regularly with many of the >> hosting companies. What's currently the best option for shared hosting >> of a turbogears application? I'm thinking of dreamhost and webfaction >> does anyone

web hosting, first hand experiences?

2011-07-03 Thread Daniel Fetchinson
Hi folks, I know this comes up regularly but the thing is that the quality of service changes also quite regularly with many of the hosting companies. What's currently the best option for shared hosting of a turbogears application? I'm thinking of dreamhost and webfaction does anyone have any recen

Re: New member intro and question

2011-06-18 Thread Daniel Fetchinson
> > I'm a new list member from the United States. Long time programmer, > fairly new to Python and absolutely loving it so far! I'm 36, live in > Oklahoma, and own a small Linux software development and consulting > firm. Python has made my life a *lot* easier and, the more I learn, > the easier i

Re: Postmortem on Unladen Swallow

2011-04-14 Thread Daniel Fetchinson
> There's a postmortem on the failure of Unladen Swallow by one of the > developers at: > > http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospective.html This outcome of things is really a testament to the hard work of the pypy folks. They, a volunteer bunch, beat google! And that's somethi

Common practice for multiple python versions sharing 3rd party modules

2011-04-09 Thread Daniel Fetchinson
Hi folks, In order to test my own modules with various python versions I've installed python 2.4, 2.5, 2.6, 2.7, 3.1, 3.2. The original installation on my fedora box was 2.6 and all 3rd party modules so far were installed under /usr/lib/python2.6/site-packages. Since now the executable 'python' po

Re: Fun python 3.2 one-liner

2011-04-05 Thread Daniel Fetchinson
what is the character limit on a one liner :P. >>> >>> For PEP 8 compliance, 80 characters. :-) >> >> Yeah, but we don't live in the 80's or 90's anymore and our screens can >> support xterms (or let alone IDE widows) much wider than 80 characters. >> I'm using 140 for python these days. Serio

Re: Fun python 3.2 one-liner

2011-04-05 Thread Daniel Fetchinson
>> what is the character limit on a one liner :P. > > For PEP 8 compliance, 80 characters. :-) Yeah, but we don't live in the 80's or 90's anymore and our screens can support xterms (or let alone IDE widows) much wider than 80 characters. I'm using 140 for python these days. Seriously, who would w

Re: Suggestion Reqd for Designing a Website in Python

2011-02-25 Thread Daniel Fetchinson
>> >I have developed one big Machine Learning software a Machine >> >Translation system in Python. >> >Now, I am thinking to make a User Interface of it and upload it in a >> >web site. >> >> Do you mean you want people to download this from a web site as an >> executable, and then run it locally o

Re: Use the Source Luke

2011-02-05 Thread Daniel Fetchinson
> For the Python world though, there does seem > to have been a change. A decade ago in this newsgroup, there were > frequent references to standard library source. I don't see that > much anymore. Popularity has a price. A decade ago only hackers were exposed to python who are happy to chat abo

Re: Interesting bug

2011-01-01 Thread Daniel Fetchinson
> Dear Group, > > Hope all of you are fine and spending nice new year evenings. > > I get a bug in Python over the last 4 years or so, since I am using > it. The language is superb, no doubt about it. It helped me finish > many a projects, with extraordinary accuracy. But long since, I was > gettin

Re: Interning own classes like strings for speed and size?

2010-12-27 Thread Daniel Fetchinson
>> I believe what you are looking for is (some variant of) the singleton >> pattern: >> >> http://en.wikipedia.org/wiki/Singleton_pattern > > Actually, no. What I want is the flyweight pattern instead: > > http://en.wikipedia.org/wiki/Flyweight_pattern Oh I see. I did not know about this pattern,

Re: Interning own classes like strings for speed and size?

2010-12-27 Thread Daniel Fetchinson
> I'm trying to solve a computational problem and of course speed and size is > important there. Apart from picking the right algorithm, I came across an > idea that could help speed up things and keep memory requirements down. What > I have is regions described by min and max coordinates. At first

Re: Python Web App

2010-12-23 Thread Daniel Fetchinson
Anybody know where I can find a Python Development Environment in the form of a web app for use with Chrome OS. I have been looking for a few days and all i have been able to find is some old discussions with python developers talking about they will want one for the OS to be a

Re: Added Python, WSGI to XAMPP

2010-12-17 Thread Daniel Fetchinson
> How-To: Add VirtualEnv and Pylons (WSGI framework) to XAMPP > >>> >>> Maybe, if there's no Zope. Or we'll run away screaming... >> >> That is rather pathetically true... >> >> Ah well, each to their own... >> >> Chris >> > What

Re: inverse of a matrix with Fraction entries

2010-11-25 Thread Daniel Fetchinson
>> > I wouldn't do it that way. Let M be your matrix. Work out the LCM l of >> > the denominators, and multiply the matrix by that to make it an integer >> > matrix N = l M. Then work out the determinant d of that integer matrix. >> > Next, the big step: use Gaussian elimination to find a matrix

Re: inverse of a matrix with Fraction entries

2010-11-24 Thread Daniel Fetchinson
>> So after all I might just code the inversion via Gauss elimination >> myself in a way that can deal with fractions, shouldn't be that hard. > > I wouldn't do it that way. Let M be your matrix. Work out the LCM l of > the denominators, and multiply the matrix by that to make it an integer > mat

Re: inverse of a matrix with Fraction entries

2010-11-24 Thread Daniel Fetchinson
>> It's a mathematical problem so no uncertainty is present in the >> initial values. And even if there was, if there are many orders of >> magnitude differences between the entries in the matrix floating point >> does not suffice for various things like eigenvalue calculation and >> stuff like tha

Re: inverse of a matrix with Fraction entries

2010-11-24 Thread Daniel Fetchinson
>> I'm using fractions.Fraction as entries in a matrix because I need to >> have very high precision and fractions.Fraction provides infinite >> precision . . . >> >> Probably it doesn't matter but the matrix has all components non-zero >> and is about a thousand by thousand in size. > > I wonder h

Re: inverse of a matrix with Fraction entries

2010-11-24 Thread Daniel Fetchinson
I guess this is a question to folks with some numpy background (but not necessarily). I'm using fractions.Fraction as entries in a matrix because I need to have very high precision and fractions.Fraction provides infinite precision (as I've learned from advice from thi

Re: inverse of a matrix with Fraction entries

2010-11-24 Thread Daniel Fetchinson
>> I guess this is a question to folks with some numpy background (but >> not necessarily). >> >> I'm using fractions.Fraction as entries in a matrix because I need to >> have very high precision and fractions.Fraction provides infinite >> precision (as I've learned from advice from this list). > >

inverse of a matrix with Fraction entries

2010-11-24 Thread Daniel Fetchinson
I guess this is a question to folks with some numpy background (but not necessarily). I'm using fractions.Fraction as entries in a matrix because I need to have very high precision and fractions.Fraction provides infinite precision (as I've learned from advice from this list). Now I need to calcul

Re: what's the precision of fractions.Fraction?

2010-11-18 Thread Daniel Fetchinson
>> I do a recursive evaluation of an expression involving fractions and >> unsurprisingly the numerator and denominator grows pretty quickly. >> After 10-20 iterations the number of digits in the numerator and >> denominator (as integers) reaches 80-100. And I'm wondering until what >> point I can

what's the precision of fractions.Fraction?

2010-11-18 Thread Daniel Fetchinson
I do a recursive evaluation of an expression involving fractions and unsurprisingly the numerator and denominator grows pretty quickly. After 10-20 iterations the number of digits in the numerator and denominator (as integers) reaches 80-100. And I'm wondering until what point I can trust the resul

Re: Am I The Only One Who Keeps Reading “Numpy” as “Numpty”?

2010-11-12 Thread Daniel Fetchinson
As in Numpty Dumpty? > Sorry... -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyGUI 2.3

2010-11-11 Thread Daniel Fetchinson
>> The problem is that some part of the application gets installed to >> >> /home/fetchinson/.local/lib/python2.6/site-packages/GUI >> >> and some other parts get installed to >> >> /home/fetchinson/.local/lib/python/site-packages/GUI > > Which parts get installed in which places, exactly? This ge

Re: cms 4 static pages?

2010-11-04 Thread Daniel Fetchinson
> m looking 4 a framework, that allows to build static community software > (similar to facebook) without having to start scripts, database > connects, admin cookies, e.t.c. > > means - should be dynamic without really being dynamic, delivering just > static pages. (yes, i know e.g. nginx does that

Re: playful coding problems for 10 year olds

2010-11-02 Thread Daniel Fetchinson
>> Hi folks, >> >> My niece is interested in programming and python looks like a good >> choice (she already wrote a couple of lines :)) She is 10 and I >> thought it would be good to have a bunch of playful coding problems >> for her, stuff that she could code herself maybe after some initial >> h

playful coding problems for 10 year olds

2010-11-01 Thread Daniel Fetchinson
Hi folks, My niece is interested in programming and python looks like a good choice (she already wrote a couple of lines :)) She is 10 and I thought it would be good to have a bunch of playful coding problems for her, stuff that she could code herself maybe after some initial help. Do you guys kn

Re: ANN: PyGUI 2.3

2010-10-27 Thread Daniel Fetchinson
> PyGUI 2.3 is available: > >http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ > > This version works on Snow Leopard with PyObjC 2.3. > > > What is PyGUI? > -- > > PyGUI is a cross-platform GUI toolkit designed to be lightweight > and have a highly Pythonic API. Installation

Re: ANN: PyGUI 2.3

2010-10-26 Thread Daniel Fetchinson
> PyGUI 2.3 is available: > >http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ > > This version works on Snow Leopard with PyObjC 2.3. Any reason your project is not easy_installable? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.pyth

Re: [OFF] sed equivalent of something easy in python

2010-10-25 Thread Daniel Fetchinson
>> using python. The pattern is that the first line is deleted, >> then 2 lines are kept, 3 lines are deleted, 2 lines are kept, >> 3 lines are deleted, etc, etc. > > If you have GNU sed, you can use > >sed -n '2~5{N;p}' > > which makes use of the GNU "~" extension. If you need a more > portabl

[OFF] sed equivalent of something easy in python

2010-10-25 Thread Daniel Fetchinson
This question is really about sed not python, hence it's totally off. But since lots of unix heads are frequenting this list I thought I'd try my luck nevertheless. If I have a file with content 1 2 3 4 5 6 7 8 ... i.e. each line contains simply its line number, then it's quite easy to conve

Does everyone keep getting recruiting emails from google?

2010-10-14 Thread Daniel Fetchinson
I keep getting recruiting emails from charlesngu...@google.com about working for google as an engineer. The messages are pretty much the same and go like this: I am part of the Google Staffing team and was wondering if you would be open to exploring engineering

Re: how do I search python mailing list archives?

2010-10-13 Thread Daniel Fetchinson
> What are the various ways to search the python mailing list archives? If you are searching for 'foo' and 'bar' you can try this in google: foo bar site:mail.python.org inurl:python-list Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.or

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Daniel Fetchinson
> Raymond Hettinger writes: > >> It doesn't seem to be common knowledge when and how a[x] gets >> translated to a[x+len(x)]. So, here's a short info post on how Python >> supports negative indices for sequences. > > Thanks for this. Could you post your messages using a channel that > doesn't arbi

Re: fairly urgent request: paid python (or other) work required

2010-09-02 Thread Daniel Fetchinson
On 9/1/10, lkcl wrote: > i apologise for having to contact so many people but this is fairly > urgent, and i'm running out of time and options. i'm a free software > programmer, and i need some paid work - preferably python - fairly > urgently, so that i can pay for food and keep paying rent, an

Re: looking for open source python project

2010-08-29 Thread Daniel Fetchinson
> looking for a python project (preferably something a bit small) that > is looking for contributors. the small bit is because i've never > worked in a team before and haven't really read source code that's > 1000s of lines long, so i'm not too sure i can keep up. > > my python fu is decent (i thin

Re: pypy

2010-08-25 Thread Daniel Fetchinson
> Just curious if anyone had the chance to build pypy on a 64bit > environment and to see if it really makes a huge difference in > performance. Would like to hear some thoughts (or alternatives). I'd recommend asking about this on the pypy mailing list or looking at their documentation first; see

Re: Save/load like matlab?

2010-08-23 Thread Daniel Fetchinson
> I wonder if there is a way to save and load all python variables just like > matlab does, so I can build a code step by step by loading previous states. > > I am handling a python processing code for very large files and multiple > processing steps. Each time I find a bug, I have to run the whole

Re: path to data files

2010-08-19 Thread Daniel Fetchinson
>> If a python module requires a data file to run how would I reference >> this data file in the source in a way that does not depend on whether >> the module is installed system-wide, installed in $HOME/.local or is >> just placed in a directory from where the interpreter is fired up? I'd >> like

path to data files

2010-08-19 Thread Daniel Fetchinson
If a python module requires a data file to run how would I reference this data file in the source in a way that does not depend on whether the module is installed system-wide, installed in $HOME/.local or is just placed in a directory from where the interpreter is fired up? I'd like to always keep

Re: how to save a whole web page with something block

2010-08-10 Thread Daniel Fetchinson
> I want to save a web page. I use urllib to parse the web page. But I > find the saved file, where some content is missing. The missing part > is block from the original web page, such as this part style="display: block;" id="GeneInts">I don't know how to > parse a whole page without someth

Re: Smith-Waterman Algorithm in Python

2010-08-09 Thread Daniel Fetchinson
>>> Every one of the first 20 entries is either the OP questions or your >>> reply. >> >> And you think it was there before the OP sent his message? >> Oh wait, did you just invent a time machine? :) >> >>> Daniel - you are no help at all, and no funny. >> >> Actually, I'm damn funny! :) > > I have

Re: Smith-Waterman Algorithm in Python

2010-08-07 Thread Daniel Fetchinson
>>> Does any one about any implementation of classical Smith Waterman >>> local alignment algorithm and it's variants for aligning natural >>> language text? >>> >> >> Please see http://tinyurl.com/2wy43fh >> >> > Every one of the first 20 entries is either the OP questions or your reply. And you

Re: Smith-Waterman Algorithm in Python

2010-08-06 Thread Daniel Fetchinson
> Does any one about any implementation of classical Smith Waterman > local alignment algorithm and it's variants for aligning natural > language text? Please see http://tinyurl.com/2wy43fh Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Daniel Fetchinson
>> > After getting the technicalities out of the way, maybe I should have >> > asked: >> >> > Is it only me or others would find a platform independent python API >> > to clear the terminal useful? > I don't know much, but just in case the following is useful to anyone: > > There is a Windows prog

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Daniel Fetchinson
>> After getting the technicalities out of the way, maybe I should have >> asked: >> >> Is it only me or others would find a platform independent python API >> to clear the terminal useful? > > There are two kinds of programs: > 1. Those that process input to output. If one of those suddenly starte

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Daniel Fetchinson
>>> Hi folks, >>> >>> If I'm only interested in linux and windows I know I can do >>> >>> >>> import os >>> import platform >>> >>> if platform.system( ) == 'Linux': >>> clear = 'clear' >>> else: >>> clear = 'cls' >>> >>> os.system( clear ) >>> #

Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Daniel Fetchinson
Hi folks, If I'm only interested in linux and windows I know I can do import os import platform if platform.system( ) == 'Linux': clear = 'clear' else: clear = 'cls' os.system( clear ) or something equivalent using os.na

Re: detect endianness of a binary with python

2010-07-22 Thread Daniel Fetchinson
>>> Something like the "file" utility for linux would be very helpfull. >>> >>> Any help is appreciated. > >>You're going to have to describe in detail what's in the file before >>anybody can help. > > We are creating inside our buildsystem for an embedded system a cram > filesystem > image. Later

Re: source install of python2.7 and rpm install of cx_Oracle collision

2010-07-21 Thread Daniel Fetchinson
> I make installed python 2.7 from source, and also installed the RPM version > of cx_Oracle for python 2.7. > > But ldd tells me : > #ldd cx_Oracle.so > libpython2.7.so.1.0 => not found > > I find out that only libpython2.7.a generated when I install python2.7, who > can tell

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Daniel Fetchinson
I'm pleased to announce the release of inflect.py v0.1.8, a module that correctly generates: * the plural of singular nouns and verbs * the singular of plural nouns * ordinals * indefinite articles * present participles * and converts numbers to words >>

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Daniel Fetchinson
>>> I'm pleased to announce the release of inflect.py v0.1.8, a module that >>> correctly generates: >>> >>> * the plural of singular nouns and verbs >>> * the singular of plural nouns >>> * ordinals >>> * indefinite articles >>> * present participles >>> * and converts numbers to words >> >> Which

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-15 Thread Daniel Fetchinson
> I'm pleased to announce the release of inflect.py v0.1.8, a module that > correctly generates: > > * the plural of singular nouns and verbs > * the singular of plural nouns > * ordinals > * indefinite articles > * present participles > * and converts numbers to words Wow! Tons of kudos, this mu

Re: how to install all python plugins

2010-07-15 Thread Daniel Fetchinson
> I`m using ubuntu 10.04 I want to install all the python plugins at once > or the python plugins list. > thank you in advance What is a python plugin? If you mean all published packages on the python website, then you probably don't really want to install all of them, only those that you need.

Re: eGenix at EuroPython 2010

2010-07-14 Thread Daniel Fetchinson
> EuroPython 2009 - Making 50 Mio. EUR per year using Python > http://www.egenix.com/go23/ This link returns a 404. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python script to install python

2010-07-08 Thread Daniel Fetchinson
> I would like to have a python script that would download the most > recent svn of python, configure, make, install and cleanup after > itself. I am not replacing the python version I would be using to run > the script. > I was struggling to get this to work and I assume someone else has > done it

Re: Python 3 - Is PIL/wxPython/PyWin32 supported?

2010-07-07 Thread Daniel Fetchinson
> I don't know that PIL or wxPython supports Python 3 or not. May with > some trick these packages are working. > > Does anybody know about it? > Can I replace my Py2.6 without lost PIL/wxPython? PIL currently does not support python 3 but release 1.1.7 will in the future. Don't ask me when, I don

Re: Twisted 10.1.0 released

2010-07-05 Thread Daniel Fetchinson
> On behalf of Twisted Matrix Laboratories, I am honored to announce the > release of Twisted 10.1.0. > > Highlights include: > > * Deferreds now support cancellation > > * A new "endpoint" interface which can abstractly describe stream > transport endpoints such as TCP and SSL > > * inotify sup

Re: Using Python for web applications

2010-06-30 Thread Daniel Fetchinson
> Sorry for asking such a simple (or possibly complicated) question, as > I am new to Python programming. Anyways, I have read online that many > popular websites use Python for some of their web-based applications > (for example, Reddit), and that lead me to wonder how is this done? There are var

Re: Build unordered list in HTML from a python list

2010-06-30 Thread Daniel Fetchinson
> I have this python list that represets a sitemap: > > tree = [{'indent': 1, 'title':'Item 1', 'hassubfolder':False}, > {'indent': 1, 'title':'Item 2', 'hassubfolder':False}, > {'indent': 1, 'title':'Folder 1', 'hassubfolder':True}, > {'indent': 2, 'title':'Sub Item 1.1'

Re: web application in django

2010-06-25 Thread Daniel Fetchinson
> I'm doing web application in django in which I have to make search option > that will find on other web page some product(for example) and that product > will have to been seen on my page.. now I don't know where to start with > programming.. I know I must parse that other page but I don't have i

Re: [Python-Dev] adding new function

2010-06-22 Thread Daniel Fetchinson
> how can i simply add new functions to module after its initialization > (Py_InitModule())? I'm missing something like > PyModule_AddCFunction(). This type of question really belongs to python-list aka comp.lang.python which I CC-d now. Please keep the discussion on that list. Cheers, Daniel

Re: Vote to Add Python Package "pubsub" to the Python Standard Library

2010-06-01 Thread Daniel Fetchinson
> I vote for adding the Python package "pubsub" to the Python standard > library. It has recently been added to wxpython (replacing the old > wx.lib.pubsub package), but it has application to non-gui programs as > well. > > For more information see: . If you are re

Re: What's the largest python/django powered website in the world?

2010-05-30 Thread Daniel Fetchinson
> just curious, what's the largest python powered website in the world? I'm afraid you'll need to define what you mean by "python powered". If the server side of a web application is written in 3 or more languages and one of them is python, does that count? If yes, then probably google and youtube

Re: Does pickled objects work fine between different OS?

2010-05-26 Thread Daniel Fetchinson
> If I dump a Python dictionary into a file named "data.pkl" using > Pickle module on a Linux operating system, will the data contained in > "data.pkl" load fine in a Windows OS? Yes. > I mean will I be able to load the dictionary data contained in "data.pkl" > just fine on Windows XP? Yes. Che

Re: to prevent reveres engineering for Python

2010-05-25 Thread Daniel Fetchinson
>> is it possible to prevent reveres engineering when customer have access >> to executable made from Python code??? The only secure way of protecting your code is if you expose it as a web service or some such. (Yes, people can still crack your web server, but that's nitpicking :)) Cheers, Danie

Re: replacing words in HTML file

2010-04-29 Thread Daniel Fetchinson
>> > | > Any idea how I can replace words in a html file? Meaning only the >> > | > content will get replace while the html tags, javascript, & css are >> > | > remain untouch. >> > | >> > | I'm not sure what you tried and what you haven't but as a first trial >> > | you might want to >> > | >> > |

Re: replacing words in HTML file

2010-04-29 Thread Daniel Fetchinson
> | > Any idea how I can replace words in a html file? Meaning only the > | > content will get replace while the html tags, javascript, & css are > | > remain untouch. > | > | I'm not sure what you tried and what you haven't but as a first trial > | you might want to > | > | > | > | f = open( 'new

  1   2   3   4   5   >