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

2006-09-13 Thread John Machin
Michael top-posted [again]: > > John Machin wrote: > > Michael top-posted [corrected]: > > > John Machin wrote: > > > > Michael wrote: > > > > > Hi All, > > > > > > > > > > I've received (via UDP) a null terminated string and need to convert > > > > > it > > > > > into a Python string. Can anyone

Re: Refactor a buffered class...

2006-09-13 Thread lh84777
thanks a lot to all, i help me to learn a lot ! (i finally use the generator trick, it is great...) best regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: [IronPython] [ANN] IronPython Community Edition 1.0r1

2006-09-13 Thread M. David Peterson
http://www.oreillynet.com/windows/blog/2006/09/seo_sanghyeonipce_ironpython_c.htmlSeo, do you have a blog I can point people to? Either way, Thanks!  This will make things TONS easier in regards to running IronPython on Mono. :)On 9/13/06, Sanghyeon Seo < [EMAIL PROTECTED]> wrote:I am happy to anno

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

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 10:30 +0200, Fredrik Lundh wrote: > Antoon Pardon wrote: > > > One place where I would use such a feature is in a unittest > > package. I think being able to write self.assert or self.raise > > looks better than having to append an underscore. > > patch here: > > http://ma

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

2006-09-13 Thread Michael
John, Thanks for your reply. Just wondering... how are Python strings formatted? Evidently they're not 0 terminated. Thanks again, MDM John Machin wrote: > Michael top-posted [corrected]: > > John Machin wrote: > > > Michael wrote: > > > > Hi All, > > > > > > > > I've received (via UDP) a null t

Re: [ANN] IronPython Community Edition 1.0r1

2006-09-13 Thread Sanghyeon Seo
2006/9/14, Sanghyeon Seo <[EMAIL PROTECTED]>: > I am happy to announce IronPython Community Edition (IPCE for short) > 1.0 revision 1, based on IronPython 1.0, to the world. I haven't included Python standard library or my DB-API for IronPython modules or useful third party modules like ElementTre

[ANN] IronPython Community Edition 1.0r1

2006-09-13 Thread Sanghyeon Seo
I am happy to announce IronPython Community Edition (IPCE for short) 1.0 revision 1, based on IronPython 1.0, to the world. Get it here: http://sparcs.kaist.ac.kr/~tinuviel/download/IPCE-1.0r1.zip Binary is built with Mono 1.1.17.1. Benefits of this edition: 1. You don't need to fight Mono with

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

2006-09-13 Thread John Machin
Michael top-posted [corrected]: > John Machin wrote: > > 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 strin

Re: stock quotes

2006-09-13 Thread Bryan
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: FtpUtils Progress Bar

2006-09-13 Thread Justin Ezequiel
[EMAIL PROTECTED] wrote: > > Does anyone have an example on how to show the progress of the > upload/download when using ftputil? > haven't used ftputil in quite a while ... but using ftplib... import ftplib class Callback(object): def __init__(self, totalsize, fp): self.totalsize =

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

2006-09-13 Thread Michael
Thank you very much for your responses. To answer some of the questions... Yes, I am in Python receiving a C language 0 terminated string that was sent to my Python program in a UDP packet (which is how I know the count). Are your responses still correct given this clarification? Thanks much, MDM

Re: parameter files

2006-09-13 Thread Gabriel Genellina
At Thursday 14/9/2006 01:10, Russ wrote: > I would try a configuration file, instead of a python module. > See ConfigParser: > . > You can save values for each "run" in a separate [section]. > Execfile is a pretty big hammer for this. Hey, th

Re: time-based point system

2006-09-13 Thread Jay
I'm sorry. I never considered what you said about the relationship about the input and output. I'll take my thread elsewhere to a math board. Erik Max Francis wrote: > Jay wrote: > > > That function is absolutely no good for this situation. > > > > 1. Take a small number. > > 5.4348809719085693

Re: time-based point system

2006-09-13 Thread Gabriel Genellina
At Thursday 14/9/2006 00:46, 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 great

Re: time-based point system

2006-09-13 Thread Erik Max Francis
Jay wrote: > That function is absolutely no good for this situation. > > 1. Take a small number. > 5.4348809719085693 > > 2. Put it in the function. > f(5.4348809719085693) = 1/5.4348809719085693 > > 3. Get a large number??? > 0.18399666987533483 > > That number is even smaller. I want a larg

Re: parameter files

2006-09-13 Thread Russ
> I would try a configuration file, instead of a python module. > See ConfigParser: > . > You can save values for each "run" in a separate [section]. > Execfile is a pretty big hammer for this. Hey, that looks interesting, but those docs don't

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

2006-09-13 Thread John Machin
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. > I think you mean NUL, not null. What have you received it into, if it's

Re: FtpUtils Progress Bar

2006-09-13 Thread George Sakkis
[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: How to build extensions on Windows?

2006-09-13 Thread Martin v. Löwis
John Machin schrieb: > Hi Martin, I do hope you don't regret opening Pandora's box :-) > > Does the following look about right? Technically, yes. I wonder whether it will generate unreadable error messages, though (one would have to try). > I was somewhat bemused by the limit of 200 bytes on the

Re: time-based point system

2006-09-13 Thread Jay
That function is absolutely no good for this situation. 1. Take a small number. 5.4348809719085693 2. Put it in the function. f(5.4348809719085693) = 1/5.4348809719085693 3. Get a large number??? 0.18399666987533483 That number is even smaller. I want a large one coming out. Erik Max Francis

Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread David J. Braden
Jason Tishler wrote: > 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 > Work

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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'

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

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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'

  1   2   3   >