Re: learning python, using string help

2006-02-03 Thread Tom Anderson
for the awesome example! I'm not sure how awesome it is - it's pretty simple, and probably has lots of bugs. Is the BSD ruptime output format the same as on HP-UX? I have a Mac myself, but no local machines broadcasting rwho data, so i don't get any output to play with when i run

Re: would it be feasable to write python DJing software

2006-02-03 Thread Tom Anderson
, whatever; if that's not fast enough, rewrite chunks of the code in pyrex (a derivative of python that can be compiled to native code, via translation to C); if it's still not fast enough, go to C. Oh, and before you start going native, try running your program under psyco. tom -- Throw bricks at lawyers if you can! -- http://mail.python.org/mailman/listinfo/python-list

Re: Dual Core outlook

2006-02-07 Thread Tom Anderson
GC can eat a measurable, although not huge, fraction of your execution time, so farming it out to a second core should speed your program up a bit. tom PS Excuse any errors in the java - it's a long time since i've written any! -- Through the darkness of Future Past the magician lo

Re: Question about idioms for clearing a list

2006-02-07 Thread Tom Anderson
l. > > I have hardly used the del keyword in several years of coding in Python. Ditto. > Why should it magically spring to mind in this occasion? Similarly I > hardly ever find myself using slices, never mind in a mutable context. > > del L[:] is not obvious, especially given the existence of clear() in > dictionaries. Agreed. tom -- GOLDIE LOOKIN' CHAIN [...] will ultimately make all other forms of music both redundant and unnecessary -- ntk -- http://mail.python.org/mailman/listinfo/python-list

Question

2006-03-02 Thread Tom Leggio
Do I need this on my computer---Python---can I remove it without hurting anything? Thanks Tommy -- Please visit my web page @tomleggio.com Tom Leggio 194 NE 6th. CT. Dania Beach, Fl 33004-3633 954-205-5307 -- http://mail.python.org/mailman/listinfo/python-list

Curve fitting

2005-05-08 Thread Tom Anderson
Hi, I'd like to fit a curve (a rectangular hyperbola, in fact) to some data points as part of a program i'm writing. Can anyone suggest a package which would help me do this? A bit of googling suggests that SciPy might be what i want. Does that sound likely? Thanks, tom --

Re: Curve fitting

2005-05-08 Thread Tom Anderson
On Sun, 8 May 2005, Grant Edwards wrote: > On 2005-05-08, Tom Anderson <[EMAIL PROTECTED]> wrote: > > > I'd like to fit a curve (a rectangular hyperbola, in fact) to > > some data points as part of a program i'm writing. Can anyone > > suggest a package wh

Getting a DOM element's children by type (STUPID)

2005-06-08 Thread Tom Anderson
27;m happy to RTFM here, but would appreciate a pointer to the appropriate such manual, since the docs i have to hand are somewhat unenlightening. Thanks, tom -- Just because Congresspeople do it, doesn't mean it's right. -- Ian York -- http://mail.python.org/mailman/listinfo/python-list

Decimal Places Incorrect

2005-06-08 Thread Tom Haddon
Hi Folks, When I run: print "%0.2f" % ((16160698368/1024/1024/1024),) I get 15.00 I should be getting 15.05. Can anyone tell me why I'm not? Thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-11 Thread Tom Anderson
d have taken me pages and pages of java. tom PS: http://jove.prohosting.com/~zahlman/cpp.html -- Jim-Jammity Jesus Krispy Kreme Christ on a twat-rocket! -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-12 Thread Tom Anderson
on names, even if you have a filter a gigabyte in size, you still have a 2% false positive rate [2], which is 20 million names. tom [1] http://en.wikipedia.org/wiki/Bloom_filter [2] http://www.cc.gatech.edu/fac/Pete.Manolios/bloom-filters/calculator.html -- Think logical, act incremental -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-13 Thread Tom Anderson
And transistors are > magic until you dig down to the truly magical stuff that's going on with > charge carriers and electric fields inside a semiconductor junction. > That's about where my brain starts to hurt, but it's also where the quantum > mechanics are just gettin

Re: What is different with Python ?

2005-06-13 Thread Tom Anderson
out any of this, but I have a very strong > suspicion that the *best* first step in learning programming is a program > very much like the following, which I'm pretty sure was mine: > > 10 FOR A=1 TO 10: PRINT"Peter is great!": END 10 PRINT "TOM IS ACE" 20 G

Re: What is different with Python ?

2005-06-13 Thread Tom Anderson
don't buy that. I think there's a world of difference between knowing what something does and how it does it; a black-box view of the memory system (allocation + GC) is perfectly sufficient as a basis for programming using it. That black-box view should include some idea of how long

Re: What is different with Python ?

2005-06-13 Thread Tom Anderson
l universal > fundamentals of data structures, algorithms, and control flow without > getting bogged down in details. Ah, so you've cleaned yourself up with Guido's Twelve-Step Plan. Amen to that, brother! tom -- Why do we do it? - Exactly! -- http://mail.python.org/mailman/listinfo/python-list

Re: implicit variable declaration and access

2005-06-13 Thread Tom Anderson
string > stored in x. And how can I access that implicitly later ? Are you absolutely sure you want to do this? tom -- The MAtrix had evarything in it: guns, a juimping off teh walls, flying guns, a bullet tiem, evil computar machenes, numbers that flew, flying gun bullets in slowar motian

Re: implicit variable declaration and access

2005-06-13 Thread Tom Anderson
On Mon, 13 Jun 2005, Peter Dembinski wrote: > Tom Anderson <[EMAIL PROTECTED]> writes: > > [snap] > >> The MAtrix had evarything in it: guns, a juimping off teh walls, flying >> guns, a bullet tiem, evil computar machenes, numbers that flew, flying >> gun bul

Re: implicit variable declaration and access

2005-06-14 Thread Tom Anderson
On Mon, 13 Jun 2005, Ali Razavi wrote: > Tom Anderson wrote: >> On Mon, 13 Jun 2005, Ali Razavi wrote: >> >>> Is there any reflective facility in python that I can use to define a >>> variable with a name stored in another variable ? >>> >>>

Re: implicit variable declaration and access

2005-06-15 Thread Tom Anderson
On Tue, 14 Jun 2005, Scott David Daniels wrote: > Tom Anderson wrote: >> ... If it's not, try: >> x = "myVarName" >> y = "myVarValue" >> locals()[x] = y > > Sorry, this works with globals(), but not with locals(). Oh, weird. It works w

Re: What is different with Python ? (OT I guess)

2005-06-16 Thread Tom Anderson
gt; > How different would the world be if we (more accurately) called it > "Computer Arts"? At one point, a friend and i founded a university to give our recreational random hackery a bit more credibility (well, we called ourself a university, anyway; it was mostly a joke). We called

Re: Python & firewall control (Win32)

2005-06-16 Thread Tom Anderson
nced I > want to go that route unless it is relatively simple. http://wipfw.sourceforge.net/ import os def deny(src, dst, proto="all"): cmd = "ipfw add deny " + proto + " from " + src + " to " + dst os.system(cmd) ipfw for Windows is te

Re: Python & firewall control (Win32)

2005-06-17 Thread Tom Anderson
On Fri, 17 Jun 2005, Tim Williams wrote: > On Thu, 16 Jun 2005, Tom Anderson wrote: > > > On Thu, 16 Jun 2005, Tim Williams wrote: > > > > > Does anyone know of (personal/desktop) firewall that can be > > > controlled via Python > > > > http://wipf

Rotating a picture

2007-06-19 Thread Tom Gur
Hi, I'm trying to build a small spaceship battle game as an exercise, using pygame. How can I rotate the gif file of my ship by X degrees ? -- http://mail.python.org/mailman/listinfo/python-list

Python IDE

2007-06-19 Thread Tom Gur
Hi, which IDE would you recommend for a python ? -- http://mail.python.org/mailman/listinfo/python-list

static python classes ?

2007-06-19 Thread Tom Gur
Hi, I'm new to python, and I can't seem to find in the docs how to create the python equivalent of what's called in most OOP languages "static classes", can you give me a hint ? -- http://mail.python.org/mailman/listinfo/python-list

Re: static python classes ?

2007-06-19 Thread Tom Gur
> Look for @staticmethod inhttp://docs.python.org/lib/built-in-funcs.html > > Example: > class C: > @staticmethod > def f(arg1, arg2, ...): ... Oops, sorry for the confusion - I've actually meant a static method, and Gerald's answer works fine. Thanks alot -- http://mail.python.org/mai

Bibus/python locale not supported problem

2007-04-25 Thread Tom Chilton
ere I get the option I choose en_GB. If this isn't a python problem sorry for bothering you all... I am not subscribed to this list but I will check nabble for replies. Thanks Tom -- View this message in context: http://www.nabble.com/Bibus-python-locale-not-supported-problem-tf3646227.html

Get a control over a window

2007-05-15 Thread Tom Gur
Hi, I was wondering how do I get control over a window (Win32). to be more specific, I need to find a handle to a window of a certain program and minimize the window. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get a control over a window

2007-05-17 Thread Tom Gur
Thanks guys, especially Duncan ! That's what I'm using now: import sys from win32gui import GetWindowText, EnumWindows, ShowWindow from win32con import SW_MINIMIZE def listWindowsHandles(): res = [] def callback(hwnd, arg): res.append(hwnd) EnumWindows(callback, 0) return

Re: Get a control over a window

2007-05-17 Thread Tom Gur
Thanks guys, especially Duncan ! That's what I'm using now: import sys from win32gui import GetWindowText, EnumWindows, ShowWindow from win32con import SW_MINIMIZE def listWindowsHandles(): res = [] def callback(hwnd, arg): res.append(hwnd) EnumWindows(callback, 0) retur

Embedding the python interpreter

2007-08-28 Thread Tom Gur
Hey, Do you know an easy way to embed the python interpreter in a python program (so a non-technical user, which has no idea how to install the python interpreter would be able to run the script as an executable) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding the python interpreter

2007-08-30 Thread Tom Gur
On Aug 28, 4:03 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-08-28, Tom Gur <[EMAIL PROTECTED]> wrote: > > > Hey, > > > Do you know an easy way to embed the python interpreter in a python > > program (so a non-technical user, which has no idea ho

low level ethernet device access in linux

2007-08-31 Thread Tom Brown
am running the application as a user and not as root. I would like to be able to run this app. as a user. Is there a way to create a socket without running the app. as root or sudo? When I run the app. as root I get this error: discovery.py: cannot connect to X server Thanks, Tom -- http://ma

Re: why should I learn python

2007-09-06 Thread Tom Brown
rogramming, do it in assmebly. If you want to get a lot done while having a lot of fun doing it, do it in python. Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: Subclassing zipfile (new style class)

2007-09-06 Thread Tom Brown
module.__init__() takes at most 2 arguments (3 given) > I think because you need to do this: from zipfile import ZipFile class walkZip(ZipFile): pass -Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: why should I learn python

2007-09-06 Thread Tom Brown
for web development. Checkout http://www.riverbankcomputing.co.uk/pyqt/index.php for writing GUI programs. There are other options for GUI apps. That is the one I use all the time. Good luck, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: why should I learn python

2007-09-06 Thread Tom Brown
On Thursday 06 September 2007 15:29, windandwaves wrote: > On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote: > > Seewww.python.org. Trust us all when we say that its the best. > > I get that feeling - yes. Question is: > > 1. what is it good for? > 2. why is it so good? > > I would love t

Re: why should I learn python

2007-09-06 Thread Tom Brown
On Thursday 06 September 2007 15:44, Torsten Bronger wrote: > Hallöchen! > > Tom Brown writes: > > [...] Python has been by far the easiest to develop in. Some > > people might say it is not "real programming" because it is so > > easy. > > I can&#x

Re: Python Database Apps

2007-09-11 Thread Tom Brown
Linux and Windows to make cross-platform development a breeze. -Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: recursion

2007-09-13 Thread Tom Wright
Gigs_ wrote: > Can someone explain me this > def f(l): > if l == []: > return [] > else: > return f(l[1:]) + l[:1] # <= cant figure this, how is > all sum at the end? If you think about building up from the simplest case: f([]) = [] f(['a']) = f([])

Garbage collection

2007-03-21 Thread Tom Wright
Hi all I suspect I may be missing something vital here, but Python's garbage collection doesn't seem to work as I expect it to. Here's a small test program which shows the problem on python 2.4 and 2.5: $ python2.5 Python 2.5 (release25-maint, Dec 9 2006, 15:33:01) [GCC 4.1.2 20061115 (prerele

Re: Technical Answer - Protecting code in python

2007-03-21 Thread Tom Wright
flit wrote: > 1 - There is a way to make some program in python and protects it? I > am not talking about ultra hard-core protection, just a simple one > that will stop 90% script kiddies. Put it in an executable? It's more hidden than protected, but it will stop a fair few non-experts. I use and

Re: Garbage collection

2007-03-21 Thread Tom Wright
Thinker wrote: > How do you know amount of memory used by Python? > ps ? top or something? $ ps up `pidof python2.5` USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND tew2426275 0.0 11.9 257592 243988 pts/6 S+ 13:10 0:00 python2.5 "VSZ" is "Virtual Memory Size" (

Re: Garbage collection

2007-03-21 Thread Tom Wright
[EMAIL PROTECTED] wrote: > You haven't forgotten to do anything. Your attempts at freeing memory are > being thwarted (in part, at least) by Python's int free list. I believe > the int free list remains after the 10M individual ints' refcounts drop to > zero. The large storage for the list is gra

Re: Garbage collection

2007-03-21 Thread Tom Wright
[EMAIL PROTECTED] wrote: > Tom> ...and then I allocate a lot of memory in another process (eg. > open Tom> a load of files in the GIMP), then the computer swaps the > Python > Tom> process out to disk to free up the necessary space. Python's > Tom&

Re: Garbage collection

2007-03-21 Thread Tom Wright
Steven D'Aprano wrote: > You've described an extremely artificial set of circumstances: you create > 40,000,000 distinct integers, then immediately destroy them. The obvious > solution to that "problem" of Python caching millions of integers you > don't need is not to create them in the first place

Re: Garbage collection

2007-03-21 Thread Tom Wright
Steve Holden wrote: > Easy to say. How do you know the memory that's not in use is in a > contiguous block suitable for return to the operating system? I can > pretty much guarantee it won't be. CPython doesn't use a relocating > garbage collection scheme Fair point. That is difficult and I don't

Re: Garbage collection

2007-03-21 Thread Tom Wright
[EMAIL PROTECTED] wrote: > If your program's behavior is: > > * allocate a list of 1e7 ints > * delete that list > > how does the Python interpreter know your next bit of execution won't be > to repeat the allocation? It doesn't know, but if the program runs for a while without repeating

Re: How to Start

2007-09-13 Thread Tom Brown
ome productive. There is eric4, which is an IDE. I has a debugger. That may be the place to start. Good luck, Tom -- http://mail.python.org/mailman/listinfo/python-list

Using python to create windows apps that everyone can use?

2007-09-17 Thread Tom Harding
can make this into a .exe that can be opened by any person on any computer without python installed. I would just love to do this in python and not C++, its so simple and logical. So basically, the easiest way to do that, please! Thanks, Tom Harding -- http://mail.python.org

esvect and reflectbox

2007-10-06 Thread Tom Jones
Hi, I am trying to create a leftarrow of \vv{}. I thought I could just reflect the vector, but the solution has escaped me. Could someone help me out? [EMAIL PROTECTED] [EMAIL PROTECTED] \cleaders\hbox{$#4\mkern0mu#2\mkern0mu$}\hfill% \mkern-1.5mu#3$% } was replaced with [EMAIL P

Default event handlers in wxPython

2007-01-15 Thread Tom Wright
Hi all I'm writing my first wxPython app and am having a problem with event handlers. I've set up a multi-part status bar and would like all the tooltips, menu help strings etc. to go into the second part of it. Is there some easy way of doing this? I've not found one, so have set up the follow

How to find out if another process is using a file

2007-01-18 Thread Tom Wright
I'm writing a program which reads a series of data files as they are dumped into a directory by another process. At the moment, it gets sporadic bugs when it tries to read files which are only partially written. I'm looking for a function which will tell me if a file is opened in write-mode by an

Re: How to find out if another process is using a file

2007-01-19 Thread Tom Wright
js wrote: > How about using lock? > Let writing process locks the files before writing, and unlock after > the job's done. Is locking mandatory or co-operative? I don't have any control over the process which is doing the writing, so if it's co-operative it's no good to me. If it's mandatory, th

Re: How to find out if another process is using a file

2007-01-19 Thread Tom Wright
Jean-Paul Calderone wrote: > A better solution is to name or place files which are begin written in a > which is recognizable and only rename or move them to their final location > when they have been completely written. > > For example, name files ".new" as they are being written. When they are

Re: select windows

2007-01-30 Thread Tom Wright
Dennis Lee Bieber wrote: > (And the Amiga could add even more complexity -- I still miss the > Amiga's ability to PUSH a window to the back while STILL KEEPING > FOCUS... Made it easy to type stuff into one window while reading data > from a covering window!) KDE's window manager can do this (and

Re: need help on a data structure problem

2007-02-01 Thread Tom Plunket
fice for your answer! Good luck in Computer Science! -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

working model of a microcoded computer

2007-02-02 Thread tom arnall
ution of a microcode instruction and, by extension, of machine language. I would like very much to get people's feedback on the thing. Thanks, tom arnall north spit, ca usa -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

starship.python.net is down

2007-02-16 Thread Tom Bryan
One of the system administrators had to reboot starship.python.net last night, but it appears that the machine did not come back up properly. starship.python.net is currently down while we investigate. ---Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: starship.python.net is down

2007-02-26 Thread Tom Bryan
l in the "investigation" stage at the moment, so it's hard to give an estimate of when the problem will be fixed. Thanks for your patience, ---Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: >>>> 911 operation by evil JEWS and Mossad <<<

2007-11-09 Thread Tom Potter
saves me a lot of time in getting to the heart of issues. As one can view and easily download many interesting videos from the site that one cannot find elsewhere, I suggest that folks interested in interesting videos should visit the site. The following URL lists several interesting videos. http:

dependency algorithm

2007-11-14 Thread Tom Jones
Hi, Consider tuples of the above numbers in the form: (a,b) Suppose this relation means: a depends on b Given a list of tuples, I would like an algorithm to return the proper ordering of the elements...and if the ordering has a loop (which in this case, prevents a proper ordering), then

Re: google earth / pythoncom

2007-11-15 Thread Tom Brown
he 'normal/full' > Python on the PC too - if that can be done ? Have 2 Pythons installed > on one PC ? You can have two python installations on one pc. You have to use the full path to the interpreter to get the one you want. Or, the first one it finds in your path will be used.

Passing arguments to subclasses of unittest.TestCase

2007-11-27 Thread Tom Harris
rather stuck with unittest, as I have 84 testcases, and I have to make it work tomorrow. -- Tom Harris BeacyBooks bigpondcom> -- http://mail.python.org/mailman/listinfo/python-list

Floats and NaNs

2007-12-03 Thread Dalton, Tom
omething like my_float = float("nan") If str(my_float) == "nan": doSomething() But that's awful! Any help or reasons why the functionality isn't provided would be gratefully received! Cheers, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: [SQL] plpythonu and "hello concurrent world"

2007-12-05 Thread Tom Lane
Gerardo Herzig <[EMAIL PROTECTED]> writes: > Hi all. Im having some "problems" with a small concurrent plpython function. Don't even *think* about starting multiple threads inside the Postgres backend. It's an excellent way to break things.

how do I make a class global?

2006-04-27 Thread Tom Brown
ile(source, 'tmp.py', 'exec') exec co Then, to create another event, I would just have to add another line like this: e.new('ETestEvent', 'test') Thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

PyX on Windows

2006-05-13 Thread Tom Longridge
MikTek on Windows to run LaTeX; does anyone know if is this likely to be the problem? Many thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: [HACKERS] Iterating generator from C (PostgreSQL's pl/python RETUN

2006-05-15 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes: >> Sven Suursoho wrote: >>> As for testing in actual pl/python build environment, we had objections >>> from >>> leading postgresql Tom Lane that even if we do test it at build time, >>> a determined DBA

Redirecting STDOUT using C calls.

2007-12-30 Thread Tom Gaudasinski
Greetings, I'm trying to redirect python's stdout to another location. The reason for this is that I'm embedding python in an application. Now, originally my code was developed for Linux and that did not require redirection due to the fact that every X11 application can have an STDOUT assoc

Re: Redirecting STDOUT using C calls.

2007-12-30 Thread Tom Gaudasinski
Christian Heimes wrote: > Tom Gaudasinski wrote: > >> Greetings, >> I'm trying to redirect python's stdout to another location. The >> reason for this is that I'm embedding python in an application. Now, >> originally my code was

Re: dealing with binary files

2008-01-07 Thread Tom Brown
On Mon, 2008-01-07 at 11:57 -0200, Guilherme Polo wrote: > 2008/1/7, Gerardo Herzig <[EMAIL PROTECTED]>: > > Hi all. Im trying to read a binary data from an postgres WAL archive. > > If i make a > > xfile = open('filename', 'rb').xreadlines() > > line = xfile.next() > > > > i see this sort of thing

Re: building psycopg2 on windows using mingw, "cannot find -lpq"

2008-01-21 Thread Tom Brown
On Mon, 2008-01-21 at 01:57 -0800, GHUM wrote: > What am I missing? any hints? I use psycopg2 all the time on windows. I use the binary installer instead of source. Works great for me. -Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: [SQL] compiling plpython compilation error

2008-03-03 Thread Tom Lane
or making a custom libpython installation. regards, tom lane -- http://mail.python.org/mailman/listinfo/python-list

Licence confusion: distributing MSVC?71.DLL

2008-03-06 Thread Tom Wright
Hi I've written a program in Python using wxPython and Matplotlib and would like to distribute it under the GPL. For ease of use, I'd also like to distribute and installable version for Windows, but this needs MSVCR71.dll and MSVCP71.dll to work. I've created an installer using py2exe and Inno S

Re: Licence confusion: distributing MSVC?71.DLL

2008-03-06 Thread Tom Wright
Tom Wright wrote: > If someone has worked their way through this maze before and has an > answer, I'd be keen to hear it. Hmm, an answer of sorts: Inkscape's Windows build comes with MSVCR70.dll and MSVCR71.dll (but not MSVCP71.dll). As it's a big and high-profile project d

Re: Licence confusion: distributing MSVC?71.DLL

2008-03-06 Thread Tom Wright
Gabriel Genellina wrote: > Maybe this thread > http://groups.google.com/group/comp.lang.python/browse_thread/thread/f8df5ed32b324a3f/ > can help. > > This EULA doesn't apply to you, but to the Python developers, which are > the actual Visual Studio users and have to comply with its license terms.

Re: Licence confusion: distributing MSVC?71.DLL

2008-03-07 Thread Tom Wright
jim-on-linux wrote: > This is what someone wrote on 1-21-2007 > to this help site about this pain in the a... > MSVCR71 stuff. > > " I believe this problem doesn't exist. > (snip useful bit of EULA and explanation) Thanks for that - just what I didn't manage to turn up with Google. I'll go ahead

Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
I'm still confused about this, even after days of hacking at it. It's time I asked for help. I understand that each of you knows more about Python, Javascript, unicode, and programming than me, and I understand that each of you has a higher SAT score than me. So please try and be gentle with your r

Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
I'm still confused about this, even after days of hacking at it. It's time I asked for help. I understand that each of you knows more about Python, Javascript, unicode, and programming than me, and I understand that each of you has a higher SAT score than me. So please try and be gentle with you

[no subject]

2008-03-15 Thread Tom Stambaugh
> Somehow I don't get what you are after. The ' doesn't have to be escaped > at all if " are used to delimit the string. If ' are used as delimiters > then \' is a correct escaping. What is the problem with that!? If I delimit the string with double quote, then I have to escape every double qu

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
ote, then I have to escape every double quote in whatever I serialize. I'm moving strict html from the server to the browser, and therefore the value of every tag attribute is delimited by double quotes. That means that I'd have to escape every double quote, and there are MANY more of them.

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
I appreciate the answers the community has provided, I think I need to add some additional context. I use a trick to let me pass the information into my browser client application. The browser requests the server information from a form whose target is a hidden iframe. The string the server ser

Re: Unicode/UTF-8 confusion

2008-03-16 Thread Tom Stambaugh
I want to thank this community -- especially Carsten Haese -- for your patience with my confusion and for your several suggestions about how to resolve the issue. As a newcomer to python-list, I appreciate your willingness to respond to my request and your graciousness in helping me see the con

Re: Types, Cython, program readability

2008-03-17 Thread Tom Stambaugh
> I'm not entirely sure why you think Pyrex should "contain a compiler". > It certainly works well enough with the free [beer] MS VS 2008 Express > and I'm fairly sure it's fine with MingW. Both of those are readily > available and I don't imagine anyone who's going to use Pyrex / Cython / > ShedSk

Re: Pycon disappointment

2008-03-17 Thread Tom Stambaugh
> But vendors often don't label themselves as vendors. And often, the > researcher or individual in question, who has something worth saying, does > have a professional job of sorts, which might be related to his or her > work > or speech. I've heard people give very long, detailed talks about >

Re: String To List

2008-03-17 Thread Tom Stambaugh
It's too bad your inner data items are delimited with an apostrophe (') instead a double-quote ("). If they were double-quote, you could do something as simple as: Given: a = '["xyz", "abc"]' import simplejson answer = simplejson.loads(a) There may be an incantation to simplejson that allows y

python-list Metaquestion

2008-03-17 Thread Tom Stambaugh
can review it for approval. > > The reason it is being held: > >Message has a suspicious header I'm happy to adjust my headers in whatever way is needed, if I know what the problem is. Is there FAQ somewhere that tells me what I should change? Thx, Tom -- http://mail.python.org/mailman/listinfo/python-list

[no subject]

2008-03-18 Thread Tom Stambaugh
"Duncan Booth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've also just spent a while getting simplejson 1.7.4 to install on a > (non- > windows) system without a C compiler. > > The trick is to unzip the tar file and then before you try to install it > delete everything in si

Re: python book for non technical absolute beginner

2008-12-07 Thread Tom Morris
ial for absolute beginners. It'd certainly be nice if the author were to allow someone to port the tutorial for Python and other languages. It spends a lot of time taking the reader from numbers and letters through conditionals, loops, arrays, iteration and eventually to classes and objects

Re: Mathematica 7 compares to other languages

2008-12-12 Thread Tom McGlynn
r arrays) so useful in many numerical contexts. This is cross-posted to Python as well. I understand it has similar array arithmetic capabilities to Fortran. I believe this may be one reason for Python's burgeoning popularity Tom McGlynn -- http://mail.python.org/mailman/listinfo/python-list

Total Python Noob

2008-10-09 Thread Tom Lake
I have Python 2.6 installed on Vista Ultimate. When I try to calculate sqrt (or any transcendental functions) I get the following error sqrt(2) Traceback (most recent call last): File "", line 1, in NameError: name 'sqrt' is not defined What am I doing wrong?

Re: Total Python Noob

2008-10-09 Thread Tom Lake
"Chris Rebert" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Thu, Oct 9, 2008 at 11:22 PM, Tom Lake <[EMAIL PROTECTED]> wrote: I have Python 2.6 installed on Vista Ultimate. When I try to calculate sqrt (or any transcendental functions) I get the fo

Re: return a value to shell script

2008-11-12 Thread Tom Wright
devi thapa wrote: > I am executing a python script in a shell script. The python script > actually returns a value. > So, can I get the return value in a shell script? If yes, then help me > out. Yes. The variable $? should be bound to the return value of the last foreground program to exit. Th

Parsing DTDs

2009-05-29 Thread Tom Anderson
is no longer maintained, given that it's not like the DTD spec has changed very much? Thanks, tom -- Many of us adopted the File's slang as our own, feeling that we'd found a tangible sign of the community of minds we'd half-guessed to be out there. -- http://mail.python.or

Re: matplotlib question

2008-06-12 Thread Tom Wright
asdf wrote: > basically I need to plot a graph of data vs time. However when i use > matplotlib the hr:min tick marks come out very close together and > appear jumbled. You need to look up the matplotlib.dates package - it's covered briefly in the tutorial at http://matplotlib.sourceforge.net/tuto

Looping-related Memory Leak

2008-06-26 Thread Tom Davis
I am having a problem where a long-running function will cause a memory leak / balloon for reasons I cannot figure out. Essentially, I loop through a directory of pickled files, load them, and run some other functions on them. In every case, each function uses only local variables and I even made

Re: Looping-related Memory Leak

2008-06-30 Thread Tom Davis
On Jun 26, 5:38 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Jun 26, 5:19 am, Tom Davis <[EMAIL PROTECTED]> wrote: > > > I am having a problem where a long-running function will cause a > > memory leak / balloon for reasons I cannot figure out. Essentially, I &

Re: Looping-related Memory Leak

2008-07-01 Thread Tom Davis
On Jun 30, 3:12 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 30 Jun 2008 10:55:00 -0700, Tom Davis wrote: > > To me, this seems illogical. I can understand that the GC is > > reluctant to reclaim objects that have many connections to other >

Re: Looping-related Memory Leak

2008-07-01 Thread Tom Davis
On Jun 30, 8:24 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Jun 30, 1:55 pm, Tom Davis <[EMAIL PROTECTED]> wrote: > > > > > On Jun 26, 5:38 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > On Jun 26, 5:19 am, Tom Davis <[EMAIL PROTECTED]&g

<    1   2   3   4   5   6   7   >