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: 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: 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: 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: 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: 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: 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: Write web apps in Python?

2010-04-12 Thread Daniel Fetchinson
> I'd like to make sure I understand what the options are to write web > applications in Python: > > - à la PHP, using Apache's mod_python > > - using eg. Lighttpd and configuring it to load the Python interpreter > every time a Python script is called (www.jakehilton.com/?q=node/54) > > - long-run

Re: Object serialization: transfer from a to b (non-implemented code on b)

2010-04-16 Thread Daniel Fetchinson
> I am trying to serialize a function, class, etc and transfer it, have it > unserialized and used. You might want to look at pyro: http://pyro.sourceforge.net/ and also picloud: http://www.picloud.com/ HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://ma

Re: [ANN] pyjamas 0.7 released

2010-04-25 Thread Daniel Fetchinson
> for fits and giggles, to show what's possible in only 400 > lines of python, here is a game of asteroids, written by joe rumsey. > yes, it runs under pyjamas-desktop too. > > http://pyjs.org/examples/asteroids/public/Space.html This URL returns a blank page for me on firefox 3.3.5 (linux) wi

Re: [ANN] pyjamas 0.7 released

2010-04-26 Thread Daniel Fetchinson
>>> for fits and giggles, to show what's possible in only 400 >>> lines of python, here is a game of asteroids, written by joe rumsey. >>> yes, it runs under pyjamas-desktop too. >>> >>> http://pyjs.org/examples/asteroids/public/Space.html >> >>This URL returns a blank page for me on firefox 3.

Re: replacing words in HTML file

2010-04-28 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.html', 'w' ) f.write( open( 'index.h

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

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: 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: 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: 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: 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: [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: 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: 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: 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: 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: 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: 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: 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: 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: [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: [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-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: 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: 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

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: 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 ) >>> #

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-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: 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: 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-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: 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

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: 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

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: 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: setting program name, like $0= in perl?

2009-06-09 Thread Daniel Fetchinson
> I'm sure this is a FAQ, but I certainly haven't been able > to find an answer. > > Is it possible to set the program name as seen by the > operating system or lower-level libraries? > > I'm connecting to a database, and the runtime helpfully > sends some information to the server, such as usernam

Re: Tool for browsing python code

2009-06-16 Thread Daniel Fetchinson
>> "D'Arcy J.M. Cain" writes: >> >> not sure if there are any "curses" base TUI's (!) for Python. >> > vi >> >> emacs :) > > Hey, it was all pretty civil up till now. ;) I've heard from my cousin that his former high school classmate's uncle did a research on a large statistical sample of progra

Re: Python simple web development

2009-06-26 Thread Daniel Fetchinson
>> What I've read about Django, Turbogears is that they are powerful >> enough to create big web-based portals, applications, etc. >> I need just simple forms without any sophisticated functionality. >> So again: why I am wrong ? > > Just because something is powerful doesn't mean you can't do simp

Re: ANN: Package Manager GUI for Python (Windows)

2009-06-30 Thread Daniel Fetchinson
> Hi All, > > I'm pleased to announce a GUI package manager (v 0.12) for > Python versions 2.x under Windows. > > http://sourceforge.net/projects/pythonpkgmgr/ > > It's tightly linked to the pypi repository and offers > the following functions: > > - search packages on pypi by name > > - install

Re: memoization module?

2009-07-05 Thread Daniel Fetchinson
> Is there a memoization module for Python? I'm looking for something > like Mark Jason Dominus' handy Memoize module for Perl. The Python Cookbook has several examples: http://www.google.com/search?q=python+memoize&sitesearch=code.activestate.com HTH, Daniel -- Psss, psss, put it down! -

Re: A Bug By Any Other Name ...

2009-07-06 Thread Daniel Fetchinson
I wonder how many people have been tripped up by the fact that ++n and --n fail silently for numeric-valued n. >>> >>> What do you mean, "fail silently"? They do exactly what you should >>> expect: >> ++5 # positive of a positive number is p

Re: A Bug By Any Other Name ...

2009-07-06 Thread Daniel Fetchinson
>> Yes, there are plenty of languages other than Java and C, but the >> influence of C is admittedly huge in Python. Why do you think loops >> are called "for", conditionals "if" or "while", functions return via >> "return", loops terminate via "break" and keep going via "continue" >> and why is co

Re: A Bug By Any Other Name ...

2009-07-07 Thread Daniel Fetchinson
> (snip) >> and my point is that users >> are most of time correct when they assume that something will work the >> same way as in C. > > Oh, really ? They would surely be wrong if they'd expect the for loop to > have any similarity with a C for loop, or - a *very* common error - if > they'd expect

Re: A Bug By Any Other Name ...

2009-07-07 Thread Daniel Fetchinson
Yes, there are plenty of languages other than Java and C, but the influence of C is admittedly huge in Python. Why do you think loops are called "for", conditionals "if" or "while", functions return via "return", loops terminate via "break" and keep going via "continue" and

Re: A Bug By Any Other Name ...

2009-07-07 Thread Daniel Fetchinson
>> and my point is that users >> are most of time correct when they assume that something will work the >> same way as in C. > > Oh, really ? They would surely be wrong if they'd expect the for loop to > have any similarity with a C for loop, or - a *very* common error - if > they'd expect assignme

Re: A Bug By Any Other Name ...

2009-07-08 Thread Daniel Fetchinson
>> But this academic discussion is honestly a little pointless. The OP >> was referring to a expectation, coming from C, that is not fulfilled >> in python. What's wrong with mentioning it somewhere for the sake of >> helping C programmers? >> > And where does one stop? After all, my primary

Re: SQLObject 0.11.0

2009-08-12 Thread Daniel Fetchinson
> I don't want to start a flame war and would just like some information > before diving in-- > What are some the advantages and disadvantages of SQLObject compared to > SQLAlchemy? In short: sqlobject is much simpler (to use, to understand, etc) than sqlalchemy and so I prefer it in small project

Re: Seeking a python code browser

2009-09-01 Thread Daniel Fetchinson
> Is there any recommendation for a python code browser (aka xref) tool. > I am a Source Navigator user, but seems like its python support is > flaky. Unless you can help me with that...which is my preferred way. Check out code investigator: http://codeinvestigator.googlepages.com/main HTH, Dani

Re: The future of Python immutability

2009-09-08 Thread Daniel Fetchinson
>> > Is the difference because of mutability versus immutability, or >> > because of C code in Numpy versus Matlab code? Are you comparing >> > bananas and pears? >> >> It consisted of something like this > > > Your code does a lot of unnecessary work if you're just trying to > demonstrate immutabi

Re: search term parsing like Google/Gmail

2009-09-09 Thread Daniel Fetchinson
> I am looking for a string parser that works kind of like Google's or > Gmail's advanced search capabilities. So it would turn something like this: > > (subject:"hi there" from:[tim, tom, -fred]) or (subject:foobar from:sam) > > into a python structure that could be used. I don't really care

Re: Programming ideas?

2009-09-12 Thread Daniel Fetchinson
> I know you've probably had this question a million and one times but here it > is again. I'm intermediate at C, pretty good at Java (though I really don't > want to program in this), okay at perl and I've just learned python. But, I > have no more ideas to write programs/scripts for! Any ideas wi

Re: is there a "strawberry python"?

2009-09-12 Thread Daniel Fetchinson
> the reason I like strawberry perl is that I don't need to have admin right > to install it. i can just unzip it and start the game. > i am wondering if there is something similar in python community. > > any insight will be appreciated! As far as I remember there are python installations on USB

Re: How to install pysqlite?

2009-09-19 Thread Daniel Fetchinson
> I am trying to install pysqlite (Python interface to the SQLite). I > downloaded the file with the package (pysqlite-2.5.5.tar.gz). And I > did the following: > > gunzip pysqlite-2.5.5.tar.gz > tar xvf pysqlite-2.5.5.tar > cd pysqlite-2.5.5 > python setup.py install > > At the last step I have a

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-19 Thread Daniel Fetchinson
>> the pyjamas project is taking a slightly different approach to achieve >> this same goal: beat the stuffing out of the pyjamas compiler, rather >> than hand-write such large sections of code in pure javascript, and >> double-run regression tests (once as python, second time converted to >> javas

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-19 Thread Daniel Fetchinson
>> the pyjamas project is taking a slightly different approach to achieve >> this same goal: beat the stuffing out of the pyjamas compiler, rather >> than hand-write such large sections of code in pure javascript, and >> double-run regression tests (once as python, second time conve

Re: What are the naming convention for private member variable, and private and public member function?

2009-09-19 Thread Daniel Fetchinson
> It says in http://www.python.org/dev/peps/pep-0008/ > > "Method Names and Instance Variables > > Use the function naming rules: lowercase with words separated by > underscores as necessary to improve readability. > > Use one leading underscore only for non-public methods and

Re: How to get the minimum number that can be represented?

2009-09-19 Thread Daniel Fetchinson
> Suppose I want to define a function that return the minimum number > that can be represented. > > def f(x): > #body > > That it, if I call f(10), f will return the minimum integer that can > be represented in the machine; if I cal f(10.5), f will return the > minimum float that can be represent

Re: How python source code in large projects are organized?

2009-09-20 Thread Daniel Fetchinson
> I am wondering what is the best way of organizing python source code > in a large projects. There are package code, testing code. I'm > wondering if there has been any summary on previous practices. I suggest looking at the source code of large projects like twisted, PIL, django, turbogears, etc

Re: Where are python module installed?

2009-09-20 Thread Daniel Fetchinson
> I configured python-2.6.2 with my own --prefix, then 'make' and 'make > install'. I only find the following dirs and I don't find any python > modules in the directory. Do python modules come with python-2.6.2? > > $ ls > bin include lib share Try 'ls lib/python*' and also 'ls lib/python*/sit

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-20 Thread Daniel Fetchinson
>> >> the pyjamas project is taking a slightly different approach to achieve >> >> this same goal: beat the stuffing out of the pyjamas compiler, rather >> >> than hand-write such large sections of code in pure javascript, and >> >> double-run regression tests (once as python, second time converted

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: 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: 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: 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

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

[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

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

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: ANN: PyGUI 2.3

2010-10-27 Thread Daniel Fetchinson
> and have a highly Pythonic API. Installation to a custom location with python setup.py install --home=/home/fetchinson/.local makes GUI un-importable: [fetchin...@fetch ~]$ python 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"

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: 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

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: 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 par

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

non-standard glibc location

2017-09-06 Thread Fetchinson . via Python-list
Hi folks, I'm trying to install a binary package (tensorflow) which contains some binary C extensions. Now my system glibc is 2.15 but the binaries in the C extensions were created (apparently) with glibc 2.17. So I thought no problemo I installed glibc 2.17 to a custom location, built python2.7 f

Re: non-standard glibc location

2017-09-07 Thread Fetchinson . via Python-list
On 9/7/17, Thomas Jollans wrote: > On 2017-09-06 16:14, Fetchinson . via Python-list wrote: >> Hi folks, >> >> I'm trying to install a binary package (tensorflow) which contains >> some binary C extensions. Now my system glibc is 2.15 but the binaries >

why does memory consumption keep growing?

2017-10-05 Thread Fetchinson . via Python-list
Hi folks, I have a rather simple program which cycles through a bunch of files, does some operation on them, and then quits. There are 500 files involved and each operation takes about 5-10 MB of memory. As you'll see I tried to make every attempt at removing everything at the end of each cycle so

Re: why does memory consumption keep growing?

2017-10-05 Thread Fetchinson . via Python-list
On 10/5/17, Chris Angelico wrote: > On Fri, Oct 6, 2017 at 8:06 AM, Fetchinson . via Python-list > wrote: >> Hi folks, >> >> I have a rather simple program which cycles through a bunch of files, >> does some operation on them, and then quits. There are 500 files

How to make python pick up my new-and-shiny openssl shared object

2018-08-07 Thread Fetchinson . via Python-list
The highest version of openssl available on my system is 1.0.0 which is not good enough for pip these days (or github for that matter). So I've installed 1.1.0 to a custom location /home/fetch/opt. But if I do import ssl ssl.OPENSSL_VERSION it still shows me that it is using the system default 1.

Re: How to make python pick up my new-and-shiny openssl shared object

2018-08-08 Thread Fetchinson . via Python-list
On 8/8/18, Christian Heimes wrote: > On 2018-08-08 00:07, Fetchinson . via Python-list wrote: >> The highest version of openssl available on my system is 1.0.0 which >> is not good enough for pip these days (or github for that matter). So >> I've installed 1.1.0 to a c

compiling 3.7.0 from source with custom libffi path

2018-09-24 Thread Fetchinson . via Python-list
I'm trying to compile python 3.7.0 from source with a custom libffi path and the compiler/linker doesn't seem to pick up the right version. The system libffi doesn't have the development files so I've installed the latest libffi (also from source) to /opt/custom but still I get INFO: Could not loc

Re: compiling 3.7.0 from source with custom libffi path

2018-09-24 Thread Fetchinson . via Python-list
>> I'm trying to compile python 3.7.0 from source with a custom libffi >> path and the compiler/linker doesn't seem to pick up the right >> version. The system libffi doesn't have the development files so I've >> installed the latest libffi (also from source) to /opt/custom but >> still I get >> >>

Re: compiling 3.7.0 from source with custom libffi path

2018-09-24 Thread Fetchinson . via Python-list
On 9/24/18, Thomas Jollans wrote: > On 2018-09-24 14:14, Fetchinson . via Python-list wrote: >>>> I'm trying to compile python 3.7.0 from source with a custom libffi >>>> path and the compiler/linker doesn't seem to pick up the right >>>> versio

Re: compiling 3.7.0 from source with custom libffi path

2018-09-24 Thread Fetchinson . via Python-list
On 9/24/18, Thomas Jollans wrote: > On 2018-09-24 16:30, Fetchinson . via Python-list wrote: >> [fetch@fetch]$ grep LIBFFI_INCLUDE Makefile >> LIBFFI_INCLUDEDIR= /opt/custom/lib/libffi-3.2.1/include >> >> So I'd say everything should work but it doesn't,

Re: So apparently I've been banned from this list

2018-10-01 Thread Fetchinson . via Python-list
On 10/1/18, Roel Schroeven wrote: > jkn schreef op 1/10/2018 om 20:25: >> On Monday, October 1, 2018 at 6:57:30 PM UTC+1, Ethan Furman wrote: >>> On 09/30/2018 09:30 AM, Steven D'Aprano wrote: >>> Notwithstanding Ethan's comment about having posted the suspension notice on the list,

web facing static text db

2016-04-29 Thread Fetchinson . via Python-list
Hi folks, I have a very specific set of requirements for a task and was wondering if anyone had good suggestions for the best set of tools: * store text documents (about 10 pages) * the data set is static (i.e. only lookups are performed, no delete, no edit, no addition) * only one operation

Re: web facing static text db

2016-04-30 Thread Fetchinson . via Python-list
On 4/30/16, Gordon Levi wrote: > "Fetchinson ." wrote: > >>Hi folks, >> >>I have a very specific set of requirements for a task and was >>wondering if anyone had good suggestions for the best set of tools: >> >>* store text documents (about

building 3.7.1 from source, _ctypes and libffi troubles

2018-12-20 Thread Fetchinson . via Python-list
Hi all, I'm trying to build 3.7.1 from source and having trouble with libffi and _ctypes. I'm on linux and have installed libffi also from source to a custom location: $HOME/opt/lib64/libffi.so.6.0.4 $HOME/opt/lib64/libffi.a $HOME/opt/lib64/libffi.la $HOME/opt/lib64/libffi.so.6 $HOME/opt/lib64/lib

Re: building 3.7.1 from source, _ctypes and libffi troubles

2018-12-20 Thread Fetchinson . via Python-list
On 12/20/18, Fetchinson . wrote: > Hi all, I'm trying to build 3.7.1 from source and having trouble with > libffi and _ctypes. I'm on linux and have installed libffi also from > source to a custom location: > > $HOME/opt/lib64/libffi.so.6.0.4 > $HOME/opt/lib64/libffi.a

Re: building 3.7.1 from source, _ctypes and libffi troubles

2018-12-25 Thread Fetchinson . via Python-list
>> And as far as I know pkg-config is used by python's configure script >> so everything should be fine. I also set >> LD_LIBRARY_PATH=/home/fetch/opt/lib:/home/fetch/opt/lib64 and also >> C_INCLUDE_PATH=/home/fetch/opt/include > > I looked into this a little. I found that setting C_INCLUDE_PATH as

<    1   2   3   4   5