Re: Javascript is turning into Python?!

2006-11-02 Thread Fredrik Lundh
Paul Rubin wrote: > I hadn't seen this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 http://weblogs.mozillazine.

Re: Javascript is turning into Python?!

2006-11-02 Thread Maxim Sloyko
Paul Rubin wrote: > [Correction of earlier accidental crosspost] > > I hadn't seen this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_

Re: Best way to have intermediate object description format

2006-11-02 Thread [EMAIL PROTECTED]
Thanks paddy, Since the original language from which I am translating does not support any of these formats, I will have to write one myself. So, which one is easy to write out in a C like environment. regards, Suresh Paddy wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > Is there any standard text

Re: __doc__ in compiled script

2006-11-02 Thread Fredrik Lundh
Gabriel Genellina wrote: >> >>> co.co_consts[list(co.co_names).index("__doc__")] >> 'This is a docstring' > > Good! I'll buy this one :) thanks! however, there's no 1:1 mapping between names and constants; if you want code that works by accident, you might as well use co_consts[0]. -- http:

Re: Javascript is turning into Python?!

2006-11-02 Thread Paul Rubin
[Correction of earlier accidental crosspost] I hadn't seen this before. New Javascript 1.7 features: - Generators - Iterators - Array comprehensions - Destructuring assignment Sounds like another language we know. http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 -- http://mail.pytho

Re: emacs shell hangs on W32 with python

2006-11-02 Thread Brian Elmegaard
[EMAIL PROTECTED] writes: > Is there any way to run python through emacs or xemacs without having > it hang or is shell support broken? Doing it from eshell gives the same problem :-( -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html Rugbyklubben Speed Scandinavi

Re: is mod_python borked?

2006-11-02 Thread Tim Roberts
"walterbyrd" <[EMAIL PROTECTED]> 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? mod_python is most definitely NOT the only way of using Python to

Re: urllib2: HTTP Version not supported

2006-11-02 Thread Tim Roberts
"Nirnimesh" <[EMAIL PROTECTED]> wrote: > >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? Are you pass

Re: Best way to have intermediate object description format

2006-11-02 Thread Paddy
[EMAIL PROTECTED] wrote: > Hi, > Is there any standard text format for storing data of object oriented > nature. > The text file should be readable. > > That is, Is there any better way than having to write out a file like > this from the original place and read it in python and process it. > >

Re: a newbi problem: can't find complete python curses library

2006-11-02 Thread Bill Pursell
krishnakant Mane wrote: > I will like to use the curses or ncurses library for the menus and the > input forms with add, save, delete, update and cancel buttens. > I also need to create drop down menus with a top level menu bar. > I read a few articles about python wrapping curses but can't find

Best way to have intermediate object description format

2006-11-02 Thread [EMAIL PROTECTED]
Hi, Is there any standard text format for storing data of object oriented nature. The text file should be readable. That is, Is there any better way than having to write out a file like this from the original place and read it in python and process it. # world = Worl

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

2006-11-02 Thread Tiefeng Wu
Tim Chase wrote: > Having a win32 program take case-sensitive filenames is a bit > odd, given that the OS is case-agnostic...however, that doesn't > preclude bad programming on the part of your tool-maker. Alas. > > Thus, to accomodate the lousy programming of your tool's maker, I > proffer thi

Re: a newbi problem: can't find complete python curses library

2006-11-02 Thread Rainy
krishnakant Mane wrote: > hello, > I am a new member to this list. > I am Krishnakant from India, Mumbai. > I have been coding in python for quite some time and now I am at the > intermediate level of programming as far as python is concerned. > I am going to develop a accounting software that can

a newbi problem: can't find complete python curses library

2006-11-02 Thread krishnakant Mane
hello, I am a new member to this list. I am Krishnakant from India, Mumbai. I have been coding in python for quite some time and now I am at the intermediate level of programming as far as python is concerned. I am going to develop a accounting software that can work on the console and accessed thr

Re: Style for modules with lots of constants

2006-11-02 Thread Scott David Daniels
Paul McGuire wrote: > class Constants(object): > pass > > Then I defined the context for my LEFT and RIGHT constants, which are being > created to specify operator associativity, and then my constant fields as > attributes of that object: > > opAssoc = Constants(object) > opAssoc.RIGHT = 0

Re: The Python Journal

2006-11-02 Thread [EMAIL PROTECTED]
Thanks all for your comments. A number of people have mentioned the click-difficulty of getting to the journal. I'll work with the publisher to make that happen, otherwise I may be able to manually edit the front page to include a link to the latest version. It's great to have people visiting alre

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Steve Holden
John Salerno wrote: > Fredrik Lundh wrote: > >>JohnJSal wrote: >> >> >>>That's a perfectly valid comment, but in this case just not applicable. >>>I spent a lot of time working through my original question before >>>posting, but I just couldn't get it. >> >>how do you fit "a lot of time" into 18 m

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread John Salerno
Fredrik Lundh wrote: > JohnJSal wrote: > >> That's a perfectly valid comment, but in this case just not applicable. >> I spent a lot of time working through my original question before >> posting, but I just couldn't get it. > > how do you fit "a lot of time" into 18 minutes? > > > Hmmm, I ha

Re: creating new objects with references to them

2006-11-02 Thread John Salerno
Dennis Lee Bieber wrote: > I'd keep it -- since the operations to load/save from the database > should probably be methods of that class -- or, at least, the mapping > from instance attributes to the SQL might be... Well, I'm sort of working on a method that just involves a bunch of functi

Re: is mod_python borked?

2006-11-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: > 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? > > > I replied to you over on the mod_python mailing

Re: How to test python extension modules during 'make check' / 'make distcheck'?

2006-11-02 Thread Leo Kislov
Mark Asbach wrote: > Hi pythonians, > > I'm one of the maintainers of an open source image processing toolkit > (OpenCV) and responsible for parts of the autotools setup. The package > mainly consists of four shared libraries but is accompanied by a python > package containing some pure python cod

Re: is mod_python borked?

2006-11-02 Thread walterbyrd
[EMAIL PROTECTED] wrote: > One of the biggest problems is that a lot of ISPs still use Apache 1.3 > and so only mod_python 2.7.X is available on those platforms. Yes, I think that is a big problem. I don't think django or turbogears will work with apache 1.3. And it seems to me that practically

Re: other ways to check for ?

2006-11-02 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Python should have a TypeError subclass: "NotCallableError", to > enforce BAFP. Bureau of Alcohol, Firearms, and Programmers? (Perhaps you meant "EAFP") -- \ "If you go flying back through time and you see somebody else | `\ flying f

Re: __doc__ in compiled script

2006-11-02 Thread Gabriel Genellina
At Thursday 2/11/2006 17:54, Peter Otten wrote: > I have a script starting with a docstring. After compiling it with > compile(), is there any way I could get the docstring? __doc__ on the > code object doesn't work. > I can't use __import__ because the script has top-level statements > that hav

Re: other ways to check for ?

2006-11-02 Thread [EMAIL PROTECTED]
Python should have a TypeError subclass: "NotCallableError", to enforce BAFP. -- http://mail.python.org/mailman/listinfo/python-list

How to test python extension modules during 'make check' / 'make distcheck'?

2006-11-02 Thread Mark Asbach
Hi pythonians, I'm one of the maintainers of an open source image processing toolkit (OpenCV) and responsible for parts of the autotools setup. The package mainly consists of four shared libraries but is accompanied by a python package containing some pure python code and of course extension modul

Re: scared about refrences...

2006-11-02 Thread Gabriel Genellina
At Thursday 2/11/2006 19:23, SpreadTooThin wrote: I realize I may be beating a dead horse here... but... def fn(x): x = x + 1 print x a = 2 fn(a) >>> 3 print a >>> 2 So in some cases the it is safe to assume that your variables to function will not change in other cases it is not.. but t

Re: is mod_python borked?

2006-11-02 Thread grahamd
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? I replied to you over on the mod_python mailing list when you reposted the question t

Re: Win32 COM

2006-11-02 Thread Tom Plunket
Tom Plunket wrote: > I don't know anything about COM beyond the fact that I can look in the > OLE/COM browser to maybe figure out the API that an object has that I > need to operate on. I'm still not entirely sure what's going on, because there are some methods and properties that are available b

emacs shell hangs on W32 with python

2006-11-02 Thread emin . shopper
Emacs seems to freeze when doing certain shell commands on Microsoft Windows. The following is a simple example with Xemacs: -- [Xemacs version 21.4.19; January 2006] Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft

Re: Keyboard interrupts, Idle vs. SciTE

2006-11-02 Thread Neil Hodgson
John Ladasky: > Under SciTE, I do not get my "exiting program" message. Instead, I get > the standard SciTE abort message: > > >> Process failed to respond; forcing abrupt termination... >> Exit code: 1 > > > I much prefer the SciTE environment to Idle. Is there any way that I > can rewrite

Re: scared about refrences...

2006-11-02 Thread Steve Holden
SpreadTooThin wrote: > Bruno Desthuilliers wrote: > >>SpreadTooThin a écrit : >> >>>Bruno Desthuilliers wrote: >>> >>> Nick Vatamaniuc a écrit : (snip) >In Python all the primitives are copied and all other entities are >references. Plain wrong. There's no "prim

Re: is mod_python borked?

2006-11-02 Thread Jeffrey Froman
walterbyrd wrote: > Researching further, it looks to me like mod_python may only work well > on apache 2.X. mod_python works splendidly with Apache 2.0.x as well as Apache 1.3.x. There is a different mod_python version for each Apache branch. The version for Apache 2.0.x has newer features, but t

Re: scared about refrences...

2006-11-02 Thread SpreadTooThin
Bruno Desthuilliers wrote: > SpreadTooThin a écrit : > > Bruno Desthuilliers wrote: > > > >>Nick Vatamaniuc a écrit : > >>(snip) > >> > >>>In Python all the primitives are copied and all other entities are > >>>references. > >> > >>Plain wrong. There's no "primitives" (ie : primitive data types)

Re: Python in sci/tech applications

2006-11-02 Thread John Coleman
Robert Kern wrote: > John Coleman wrote: > > Maybe I don't know what I'm looking for, but I downloaded Enthought a > > few days ago and don't seem to find MinGW on my system. There are 2 > > relatively small (totalling about 13 kb IIRC) *python* files deeply > > buried in the distribution with min

Keyboard interrupts, Idle vs. SciTE

2006-11-02 Thread John Ladasky
Hi there. The following minimal code in Python 2.3.4 works under Idle v. 1.0.3, but not under SciTE v. 1.66: from time import sleep try: while True: sleep(0.25) print ".", except KeyboardInterrupt: print "\nKeyboard interrupt received. Exiting program.\n\n" Under SciTE,

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
John Coleman wrote: > Maybe I don't know what I'm looking for, but I downloaded Enthought a > few days ago and don't seem to find MinGW on my system. There are 2 > relatively small (totalling about 13 kb IIRC) *python* files deeply > buried in the distribution with mingw in their filename but nothi

problem controlling/displaying video thru "pexpect"

2006-11-02 Thread mavicdog
I am developing a small appl. for a student to code some video. I am able to control mplayer in slave mode through IDLE using pexpect. In my app though I want to display it in a particular frame and have buttons control rw ff, stop, play etc... I am having two problems. One how do I frame the mplay

Re: Python in sci/tech applications

2006-11-02 Thread John Coleman
Maybe I don't know what I'm looking for, but I downloaded Enthought a few days ago and don't seem to find MinGW on my system. There are 2 relatively small (totalling about 13 kb IIRC) *python* files deeply buried in the distribution with mingw in their filename but nothing like a gcc compiler. I've

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Fredrik Lundh
JohnJSal wrote: > That's a perfectly valid comment, but in this case just not applicable. > I spent a lot of time working through my original question before > posting, but I just couldn't get it. how do you fit "a lot of time" into 18 minutes? -- http://mail.python.org/mailman/listinfo/pytho

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread JohnJSal
Carsten Haese wrote: > The fact that you were able to answer your own question only a few > minutes later indicates to me that you should set your "I give up and > ask the list" threshold a tad higher. That's a perfectly valid comment, but in this case just not applicable. I spent a lot of time w

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Carsten Haese
On Thu, 2006-11-02 at 13:14 -0800, JohnJSal wrote: > JohnJSal wrote: > > JohnJSal wrote: > > > Peter Otten wrote: > > > > > > > > > > ...the above is not a 1-tuple, but an ordinary string. You forgot the > > > > trailing comma: > > > > > > > > ('notes',) > > > > > > Right you are! Now it works! :)

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Rainy
JohnJSal wrote: > JohnJSal wrote: > > Peter Otten wrote: > > > > > > > ...the above is not a 1-tuple, but an ordinary string. You forgot the > > > trailing comma: > > > > > > ('notes',) > > > > Right you are! Now it works! :) > > > > Thanks! > > Oh great, now I've moved on to another issue. It see

Re: __doc__ in compiled script

2006-11-02 Thread Gabriel Genellina
At Thursday 2/11/2006 17:59, Fredrik Lundh wrote: > I have a script starting with a docstring. After compiling it with > compile(), is there any way I could get the docstring? __doc__ on the > code object doesn't work. > > I can't use __import__ because the script has top-level statements that

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread JohnJSal
JohnJSal wrote: > JohnJSal wrote: > > Peter Otten wrote: > > > > > > > ...the above is not a 1-tuple, but an ordinary string. You forgot the > > > trailing comma: > > > > > > ('notes',) > > > > Right you are! Now it works! :) > > > > Thanks! > > Oh great, now I've moved on to another issue. It see

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread JohnJSal
JohnJSal wrote: > Peter Otten wrote: > > > > ...the above is not a 1-tuple, but an ordinary string. You forgot the > > trailing comma: > > > > ('notes',) > > Right you are! Now it works! :) > > Thanks! Oh great, now I've moved on to another issue. It seems that the list appending isn't working rig

Re: is mod_python borked?

2006-11-02 Thread walterbyrd
Shreekar Patel wrote: > No, I've been using mod_python for a long time, and I haven't run in to > any problems. In fact I use python server pages for my web development, > which is much faster than python cgi scripts. > Researching further, it looks to me like mod_python may only work well on ap

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
Steve Holden wrote: > Robert Kern wrote: >> [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.

Re: Converting a .dbf file to a CSV file

2006-11-02 Thread John Machin
Johanna Pfalz wrote: > Is there a module/method in python to convert a file from .DBF format to > .CSV format? > > Hi Johanna, the best start at the moment is the Python Cookbook recipe that others have quoted. Steps: (1) Input: as per recipe. Note that the recipe handles only the earliest simple

Re: __doc__ in compiled script

2006-11-02 Thread Peter Otten
Gabriel Genellina wrote: > Hello > > I have a script starting with a docstring. After compiling it with > compile(), is there any way I could get the docstring? __doc__ on the > code object doesn't work. > I can't use __import__ because the script has top-level statements > that have to be execut

Re: __doc__ in compiled script

2006-11-02 Thread Fredrik Lundh
Gabriel Genellina wrote: > I have a script starting with a docstring. After compiling it with > compile(), is there any way I could get the docstring? __doc__ on the > code object doesn't work. > > I can't use __import__ because the script has top-level statements that > have to be executed on

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread JohnJSal
Peter Otten wrote: > ...the above is not a 1-tuple, but an ordinary string. You forgot the > trailing comma: > > ('notes',) Right you are! Now it works! :) Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in sci/tech applications

2006-11-02 Thread Steve Holden
Robert Kern wrote: > [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 no

Re: is mod_python borked?

2006-11-02 Thread Bruno Desthuilliers
Michael S a écrit : > 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. Seems there's a strange bug with pysqlite when you have both mod_python/pysqlite and php5... -- http://mail.python.org/mailman/li

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Peter Otten
JohnJSal wrote: > Can someone explain to me why the first version of this method works, > but the second one doesn't? All I've changed (I think) is how the > information is nested. The error I'm getting is that the call to > xrc.XRCCTRL is not working in the second example. Instead of getting > th

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Carsten Haese
On Thu, 2006-11-02 at 12:28 -0800, JohnJSal wrote: > Can someone explain to me why the first version of this method works, > but the second one doesn't? All I've changed (I think) is how the > information is nested. The error I'm getting is that the call to > xrc.XRCCTRL is not working in the secon

__doc__ in compiled script

2006-11-02 Thread Gabriel Genellina
Hello I have a script starting with a docstring. After compiling it with compile(), is there any way I could get the docstring? __doc__ on the code object doesn't work. I can't use __import__ because the script has top-level statements that have to be executed only once (it's not supposed to b

Re: scared about refrences...

2006-11-02 Thread Bruno Desthuilliers
SpreadTooThin a écrit : > Bruno Desthuilliers wrote: > >>Nick Vatamaniuc a écrit : >>(snip) >> >>>In Python all the primitives are copied and all other entities are >>>references. >> >>Plain wrong. There's no "primitives" (ie : primitive data types) in >>Python, only objects. And they all get pas

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread JohnJSal
JohnJSal wrote: > Can someone explain to me why the first version of this method works, > but the second one doesn't? Sorry, it's the first one that doesn't work. The second one does. -- http://mail.python.org/mailman/listinfo/python-list

what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread JohnJSal
Can someone explain to me why the first version of this method works, but the second one doesn't? All I've changed (I think) is how the information is nested. The error I'm getting is that the call to xrc.XRCCTRL is not working in the second example. Instead of getting the appropriate widget, it's

Re: __div__ not recognized automatically

2006-11-02 Thread Tuomas
Try a=(b+c)/NumX(2) TV 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

Re: uninstall and Windows file associations

2006-11-02 Thread Trent Mick
Roger Miller wrote: > When I installed Python 2.5 (on Windows XP) I left 2.4 in place "just > in case". Today I decided to remove it. However after doing so (from > the control panel) I found that Windows no longer knows about the > Python file types and associations. Is this behavior expected, or

Re: problem with svd in numpy

2006-11-02 Thread Robert Kern
Zeynep Gerek wrote: > Hello, > > I am having weird problem with svd routine in python. numpy questions are best asked on the numpy list. http://www.scipy.org/Mailing_Lists > I am comparing > eigenvector values from python and matlab. And they are giving different > values. Actually, they a

Accessing Javascript variable in python chunk in spyce

2006-11-02 Thread Bhartesh Doshi
Hi. I am using spyce and coding protions in _javascript_ and python chunks. I want to use a variable defined and calculated in _javascript_ in a python chunk. Is this possible.   Regards, Bhartesh. -- http://mail.python.org/mailman/listinfo/python-list

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

2006-11-02 Thread Jean-Paul Calderone
On Thu, 2 Nov 2006 14:15:58 -0500, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >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 re

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >