Re: pickle and instancemethod objects

2006-09-13 Thread Martin v. Löwis
Steven Bethard schrieb: > Does this approach seem sound? Am I going to run into some weird > problems doing it this way? It's good, but I think rebuilding the object through new.instancemethod should be even better. py> class A: ... def f(self):print "A" ... py> class B(A): ... def f(self):p

Re: Running python from a usb drive

2006-09-13 Thread Jason
cjl wrote: > Thorsten: > > Thank you for your reply. > > > Setting environment variables has only effect on the process itself > > and the subprocesses. This has nothing to do with Windows, it's the > > same with Linux. > > True, and the changes to path and pythonpath are gone after I close the > c

Re: Is there a way to find IP address?

2006-09-13 Thread Fredrik Lundh
Lad wrote: > Normaly I can log user's IP address using os.environ["REMOTE_ADDR"] . > If a user is behind a proxy, I will log proxy's IP address only. > Is there a way how to find a real IP user's address? os.environ["HTTP_X_FORWARDED_FOR"] (but that can easily be spoofed, and is mostly meaning

Re: Looking for the Perfect Editor

2006-09-13 Thread Omar
thank you claudio for your comprehensive answer. I will work on it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread David J. Braden
Travis E. Oliphant wrote: > Brendon Towle wrote: >> I need to simulate scenarios like the following: "You have a deck of >> 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, >> replace it, and repeat N times." >> > > Thinking about the problem as drawing sample froms a discret

Re: python threading

2006-09-13 Thread Lawrence Oluyede
daniel <[EMAIL PROTECTED]> wrote: > can someone give me a good threading tutorial http://awaretek.com/tutorials.html#thread and http://www.google.com/search?q=python+threading+tutorial -- Lawrence - http://www.oluyede.org/blog "Nothing is more dangerous than an idea if it's the only one you have

Re: How to build extensions on Windows?

2006-09-13 Thread John Machin
Fredrik Lundh wrote: > Kevin D.Smith wrote: > > > This almost worked (at least, it appears to). I got the module to > > build and install using VS 2005. It works fine if I run python from > > the directory where I built the extension. However, if you go to any > > other directory, run python, a

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Hardcoded Software" <[EMAIL PROTECTED]> wrote: > Matthew Wilson wrote: > > I understand that idea of an object's __repr__ method is to return a > > string representation that can then be eval()'d back to life, but it > > seems to me that it doesn't always work. > >

Tkinter on Python 2.4 on Mac OS X?

2006-09-13 Thread Ben Kovitz
Well, I've made some progress--mostly installing and re-installing things to make sure I've got the latest version. I finally got the "Hello World" program at http://docs.python.org/lib/node718.html to work, but only under Python 2.3. Under Python 2.4, both "Hello World" and IDLE just sit there w

Question about Python 2.4.3 from RPM on RedHat 9.0

2006-09-13 Thread Wonder
Hello, I'm installing Python 2.4.3 on my RedHat 9.0. I downloaded Python-2.4.3.tgz and would like to build a RPM package from it and then install from the RPM. When I run "rpmbuild -ta Python-2.4.3.tgz", I got an error "error: %changelog not in descending chronological order". Could anybody tell

Re: How to build extensions on Windows?

2006-09-13 Thread Fredrik Lundh
John Machin wrote: > Any support for the radical notion of the error message giving the full > path of the file that it's complaining about? If so, I'll lob in an > enhancement request in the morning ... there's always "python -vv", of course. -- http://mail.python.org/mailman/listinfo/python

PyCrust Question

2006-09-13 Thread Rich Shepard
To test my code interactively I decided to try PyCrust. However, all the File menu items except Save and Quit are greyed out so I cannot open a saved file. Is there a simple explanation I've overlooked? Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied

Re: Gadfly server startup error

2006-09-13 Thread Ralf Muschall
Steve Holden wrote: > Yes, the whole Gadfly SF web seems to be a bit of a mess. Maybe it has been infected by the source code+doc ;-) I just started the server (after applying Carl's changes) with gfserver foodb . '' (the DB "foodb" had been created earlier using gfplus locally). If I lo

Re: How to build extensions on Windows?

2006-09-13 Thread Martin v. Löwis
John Machin schrieb: > Any support for the radical notion of the error message giving the full > path of the file that it's complaining about? If so, I'll lob in an > enhancement request in the morning ... A patch would be appreciated much more so. Regards, Martin -- http://mail.python.org/mailm

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread David J. Braden
David J. Braden wrote: > Travis E. Oliphant wrote: >> Brendon Towle wrote: >>> I need to simulate scenarios like the following: "You have a deck of >>> 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, >>> replace it, and repeat N times." >>> >> >> Thinking about the problem as

Re: pickle and instancemethod objects

2006-09-13 Thread Steven Bethard
Martin v. Löwis wrote: > Steven Bethard schrieb: >> Does this approach seem sound? Am I going to run into some weird >> problems doing it this way? > > It's good, but I think rebuilding the object through > new.instancemethod should be even better. > > py> class A: > ... def f(self):print "A"

Re: Looking for the Perfect Editor

2006-09-13 Thread stu
jedit http://www.jedit.org/ much better than textpad by a longshot. but whatever you choose... -stu -- http://mail.python.org/mailman/listinfo/python-list

When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread John Henry
Hi list, Just to make sure I understand this. Since there is no "pointer" type in Python, I like to know how I do that. For instance, if I do: ...some_huge_list is a huge list... some_huge_list[0]=1 aref = some_huge_list aref[0]=0 print some_huge_list[0] we know that the answere

Re: Tkinter on Python 2.4 on Mac OS X?

2006-09-13 Thread Bill Williams
In article <[EMAIL PROTECTED]>, "Ben Kovitz" <[EMAIL PROTECTED]> wrote: >...I finally got the > "Hello World" program at http://docs.python.org/lib/node718.html to > work, but only under Python 2.3. > > Has anyone gotten Tkinter running with Python 2.4 on a Mac? > The Hello World example works f

Re: Windows bandwidth monitor

2006-09-13 Thread RunLevelZero
Cool thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread Laszlo Nagy
John Henry írta: > Hi list, > > Just to make sure I understand this. > > Since there is no "pointer" type in Python, I like to know how I do > that. > > For instance, if I do: > >...some_huge_list is a huge list... >some_huge_list[0]=1 >aref = some_huge_list >aref[0]=0 >print so

Re: Python blogging software

2006-09-13 Thread Irmen de Jong
Cliff Wells wrote: > I'm currently using Frog, and it's decent, but lacks some fundamental > features (tags for one). Since Irmen is probably going to scrap it > anyway, I'm kind of fishing about for something new. That is not really true. I won't "scrap" Frog. One of the reasons would be that I'

Re: Dice gen and analyser script for RPGs: comments sought

2006-09-13 Thread George Sakkis
Richard Buckle wrote: > Comments, insights and overall evaluations are especially welcomed re: > * Cleanliness of design > * Pythonicity of design > * Pythonicity of code > * Efficiency of code > * Quality of docstrings > * Conformance with modern docstring standards > * Conformance with coding st

page contents are not refreshed

2006-09-13 Thread Gleb Rybkin
when running apache, mod_python in windows. This looks pretty strange. Creating a simple python file that shows current time will correctly display the time in apache the first time, but freezes afterwards and shows the same time on all subsequent clicks as long as the file is not modified. Any i

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread Steve Holden
John Henry wrote: > Hi list, > > Just to make sure I understand this. > > Since there is no "pointer" type in Python, I like to know how I do > that. > > For instance, if I do: > >...some_huge_list is a huge list... >some_huge_list[0]=1 >aref = some_huge_list >aref[0]=0 >pri

Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread Jason Tishler
Dave, On Wed, Sep 13, 2006 at 03:33:01PM +, David J. Braden wrote: > I can now confirm that, yes, IDLE pops up w/o menus under cygwin. You should be able to workaround this problem by executing idle with the "-n" option: $ idle -n Jason -- PGP/GPG Key: http://www.tishler.net/jason/pub

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread metaperl
One way to avoid the issue I brought up is for the syntax to be very regular... like Lisp or Tcl: set class "algebra" (setq class "algebra") -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Grant Edwards
On 2006-09-13, metaperl <[EMAIL PROTECTED]> wrote: > One way to avoid the issue I brought up is for the syntax to > be very regular... like Lisp or Tcl: > > set class "algebra" > > (setq class "algebra") Unfortunately (or fortunately?) the human mind isn't very regular and seems to prefer structu

PumpMessages et WM_QUIT

2006-09-13 Thread swell
I have a COM server that throw events that i catch after running the event loop thanks to pythoncom.PumpMessages(). How can i stop and exit this loop? I tried to use win32api.PostQuitMessage() but this has no effect ( the doc says that WM_QUIT stops the PumpMessages loop but it doesn't) Does someo

how are dictionary literals handled by the interpreter?

2006-09-13 Thread [EMAIL PROTECTED]
I wrote up a quick little set of tests, I was acutally comparing ways of doing "case" behavior just to get some performance information. Now two of my test cases had almost identical results which was not at all what I expected. Ultimately I realized I don't really know how literals are treated w

Re: page contents are not refreshed

2006-09-13 Thread Steve Holden
Gleb Rybkin wrote: > when running apache, mod_python in windows. > > This looks pretty strange. Creating a simple python file that shows > current time will correctly display the time in apache the first time, > but freezes afterwards and shows the same time on all subsequent clicks > as long as t

Re: page contents are not refreshed

2006-09-13 Thread waylan
Gleb Rybkin wrote: > when running apache, mod_python in windows. > > This looks pretty strange. Creating a simple python file that shows > current time will correctly display the time in apache the first time, > but freezes afterwards and shows the same time on all subsequent clicks > as long as th

Re: Looking for the Perfect Editor

2006-09-13 Thread Wildemar Wildenburger
stu wrote: > jedit > > http://www.jedit.org/ Finally! I usually try to stay out of these discussions; yet I'm always disappointed at how few people seem to be using jEdit and how long it takes them to come out of their holes. So let me enforce that: jEdit www.jedit.org wildemar -- http://ma

Re: page contents are not refreshed

2006-09-13 Thread Steve Holden
waylan wrote: > Gleb Rybkin wrote: > >>when running apache, mod_python in windows. >> >>This looks pretty strange. Creating a simple python file that shows >>current time will correctly display the time in apache the first time, >>but freezes afterwards and shows the same time on all subsequent cl

Re: Dice gen and analyser script for RPGs: comments sought

2006-09-13 Thread Steven Bethard
George Sakkis wrote: > * [personal preference]: Don't leave space between *every* operator in > expressions, group them based on precedence. E.g. instead of "(n * > sigmaSq - sigma * sigma) / (n * n)", I read it easier as "(n*sigmaSq - > sigma*sigma) / (n*n). The spaced-out version is more `PEP 8`

Re: page contents are not refreshed

2006-09-13 Thread tobiah
Browser Cache? Gleb Rybkin wrote: > when running apache, mod_python in windows. > > This looks pretty strange. Creating a simple python file that shows > current time will correctly display the time in apache the first time, > but freezes afterwards and shows the same time on all subsequent click

Idle 1.1.3 class browser + a few questions

2006-09-13 Thread hg
Hi, Is there a way to: 1) open the class browser automatically on the file opening 2) have the class browser updated when functions/classes ... are added to the file 3) have a vertical scroll bar 4) have line numbers Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python blogging software

2006-09-13 Thread Pierre Quentel
Hi, There is a blog demo in Karrigell : http://karrigell.sourceforge.net There is a project called KarriBlog aiming to offer a more complete application, it's still beta but you can see it working on this site (in French) : http://www.salvatore.exolia.net/site Regards, Pierre -- http://mail.py

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread [EMAIL PROTECTED]
Matthew Wilson wrote: > I understand that idea of an object's __repr__ method is to return a > string representation that can then be eval()'d back to life, but it > seems to me that it doesn't always work. Just to reinforce something Skip mentioned: If you're looking for a way to serialize an ob

Re: page contents are not refreshed

2006-09-13 Thread waylan
Steve Holden wrote: > waylan wrote: [snip] > > > >>from mod_python import apache > >>from time import strftime, gmtime > >> > > > > def curtime(): > > return strftime("%a, %d %b %Y %H:%M:%S +", gmtime()) > > > > > >>def handler(req): > >> req.content_type = "text/plain" > >> req.sen

urllib en https

2006-09-13 Thread Cecil Westerhof
I have a strange problem. I wrote a script that uses urllib.urlopen to fetch a page through https. In Python 2.2.2 this works without a problem. But when I use the script in Python I get: Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/urllib.py", line

urllib en https

2006-09-13 Thread Cecil Westerhof
Something went wrong with my last post. So, again: I have a strange problem. I wrote a script that uses urllib.urlopen to fetch a page through https. In Python 2.2.2 this works without a problem. But when I use the script in Python 2.4.1 (which is more recent) I get: Traceback (most recent call l

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread John Henry
Thanks for the reply, both to Laszlo and Steve. Okay, I understand what you're saying. But what if I need to make a "pointer" to a simple variable. For instance, in C: int i=1 int *j=&i *j = 2 print i and you get 2 printed. In Python, i=1 j=i j=2 print i and you get

Colorado Python seminar in November

2006-09-13 Thread Mark Lutz
Just a reminder that the Fall 2006 Colorado Python seminar is now less than 2 months away. Space is limited, so plan now to come join us for a week of in-depth Python training in the Colorado Rockies. For details, please see the original announcement below. --

Re: how are dictionary literals handled by the interpreter?

2006-09-13 Thread Jason
[EMAIL PROTECTED] wrote: > I wrote up a quick little set of tests, I was acutally comparing ways > of doing "case" behavior just to get some performance information. Now > two of my test cases had almost identical results which was not at all > what I expected. Ultimately I realized I don't reall

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread Grant Edwards
On 2006-09-13, John Henry <[EMAIL PROTECTED]> wrote: > Thanks for the reply, both to Laszlo and Steve. > > Okay, I understand what you're saying. > > But what if I need to make a "pointer" to a simple variable. There's no such thing as a "simple variable". There are mutable objects and immutable

Re: urllib en https

2006-09-13 Thread [EMAIL PROTECTED]
please provide a sample program, which has the minimal functionality necessary to reproduce this error. I've checked and the syntax hasn't changed. Perhaps it's with the string you are passing as "fullurl". Anyways, I can't really troubleshoot more than that without some code. Cecil Westerhof wrot

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread John Henry
Thanks for the reply, Grant. I am not doing things like that - I am just trying to clear up in my mind the Python concepts. I understand it now. Grant Edwards wrote: > On 2006-09-13, John Henry <[EMAIL PROTECTED]> wrote: > > Thanks for the reply, both to Laszlo and Steve. > > > > Okay, I under

Re: urllib en https

2006-09-13 Thread Cecil Westerhof
Cecil Westerhof wrote: > Something went wrong with my last post. So, again: > > I have a strange problem. I wrote a script that uses urllib.urlopen to > fetch a page through https. In Python 2.2.2 this works without a problem. > But when I use the script in Python 2.4.1 (which is more recent) I g

Re: Python blogging software

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 08:22 -0700, Fuzzyman wrote: > Cliff Wells wrote: > > On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: > > > > > Anyone aware of any functional (doesn't need to be complete, beta is > > > fine) blog software written in Python? > > > > Hmph. And as soon as I hit send I fi

Re: how are dictionary literals handled by the interpreter?

2006-09-13 Thread [EMAIL PROTECTED]
Jason wrote: > [EMAIL PROTECTED] wrote: > > I wrote up a quick little set of tests, I was acutally comparing ways > > of doing "case" behavior just to get some performance information. Now > > two of my test cases had almost identical results which was not at all > > what I expected. Ultimately

Re: Looking for the Perfect Editor

2006-09-13 Thread stu
Wildemar Wildenburger wrote: > > Finally! I usually try to stay out of these discussions; yet I'm always > disappointed at how few people seem to be using jEdit and how long it > takes them to come out of their holes. well when people start reccomending things like textpad which is crap. textpad

ReadError, "not a bzip2 file"

2006-09-13 Thread itzel
Hello!! In using tarfile to group thousands of small files from a directory and then compress it. I already compress a group of files in my pc, but I need do it in a server and I'm testing the same procedure, but it doesn't work . A "ReadError" appear: "not a bzip2 file". I'm using this script: im

Re: Python blogging software

2006-09-13 Thread Fuzzyman
Cliff Wells wrote: > On Wed, 2006-09-13 at 08:22 -0700, Fuzzyman wrote: > > Cliff Wells wrote: > > > On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: > > > > > > > Anyone aware of any functional (doesn't need to be complete, beta is > > > > fine) blog software written in Python? > > > > > > H

Re: how are dictionary literals handled by the interpreter?

2006-09-13 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I wrote up a quick little set of tests, I was acutally comparing ways > of doing "case" behavior just to get some performance information. Now > two of my test cases had almost identical results which was not at all > what I expected. Ultimately I realized I don't reall

Re: win32service (wxpython) -- i cannot install service

2006-09-13 Thread Larry Bates
kkt49 wrote: > under code service install => ok > > _svc_name_ = r'moin_service' > _svc_display_name_ = r'moin_service' > start_cmd = r"c:\mmde\moin.exe" > #info = ['', '', ''] > > def __init__(self): > #self._svc_name = info[0] > #self._svc_display_name_ = inf

Re: win32service (wxpython) -- i cannot install service

2006-09-13 Thread Larry Bates
Larry Bates wrote: > kkt49 wrote: >> under code service install => ok >> >> _svc_name_ = r'moin_service' >> _svc_display_name_ = r'moin_service' >> start_cmd = r"c:\mmde\moin.exe" >> #info = ['', '', ''] >> >> def __init__(self): >> #self._svc_name = info[0] >> #

Re: how are dictionary literals handled by the interpreter?

2006-09-13 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > I wrote up a quick little set of tests, I was acutally comparing ways > > of doing "case" behavior just to get some performance information. Now > > two of my test cases had almost identical results which was not at all > > what I expected.

Re: how are dictionary literals handled by the interpreter?

2006-09-13 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > I wrote up a quick little set of tests, I was acutally comparing ways > > of doing "case" behavior just to get some performance information. Now > > two of my test cases had almost identical results which was not at all > > what I expected.

Statistical distribution of object size

2006-09-13 Thread [EMAIL PROTECTED]
Hi, In a typical heavy-use python application (say running Zope for dukehealth.org) what is the (statistical) distribution of the the size of objects? (i.e. start up server, stop time when it has been under load for a few hours, and put each object into a bucket marked with the number of bytes it

Delete items in nested dictionary based on value.

2006-09-13 Thread Brian L. Troutwine
I've got a problem that I can't seem to get my head around and hoped somebody might help me out a bit: I've got a dictionary, A, that is arbitarily large and may contains ints, None and more dictionaries which themselves may contain ints, None and more dictionaries. Each of the sub-dictionaries is

parameter files

2006-09-13 Thread Russ
I have a python module (file) that has a set of parameters associated with it. Let's say the module is called "code.py." I would like to keep the parameter assignments in a separate file so that I can save a copy for each "run" without having to save the entire code.py file. Let's say the parameter

Re: How to build extensions on Windows?

2006-09-13 Thread John Machin
Fredrik Lundh wrote: > John Machin wrote: > > > Any support for the radical notion of the error message giving the full > > path of the file that it's complaining about? If so, I'll lob in an > > enhancement request in the morning ... > > there's always "python -vv", of course. Thank you; I wasn'

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread bearophileHUGS
My first try, not much tested: def clean(d): for key,val in d.items(): if isinstance(val, dict): val = clean(val) if not val: del d[key] return d a = {1: {2: 2, 3: {1: None, 2: 2}}, 2: 2, 3: None} print clean(a) # Out: {1: {2: 2, 3: {2: 2}}, 2: 2} b

Status of PyXPCOM?

2006-09-13 Thread kenneth . m . mcdonald
I'm waiting for PyXPCOM with bated breath, but always have a hard time figuring out what is actually happening with it--the ActiveState mailing list is mostly inactive, and web searches Always turn up very old, out of date pages. If it weren't for the fact that I know Mark Hammond is working,very,

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread bearophileHUGS
Better: def clean(d): for key,val in d.items(): if isinstance(val, dict): val = clean(val) if val is None or val == {}: del d[key] return d a = {1: {2: 2, 3: {1: None, 2: 2}}, 2: 2, 3: None} print clean(a) # Out: {1: {2: 2, 3: {2: 2}}, 2: 2} b = {1:

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread Dale Strickland-Clark
Brian L. Troutwine wrote: > I've got a problem that I can't seem to get my head around and hoped > somebody might help me out a bit: > > I've got a dictionary, A, that is arbitarily large and may contains > ints, None and more dictionaries which themselves may contain ints, > None and more dictio

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > Better: > > def clean(d): > for key,val in d.items(): > if isinstance(val, dict): > val = clean(val) > if val is None or val == {}: > del d[key] > return d Can you delete values from a dictionary whilst iterating over its

Re: How to build extensions on Windows?

2006-09-13 Thread Fuzzyman
Martin v. Löwis wrote: > Kevin D. Smith schrieb: > > Then there is Mike Fletcher's web page > > (http://www.vrplumber.com/programming/mstoolkit/) that describes in > > detail how to build extensions, but most of the links to external > > software are no longer valid. I think it's safe to say that

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread John McMonagle
> > Assuming dict_sweep worked perfectly it would take input like this: > > A_in = {1: {2: 2, 3: {1: None, 2: 2}}, 2: 2, 3: None} > > B_in = {1: {1: {1: None, 2: {1: None}}, 2: 2, 3: None} > > and output this: > > A_out = {1: {2: 2, 3: {2: 2}}, 2: 2} > > B_out = {2:2} > > This dict_sweep ab

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread bearophileHUGS
Fuzzyman: > Can you delete values from a dictionary whilst iterating over its items ? Try the code, it works. I am not iterating on the dict, I am not using dict.iteritems(), that produces a lazy iterable, I am using dict.items() that produces a list of (key,value) pairs. And I am not removing ele

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread bearophileHUGS
Here you can find an improved version: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498093 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build extensions on Windows?

2006-09-13 Thread John Machin
Martin v. Löwis wrote: > John Machin schrieb: > > Any support for the radical notion of the error message giving the full > > path of the file that it's complaining about? If so, I'll lob in an > > enhancement request in the morning ... > > A patch would be appreciated much more so. > Hi Martin, I

threads and return values

2006-09-13 Thread Timothy Smith
say i'm issuing t = Thread(target=lambda: WeeklyReportPDF.MakeReport(self.UserNameValue, self.PassWordValue,ReportType,self.db)) t.start() which works just fine, BUT how do i get access to the return value of WeeklyReportPDF.MakeReport() ?? -- http://mail.python.org/mailman/listinfo/python-li

Re: parameter files

2006-09-13 Thread gry
Russ wrote: > I have a python module (file) that has a set of parameters associated > with it. Let's say the module is called "code.py." I would like to keep > the parameter assignments in a separate file so that I can save a copy > for each "run" without having to save the entire code.py file. Let

Re: threads and return values

2006-09-13 Thread Paul Rubin
Timothy Smith <[EMAIL PROTECTED]> writes: > t = Thread(target=lambda: > WeeklyReportPDF.MakeReport(self.UserNameValue, > self.PassWordValue,ReportType,self.db)) > t.start() > > which works just fine, BUT how do i get access to the return value of > WeeklyReportPDF.MakeReport() ?? You can't. Make

Re: best small database?

2006-09-13 Thread Blair P. Houghton
Fredrik Lundh wrote: > Blair P. Houghton wrote: > > > Can't be any harder than switching between incompatible filesystems, > > unless you assume it should "just work...". > > so what file systems are you using that don't support file names and > binary data ? Mmmm, no. I'm saying that the change

stock quotes

2006-09-13 Thread Donlingerfelt
I would like to download stock quotes from the web, store them, do calculations and sort the results. However I am fairly new and don't have a clue how to parse the results of a web page download. I can get to the site, but do not know how to request the certain data need. Does anyone know how

Re: threads and return values

2006-09-13 Thread Paul Rubin
Paul Rubin writes: > import Queue > q = Queue() Oops, meant q = Queue.Queue() -- http://mail.python.org/mailman/listinfo/python-list

Python to JavaScript Compiler? Anyone written such a beast?

2006-09-13 Thread kenneth . m . mcdonald
Of course, I'm not talking about something that would transform any Python code into semantically JavaScript code, but simply something that would analyze a "restricted" Python source file, and spit out equivalent JavaScript. The big advantage (as far as I'm concerned) is that one could make use of

Re: When is it a pointer (aka reference) - when is it a copy?

2006-09-13 Thread George Sakkis
Grant Edwards wrote: > On 2006-09-13, John Henry <[EMAIL PROTECTED]> wrote: > > So, if I understand you correctly, I must make the reference > > to a more elaborate representation. Like: > > > >i=[1,] > >j=i > >j[0]=2 > >print i > > > > in order to get 2 printed. > > > > Correct?

Re: Python to JavaScript Compiler? Anyone written such a beast?

2006-09-13 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Of course, I'm not talking about something that would transform > any Python code into semantically JavaScript code, but simply > something that would analyze a "restricted" Python source file, > and spit out equivalent JavaScript. The big advantage (as far > as I'm conce

Re: Scientific computing and data visualization.

2006-09-13 Thread David J. Braden
Fie Pye wrote: > Hallo > > I would like to have a high class open source tools for scientific > computing and powerful 2D and 3D data visualisation. Therefore I chose > python, numpy and scipy as a base. Now I am in search for a visualisation > tool. I tried matplotlib and p

FtpUtils Progress Bar

2006-09-13 Thread iwcook58
Hi, I can successfully upload and download files using Stefan's Schwarzer's ftputil script. The problem is that as some of the files are quite large you cannot see how much has been downloaded/uploaded. Even a percentage or just dots going across the screen would be better than nothing. Does anyo

Re: stock quotes

2006-09-13 Thread George Sakkis
Donlingerfelt wrote: > I would like to download stock quotes from the web, store them, do > calculations and sort the results. However I am fairly new and don't have a > clue how to parse the results of a web page download. I can get to the > site, but do not know how to request the certain data

Re: Python to JavaScript Compiler? Anyone written such a beast?

2006-09-13 Thread Ben Finney
[EMAIL PROTECTED] writes: > Of course, I'm not talking about something that would transform any > Python code into semantically JavaScript code, but simply something > that would analyze a "restricted" Python source file, and spit out > equivalent JavaScript. You may be looking for Pyjamas:

Re: stock quotes

2006-09-13 Thread Larry Bates
Donlingerfelt wrote: > I would like to download stock quotes from the web, store them, do > calculations and sort the results. However I am fairly new and don't have a > clue how to parse the results of a web page download. I can get to the > site, but do not know how to request the certain data

Re: Linear regression in 3 dimensions

2006-09-13 Thread David J. Braden
Andrew McLean wrote: > Bernhard, > > Levenberg-Marquardt is a good solution when you want to solve a general > non-linear least-squares problem. As Robert said, the OPs problem is > linear and Robert's solution exploits that. Using LM here is unnecessary > and I suspect a fair bit less efficien

Re: FtpUtils Progress Bar

2006-09-13 Thread Timothy Smith
[EMAIL PROTECTED] wrote: > Hi, > I can successfully upload and download files using Stefan's Schwarzer's > ftputil script. > > The problem is that as some of the files are quite large you cannot see > how much has been downloaded/uploaded. > Even a percentage or just dots going across the screen wo

Re: auto upgrade scripts?

2006-09-13 Thread alex23
[EMAIL PROTECTED] wrote: > In my case I want my program to check for (e.g.) bug-fix releases on > some location (network drive or ftp), and if available, allow to > automatically download and install them. Have you looked into PEAK's setuptools? http://peak.telecommunity.com/DevCenter/setuptools

time-based point system

2006-09-13 Thread Jay
I'm writing a game script and the point system will be based upon time. The less time there is between event one and event two, the higher score you'll get for event two. However, I've got a problem figuring how to do this. Here's why. I don't want the score system to just be a straight charted

Re: time-based point system

2006-09-13 Thread Erik Max Francis
Jay wrote: > I'm writing a game script and the point system will be based upon time. > The less time there is between event one and event two, the higher > score you'll get for event two. However, I've got a problem figuring > how to do this. Here's why. I don't want the score system to just b

Re: stock quotes

2006-09-13 Thread skip
don> I would like to download stock quotes from the web, store them, do don> calculations and sort the results. However I am fairly new and don> don't have a clue how to parse the results of a web page download. don> I can get to the site, but do not know how to request the certai

Re: Looking for the Perfect Editor

2006-09-13 Thread David J. Braden
stu wrote: > Wildemar Wildenburger wrote: >> Finally! I usually try to stay out of these discussions; yet I'm always >> disappointed at how few people seem to be using jEdit and how long it >> takes them to come out of their holes. > > well when people start reccomending things like textpad which

How do I converted a null (0) terminated string to a Python string?

2006-09-13 Thread Michael
Hi All, I've received (via UDP) a null terminated string and need to convert it into a Python string. Can anyone tell me how this is done? If it helps, I know the number of characters in the string. Thanks, M. McDonnell -- http://mail.python.org/mailman/listinfo/python-list

Re: time-based point system

2006-09-13 Thread Jay
Okay, this is a game. So the points are abstract. It's like an arcade game in respect to the points. They don't actually mean or represent anything. The only point is to get a high score. The idea is that the faster the user acts (or reacts) the greater amount of points they'll receive. Simpl

Re: time-based point system

2006-09-13 Thread Erik Max Francis
Jay wrote: > Okay, this is a game. So the points are abstract. It's like an arcade > game in respect to the points. They don't actually mean or represent > anything. The only point is to get a high score. The idea is that the > faster the user acts (or reacts) the greater amount of points the

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-13 Thread Steve Holden
Michael wrote: > Hi All, > > I've received (via UDP) a null terminated string and need to convert it > into a Python string. Can anyone tell me how this is done? If it helps, > I know the number of characters in the string. > > Thanks, > M. McDonnell > Have you received this string in Python or

Re: Looking for the Perfect Editor

2006-09-13 Thread Jay
I, too, am a hardcore fan of jEdit. It's nice to finally see some user support on this forum. :-) Wildemar Wildenburger wrote: > stu wrote: > > jedit > > > > http://www.jedit.org/ > > Finally! I usually try to stay out of these discussions; yet I'm always > disappointed at how few people seem t

Re: How to build extensions on Windows?

2006-09-13 Thread Martin v. Löwis
Fuzzyman schrieb: > More interestingly, someone reported on Python-dev recently a speed > improvement of around 30% (from memory) by compiling with VC 8. I know > the grumble (almost certainly correctly) about Microsoft's 'odd' > interpretation of the C standards in VC 8, but it looks like there ar

<    1   2   3   >