Re: Python web frameworks

2007-11-20 Thread Joe Riopel
On Nov 20, 2007 7:19 AM, joe jacob <[EMAIL PROTECTED]> wrote: > There are a lot of web frameworks for python like django, mod_python, > spyce, turbo gears, Zope, Cherrypy etc. Which one is the best in terms > of performance and ease of study. I wouldn't classify mod_pytho

Re: Python web frameworks

2007-11-20 Thread Joe Riopel
On Nov 20, 2007 8:46 AM, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > Django comes with its own little server so that you don't have > to set up Apache on your desktop to play with it. Pylons too, it's good for development but using the bundled web server is not recommended for production. --

Re: Python web frameworks

2007-11-21 Thread joe jacob
On Nov 21, 10:15 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Nov 21, 1:37 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > > > > > On Nov 20, 3:39 pm, Graham Dumpleton <[EMAIL PROTECTED]> > > wrote: > > > > This only holds if actually hosted on Apache. As Django these days > > > supports

Re: Python web frameworks

2007-11-21 Thread Joe Riopel
On Nov 21, 2007 5:42 AM, joe jacob <[EMAIL PROTECTED]> wrote: > Thanks everyone for the response. From the posts I understand that > Django and pylons are the best. By searching the net earlier I got the > same information that Django is best among the frameworks so I > downloa

Re: Clean way to get one's network IP address?

2007-11-21 Thread Joe Riopel
On Nov 21, 2007 10:15 AM, Gilles Ganault <[EMAIL PROTECTED]> wrote: > I know about socket.gethostbyname, but this relies on what's in > /etc/hosts, and I'd rather have a more independent solution. I might be missing something in your question, but on a Windows XP machine, I can get the IP address

Re: Python web frameworks

2007-11-23 Thread joe jacob
On Nov 21, 10:27 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Jeff wrote: > > On Nov 21, 6:25 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > >> joe jacob a écrit : > >> (snip) > > >>> Thanks everyone for the response. From the posts

Dynamically adding a runtime generated method to a class.

2007-11-29 Thread Joe Goldthwaite
I'm not sure how to even ask this question. I'm working on a financial reporting application. The current system is very limited in what it can display. You can see reports with columns of Period, Quarter, Year to date or you can see a yearly trend. I'd like for the users to be able to define t

I'm missing something here with range vs. xrange

2007-12-06 Thread Joe Goldthwaite
I've been playing with Python a bit. Doing little performance benchmarks and working with Psyco. It's been fun and I've been learning a lot. For example, in a previous post, I was looking for a way to dynamically add new runtime function to a class. Martin told me to use a class instance variabl

RE: I'm missing something here with range vs. xrange

2007-12-07 Thread Joe Goldthwaite
>90+ seconds?? What hardware, OS, and Python version? What else was >running in the background? >With this kit: >OS Name: Microsoft Windows XP Professional >Version: 5.1.2600 Service Pack 2 Build 2600 >Processor: x86 Family 15 Model 36 Stepping 2 AuthenticAMD ~1995 Mhz >Python: Pyt

RE: I'm missing something here with range vs. xrange

2007-12-07 Thread Joe Goldthwaite
ern Schliessmann Sent: Thursday, December 06, 2007 3:33 PM To: [email protected] Subject: Re: I'm missing something here with range vs. xrange Joe Goldthwaite wrote: > I read that the range function builds a list and that xrange > returns an iterator and is therefore more effici

RE: File to dict

2007-12-07 Thread Joe Goldthwaite
Duncan Booth wrote: >for item in list: >if item == 'searched.domain': >return item... [EMAIL PROTECTED] wrote: >Sure, but I have two options here, none of them nice: either "write C >in Python" or do it inefficient and still elaborate way. I don't understand your point at all. How

RE: I'm missing something here with range vs. xrange

2007-12-10 Thread Joe Goldthwaite
>You can't imagine why someone might prefer an iterative solution over >a greedy one? Depending on the conditions, the cost of creating the >list can be a greater or a lesser part of the total time spent. Actual >iteration is essentially the same cost for both. Try looking at memory >usage while yo

RE: I'm missing something here with range vs. xrange

2007-12-10 Thread Joe Goldthwaite
>You bring up an excellent point. It might seem like I'm actually running on >a Macbook Pro with an Intel Core 2 Duo at 2.33 GHz with 2 GB of ram. Err... Uhh... What I meant to say was "It might seem like I'm running on an old slow POS but I'm actually running on a Macbook Pro..." Sorry, me fl

Re: newbie

2007-12-10 Thread Joe Riopel
On Dec 10, 2007 9:03 PM, Whizzer <[EMAIL PROTECTED]> wrote: > Is OReilly's Learning Python a good place to start learning to program? > I've been told Python is a good first language. I think this is a great place to start, there is a free version right there online. http://diveintopython.org/ --

python and xulrunner

2006-04-30 Thread joe . hrbek
Hi everyone, sorry, this post is a bit off topic. I posted this on a devel xul thread on the mozilla groups but didn't get a response. My hope is that some of you may have interest in this and have tried it yourself. I've been trying to get xulrunner compiled with python (in windows) but have be

Re: python and xulrunner

2006-05-01 Thread joe . hrbek
Well, it's my understanding (I could be wrong), that pyxpcom is to enable firefox/mozilla to use python. My interest is more in the area of xulrunner. I've read that page several times and pulled compiler/linker build steps from it, but never followed it exactly. I suppose I can try pyxpcom inste

Re: A critic of Guido's blog on Python's lambda

2006-05-08 Thread Joe Marshall
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... > > But the key in the whole thread is simply that indentation will not > > scale. Nor will Python. > > Absolutely. That's why firms who are interested in building *seriously* > large scale systems, like my employer (and suppli

Re: A critic of Guido's blog on Python's lambda

2006-05-08 Thread Joe Marshall
Alex Martelli wrote: > > Your "pragmatic benefits", if such they were, would also apply to the > issue of "magic numbers", which was discussed in another subthread of > this unending thread; are you therefore arguing, contrary to widespread > opinion [also concurred in by an apparently-Lisp-orient

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Joe Marshall
Pisin Bootvong wrote: > Is this a Slippery Slope fallacious argument? > (http://c2.com/cgi/wiki?SlipperySlope) > > "if python required you to name every function then soon it will > require you to name every number, every string, every immediate result, > etc. And we know that is bad. Therefore re

Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Joe Marshall
Alex Martelli wrote: > > I think it's reasonable to make a name a part of functions, classes and > modules because they may often be involved in tracebacks (in case of > uncaught errors): to me, it makes sense to let an error-diagnosing > tracebacks display packages, modules, classes and functions

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Joe Marshall
Alex Martelli wrote: > Joe Marshall <[EMAIL PROTECTED]> wrote: >... > > The problem is that a `name' is a mapping from a symbolic identifier to > > an object and that this mapping must either be global (with the > > attendant name collision issues) or withi

Re: Python's great, in a word

2008-01-07 Thread Joe Riopel
On Jan 7, 2008 8:09 AM, <[EMAIL PROTECTED]> wrote: > The best thing about Python is ___. it's mailing list. -- http://mail.python.org/mailman/listinfo/python-list

Re: *** AMERICAN BASTARDS DESERVE TO BE RAPED ***

2008-01-12 Thread Joe Riopel
On Jan 12, 2008 2:00 PM, radiosrfun <[EMAIL PROTECTED]> wrote: > Whether we agree on "tactics" or not - if it come to a battlefield with the > two of us - or any Americans there - we're still going to fight the same > enemy - not each other. This is a good resource for starting Python http://divei

Re: where do my python files go in linux?

2008-01-12 Thread Joe Riopel
On Jan 12, 2008 10:13 AM, Jorgen Bodde <[EMAIL PROTECTED]> wrote: > I thought about that too. I just wonder why /usr/local/bin is always > empty and every .deb I install from a source (if it's from Ubuntu or > not) installs files in /usr/bin .. So I looked further and noticed > that most python fil

Re: XOR encryption

2008-01-18 Thread joe jacob
On Jan 18, 4:11 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 18 Jan 2008 03:06:51 -0800, joe jacob wrote: > > I wrote a python script to perform XOR encryption on a text and write > > the encrypted text to a file. But when I try to read the

XOR encryption

2008-01-18 Thread joe jacob
I wrote a python script to perform XOR encryption on a text and write the encrypted text to a file. But when I try to read the file as the encrypted text contains an EOF in between the file is read only to the first EOF and remaining part of the text is not read. I used the text "hello world" and

wxpython

2008-01-23 Thread joe jacob
I am trying to open a file containing non displayable characters like contents an exe file. The is is with the below mentioned code: self.text_ctrl_1.SetValue(file_content) If the file_content contains non displayable characters I am getting an error like this: Traceback (most recent call last):

Designing website

2008-01-24 Thread joe jacob
Hi All, I am planning to design a website using windows, apache, mysql, python. But I came to know that python cgi is very slow. I came across mod_python also but no good documentation are available for learning mod_python. Suggest me a good solution for this as I don't know other languages like P

Re: wxpython

2008-01-24 Thread joe jacob
oin ( > >>chr (random.randint (0, 255)) for i in range (1000) > >> ) > >> munged_text = "".join ( > >>c if 32 <= ord (c) <= 126 else hex (ord (c)) for c in file_content > >> ) > > >> print repr (file_content) > >

Re: Trying to understand Python web-development

2008-01-29 Thread Joe Riopel
On Jan 29, 2008 12:11 PM, walterbyrd <[EMAIL PROTECTED]> wrote: > I am not really sure about what wsgi is supposed to accomplish. This will explain WSGI: http://www.python.org/dev/peps/pep-0333/ -- http://mail.python.org/mailman/listinfo/python-list

Re: noob stuck on reading double

2008-01-29 Thread Joe Riopel
On Jan 29, 2008 1:35 PM, Hannah Drayson <[EMAIL PROTECTED]> wrote: > It imports as a string of rubbish... > i.e. > > > >>> text = f.read() > >>> print text > ?F?C??y??>? > @[EMAIL PROTECTED]@???/???8[EMAIL PROTECTED]/[EMAIL > PROTECTED]@?Q???Q???Q???Q???Q??ǑR[???Q?

Re: noob stuck on reading double

2008-01-29 Thread Joe Riopel
On Jan 29, 2008 1:59 PM, Joe Riopel <[EMAIL PROTECTED]> wrote: > When reading the file, try using > file = open('data.bin', 'rb') > file.seek(0) > raw = file.read() > > Do the unpack on "raw". Ignore this, sorry for the confusion. -- http://mail.python.org/mailman/listinfo/python-list

Re: noob stuck on reading double

2008-01-29 Thread Joe Riopel
Since you're unpacking it with the 'd' format character I am assuming a "doubleword" field is a double. You said you had 113 of them in the binary file. You should be doing something like this: file = open('data.bin', 'rb') file.seek(0) raw = file.re

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-29 Thread Joe Riopel
On Jan 29, 2008 9:23 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > If you're going to delete elements from > a list while iterating over it, then do > it in reverse order: how about >>> li = [1,2,3,4,5] >>> filter(lambda x: x != 3, li) [1, 2, 4, 5] >>> -- http://mail.python.org/mailman/listi

Form to mail script

2008-01-30 Thread Joe Demeny
I am looking for a python web form to mail script for a public web site - could you recommend one? -- Joe Demeny -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Sockets Help

2008-03-10 Thread Joe Riopel
On Mon, Mar 10, 2008 at 6:58 PM, Mark M Manning <[EMAIL PROTECTED]> wrote: > I need your expertise with a sockets question. > > Let me preface this by saying I don't have much experience with > sockets in general so this question may be simple. I would suggest taking a quick look at this tutori

Re: How to factor using Python?

2008-03-11 Thread Joe Riopel
On Mon, Mar 10, 2008 at 1:08 AM, Nathan Pinno <[EMAIL PROTECTED]> wrote: > How do I factor a number? I mean how do I translate x! into proper > Python code, so that it will always do the correct math? This should work to do x! (factorial of x). reduce(lambda x,y: x*y, range(1, x+1)) -- http://m

Re: How to factor using Python?

2008-03-11 Thread Joe Riopel
On Tue, Mar 11, 2008 at 10:38 AM, Joe Riopel <[EMAIL PROTECTED]> wrote: > On Mon, Mar 10, 2008 at 1:08 AM, Nathan Pinno <[EMAIL PROTECTED]> wrote: > > How do I factor a number? I mean how do I translate x! into proper > > Python code, so that it will always do the cor

Re: difference b/t dictionary{} and anydbm - they seem the same

2008-03-11 Thread Joe Riopel
On Tue, Mar 11, 2008 at 10:58 AM, davidj411 <[EMAIL PROTECTED]> wrote: > Thanks, that makes sense. Are there any local relational databases > available to python that don't require a server backend? sqlite http://www.sqlite.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
model is most definitely not the same as C. Technically true, in that pointers in C require some special syntax, but the common idiom is to hide this away by defining a new type: typedef Foo* FooPtr; Now, for any code using the "FooPtr" type, the data model is the same as Python (or as Java, RB, .NET, etc., again for code that's using only reference types). Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-10 Thread Joe Strout
r is called "foo", and you pass in "bar", then foo = SomeNewArray(); would change bar if it were passed by reference; it would not affect bar at all if it were passed by value. The two are quite distinct. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-10 Thread Joe Strout
at held or generated the reference in the calling code. This is very odd, and I see it quite a bit. Me: "You pass the object." Joe: "That's correct. You pass the reference." What was wrong with my original? I'm saying that I believe your idea was correct, but wor

function to find the modification date of the project

2009-01-19 Thread Joe Strout
ronment. One odd thing was the need to employ the HACK identified above, where if __file__ happens to already be in the current directory, then os.path.dirname of it returns the empty-string -- yet the empty-string is not a valid argument to os.listdir(). Is there a better way to a list of files in the same directory as a given file? Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: function to find the modification date of the project

2009-01-19 Thread Joe Strout
James Mills wrote: You know you could just store a __version__ attribute in your main library (__init__.py). :) What, and update it manually? I don't trust myself to remember to do that every time! Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: function to find the modification date of the project

2009-01-19 Thread Joe Strout
Yes, and presumably if some power user did this, then that would be the intended effect. Not sure why they'd do that, but they must have a good reason -- who am I to stop them? Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: function to find the modification date of the project

2009-01-19 Thread Joe Strout
ir change to be), and tell them to re-download it. But really, this is NOT going to happen. These users wouldn't even know how to open the app bundle to find the Python files. Any comments on the functioning and platform-independence of the code? Thanks, - Joe -- http://mail.python.org/mai

Re: English-like Python

2009-01-20 Thread Joe Strout
ing unnecessary parentheses does a lot to improve the readability of the code IMHO. Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-20 Thread Joe Strout
to be written something like: g f("abc", 123), "def" I'm not saying I know how to translate this into Python -- some of Python's other language features make this difficult. Just pointing out that your original wish is possible in at least some languages. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-21 Thread Joe Strout
adability of the code IMHO. But they're not unnecessary, at least not in Python, they're useful for distinguishing between calling the function and the function itself. Yes, quite true in Python. If there were some other way to distinguish between those -- and if tupl

Re: English-like Python

2009-01-21 Thread Joe Strout
= f could mean either, 'a= f' or 'a= f()'. Once again the return values save the day. I think I agree (if I follow you correctly). But then some other syntax would be needed for when you really mean "a=f" (i.e., make 'a' refer to the same function as 'f'). Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-22 Thread Joe Strout
anything -- the parser already knows that the list of zero or more comma-separated expressions following the identifier must be arguments. So, again, the parens are optional. It seems to me that the cost of this is that using functions > as first-class objects takes a major usability

Re: OCaml, Language syntax, and Proof Systems

2009-01-24 Thread Joe Riopel
On Fri, Jan 23, 2009 at 6:16 PM, Xah Lee wrote: > The haskell tutorials you can find online are the most mothefucking > stupid unreadable fuck. The Haskll community is almost stupid. What > they talk all day is about monads, currying, linder myer fuck type. > That's what they talk about all day. A

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Joe Strout
nd a Terminal window. I tried several IDEs and didn't really find any of them stable and feature-rich enough to be worth the bother (though Editra came close). Lack of a really top-notch IDE is one of the primary drags harshing on my Python buzz (as the young people say). Best, - Joe

Re: what IDE is the best to write python?

2009-02-02 Thread Joe Riopel
I typically use vim/vi, because it's usually already installed on the OS's I work with and vim for Windows works the same. Also, using the same editor across these different OS's, I don't have to worry too much soft/hard tabs. The contents of rc files on both Windows and UNIX/Linux are the same too

Re: UnitTest break on failure

2009-02-10 Thread Joe Riopel
On Tue, Feb 10, 2009 at 11:48 AM, Qian Xu wrote: > self.assertEquals(testMethod1(), expected_value1); > self.assertEquals(testMethod2(), expected_value2); > > However, if the first test item is failed, no more tests will be executed. > Can I tell Python, > 1. go ahead, if a failure is occurred.

Re: best set of modules for web automation without javascript

2009-02-13 Thread Joe Riopel
On Fri, Feb 13, 2009 at 9:04 AM, News123 wrote: > Hi, > I'd like to do some web automation with python 2.5 > - https: > - a cookiejar > - some forms to be filled in > what is the best set of modules. I have automated some testing of our product, using it's web UI with Python with urllib2 and urrl

Re: *nix tail -f multiple log files with Thread

2009-02-13 Thread Joe Riopel
On Fri, Feb 13, 2009 at 12:03 PM, David wrote: > Hi everyone, > > I copied a program from C to track multiple log files. I would like to be > able to print a label when a log file is updated. Here is the program; Since you're calling tail itself, why not just use tail's ability to tail multiple f

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread Joe Strout
asn't been renamed in the meantime... Please quit trying to confuse the kids at home. Classes in Python are first-class objects, and any time you refer to a class or any other object in Python, what you have is a reference to it. <http://www.strout.net/info/coding/valref/>

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-22 Thread Joe Strout
ssed are object references." (I should add that last bit to my web page -- I'll try to do that this weekend.) Cheers, - Joe P.S. I've pretty well tired of this thread, but I can't let Greg stand up for truth and clarity all by himself... -- http://mail.python.org/mailman/listinfo/python-list

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-24 Thread Joe Strout
thoughtful comments. You do yourself credit. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

recommended __future__ imports for 2.5?

2008-11-24 Thread Joe Strout
sion. So... besides "division", are there any other imports you would recommend as standard for any new code written in 2.5? And what else do you experienced gurus put at the top of every Python file? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Joe Riopel
On Sat, Nov 29, 2008 at 3:44 PM, Josh <[EMAIL PROTECTED]> wrote: > Thanks in advance, There is no right, or wrong, answer to this question. Try one for a few weeks, force yourself to use it as exclusively as possible for all your text editing needs. After that, repeat that process with the other e

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Joe Riopel
On Sat, Nov 29, 2008 at 3:44 PM, Josh <[EMAIL PROTECTED]> wrote: > Thanks in advance, There is no right, or wrong, answer to this question. Try one for a few weeks, force yourself to use it as exclusively as possible for all your text editing needs. After that, repeat that process with the other e

using os.walk to generate objects

2008-12-03 Thread Joe Hrbek
The code below works (in linux), but I'm wondering if there is a better/easier/cleaner way? It works on directory trees that don't have a lot of "."s in them or other special characters. I haven't implemented a good handler for that yet, so if you run this in your system, choose/make a simple dire

simplest way to strip a comment from the end of a line?

2008-12-04 Thread Joe Strout
ed to use a loop to find each # and then count the quotation marks to its left? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 automatic decoding of UTF16

2008-12-05 Thread Joe Strout
but it looks to me like you've found a bug. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
ions (like the system beep) and works in console apps or in any flavor of GUI app. Is there such a module out there somewhere? Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
On Dec 7, 2008, at 8:48 AM, Grant Edwards wrote: On 2008-12-07, Joe Strout <[EMAIL PROTECTED]> wrote: But invoking the standard system beep What makes you think there is such a thing as "the standard system beep"? Because OS X (the platform with which I'm most fa

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
entious process required to add something to the Python system libraries, where would be the next best place for this sort of simple OS abstraction layer? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about reference in Python.

2008-12-08 Thread Joe Strout
, which is roughly analogous to a pointer type in C/C++. For details and examples, see: <http://www.strout.net/info/coding/valref/ > Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about reference in Python.

2008-12-08 Thread Joe Strout
On Dec 8, 2008, at 7:43 PM, Steven D'Aprano wrote: On Mon, 08 Dec 2008 08:18:27 -0700, Joe Strout wrote: On Dec 7, 2008, at 10:26 PM, Group wrote: Now, I want to write a Red-Black Tree, and a List structure. In C/C + +, I can use pointers to refer to children notes (or next notes)

Re: How to initialize a class variable once

2008-12-09 Thread Joe Strout
the OP's observation. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: var or inout parm?

2008-12-10 Thread Joe Strout
xplanation of why you can't do quite what you're asking for in Python (or Java, for that matter). Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Call by reference in SWIG?

2008-12-11 Thread Joe Strout
unately I don't know enough about SWIG to suggest a work- around. Hopefully someone more versed in SWIG will have a bright idea. If you don't find anything in the Python space, you might try poking around in Java references, since Java has the same call semantics as Python.

Re: list organization question

2008-12-11 Thread Joe Strout
to want both at once, but I can't understand what that means. HTH, - Joe -- http://mail.python.org/mailman/listinfo/python-list

any Python developers available in the Denver area?

2008-12-11 Thread Joe Strout
ry, please send me email privately. Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: concept of creating structures in python

2008-12-12 Thread Joe Strout
f you then wanted to get to that thing's E object, it'd be foo.ds_obj.ele_obj. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: concept of creating structures in python

2008-12-12 Thread Joe Strout
On Dec 12, 2008, at 9:00 AM, Steve Holden wrote: Change the default value of ds_obj here to None. Otherwise, you will certainly confuse yourself (there would be just one default object shared among all instances). Joe missed a piece out here. If you change the signature of your D.__init__

Re: %s place holder does not let me insert ' in an sql query with python.

2008-12-15 Thread Joe Strout
hen you probably want to do a few other replacements; google "SQL injection" for details.) Note that I'm not familiar with the cursor.execute binding that RDM pointed out, so that may provide a better solution... but the above should work. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

AIM client code for Python?

2008-12-16 Thread Joe Strout
( "toc.oscar.aol.com", 9898 ) ...but I don't understand AIM well enough to know the correct values (and was rather hoping that I wouldn't have to). Does anyone know how to get Py-TOC to work, or have another Python TOC implementation to suggest? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

How to modify a program while it's running?

2008-12-16 Thread Joe Strout
n that module? Will that work, and is there a better way? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problem

2008-12-19 Thread Joe Strout
fer in encoding, could be handled automatically. I consider this one of the great shortcomings of Python, but it's mostly just a temporary inconvenience -- the world is moving to Unicode, and with Python 3, we won't have to worry about it so much. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parsing a sequence of integers

2008-12-19 Thread Joe Strout
Peter Otten wrote: If you are using Python 2.x: ... So you better throw in a float(...): Or, add from __future__ import division at the top of the file. I put this at the top of all my Python files, whether I expect to be dividing or not. It just saves grief. Cheers, - Joe -- http

Re: How to parsing a sequence of integers

2008-12-19 Thread Joe Strout
ange all your code to use the unambiguous // operator when you mean integer division. Better to do it now, I think, at least in any new code you write, to save you the hassle later. For those not familiar with the topic: <http://www.python.org/dev/peps/pep-0238/> Best, - Joe --

Re: encoding problem

2008-12-19 Thread Joe Strout
if neither is, then both are converted to UTF-8 (which is the "standard" encoding in RB, though it works comfily with any other too). Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problem

2008-12-19 Thread Joe Strout
mehow easier than every string knowing what it is and doing the right thing -- well, that's just silly. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's popularity

2008-12-22 Thread Joe Strout
Alvin ONeal wrote: Also worthy of mention: I've seen python pre-installed on consumer HP desktops (I think as part of a backup/restore script, but I'm not sure) It's pre-installed on every Mac (both desktop and laptop), too. Cheers, - Joe -- http://mail.python.org/mailman/

Re: embedding python in wxpython

2008-12-30 Thread Joe Strout
put to a window, while False does not redirect it. However, neither setting will create a bidirectional console or evaluation environment as the OP was asking for. (But other wx widgets do provide that, as other replies have pointed out.) Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-06 Thread Joe Strout
b some of your verbage for <http://www.strout.net/info/coding/valref/>, as it may be clearer than my own. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: python is great

2009-01-06 Thread Joe Strout
r the upcoming years, I'll certainly do my part. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: If your were going to program a game...

2009-01-06 Thread Joe Strout
;ve started learning it just last week, and apart from the nasty C-derived syntax, it's quite nice. It has a good IDE, good performance, great portability, and it's easy to use. It just surprises me that after all these years, the Python community hasn't done somethin

Re: python is great

2009-01-06 Thread Joe Strout
ut I'll admit that this does mostly fit the bill I described above (or has the potential to, anyway). Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: image recogniton?

2009-01-07 Thread Joe Strout
hardware, or spend a bit more for something with a USB or serial interface built in, like this: <http://www.oceanserver-store.com/osevkitsorus.html> Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-07 Thread Joe Strout
arently isn't, to some) that this restricted, uniform data model does not fundamentally change anything; it just makes Python a little more restricted and uniform. For details, see: <http://www.strout.net/info/coding/valref/> Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-08 Thread Joe Strout
the picture at some point, because other models get too complicated. I agree completely. I can barely understand the other models myself. Best, - Joe [1] http://www.strout.net/info/coding/valref/ -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-08 Thread Joe Strout
it. If you can find a language where an array variable is NOT a reference (and thus does not behave exactly as in Python, Java, REALbasic, C++, etc.), then that language is either a dinosaur or some weird academic oddity. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
sual in that it has only reference types. I would have picked a different example to illustrate that, but it's true nonetheless. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
amed method -- or, for that matter, if the assignment statement looked for such a method when it finds an object reference on the left-hand side -- then any object could be an lvalue, and you COULD (in some cases) assign to the result of a function. But it's not and it doesn't. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
assignments, and why responding to such misunderstandings with, "Python's assignments are the same as other languages'", is at best not helpful. I don't think so. More likely, people are being confused by the claim that Python's assignments are NOT like other languages, when in fact they are. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

type-checking support in Python?

2008-10-06 Thread Joe Strout
n one of the above. I gather (from just a couple days of browsing) that such a naming convention isn't common in the Python community, but is there anyone else here who does it? I'd rather adopt an existing standard (even if it's not widely used) than make one up. Many thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   >