PYS file

2008-01-28 Thread azrael
A I Understood correctly, pyc files are compiled py scripts. Is it possible to decomplite them. I guess it's possible, but how hard is it. -- http://mail.python.org/mailman/listinfo/python-list

Re: validate string is valid maths

2008-01-28 Thread Matthew_WARREN
Ok, I was thinking along the same lines myself, replacing ++ etc.. until no more replacements are made. I hadnt considered creating a table of pairs and replacements though, or realised that the same replace method would work in that case. handy :) The dictionary is unordered; would differences

Re: optional static typing for Python

2008-01-28 Thread John Nagle
Arnaud Delobelle wrote: > On Jan 27, 11:00 pm, "Russ P." <[EMAIL PROTECTED]> wrote: >> On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: >>> Perhaps this:http://www.python.org/dev/peps/pep-3107/mightbe >>> relevant? >>> André >> Thanks. If I read this correctly, this PEP is on track for Python

Re: optional static typing for Python

2008-01-28 Thread Kay Schluehr
On 27 Jan., 23:19, "Russ P." <[EMAIL PROTECTED]> wrote: > A while back I came across a tentative proposal from way back in 2000 > for optional static typing in Python: > > http://www.python.org/~guido/static-typing > > Two motivations were given: > > -- faster code > -- better compile-time

Re: Serving images

2008-01-28 Thread Gabriel Genellina
On 28 ene, 07:43, Jumping Arne <[EMAIL PROTECTED]> wrote: > Before I've just placed the images on a server where the script didn't need > to bother about it. Now I'm considering to let the script handle the images > also, that is serve them to the browser when requested. I've tried two > different

Re: Python Genetic Algorithm

2008-01-28 Thread wes
Max, def GeneticNextGen(self): numsets = len(self.WtSets) numwts= len(self.WtSets[0].Lis) self.WtSets.sort(CompByCurrentFitness) index_lis = [] K = 100.0 N= float(numwts) #if RISE(slope) is too high, concentration occ

Scroll Bar in List Ctrl

2008-01-28 Thread tarun
Hi All, I've a listcontrol in a frame, wherein data gets poupulated and when the data is more than the veritcal size of the listcontrol window, a vertical scroll bar comes up automatically. But it always stays at the top. but i want it be at the bottom to be able to see the latest updates always.

Re: Just for fun: Countdown numbers game solver

2008-01-28 Thread david . hotham
I see I don't have as many columns as I'd expected. Here's a reformatted listing. from time import time from bisect import insort from sys import argv #- # Hash table is a global variable #-

Re: read and readline hanging

2008-01-28 Thread Olivier Lefevre
>> But in python eventually stdout.readline() hangs. This is a real >> nuisance: why can't it just return None? > > Because that would be quite annoying because most of the time people want > blocking behavior. Just an afterthought: do people prefer the blocking behaviour because blocking until

Re: SMTP Sending Mail Problem

2008-01-28 Thread the_ricka
I added a longer text file with vocabulary typically used in our office and the email sent successfully. The crazy thing is I had already checked all the spam filters and queues in Exchange, and the older messages seem to have disappeared. Sorry for the post, I thought I was going crazy for a bi

Re: post variable

2008-01-28 Thread [EMAIL PROTECTED]
On 28 jan, 22:32, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 1. yes i've tried that technique but its annoying, the user can easily > stop the redirection and not "elegant". It's a very canonical technique with HTTP (at least after a successful POST). But I suspect you're not doing it the ri

Re: Just for fun: Countdown numbers game solver

2008-01-28 Thread Arnaud Delobelle
On Jan 28, 9:31 pm, [EMAIL PROTECTED] wrote: > I also had a go at this problem for a bit of python practice, about 6 > months ago. I tried a few optimizations and my experience was that > with only 6 seeds, a hash table was very effective. So effective, in > fact, that it made all other optimizat

Re: Problems installing Python on server

2008-01-28 Thread [EMAIL PROTECTED]
On 28 jan, 22:28, Yansky <[EMAIL PROTECTED]> wrote: > I asked my hosting company if they would upgrade Python on my server > to the latest version. They responded with: > > "Sorry no. We tend to stick with what comes packaged with the unix > distribution to ease maintenance issues. > > There is not

Re: PYS file

2008-01-28 Thread Diez B. Roggisch
Gabriel Genellina schrieb: > On 28 ene, 13:05, azrael <[EMAIL PROTECTED]> wrote: > >> A I Understood correctly, pyc files are compiled py scripts. Is it >> possible to decomplite them. >> I guess it's possible, but how hard is it. > > You want to get back the Python source? Look for the "decompyl

Embeding python with mingw on win32 and python 2.4.4

2008-01-28 Thread mani
Hi I'm bringing up an old story once more! I'm on win32 (winxp sp2) python 2.4.4. mingw gcc version is 3.4.5. msys is in c:\msys. mingw is in c:\mingw and python is in c:\pyton24. there are also python24.lib and libpython24.a in c:\python24\libs. when I try to compile this sample code [1] from msy

Re: optional static typing for Python

2008-01-28 Thread Arnaud Delobelle
On Jan 28, 4:31 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: [...] > > Note that annotations do not provide explicit typing, AFAIK: > > > def f(x:int) -> int: return x*2 > > > is stricly equivalent to > > > def f(x): return x*2 > > f.__annotations__ = {'x':int, 'return':int}

RE: Get Available Functions

2008-01-28 Thread Robert Rawlins - Think Blue
Thanks for that Tim, I'll have a play around with these functions later today and see what happens, hopefully it'll shed some light on this API for me. Thanks mate, I appreciate it. Rob -Original Message- From: Tim Chase [mailto:[EMAIL PROTECTED] Sent: 28 January 2008 17:02 To: Robert

Re: A question about osyco

2008-01-28 Thread Marc 'BlackJack' Rintsch
On Mon, 28 Jan 2008 05:31:41 -0800, iu2 wrote: > I wrote two version of a fib functions, a recursive one and an > iterative one. > Psyco improved a lot the recursive function time, but didn't affect at > all the iterative function. > > Why? Try calling the iterative one twice and measure the tim

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Tim Chase
> I've modified my little decorator (see Test1, Test2, Test3 for > usage). I'll post it later on the cookbook if there seems to be no > bugs and noone raises valid point against it:) One other area that was mentioned obliquely: preservation of docstrings (and other function attributes) I could

Re: Set ulimit when using subprocess.Popen?

2008-01-28 Thread Jarek Zgoda
Rob Wolfe napisał(a): > > Jarek Zgoda napisał(a): >> Hi, all, >> >> anybody has an idea on how to set ulimit (-v in my case, linux) for >> process started using subprocess.Popen? > > What about: > > from subprocess import call > call('ulimit -v 1000 && ulimit -v && ls', shell=True) subprocess.P

Re: Python Genetic Algorithm

2008-01-28 Thread Wildemar Wildenburger
Blubaugh, David A. wrote: > Have you ever worked with Gene Expression Programming > No. Why? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Arnaud Delobelle
On Jan 28, 10:27 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I've modified my little decorator (see Test1, Test2, Test3 for > > usage). I'll post it later on the cookbook if there seems to be no > > bugs and noone raises valid point against it:) > > One other area that was mentioned obliquely: p

Re: optional static typing for Python

2008-01-28 Thread Boris Borcic
Wish you'd opted out of typing all that static. BB Russ P. wrote: (...) > > What is that supposed to mean? > > Oh, I almost forgot. I'm supposed to sit here and be polite while > clueless dolts make wise cracks. Sorry, but I haven't yet mastered > that level of self-control. > > I would just l

Re: post variable

2008-01-28 Thread [EMAIL PROTECTED]
1. yes i've tried that technique but its annoying, the user can easily stop the redirection and not "elegant". 2. yes i'm aware of that, however what i've mentioned above is just an example, it's actually way more serious. guess i'll have to bare with it. -- http://mail.python.org/mailman/listin

Get Available Functions

2008-01-28 Thread Robert Rawlins - Think Blue
Hello Guys, I'm working with a python module which isn't part of the core Python API and it also isn't very documented or supported, is there any way that I can easily dump/view the available classes and methods within the package from within python? Thanks guys, Rob -- http://mail.py

Re: Get Available Functions

2008-01-28 Thread Christian Heimes
Tim Chase wrote: > I've had a couple cases where the underlying module was written > in C (mod_python in particular...don't know if it still has this > problem) where dir() wouldn't actually tell you about the object, > but for most cases, dir() will get you pointed in the right > dir-ection. :

Re: referer url

2008-01-28 Thread [EMAIL PROTECTED]
Thanks for the reply. 1) CGI so i'm doing it right. 2) this is impossible as i'm doing the exact same thing with another language and it utterly works. 3) the same as above 4) no.. this gets nerve breaking! -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with gethostbyaddr with intranet addresses on MAC

2008-01-28 Thread Sion Arrowsmith
shailesh <[EMAIL PROTECTED]> wrote: >Python 2.4.4 (#1, Oct 18 2006, 10:34:39) >[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin >Type "help", "copyright", "credits" or "license" for more information. from socket import * x = gethostbyname('google.com') x >'64.233.167.99'

Re: A question about osyco

2008-01-28 Thread bearophileHUGS
Marc 'BlackJack' Rintsch: > Try calling the iterative one twice and measure the time of the second > call. IIRC psyco needs at least one call to analyze the function, so the > first call is not speed up. That's how Java HotSpot works, but Psyco is very different from HotSpot, and I think you are

Executing other python code

2008-01-28 Thread Tim Rau
I'm working on a game, and I'd like players to be able to define thier ships with scripts. Naturally, I don't want to give them the entire program as thier romping ground. I would like to invoke a seperate interpreter for these files, and give it a limited subset of the functions in my game. What i

Re: file write question

2008-01-28 Thread Robb Lane (SL name)
H - I am not familiar with flush(), will look into it. But an interesting note: I repeatedly and often start long running processes (one running right now: on about it's 14th hour), writing to open files, with few problems (on Mac OS X). Although of course I can't look at the results until the file

Re: post variable

2008-01-28 Thread Gabriel Genellina
En Mon, 28 Jan 2008 19:32:45 -0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > 1. yes i've tried that technique but its annoying, the user can easily > stop the redirection and not "elegant". > > 2. yes i'm aware of that, however what i've mentioned above is just an > example, it's actual

Re: Executing other python code

2008-01-28 Thread Rolf van de Krol
AFAIK this can't be done with just python. You can use the C API of Python to achieve this. I don't know the details of that, but I guess you will need this (http://docs.python.org/api/api.html). Rolf Tim Rau wrote: > I'm working on a game, and I'd like players to be able to define thier > ship

LEELO NO TE ARREPENTIRAS

2008-01-28 Thread aida
Léelo, no te arrepentirásPOR FAVOR ANTES DE ELIMINAR ESTE MENSAJE, LEAN PRIMEROY TOMEN LA DECISIÓN DESPUÉS.ESTO TE PUEDE AYUDAR A PAGAR TUS DEUDAS O TUS ESTUDIOSHola amigos:Esto es lo me pasó días atrás, mientras navegaba por estas páginas de noticias, así como usted lo está haciendo ahora. Se me a

ISO with timezone

2008-01-28 Thread nik
Hi, How does one express the time in ISO format with the timezone designator? what I want is -MM-DDThh:mm:ss.sTZD >From the documentation I see: >>> from datetime import tzinfo, timedelta, datetime >>> class TZ(tzinfo): ... def utcoffset(self, dt): return timedelta(minutes=-399) ... >>>

Re: Python Standardization: Wikipedia entry

2008-01-28 Thread Terry Reedy
"Paddy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I would value the opinion of fellow Pythoneers who have also | contributed to Wikipedia, on the issue of "Is Python Standardized". Depends entirely on the operative meaning of standardized. Formal standards body? Obviously no

Re: Python self-evaluating strings

2008-01-28 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I found this: http://groups.google.com/group/comp.lang.python/browse_thread/thread/a1316cb4e216eba4/0cda739385abd03c?lnk=gst&q=Self-Reproducing+Program#0cda739385abd03c Exactly the one I meant. | It contains a lamb

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Terry Reedy
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I don't like the name convention. _name already has a perfectly good | convention: it's a private name, don't mess with it. That includes in | function/method signatures. With your convention, _foo is public. Since l

Re: Python Standardization: Wikipedia entry

2008-01-28 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Paddy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > |I would value the opinion of fellow Pythoneers who have also > | contributed to Wikipedia, on the issue of "Is Python Standardized". > > Depends en

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Terry Reedy
"André" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |Here's a version that |1. does not require new syntax |2. does not *necessarily* override the "_" prefix convention 'self_' is way too bulky and intrusive. Putting '_' at the end of the word is nearly as easy to detect and co

Re: ISO with timezone

2008-01-28 Thread Nicholas F. Fabry
Hello, nik. On Jan 28, 2008, at 21:03, nik wrote: > Hi, > > How does one express the time in ISO format with the timezone > designator? > > what I want is -MM-DDThh:mm:ss.sTZD > >> From the documentation I see: from datetime import tzinfo, timedelta, datetime class TZ(tzinfo): > ...

Is netstat in python is enough for getting ip address of all system connected in network

2008-01-28 Thread Manikandan R
hai everybody, I am working in python 2.4. I am in need to get the ip address of all the devices connected in the network. Is its possible in python, can anyone help me please. If its possible, can U give me the code. Mani. -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about osyco

2008-01-28 Thread iu2
On Jan 29, 1:48 am, [EMAIL PROTECTED] wrote: > Marc 'BlackJack' Rintsch: > > > Try calling the iterative one twice and measure the time of the second > > call.  IIRC psyco needs at least one call to analyze the function, so the > > first call is not speed up. > > That's how Java HotSpot works, but

Where do glade files go?

2008-01-28 Thread Devraj
Hi everyone, I am writing an application using Python/GTK/Hildon/Glade. I will be creating a debian package as the final distribution mechanism for the package. What would be the ideal place to put glade files that my application uses on the target system? Thanks. -- http://mail.python.org/mailm

Re: Problems installing Python on server

2008-01-28 Thread Devraj
Also be careful and setup all the paths that is required for compiling various Python modules etc. On Jan 29, 8:28 am, Yansky <[EMAIL PROTECTED]> wrote: > I asked my hosting company if they would upgrade Python on my server > to the latest version. They responded with: > > "Sorry no. We tend to st

Re: wx.EVT_RIGHT_UP strangeness?

2008-01-28 Thread sigpoggy
Thanks, I'm using wxPython 2.8.7.1 on OS X 10.4.11 with MacPython 2.5 No doubt it's a Mac thing, I'll take it to the wxPython users. On Jan 28, 6:36 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Jan 26, 1:30 pm, [EMAIL PROTECTED] wrote: > > > > > I am playing with wxPython 2.8.7.1 on OS X 10

Do You Want a GSM Mobile with Amazing Features? Please click here

2008-01-28 Thread Farooq
www.enmac.com.hk GSM Mobile Phones, Digital iPods, Digital Clocks, Digital Pens, Digital Quran. Enjoy these products with Islamic Features (Complete Holy Quran with Text and Audio, Tafaseer books, Ahadees Books, Daily Supplications, Universal Qibla Direction, Prayer Timing and much more) visit our

Re: Embeding python with mingw on win32 and python 2.4.4

2008-01-28 Thread mani
It's me answering my self. I found the solution in http://groups.google.com/group/comp.lang.python/browse_thread/thread/4d80df2e53dfa127/de87533c05d8021c?lnk=gst&q=Py_Initialize+undefined+reference#de87533c05d8021c It was the problem of gcc arguments order. -- http://mail.python.org/mailman/lis

Re: Python self-evaluating strings

2008-01-28 Thread Arnaud Delobelle
On Jan 29, 3:48 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | I found > this:http://groups.google.com/group/comp.lang.python/browse_thread/thread/... > > Exactly the one I meant. > > | It contains a lambda-solu

<    1   2