Re: Printing Barcodes from webapp?

2006-12-02 Thread Andy Dingley
Burhan wrote: > Is there an easy way to generate barcodes using Python Easy way for any application or language to generate barcodes is to install a barcode font on the client machine, then just generate a suitable text string for it. This is _very_ easy, if you can get the font deployed. I u

Re: rdf, xmp

2006-12-04 Thread Andy Dingley
Imbaud Pierre wrote: > I have to add access to some XMP data to an existing python > application. > XMP is built on RDF, I'm just looking at the XMP Spec from the Adobe SDK. First impressions only, as I don't have time to read the whole thing in detail. This spec doesn't inspire me with confide

Re: dict.has_key(x) versus 'x in dict'

2006-12-06 Thread Andy Dingley
Paul Melis wrote: > I've always been using the has_key() method to test if a dictionary > contains a certain key. Recently I tried the same using 'in', e.g. I've found using the set type to be the quickest way to do many of these tasks. That leads me to another problem: how to cast / convert sets

Re: dict.has_key(x) versus 'x in dict'

2006-12-06 Thread Andy Dingley
Roberto Bonvallet wrote: > >lstBugsChanged = [ bugId for bugId in setBugsChanged ] > In Python > 2.4: Hmmm. Thanks. Another reason to twist the admin's arm and get them to upgrade the last 2.3.4 boxen > sorted(setBugsChanged) Out of interest, whats the Pythonic way to simply cast

Re: One module per class, bad idea?

2006-12-12 Thread Andy Dingley
Matias Jansson wrote: > I come from a background of Java and C# where it is common practise to have > one class per file in the file/project structure. Don't confuse packages and files. Java commonly splits a package across many files, Python binds a module to a single file. If you see "Java pa

Re: program deployment

2007-01-05 Thread Andy Dingley
king kikapu wrote: > > > Are they embarassed by their code? > > hehehe...no, just worried about stealing their ideas... Ever heard of "Open Source" ? I do better by letting other people steal my ideas (and stealing theirs too) than I'd ever do by keeping things secret. -- http://mail.python.or

fixedint.py enhanced for auto-coercion (fixed-width python integers)

2006-02-03 Thread Andy Sy
Hi Dan, I find that when doing bit-twiddling in pure Python, fixed-width integer support is an extremely handy capability to have in Python regardless of what the apologists (for its absence) say. I added some stuff to fixedint.py to make >>> x=SByte(80) >>> x+200 fixedint.SignedType(8)(24) th

UK Python Conference - 19-20 April 2006

2006-02-28 Thread Andy Robinson
Simon Willison: Django Remi Delon: CherryPy and TurboGears Chris Withers: Templating systems Andy Robinson: Metadata and models in Python Andrew Thompson: Financial Programming in Python ...and of course lightning talks and BOFS will be welcome Friday 21st

Re: Python & SQLite

2005-05-04 Thread Andy Jeffries
ant me to merge these packages? [Yes/No] Cheers, Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: "/usr/bin/ld: cannot find -lmysqlclient" when building MySQL-Python

2005-05-12 Thread Andy Dustman
[EMAIL PROTECTED] wrote: > Hi. I'm trying to build MySQL-python-1.2.0 on my Linux FC2 > (with MySQL 3.23.58). See: https://sourceforge.net/tracker/index.php?func=detail&aid=1146226&group_id=22307&atid=374932 And also try the new 1.2.1c3 release candidate. -- http://mail.python.org/mailman/list

ldaptor based LDAP server

2005-05-19 Thread Andy Leszczynski
Hi, I am looking for a Python barebones for a simple LDAP server project. It does not have to be Twisted based, but it would be wonderful if it is. I need a very simple server which is listening on some port and accepts following LDAP messages: -bind -search -unbind There a

how to import a module from a arbitraty path?

2005-05-25 Thread Andy Leszczynski
I have a program which is going to dynamicly load components from some arbitrary defined paths. How to do that? A. -- http://mail.python.org/mailman/listinfo/python-list

Re: write to the same file from multiple processes at the same time?

2005-05-27 Thread Andy Leszczynski
gabor wrote: > the problem is: > what happens if 2 users invoke the cgi at the same time? Would BerkleyDB support that? -- http://mail.python.org/mailman/listinfo/python-list

Re: How do i read just the last line of a text file?

2005-05-29 Thread Andy Leszczynski
Chris F.A. Johnson wrote: > On Sun, 29 May 2005 at 05:57 GMT, John Machin wrote: > >>Chris F.A. Johnson wrote: >> >> >>>file = open(argv[1]) ## Open the file given on the command line >>>all_lines = file.readlines() ## Read all the lines >> >>I see your shadowing and raise you one obfusc

Python Challenge web site

2005-06-08 Thread Andy Leszczynski
Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit http://www.pythonchallenge.com/ anybody get to the level 30? :-) -- http://mail.python.org/mailman/listinfo/python-list

Using doctest with simple text files ?

2007-06-08 Thread Andy Dingley
I have a problem involving lots of simple text files (Java properties files), for which I'm building Python tools to manage their contents. I'm also writing lots of Python modules and using doctest to embed unit tests within them. Maintenance and shhared code ownership is an issue here. What's th

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 12:26 am, Paul Rubin wrote: > Precisely, I think that's what Alexander was trying to get across, Lisp > didn't have a uniform interface for traversing different types of sequence. And he's wrong, at least as far as common lisp is concerned - map does exactly t

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 8:49 am, Andy Freeman <[EMAIL PROTECTED]> wrote: > Map doesn't work on generators or iterators because they're not part > of the common lisp spec, but if someone implemented them as a library, > said library could easily include a map that handled them as well

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 10:10 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Andy Freeman <[EMAIL PROTECTED]> writes: > > Compare that with what a programmer using Python 2.4 has to do if > > she'd like the functionality provided by 2.5's with statement. Yes, > >

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 27, 1:15 am, Paul Rubin wrote: > Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > > >What happens when two individuals release "libraries" using these > > proposed macros -- and have implement conflicting macros using the same > > identifiers -- and you try to u

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 26, 10:03 am, Paul Rubin wrote: > > Map doesn't work on generators or iterators because they're not part > > of the common lisp spec, but if someone implemented them as a library, > > said library could easily include a map that handled them as well. > > Right, mor

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Andy Freeman
On Jun 27, 2:54 pm, John Nagle <[EMAIL PROTECTED]> wrote: > >> But, what about something in between like only > >> using the dot (.) for a shorter notation? > > How about "Mavis Beacon Teaches Typing"? How about no "wouldn't it be better" suggestions until at least three months after the sugg

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 27, 8:09 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 6/27/07, Andy Freeman <[EMAIL PROTECTED]> wrote: > > It's easy enough to get around the lack of objectness and add the > > equivalent of an iterator iterface, in either language. The

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Andy Freeman
ent index, but that has space and/or time consequences. It's unclear that that approach generalizes for more complicated structures. (You can't just pull all of the links out into such lists.) In short, while disallowing loops with strong pointers is "a" right answer, it isn&#x

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Andy Freeman
On Jun 28, 1:09 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Andy Freeman wrote: > > On Jun 27, 11:41 pm, John Nagle <[EMAIL PROTECTED]> wrote: > > While I agree that weak pointers are good and can not be an > > afterthought, I've written code where "ba

Re: Lisp-like macros in Python?

2007-05-01 Thread Andy Freeman
On May 1, 9:10 am, sturlamolden <[EMAIL PROTECTED]> wrote: > I was > wondering if it is possible to emulate some of the functionality in > Python using a function decorator that evals Python code in the stack > frame of the caller. The macro would then return a Python expression > as a string. Gran

Decorating class member functions

2007-05-03 Thread Andy Terrel
Okay does anyone know how to decorate class member functions? The following code gives me an error: Traceback (most recent call last): File "decorators2.py", line 33, in s.update() File "decorators2.py", line 13, in __call__ retval = self.fn.__call__(*args,**kws) TypeError: update()

Re: Decorating class member functions

2007-05-03 Thread Andy Terrel
Oh I should mention the decorator needs to have some notion of state (such as with the above class) -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I import a variable from another module?

2007-05-03 Thread Andy Terrel
are you sure your variable isn't in some code block that wouldn't be read on import? Such as: if __name__ == "__main___": actions = 1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorating class member functions

2007-05-03 Thread Andy Terrel
I just need to keep the state around. I make a call to some function that is pretty expensive so I want to save it as a member during the __init__ of the decorator. Yeah I'm afraid it can't be done either, that's why I asked the group. -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorating class member functions

2007-05-03 Thread Andy Terrel
not quite as elegant but here is a workaround... Thanks Virgil for taking some time to think about it. --- class Bugger (object): def __init__ (self, module): print "Entering __init__" self.module = module self.verb = 0 def instrument (module_name): def wrapper(f)

Re: Decorating class member functions

2007-05-04 Thread Andy Terrel
Thanks Peter and 7stud. That is the solution that really works for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: beginner in python

2007-08-02 Thread Andy Cheesman
(http://pymol.sourceforge.net/) they might have some of the functionality which you desire already coded! HTH Andy Steve Holden wrote: > Beema shafreen wrote: >> hi everybody, >>I am beginner in python >> I have to calculate the euclidean distance between the atoms from a pdb >> fil

Python molecular viewer

2007-08-29 Thread Andy Cheesman
d displays simple structures which can be rotated in 3D Thanks Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Andy Dingley
On 26 Mar, 14:20, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > what are the advantages of using Python for > creating number crunching apps over Fortran?? If you have to ask, you've not experienced enough Fortran to know its sheer horror. You can write programs in Python that do usefully com

Re: matching a street address with regular expressions

2007-10-11 Thread Andy Cheesman
Check out kodos http://kodos.sourceforge.net/ for an interactive python regexp tester Andy Goldfish wrote: > Don't forget to write test cases. If you have a series of addresses, > and confirm they are parsed correctly, you are in a good position to > refine the pattern. You will

Retrieve keywords a internet domain name

2007-01-31 Thread Andy Wu
Hi All, I've been working on a domain parking project where we need to analyze a domain name, say "bookhotel", and get keywords(book, hotel) out of it, then use these keywords to do some search. There are two ways to do this as far as I can see, longest match and quickest match. Longest match: bo

Python tools to manipulate JARs ?

2007-01-31 Thread Andy Dingley
I run build processes for a Java shop using Python (and some Ant). Would anyone care to suggest favoured tools for manipulating the innards of JARs? Or do I just treat them as plain zipfiles and get stuck right in there? Mainly I'm trying to query lists of classes and their embedded versions and

how to merge strings to a line

2007-02-02 Thread andy king
d help me out with the logic here. any tips/direction would be helpful. -- --andy -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I access data from MS Access?

2007-02-05 Thread Andy Dingley
On 3 Feb, 15:43, [EMAIL PROTECTED] wrote: > How to access data from MS Access? Can you access Access from Access ? from Excel / Visual Basic / SQL Query? First of all check that the DSN is working and connects to the back end MDB. This might not be Python's problem. Secondly check whatever error

Re: How can I access data from MS Access?

2007-02-06 Thread Andy Dingley
On 5 Feb, 19:40, "Sells, Fred" <[EMAIL PROTECTED]> wrote: > Years ago we used to get our FORTRAN card decks back from the DP center > with a piece of scrap paper saysing "She No Work". top that. I used to use a cross-compiler (targetting some obscure single-chip hardware) that had just a single

Re: c++ for python programmers

2007-02-12 Thread Andy Terrel
On Feb 12, 4:11 pm, "Thomas Nelson" <[EMAIL PROTECTED]> wrote: > On Feb 12, 1:35 pm, andrew clarke <[EMAIL PROTECTED]> wrote: > > > Thomas, I sent you a message off-list but it bounced due to your mailbox > > being full. > > > Short answer: Subscribe to the [EMAIL PROTECTED] mailing list and > > as

rot13 in a more Pythonic style?

2007-02-14 Thread Andy Dingley
I'm trying to write rot13, but to do it in a better and more Pythonic style than I'm currrently using. What would you reckon to the following pretty ugly thing? How would you improve it? In particular, I don't like the way a three-way selection is done by nesting two binary selections. Also I d

Re: rot13 in a more Pythonic style?

2007-02-14 Thread Andy Dingley
On 14 Feb, 16:23, Neil Cerutti <[EMAIL PROTECTED]> wrote: > str.translate is what I'd do. That's what I hope to do too, but it might not be possible (for the live, complex example). It looks as if I have to make a test, then process the contents of the code differently depending. There might well

Re: rot13 in a more Pythonic style?

2007-02-15 Thread Andy Dingley
On 14 Feb, 21:59, Paul Rubin wrote: > Why don't you describe the actual problem instead of the rot13 analogy. I don't know what the actual problem is! I need to perform a complex mapping between "old style" structured identifiers and "new style" structured identifers. A

Re: rot13 in a more Pythonic style?

2007-02-15 Thread Andy Dingley
On 15 Feb, 17:55, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > Sounds more like a case for a parser/lexer wherein the emitted "code > tokens" are the "new style" identifiers... 8-(I'm trying not to think about that Fortunately I don't think it's _quite_ that bad. -- http://ma

Re: rot13 in a more Pythonic style?

2007-02-16 Thread Andy Dingley
On 14 Feb, 20:06, "Beej" <[EMAIL PROTECTED]> wrote: > http://linuxgazette.net/109/pramode.html Thanks, that's a _really_ interesting link (Oh, I need to learn Scheme!) My code now looks like this, which I'm starting to feel much happier about in a functional sense. c_rot = lambda c, chars :

Re: Help Required for Choosing Programming Language

2007-02-19 Thread Andy Dingley
On 16 Feb, 21:22, [EMAIL PROTECTED] wrote: > I am VB6 programmer and wants to start new programming language Why? What is causing you to do this, and what do you need to achieve by doing it? > i want to go through with GUI based programming language like VB.net "GUI-based" is fairly unimportant

Possible to set cpython heap size?

2007-02-22 Thread Andy Watson
7;ve had a scan through the archives of comp.lang.python and the python docs but cannot find a way to do this. Is this possible to configure the PVM this way? Much appreciated, Andy -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to set cpython heap size?

2007-02-22 Thread Andy Watson
heap as I read in content incrementally. Ta, Andy -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to set cpython heap size?

2007-02-22 Thread Andy Watson
ork more efficiently. Interesting discussion. Cheers, Andy -- -- http://mail.python.org/mailman/listinfo/python-list

dpap implementation in python

2007-12-11 Thread Andy Cheesman
Hi people Is there a dpap implementation for python? All I can seem to find is perl based? (dpap is used to share photos in iphoto) Andy -- http://mail.python.org/mailman/listinfo/python-list

NaN handling

2006-05-03 Thread Andy McDonagh
his exists? Many thanks Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: [silly] Does the python mascot have a name ?

2006-05-17 Thread Andy Sy
Steve wrote: > umm, was just wondering, does the python mascot have a name ? We are naming > the > conference rooms in our office you see :o). > > Also, is there a place I could get some neat, good quality pics of the python > ? > > - steve The Python mascot is called Odi. http://mail.python

Tabs are evil, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Harry George wrote: > This has been discussed repeatedly, and the answer is "If you only > work alone, never use anyone else's code and no one ever uses your > codes, then do as you please. Otherwise use tab-is-4-spaces." > > When you do Agile Programming with people using emacs, vim, nedit, > x

Tabs are *EVIL*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Please... just stop this senseless defense of a Rube-Goldberg feature. There will NEVER be a universal agreement on whether tabs should be 2, 3, 4 or 8 spaces in width, and this causes endless tweaking of editor settings (a *humongous* waste of time) to handle source code made by other programmers

Re: Web framework to recommend (don't use one, use Spyce instead)

2006-05-17 Thread Andy Sy
Jacky wrote: > Hi all, > > I just started learning Python and would like to starting writing some > web-based applications with Python. > > I did have pretty much experience with doing so with PHP and Java, but > Python seems a bit different for me. > > Do you guys have some good web framework

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
If tabs are easily misunderstood, then they are a MISfeature and they need to be removed. >From the Zen of Python: "Explicit is better than implicit..." "In the face of ambiguity, refuse the temptation to guess..." "Special cases aren't special enough to break the rules..." -- It's called DOM+

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
achates wrote: >> Andy Sy wrote: >> Don't be evil - always configure your editor to >> convert tabs to true spaces. > > Yet another space-indenter demonstrates that problem actually lies with > people who think that tab == some spaces. Wrong. I am completely aw

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Peter Decker wrote: > On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: > >> If tabs are easily misunderstood, then they are a MISfeature >> and they need to be removed. > > I don't seem to understand your point in acting as a dictator. > Therefore, you are a

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Andy Sy
Peter Decker wrote: > Spaces look like crap, too, when using proportional fonts. ... and people who would even think that using proportional fonts for viewing/editing source code is anywhere remotely near being a good idea ... That's an even more advanced version of the i-think-tabs-are-good dis

Re: Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Peter Decker wrote: > On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: >> Peter Decker wrote: >>> On 5/17/06, Andy Sy <[EMAIL PROTECTED]> wrote: >>> >>>> If tabs are easily misunderstood, then they are a MISfeature >>>> and they n

Re: Tabs are *EVIL* AND *STUPID*, NOT 'misunderstood' (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
achates wrote: > Andy Sy > >> I guess this *REALLY* is how a misguided tab user exercises his 'logic': >> Syntax replication (e.g. so-called 'argument construction') is enough, >> semantics don't matter. > > That's quite amusing.. yo

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Andy Sy
Sybren Stuvel wrote: >> then WHAT THE HECK do you need to use tab characters in the source >> code for anyway (besides saving a measly few bytes) ??!? > > To separate layout (how much indentation is used) from semantics (how > many intentation levels). Like I said, you'll *NEVER* get that fancy s

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Andy Sy
achates wrote: > Andy Sy: >> Code with anything other than 8-space tabs will *NEVER* display >> properly using everyday unix utilities such as less and cat. > > less -x does what you want. > Ok, that tip certainly counts for something. This is definitely going to

Re: Tabs versus Spaces in Source Code (semantic vs. arbitrary indentation)

2006-05-17 Thread Andy Sy
Ed Singleton wrote: > On 5/15/06, Brian Quinlan <[EMAIL PROTECTED]> wrote: >> The problem with tabs is that people use tabs for alignment e.g. >> >> def foo(): >>->query = """SELECT * >>-> -> -> FROM sometable >>-> -> -> WHERE condition""" >> >> Now I change my editor to use 8-

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Andy Sy
Carl J. Van Arsdall wrote: >> Next major objection then, how can one practically use 'tabs as >> semantic indentation' without screwing up formatting of code like >> the below?? >> >> >> def sqlcall(): >> cursor.execute('select id, item, amount, field4, field5, field6'+ >>

The ONE TRUE WAY to use tabs (Re: Tabs versus Spaces in Source Code)

2006-05-20 Thread Andy Sy
achates wrote: > Yeah - we've got to the repeating ourselves stage. Actually a couple of the responses on this newsgroup have settled the question for me. I did learn something new by engaging in this holy war. Tabs need not be evil, but ONLY if they are used in one particular way: If you rea

Re: The ONE TRUE WAY to use tabs (if you must...)

2006-05-21 Thread Andy Sy
Andy Sy wrote: > Actually a couple of the responses on this newsgroup > have settled the question for me. I did learn something > new by engaging in this holy war. > > > Tabs need not be evil, but ONLY if they are used in one > particular way: > > If you really mu

Re: Dr. Dobb's Python-URL! - weekly Python news and links (May 22)

2006-05-22 Thread Andy Salnikov
ourse there is a mathematical proof of that provided somewhere, isn't it? :) "Too many" is always opposite to "hard to make a mistake", at least in my mind. Andy. -- http://mail.python.org/mailman/listinfo/python-list

Pysqlite issue no attribute 'autocommit'

2008-02-04 Thread Andy Smith
tried searching for it on the python issue traker and didnt find anything. Is anyone else aware of this issue and any solution? thanks for any help! Andy. PS sorry if I didnt include much info, hoping its a known issue (and also I didnt write the code, so not sure what else to include off th

Re: Pysqlite issue no attribute 'autocommit' RESOLVED

2008-02-04 Thread Andy Smith
Ok, simple fix... Updated to MySQL_python-1.2.2 and all ok now! :D - Original Message - From: Andy Smith To: [email protected] Sent: Monday, February 04, 2008 3:45 PM Subject: Pysqlite issue no attribute 'autocommit' Hi there, Im trying to run a Py

Pysqlite issue no attribute 'autocommit'

2008-02-04 Thread Andy Smith
tried searching for it on the python issue traker and didnt find anything. Is anyone else aware of this issue and any solution? thanks for any help! Andy. PS sorry if I didnt include much info, hoping its a known issue (and also I didnt write the code, so not sure what else to include off th

Re: Python 3.0 urllib.parse.parse_qs results in TypeError

2009-01-13 Thread Andy Grove
uot;, line 363, in handle self.handle_one_request() File "/Library/Frameworks/Python.framework/Versions/3.0/lib/ python3.0/http/server.py", line 357, in handle_one_request method() File "/Users/andy/Development/EclipseWorkspace/dbsManage/kernel.py", line 178, in

Re: Python 3.0 urllib.parse.parse_qs results in TypeError

2009-01-13 Thread Andy Grove
I don't fully understand this but if I pass in "str(qs)" instead of "qs" then the call works. However, qs is returned from file.read() operation so shouldn't that be a string already? In case it's not already obvious, I am new to Python :-) .. so I'm probably missing something here. -- http://mail

cgi.FieldStorage hanging with Python 3.0 (but works with 2.5.1)

2009-01-13 Thread Andy Grove
  As I said, this all works fine with Python 2.5.1 pre-installed. Any suggestions? Thanks, Andy. -- http://mail.python.org/mailman/listinfo/python-list

bubblefishymon

2009-01-16 Thread Andy Goldschmidt
pts. Does that mean Sensors is no longer used / supported ? If so , what do I use in place of it ? Please note, I don't know how to code in Python (yet!) so any help would be much appreciated. Regards Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
On Oct 24, 9:35 am, sturlamolden <[EMAIL PROTECTED]> wrote: > Instead of "appdomains" (one interpreter per thread), or free > threading, you could use multiple processes. Take a look at the new > multiprocessing module in Python 2.6. That's mentioned earlier in the thread. > > There is a fundamen

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
On Oct 24, 2:12 am, greg <[EMAIL PROTECTED]> wrote: > Andy wrote: > > 1) Independent interpreters (this is the easier one--and solved, in > > principle anyway, by PEP 3121, by Martin v. Löwis > > Something like that is necessary for independent interpreters, > but

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
mmunity effort, (2) make our own high-performance python interpreter (that uses an env object as you described), or (3) drop python and go to lua. I'm favoring them in the order I list them, but the more I discuss the issue with folks here, the more people seem to be unfortunately very divided on (1). Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
Glenn, great post and points! > > Andy seems to want an implementation of independent Python processes > implemented as threads within a single address space, that can be > coordinated by an outer application.  This actually corresponds to the > model promulgated in the pape

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
things with threads. Also, when the data sets that you need to send to and from each process is large, using the same address space makes more and more sense. > So, just to clarify - Andy, do you want one interpreter, $N threads > (e.g. PThreads) or the ability to fork multiple "heav

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
Another great post, Glenn!! Very well laid-out and posed!! Thanks for taking the time to lay all that out. > > Questions for Andy: is the type of work you want to do in independent > threads mostly pure Python? Or with libraries that you can control to > some extent? Are tho

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Andy O'Meara
nd others to chew on. I can tell you they're pretty important points for any performance-centric software provider (us, game developers--from EA to Ambrosia, and A/V production app developers like Patrick). Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Andy O'Meara
s of data (e.g. memory-resident video). How do you get that back to the parent process without serialization and IPC? What should really happen is just use the same address space so just a pointer changes hands. THAT's why I'm saying that a separate address space is generally a deal breaker when you have large or intricate data sets (ie. when performance matters). Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Andy O'Meara
On Oct 24, 9:40 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > It seems to me that the very simplest move would be to remove global > > static data so the app could provide all thread-related data, which > > Andy suggests through references to the Qui

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Andy O'Meara
not in a serialized form). Hence, my position that apps that use python can't be forced to go through IPC or else: (a) there's a performance/resource waste to serialize and unserialize large or intricate data sets, and (b) they're required to write and maintain serialization code that otherwise doesn't serve any other purpose. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Andy O'Meara
> Andy O'Meara wrote: > > I would definitely agree if there was a context (i.e. environment) > > object passed around then perhaps we'd have the best of all worlds. > > Moreover, I think this is probably the *only* way that > totally independent interpreters cou

Re: 2.6, 3.0, and truly independent intepreters

2008-10-26 Thread Andy O'Meara
6 am, greg <[EMAIL PROTECTED]> wrote: > Andy O'Meara wrote: > > I would definitely agree if there was a context (i.e. environment) > > object passed around then perhaps we'd have the best of all worlds. > > Moreover, I think this is probably the *only* way that >

Re: 2.6, 3.0, and truly independent intepreters

2008-10-26 Thread Andy O'Meara
ention (unless documented otherwise) is that the app can make as many contexts as its wants in whatever threads it wants because the convention is that the app is must (a) never use one context's objects in another context, and (b) never use a context at the same time from more than one thread. That's all I'm really trying to look at here. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-26 Thread Andy O'Meara
possible. Again, I only raise this to offer evidence that doing real-world work in a child process is a deal breaker--a shared address space is just way too much to give up. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-28 Thread Andy O'Meara
On Oct 26, 10:11 pm, "James Mills" <[EMAIL PROTECTED]> wrote: > On Mon, Oct 27, 2008 at 12:03 PM, Andy O'Meara <[EMAIL PROTECTED]> wrote: > > I think we miscommunicated there--I'm actually agreeing with you.  I > > was trying to make the same

Re: 2.6, 3.0, and truly independent intepreters

2008-10-28 Thread Andy O'Meara
On Oct 27, 4:05 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Andy O'Meara wrote: > > > Well, when you're talking about large, intricate data structures > > (which include opaque OS object refs that use process-associated > > allocato

Re: 2.6, 3.0, and truly independent intepreters

2008-10-28 Thread Andy O'Meara
lopers and companies to the scene, where they get their thread-independent code up and running using python without any unexpected reengineering. Again, why are companies choosing Lua over Python when it comes to an easy and flexible drop-in interpreter? And please take my points here to be exp

Re: 2.6, 3.0, and truly independent intepreters

2008-10-28 Thread Andy O'Meara
ge, we have all kinds of options when it comes to multithreading). For example, recall that by throwing python in multiple dynamic libs, we were able to achieve the GIL-less interpreter independence that we want (albeit ghetto and a pain). Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Andy O'Meara
arlier point about representing a company ready to spend real resources, please email me off-list if anyone here would have an interest in an open "CPythonES" project (and get full compensation). I can say for sure that we'd be able to lead with API framework design work--that's my personal strength and we have a lot of real world experience there. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Andy O'Meara
ing the discussion is the most > productive thing we can do. > Well, most others here seem to have a lot different definition of what qualifies as a "futile" discussion, so how about you allow the rest of us continue to discuss these issues and possible solutions. And, for the record, I've said multiple times I'm ready to contribute monetarily, professionally, and personally, so if that doesn't qualify as the precursor to "code contributions from one of the participants" then I don't know WHAT does. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Andy O'Meara
on't think you're talking > about python-level processes or threads. > Yeah, you have it right-on there, with added fact that the C and python execution (and data access) are highly intertwined (so getting and releasing the GIL would have to be happening all over). For example, consider and the dynamics, logic, algorithms, and data structures associated with image and video effects and image and video image recognition/analysis. Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-11-03 Thread Andy O'Meara
On Oct 30, 11:09 pm, alex23 <[EMAIL PROTECTED]> wrote: > On Oct 31, 2:05 am, "Andy O'Meara" <[EMAIL PROTECTED]> wrote: > > > I don't follow you there. If you're referring to multiprocessing, our > > concerns are: > > > - M

Re: 2.6, 3.0, and truly independent intepreters

2008-11-04 Thread Andy O'Meara
ta structures situation (see my posts regarding real-time video processing). I'm not sure if you've followed all the discussion, but multiple processes is off the table (this is discussed at length, so just flip back into the thread history). Andy -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   >