Re: Python tools for managing static websites?

2006-11-02 Thread Glenn Hutchings
I haven't seen mention of HTMLgen, another python package. Check it out at: http://starship.python.net/crew/friedrich/HTMLgen/html/main.html Glenn -- http://mail.python.org/mailman/listinfo/python-list

Thread priority or keeping a (wx)GUI responsive

2006-11-02 Thread NoelByron
I need to do some intense calculations in my application. Those are done by a third party Python library and consume 100% CPU time for some seconds. The computations take place in their own thread to keep my GUI responsive (wxPython in my case). Everything works fine on a dual core machine. On a s

splitter control

2006-11-02 Thread annya20inbe
Is anybody know splitter control implementaion in c... -- http://mail.python.org/mailman/listinfo/python-list

module for calculations involving radioactive decay?

2006-11-02 Thread frederik aa de jonge
does anybody know of a package/module which will facilitate/simplify calculations with radioactive samples? as a minimum spec: - user definable list of radionuclides + names + halflives (expressable in time units like sec min etc as appropriate) - choice of units (Bq or Ci, with appropriate modifie

where the hell is the run command of PyPe editor?

2006-11-02 Thread Josiah Carlson
daniel <[EMAIL PROTECTED]> wrote: > I'm trying to use PyPe, but I just got so frustrated when attempting to > run a script, this is the very first feature I would use for an editor, > OMG. I browsed through every single menu item and gave up... > > any help would be appreciated, (the most silly

Re: report progress from C function

2006-11-02 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Michael S wrote: > > > I downloaded Pyrex and ran it through their own > > example. The code looks quite messy, and I even saw a > > few "goto"s. > > looked at the assembler output from your C compiler lately? > > LOL! - is it even possible to c

Re: Tkinter Listbox string formatting question - how to kill a dancingsnake ?

2006-11-02 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: In the meantime, I have produced this evil hack, that takes advantage of the difference in pixel widths between the space, and either the fullstop or the single quote... It will only work if you have quite a lot of space to waste between columns, an

other ways to check for ?

2006-11-02 Thread elderic
Hi there, are there other ways than the ones below to check for in a python script? (partly inspired by wrapping Tkinter :P) def f(): print "This is f(). Godspeed!" 1.: --> sort of clumsy and discouraged by the docs as far as I read import types type(f) is types.FunctionType 2.: --> I don't

Re: other ways to check for ?

2006-11-02 Thread Fredrik Lundh
elderic wrote: > are there other ways than the ones below to check for > in a python script? callable(f) -- http://mail.python.org/mailman/listinfo/python-list

Re: other ways to check for ?

2006-11-02 Thread elderic
Thx =) Fredrik Lundh schrieb: > elderic wrote: > > > are there other ways than the ones below to check for > > in a python script? > > callable(f) > > -- http://mail.python.org/mailman/listinfo/python-list

Re: other ways to check for ?

2006-11-02 Thread Sybren Stuvel
elderic enlightened us with: > are there other ways than the ones below to check for 'function'> in a python script? First of all, why would you want to? If you want to call the object as a function, just do so. Handle the exception that is raised when it's raised. Sybren -- Sybren Stüvel Stü

Re: Event driven server that wastes CPU when threaded doesn't

2006-11-02 Thread Bryan Olson
Jean-Paul Calderone wrote: > On Tue, 31 Oct 2006 07:33:59 GMT, Bryan Olson <[EMAIL PROTECTED]> > wrote: >> Snor wrote: >>> I'm attempting to create a lobby & game server for a multiplayer game, >>> and have hit a problem early on with the server design. I am stuck >>> between using a threaded serv

Re: other ways to check for ?

2006-11-02 Thread Christophe
Sybren Stuvel a écrit : > elderic enlightened us with: >> are there other ways than the ones below to check for > 'function'> in a python script? > > First of all, why would you want to? If you want to call the object > as a function, just do so. Handle the exception that is raised when > it's rai

Re: other ways to check for ?

2006-11-02 Thread Diez B. Roggisch
Sybren Stuvel schrieb: > elderic enlightened us with: >> are there other ways than the ones below to check for > 'function'> in a python script? > > First of all, why would you want to? If you want to call the object > as a function, just do so. Handle the exception that is raised when > it's rais

Re: other ways to check for ?

2006-11-02 Thread [EMAIL PROTECTED]
Christophe wrote: > Sybren Stuvel a écrit : > > elderic enlightened us with: > >> are there other ways than the ones below to check for >> 'function'> in a python script? > > > > First of all, why would you want to? If you want to call the object > > as a function, just do so. Handle the exceptio

Re: other ways to check for ?

2006-11-02 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > A little experimentation shows that when something is not callable > always a TypeError which evaluates to "'' object is not > callable" that's not defined by the language specification, though, so your code won't be portable, and may break in future releases. and eve

Re: other ways to check for ?

2006-11-02 Thread Sybren Stuvel
Christophe enlightened us with: > I don't think it's a good idea because when you place a try catch > block around a function call, you'll catch any exception thrown by > the function itself and not only the "cannot be called" exception. That depends on the exception you're catching, doesn't it?

__div__ not recognized automatically

2006-11-02 Thread Anton81
Hello! I wrote a class class NumX: ... def __add__(self,other): ... def __div__(self,other): if not isinstance(other,NumX): other=NumX(other) ... Somewhere else I use a=(b+c)/2 where all variables are of NumX Type. When I execute the program it complains that it can't find an

Re: ANN: wxPython 2.7.1.3

2006-11-02 Thread Magnus Lycka
robert wrote: > John Salerno wrote: >> You want Python 2.3 for Windows? > > yes. > (I know no other big libs which already stops support of py2.3-win) The general policy for Python is to support version 2.n-1 when 2.n is the current version, but not older versions than that. There was recently a

Image creation

2006-11-02 Thread Odalrick
I need to generate wx.Bitmap with a hole in them, i.e. the whole bitmap is one colour, greyish with alpha = 255*.6, except for one rectangle that has alpha = 0 . Currently I'm doing this with PIL, thus: def _init_mask( self ): mask = Image.new( 'RGBA', self.size, color=op

Re: unescape HTML entities

2006-11-02 Thread Frederic Rentsch
Rares Vernica wrote: > Hi, > > Nice module! > > I downloaded 2.3 and I started to play with it. The file names have > funny names, they are all caps, including extension. > > For example the main module file is "SE.PY". Is you try "import SE" it > will not work as Python expects the file extensio

Re: ANN: wxPython 2.7.1.3

2006-11-02 Thread Fredrik Lundh
Magnus Lycka wrote: > The general policy for Python is to support version 2.n-1 when 2.n is > the current version, but not older versions than that. That's the policy for python-dev. Library providers that care about the users should, if they possibly can, support older versions than that. (es

Re: other ways to check for ?

2006-11-02 Thread ArdPy
elderic wrote: > Hi there, > > are there other ways than the ones below to check for > in a python script? > (partly inspired by wrapping Tkinter :P) > > def f(): >print "This is f(). Godspeed!" > > 1.: --> sort of clumsy and discouraged by the docs as far as I read > import types > type(f) i

Re: Python images processing -recap

2006-11-02 Thread alf
Fredrik Lundh wrote: > alf wrote: > >> Are all supported, which is most mature, in which I could perform for >> instance 'Ken Burns effect' > > > that's a display effect, not an image effect. you need a display (or > animation) library for that. > In fact I want to generate a sequence of B

Re: can I import the module twice (under differnet names)

2006-11-02 Thread Steve Holden
alf wrote: > Hi, > > wonder if in the python I could treat modules imorts like classes > instances. It means I could import it twice or more times under > different names. > If you want to repeat the full import, and have each imported version get an independent namespace as well as independen

urllib2: HTTP Version not supported

2006-11-02 Thread Nirnimesh
I'm using urllib2 module to fetch a URL from a server which understands HTTP/1.1 only (no HTTP/1.0). urllib2.urlopen() results in "urllib2.HTTPError: HTTP Error 505: HTTP Version not supported". How do I force urllib2 to use HTTP v1.1? Regards, Nirnimesh -- http://mail.python.org/mailman/listi

Re: Event driven server that wastes CPU when threaded doesn't

2006-11-02 Thread Magnus Lycka
Snor wrote: > I'm attempting to create a lobby & game server for a multiplayer game, > and have hit a problem early on with the server design. I am stuck > between using a threaded server, and using an event driven server. I've > been told time and time again that I should use an event driven serve

Re: best way to check if a file exists?

2006-11-02 Thread Steven D'Aprano
On Thu, 02 Nov 2006 01:44:25 +1100, Ben Finney wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > >> Ben Finney wrote: >> > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: >> > > You could try to read the file, if that fails it doesn't exist: >> > >> > Except that there are other conditio

Re: other ways to check for ?

2006-11-02 Thread Christophe
Sybren Stuvel a écrit : > Christophe enlightened us with: >> I don't think it's a good idea because when you place a try catch >> block around a function call, you'll catch any exception thrown by >> the function itself and not only the "cannot be called" exception. > > That depends on the excepti

Re: Python tools for managing static websites?

2006-11-02 Thread utabintarbo
Glenn Hutchings wrote: > I haven't seen mention of HTMLgen, another python package. Check it > out at: > > http://starship.python.net/crew/friedrich/HTMLgen/html/main.html > > Glenn For whatever reason, the Starship (hence that link) has been down for a while. :-( But I do agree that HTMLge

Re: other ways to check for ?

2006-11-02 Thread John Roth
Fredrik Lundh wrote: > elderic wrote: > > > are there other ways than the ones below to check for > > in a python script? > > callable(f) > > PEP 3100 specifies that the callable builtin is to be removed in Python 3.0, together with what I presume is the underlying C support for the function.

Re: best way to check if a file exists?

2006-11-02 Thread Fredrik Lundh
Steven D'Aprano wrote: > But there can be a race condition between os.path.exists returning True > and you trying to open the file, if some other process deletes or renames > the file in the meantime. if you'd used a threaded newsreader, you would have seen the code that "as follows" was referri

Re: __div__ not recognized automatically

2006-11-02 Thread Steven D'Aprano
On Thu, 02 Nov 2006 12:59:32 +0100, Anton81 wrote: > When I execute the program it > complains that it can't find an operator "/" for "instance" and "integer". How about if you post the actual traceback you get, rather than paraphrasing? That way, we don't have to guess. -- Steven. -- http:/

Re: other ways to check for ?

2006-11-02 Thread Fredrik Lundh
John Roth wrote: > PEP 3100 specifies that the callable builtin is > to be removed in Python 3.0, together with what > I presume is the underlying C support for the > function. PEP 3100 is not even close to being finalized, and does not apply to Python 2.X. -- http://mail.python.org/mailman/

Re: __div__ not recognized automatically

2006-11-02 Thread Nick Craig-Wood
Anton81 <[EMAIL PROTECTED]> wrote: > class NumX: >... >def __add__(self,other): > ... >def __div__(self,other): > if not isinstance(other,NumX): other=NumX(other) > ... > > Somewhere else I use > > a=(b+c)/2 > > where all variables are of NumX Type. When I execute

Re: The Python Journal

2006-11-02 Thread Ant
[EMAIL PROTECTED] wrote: ... > We'd love it if you could have a look at our first issue, and let us > know what you think! On the layout of the site: 1) I have to hit two separate Download buttons to get the PDF, and then the PDF must be viewed in an external reader rather than the browser plugi

Re: The Python Journal

2006-11-02 Thread Fuzzyman
Ant wrote: > [EMAIL PROTECTED] wrote: > ... > > We'd love it if you could have a look at our first issue, and let us > > know what you think! > > On the layout of the site: > [snip..] > 4) It would be nice to have an HTML view of these PDFs to save the > irritation of waiting for the document to d

idle with ipython

2006-11-02 Thread Brian Blais
Hello, I was wondering if there is a way to configure idle to call ipython instead of python? I am working with the Enthought edition of Python (Enthon 1.0.0). I use ipython in Linux all the time, but in windows I like the "Run Module" button in Idle, and would like to have both. thanks,

Re: Make all files extension lower by a given directory name

2006-11-02 Thread Tim Chase
>> can you post an example of a filename that misbehaves on >> your machine? >> >> > > To Fredrik Lundh and Tim Chase: > > My task was read all tga file names and generate a config xml > file, then pass this xml file to a utility, but this utillity > only read files with extension 'tga' than 'T

SE 2.3 temporarily unavailable. Cheese shop defeats upload with erratic behavior. Urgently requesting help.

2006-11-02 Thread Frederic Rentsch
Some time ago I had managed to upload a small package to the Cheese Shop using the data entry template. Uploading is in two steps: first the text then the package file. When I had a new version it went like this: The new text made a new page, but the new file went to the old page. The old page

Re: Style for modules with lots of constants

2006-11-02 Thread Neil Cerutti
On 2006-11-01, Paddy <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> The Glk API (which I'm implementing in native Python code) >> defines 120 or so constants that users must use. The constants >> already have fairly long names, e.g., gestalt_Version, >> evtype_Timer, keycode_PageDown. >> >> Ca

Re: other ways to check for ?

2006-11-02 Thread bearophileHUGS
elderic: > 1.: --> sort of clumsy and discouraged by the docs as far as I read > import types > type(f) is types.FunctionType What's the problem with this? from types import FunctionType if isinstance(f, FunctionType): ... Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-l

Re: unescape HTML entities

2006-11-02 Thread Frederic Rentsch
Rares Vernica wrote: > Hi, > > I downloades 2.2 beta, just to be sure I have the same version as you > specify. (The file names are no longer funny.) Anyway, it does not seem > to do as you said: > > In [14]: import SE > > In [15]: SE.version > ---> SE.version() > Out[15]: 'SE 2.2 beta - SEL

Re: other ways to check for ?

2006-11-02 Thread elderic
> What's the problem with this? > > from types import FunctionType > if isinstance(f, FunctionType): > ... > > Bye, > bearophile Well... it's discouraged by the docs =) At least the use of module types. I was just wondering if there were some alternatives. Never thought I would start off a th

Using Python within a Python application.

2006-11-02 Thread Michael B. Trausch
Hello, everyone. I am doing some searching and winding up a little bit confused. I have a MUD client that I am writing using Python and wxWidgets, as some of you may remember. What I am looking to do now, is add "trigger" functionality to it. In essence, the application receives text from the g

Sanity check on use of dictionaries

2006-11-02 Thread dopey483
I am manipulating lots of log files (about 500,000 files and about 30Gb in total) to get them into a little SQL db. Part of this process is "normalisation" and creating tables of common data. I am creating dictionaries for these in a simple {value,key} form. In terms of memory and performance what

Re: create global variables?-the full story

2006-11-02 Thread J. Clifford Dyer
> OK... > > from the start. > > im trying to develop a simple command line application for determining > the degree of substitution (DS) on a polymer backbone from elemental > analysis, i.e., the % weights of different elements in the > monomer-substituent compound ( i want each element to give a

Python in sci/tech applications

2006-11-02 Thread mattf
I've discovered Python and have been trying it out lately as a possible replacement for computations that would ordinarily be done with a commercial package like Matlab or IDL. I'd like to mention a few things I've run across that have either surprised me or kept me from doing things the way I'd li

Re: __div__ not recognized automatically

2006-11-02 Thread Peter Otten
Anton81 wrote: > Hello! > > I wrote a class > > class NumX: > ... > def __add__(self,other): > ... > def __div__(self,other): > if not isinstance(other,NumX): other=NumX(other) > ... > > Somewhere else I use > > a=(b+c)/2 > > where all variables are of NumX Type. When I exec

Re: SE 2.3 temporarily unavailable. Cheese shop defeats upload with erratic behavior. Urgently requesting help.

2006-11-02 Thread jim-on-linux
Frederic, I've been trying to get back into my package in the Cheese Shop for over a year. The phone company changed my e:mail address and to make a long and frustrating story short I can't get back into the Cheese Shop to make changes to my file. Time is money. At some time you have to con

is mod_python borked?

2006-11-02 Thread walterbyrd
I am considering python, instead of php, for web-application development. I often see mod_python.criticisized as being borked, broken, or just plain sucking. Any truth to any of that? -- http://mail.python.org/mailman/listinfo/python-list

creating new objects with references to them

2006-11-02 Thread JohnJSal
It seems like what I want to do is something that programmers deal with everyday, but I just can't think of a way to do it. Basically, I am writing a DB front-end and I want a new "Researcher" object to be created whenever the user presses the "New Record" button. He can open as many new records at

Re: is mod_python borked?

2006-11-02 Thread Steve Holden
walterbyrd wrote: > I am considering python, instead of php, for web-application > development. I often see mod_python.criticisized as being borked, > broken, or just plain sucking. > > Any truth to any of that? > Why don't you ask the very active mod_python mailing list that? Like all systems m

Re: is mod_python borked?

2006-11-02 Thread Shreekar Patel
walterbyrd wrote: > I am considering python, instead of php, for web-application > development. I often see mod_python.criticisized as being borked, > broken, or just plain sucking. > > Any truth to any of that? No, I've been using mod_python for a long time, and I haven't run in to any problems.

string formatter for tuple

2006-11-02 Thread jeremito
I have the following in my code a = (1,2,3) print "a = %s" %a But when I run this, I get: TypeError: not all arguments converted during string formatting Now I realize why this happens, a is actually 3 elements when the print statement is only expecting to print one value. I tried print "a =

Re: Python in sci/tech applications

2006-11-02 Thread Paul Boddie
mattf wrote: > I'd like to mention a few things I've run across that have either surprised > me or kept me > from doing things the way I'd like to. > > 1) -There's a large and active sci/tech Python community out there.- > This was something of a surprise. If you look at the python.org site > and

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
JohnJSal wrote: > It seems like what I want to do is something that programmers deal with > everyday, but I just can't think of a way to do it. Basically, I am > writing a DB front-end and I want a new "Researcher" object to be > created whenever the user presses the "New Record" button. He can ope

Re: string formatter for tuple

2006-11-02 Thread Tim Chase
> a = (1,2,3) > print "a = %s" %a > > But when I run this, I get: > > TypeError: not all arguments converted during string formatting > > Now I realize why this happens, a is actually 3 elements when the print > statement is only expecting to print one value. I tried > > print "a = %s" %(a) >

Re: string formatter for tuple

2006-11-02 Thread Steve Holden
jeremito wrote: > I have the following in my code > > a = (1,2,3) > print "a = %s" %a > > But when I run this, I get: > > TypeError: not all arguments converted during string formatting > > Now I realize why this happens, a is actually 3 elements when the print > statement is only expecting to

Re: string formatter for tuple

2006-11-02 Thread skip
> "Tim" == Tim Chase <[EMAIL PROTECTED]> writes: >> How can I print a tuple with a single string format? Tim>print "a = %s" % str(a) Tim> or Tim>print "a = %s" % repr(a) Or wrap the tuple in a tuple: print "a = %s" % (a,) Skip -- http://mail.python.org/

Re: string formatter for tuple

2006-11-02 Thread Wojciech Muła
Tim Chase wrote: > print "a = %s" % repr(a) or print "a = %r" % (a,) -- http://mail.python.org/mailman/listinfo/python-list

Re: string formatter for tuple

2006-11-02 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, jeremito wrote: > I have the following in my code > > a = (1,2,3) > print "a = %s" %a > > But when I run this, I get: > > TypeError: not all arguments converted during string formatting > > Now I realize why this happens, a is actually 3 elements when the print > statem

Re: creating new objects with references to them

2006-11-02 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, JohnJSal wrote: > What I don't know how to do is handle this arbitrary number of objects. > When it comes time to save the data to the DB, how do I access each > object (to get the text fields associated with each)? Won't I have to > have given each instance some name? Or i

Re: creating new objects with references to them

2006-11-02 Thread Ant
On Nov 2, 3:15 pm, "JohnJSal" <[EMAIL PROTECTED]> wrote: > It seems like what I want to do is something that programmers deal with > everyday, but I just can't think of a way to do it. Basically, I am > writing a DB front-end and I want a new "Researcher" object to be > created whenever the user

Re: Sanity check on use of dictionaries

2006-11-02 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I am manipulating lots of log files (about 500,000 files and about 30Gb > in total) to get them into a little SQL db. Part of this process is > "normalisation" and creating tables of common data. I am creating > dictionaries for these in a simple {value,key} form. > > I

Re: other ways to check for ?

2006-11-02 Thread Christophe
Christophe a écrit : > Sybren Stuvel a écrit : >> Christophe enlightened us with: >>> I don't think it's a good idea because when you place a try catch >>> block around a function call, you'll catch any exception thrown by >>> the function itself and not only the "cannot be called" exception. >> >>

Re: other ways to check for ?

2006-11-02 Thread Fredrik Lundh
elderic wrote: > I just wanted to know if there was a keyword for functions, too. > > Then u could've done: type(f) is function > quite similar to: type(x) is int but why do you think you need that, when you have callable() ? unless you're doing specialized stuff, there's really no reason to d

Help on writing P2P Streaming client

2006-11-02 Thread Daniel
I want to write a P2P streaming client where ine user broadcasts and many users receive the streaming content and forward like BitTorrent. Can anybody provide pointers for starting in Python. I have done couple of small projects in Python but I need to get this done. Every help is appreciated. T

Re: Help on writing P2P Streaming client

2006-11-02 Thread Steve Holden
Daniel wrote: > I want to write a P2P streaming client where ine user broadcasts and > many users receive the streaming content and forward like BitTorrent. > > Can anybody provide pointers for starting in Python. I have done couple > of small projects in Python but I need to get this done. > > E

Re: is mod_python borked?

2006-11-02 Thread Thomas Guettler
walterbyrd wrote: > I am considering python, instead of php, for web-application > development. I often see mod_python.criticisized as being borked, > broken, or just plain sucking. > > Any truth to any of that? Hi, mod_python is Apache/Python Integration. AFAIK you can't use it with a different

Re: creating new objects with references to them

2006-11-02 Thread JohnJSal
Ant wrote: > It all depends on what UI you are using (Web frontend? GUI such as > Tkinter?) and what your use case is. Making it myself with wxPython. > > What is it exactly that you want to do? Create a bunch of Researcher > objects and then save them in a single hit? Create a list of > Researc

Re: other ways to check for ?

2006-11-02 Thread elderic
> > I just wanted to know if there was a keyword for functions, too. > > > > Then u could've done: type(f) is function > > quite similar to: type(x) is int > > but why do you think you need that, when you have callable() ? unless > you're doing specialized stuff, there's really no reason to distin

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
JohnJSal wrote: > Ant wrote: > > >>It all depends on what UI you are using (Web frontend? GUI such as >>Tkinter?) and what your use case is. > > > Making it myself with wxPython. > > >>What is it exactly that you want to do? Create a bunch of Researcher >>objects and then save them in a singl

Re: string formatter for tuple

2006-11-02 Thread jeremito
[EMAIL PROTECTED] wrote: > > "Tim" == Tim Chase <[EMAIL PROTECTED]> writes: > > >> How can I print a tuple with a single string format? > > Tim>print "a = %s" % str(a) > Tim> or > Tim>print "a = %s" % repr(a) > > Or wrap the tuple in a tuple: > > print "a =

Re: creating new objects with references to them

2006-11-02 Thread JohnJSal
Steve Holden wrote: > del rec[7] Hmmm, but what if the record can remain open, changes can be made, and then saved again to the same object? I suppose it isn't necessary to delete them, right? Man, this stuff gets complicated -- http://mail.python.org/mailman/listinfo/python-list

Re: other ways to check for ?

2006-11-02 Thread Fredrik Lundh
elderic wrote: > I never said that I need anything - I merely asked for alternatives. =) > I'm pretty happy with the types-module or the callable() test. > > Basically it's just for wrapping the creation of Tk-Buttons, etc. > They need a callback and in my process to learn I wanted to know about

Re: creating new objects with references to them

2006-11-02 Thread JohnJSal
JohnJSal wrote: > Hope that makes sense. It seems like such a common task. Ok, I'm thinking about the suggestion to make a list, but I'm still confused. Even with a list, how do I access each instance. Would I have to do it by index? I assume I'd do something like this: self.records = []# li

Forum written in Python?

2006-11-02 Thread Karlo Lozovina
Are there any forum or bulletin board systems written entirely in Python? I got sick of PhpBB, mostly because I can't tweak and fiddle with the code, since I really don't like PHP and don't know it that well. I thought of writting my own simple forum software, but if there are existing projects

Re: creating new objects with references to them

2006-11-02 Thread Diez B. Roggisch
> >> Anyway, a simple list of Researchers should suffice for any of these >> purposes, and assuming you want to commit them all in one hit, you have >> a list of objects ready to iterate over. > > Ok, so in making a list does this mean that I won't have a name for > each instance? I just have to

Converting a .dbf file to a CSV file

2006-11-02 Thread Johanna Pfalz
Is there a module/method in python to convert a file from .DBF format to .CSV format? Johanna Pfalz -- http://mail.python.org/mailman/listinfo/python-list

Re: is mod_python borked?

2006-11-02 Thread Michael S
I used it for various projects. It's alright. The only problem I had, was that I was unable to get mod_python and pysqlite to work together. Other than that it was pretty good. --- walterbyrd <[EMAIL PROTECTED]> wrote: > I am considering python, instead of php, for > web-application > development

Re: Converting a .dbf file to a CSV file

2006-11-02 Thread Max Erickson
Johanna Pfalz <[EMAIL PROTECTED]> wrote: > Is there a module/method in python to convert a file from .DBF > format to .CSV format? > > Johanna Pfalz > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 There is an example provided. max -- http://mail.python.org/mailman/listinfo/

Re: Python in sci/tech applications

2006-11-02 Thread bearophileHUGS
mattf: > 3) -There's a problem with development under Windows. It's possibile to compile Python with MinGW, and to create extensions with it. So some site can host a single zip file that contains both MinGW and Python compiled with it, all ready and set. A person not much expert can then create co

Re: Converting a .dbf file to a CSV file

2006-11-02 Thread Tim Chase
> Is there a module/method in python to convert a file from .DBF format to > .CSV format? Well, at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 there's a recipe for reading DBF files...iterating over the returned data from the function declared there, it should be pretty eas

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
JohnJSal wrote: > Steve Holden wrote: > > >> del rec[7] > > > Hmmm, but what if the record can remain open, changes can be made, and > then saved again to the same object? I suppose it isn't necessary to > delete them, right? Man, this stuff gets complicated > Right. Of course, once yo

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
JohnJSal wrote: > JohnJSal wrote: > > >>Hope that makes sense. It seems like such a common task. > > > Ok, I'm thinking about the suggestion to make a list, but I'm still > confused. Even with a list, how do I access each instance. Would I have > to do it by index? I assume I'd do something lik

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > mattf: >> 3) -There's a problem with development under Windows. > > It's possibile to compile Python with MinGW, and to create extensions > with it. So some site can host a single zip file that contains both > MinGW and Python compiled with it, all ready and set. A perso

Re: Python in sci/tech applications

2006-11-02 Thread robert
[EMAIL PROTECTED] wrote: > mattf: >> 3) -There's a problem with development under Windows. > > It's possibile to compile Python with MinGW, and to create extensions > with it. So some site can host a single zip file that contains both > MinGW and Python compiled with it, all ready and set. A perso

Re: Python in sci/tech applications

2006-11-02 Thread Fredrik Lundh
robert wrote: > Is it really not possible to create extension libs with > older MSVC or Mingw, which work with regular Python binaries > version 2.4 and 2.5 ? last time I tried, it took me 20 minutes from that I typed "mingw" into google until I had built and tested my first non-trivial extens

Re: Python in sci/tech applications

2006-11-02 Thread bearophileHUGS
Robert Kern: > We distribute mingw set up to do this with our "Enthought > Edition" Python distribution. > http://code.enthought.com/enthon/ Sorry, maybe I'm blind but I don't see MinGW listed in that page... Maybe it's included but not listed... Bye, bearophile -- http://mail.python.org/mailma

refcounting errors???

2006-11-02 Thread [EMAIL PROTECTED]
Hi, I have a few problems with the C-API. I am trying to embed Python in a simulator that I am writing (I am replacing my previous Guile-based scripting system (mostly as pyrex is a lot nicer than swig and the fact that PyUnit is really nice)). Non the less, my problems come when dealing with cal

Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-02 Thread robert
I'd like to use multiple CPU cores for selected time consuming Python computations (incl. numpy/scipy) in a frictionless manner. Interprocess communication is tedious and out of question, so I thought about simply using a more Python interpreter instances (Py_NewInterpreter) with extra GIL in t

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Robert Kern: >> We distribute mingw set up to do this with our "Enthought >> Edition" Python distribution. >> http://code.enthought.com/enthon/ > > Sorry, maybe I'm blind but I don't see MinGW listed in that page... > Maybe it's included but not listed... It's there. -

Re: Python in sci/tech applications

2006-11-02 Thread robert
Fredrik Lundh wrote: > robert wrote: > >> Is it really not possible to create extension libs with > > older MSVC or Mingw, which work with regular Python binaries > > version 2.4 and 2.5 ? > > last time I tried, it took me 20 minutes from that I typed "mingw" into > google until I had built an

Re: Forum written in Python?

2006-11-02 Thread slav0nic
Karlo Lozovina пишет: > Are there any forum or bulletin board systems written entirely in Python? > I got sick of PhpBB, mostly because I can't tweak and fiddle with the > code, since I really don't like PHP and don't know it that well. > > I thought of writting my own simple forum software, but

problem with svd in numpy

2006-11-02 Thread Zeynep Gerek
Hello, I am having weird problem with svd routine in python. I am comparing eigenvector values from python and matlab. And they are giving different values. Actually, they are same but python gives negative values of these numbers.   This is my test program (I am dealing with 100x100 mat

Creating db front end or middleware.

2006-11-02 Thread tobiah
Let's say I want to write a new tool to do something to, or report on people in a database. Each tool is going to have to have all sorts of routines that know about the relationship between the data. The first thought is to write a library of routines that do things like, change_address(), or fire

Re: Python in sci/tech applications

2006-11-02 Thread bearophileHUGS
Fredrik Lundh: > last time I tried, it took me 20 minutes from that I typed "mingw" into > google until I had built and tested my first non-trivial extension. your > milage may vary. But probably before those 20 minutes there is a lot of time of experience of yours with CPython sources, other comp

Re: Forum written in Python?

2006-11-02 Thread Salvatore
Hello, Look at Karrigell, it includes the base of a forum and a blog in is demo Karrigell is a wonderfull pythonic framework. It's simple and efficient. Thanks his author Regards slav0nic a écrit : > Karlo Lozovina ÐÉÛÅÔ: > > Are there any forum or bulletin board systems written entirely in

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-02 Thread Jean-Paul Calderone
On Thu, 02 Nov 2006 19:32:54 +0100, robert <[EMAIL PROTECTED]> wrote: >I'd like to use multiple CPU cores for selected time consuming Python >computations (incl. numpy/scipy) in a frictionless manner. NumPy releases the GIL in quite a few places. I haven't used scipy much, but I would expect it

  1   2   >