Python-URL! - weekly Python news and links (Oct 6)

2008-10-06 Thread Gabriel Genellina
QOTW: .. as the problem grows in complexity, C++ accumulates too much of its own bloat. - sturlamolden, on Python as a *faster* language than C++ Python 2.6 final has been released: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b440f6bd2a54b6a/

Re: python-2.6

2008-10-06 Thread Rajanikanth Jammalamadaka
There seems to be a bug with idle on Mac OS X. http://bugs.python.org/issue4017 It has to do something with reinstalling the TCL and TK. If you want to see detailed error messages, open a terminal and type idle at the command prompt. Cheers, Raj On Thu, Oct 2, 2008 at 11:26 PM, [EMAIL

Re: Pr. Euler 18, recursion problem

2008-10-06 Thread Aidan
process wrote: I am trying to solve project euler problem 18 with brute force(I will move on to a better solution after I have done that for problem 67). http://projecteuler.net/index.php?section=problemsid=18 However I can't get the recursive function right. I always have to use return right?

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Christian Heimes
Terry Reedy wrote: In 3.0, the test returns true because function attributes only get wrapped when bound. In the meanwhile, 'object' in repr(X.__lt__) should do it for you. This session should give you some hints how to archive your goal :) Have fun! import types class A(object): ...

Re: Python 2.6, GUI not working on vista?

2008-10-06 Thread Steve Holden
Thorsten Kampe wrote: * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) In message [EMAIL PROTECTED], Michel Claveau - NoSpam SVP ; merci wrote: Another way is to de-activate UAC. Please don't be stupid! He's not stupid. Disabling UAC is the recommended way to get rid of these

Re: 'int' object is not iterable iterating over a dict

2008-10-06 Thread Diez B. Roggisch
mmiikkee13 schrieb: a_list = range(37) list_as_dict = dict(zip(range(len(a_list)), [str(i) for i in a_list])) for k, v in list_as_dict: ... print k, v ... Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object is not iterable What 'int' object is this

python noob help

2008-10-06 Thread toyko
So yeah, I have this assignment for my computer science class, http://pages.cpsc.ucalgary.ca/~boyd/231/as1.pdf so far this is what I have wrote, any suggestions cause I am stuck! xc, yc = input() r = input() x1, y1 = input() x2, y2 = input() a = (x2 - x1)**2 + (y2 - y1)**2 b = 2((x1 - xc)(x2 -

Re: Pr. Euler 18, recursion problem

2008-10-06 Thread process
On Oct 6, 8:13 am, Aidan [EMAIL PROTECTED] wrote: process wrote: I am trying to solve project euler problem 18 with brute force(I will move on to a better solution after I have done that for problem 67). http://projecteuler.net/index.php?section=problemsid=18 However I can't get the

Re: Pr. Euler 18, recursion problem

2008-10-06 Thread Aidan
process wrote: On Oct 6, 8:13 am, Aidan [EMAIL PROTECTED] wrote: process wrote: I am trying to solve project euler problem 18 with brute force(I will move on to a better solution after I have done that for problem 67). http://projecteuler.net/index.php?section=problemsid=18 However I can't get

Re: python noob help

2008-10-06 Thread Marc 'BlackJack' Rintsch
On Mon, 06 Oct 2008 00:08:58 -0700, toyko wrote: So yeah, I have this assignment for my computer science class, http://pages.cpsc.ucalgary.ca/~boyd/231/as1.pdf so far this is what I have wrote, any suggestions cause I am stuck! Learn Python and actually *think* about the problem and a

Re: sftp problem!

2008-10-06 Thread sa6113
Dear Mike, Thanks for your help, but I am new in paramiko,would you please help me more? May I connect to server by password insted of private key? How? I used this code: ... t.auth_password(username, password, event) ... but I received this error : paramiko.SSHException : No existing session

Using python Serial module on windows

2008-10-06 Thread Holger
Hi I'm using python Serial from: http://switch.dl.sourceforge.net/sourceforge/pyserial/pyserial-2.4.tar.gz to implement ymodem and other protocols on the PC com port And it works like a charm in cygwin, but when I try to use it directly in python under windows using active state python

Builing Python 2.6 on AIX 5.2

2008-10-06 Thread brasse
Hello! I am having some trouble building Python 2.6 on AIX. The steps I have taken are: export PATH=/usr/bin/:/usr/vacpp/bin/ ./configure --with-gcc=xlc_r --with-cxx=xlC_r --disable-ipv6 make This is the error message I'm seeing: ./Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Duncan Booth
Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: On Oct 5, 2:12 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: Duncan Booth wrote: [EMAIL PROTECTED] wrote: OFFSET = dict((%x%i, int(c)) for i,c in enumerate(5433)) def get_highest_bit_num(r): s = %x%r return

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 1:13 am, MRAB [EMAIL PROTECTED] wrote: Fuzzyman wrote: Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: if hasattr(clr, '__lt__'):

Re: Using python Serial module on windows

2008-10-06 Thread Diez B. Roggisch
Holger wrote: Hi I'm using python Serial from: http://switch.dl.sourceforge.net/sourceforge/pyserial/pyserial-2.4.tar.gz to implement ymodem and other protocols on the PC com port And it works like a charm in cygwin, but when I try to use it directly in python under windows using

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Holger
On 6 Okt., 10:37, Mark Dickinson [EMAIL PROTECTED] wrote: See alsohttp://bugs.python.org/issue3439 where there's a proposal to expose the _PyLong_NumBits method.  This would give an O(1) solution. Doesn't that depend on the underlying implementation? Anyway, here's a pretty one (I think): def

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Mark Dickinson
On Oct 5, 11:40 pm, Terry Reedy [EMAIL PROTECTED] wrote: Your point, that taking floor(log2(x)) is redundant, is a good catch. However, you should have added 'untested' ;-).  When value has more significant bits than the fp mantissa can hold, this expression can be 1 off (but no more, I

Re: Python 2.6, GUI not working on vista?

2008-10-06 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Thorsten Kampe wrote: * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) In message [EMAIL PROTECTED], Michel Claveau - NoSpam SVP ; merci wrote: Another way is to de-activate UAC. Please don't be stupid! He's not stupid. Disabling UAC is the

Cookielib in Jython

2008-10-06 Thread Felipe De Bene
Hi There, I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and everything works fine except when I try to import the Standard CPython's cookielib. I know this may sound stupid, I could use an advice here on what's wrong. Thanks in advance, Felipe. Output: Jython 2.2.1 on

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread bearophileHUGS
Mark Dickinson: See alsohttp://bugs.python.org/issue3439 where there's a proposal to expose the _PyLong_NumBits method. This would give an O(1) solution. Sounds useful, I've used the gmpy.numdigits(x [,base]) few times. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

What AugStore and AugLoad AST nodes are?

2008-10-06 Thread franck
Dear all, I'm experimenting with new ast module. I'd like to have pieces of code that can generate AugLoad and AugStore AST nodes. Indeed, I actually do not know what they correspond to. Thanks for any help! Franck -- http://mail.python.org/mailman/listinfo/python-list

Re: In Python 2.6, bytes is str

2008-10-06 Thread Benjamin Kaplan
On Mon, Oct 6, 2008 at 1:30 AM, Bryan Olson [EMAIL PROTECTED] wrote: In Python 2.6, the name 'bytes' is defined, and bound to str. The 2.6 assignment presents some pitfalls. Be aware. Consider constructing a bytes object as: b = bytes([68, 255, 0]) In Python 3.x, len(b) will be 3,

Python-URL! - weekly Python news and links (Oct 6)

2008-10-06 Thread Gabriel Genellina
QOTW: .. as the problem grows in complexity, C++ accumulates too much of its own bloat. - sturlamolden, on Python as a *faster* language than C++ Python 2.6 final has been released: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b440f6bd2a54b6a/

Re: python noob help

2008-10-06 Thread piloneur
On 6 oct, 09:36, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Mon, 06 Oct 2008 00:08:58 -0700, toyko wrote: So yeah, I have this assignment for my computer science class, http://pages.cpsc.ucalgary.ca/~boyd/231/as1.pdfso far this is what I have wrote, any suggestions cause I am

Re: When Python should not be used?

2008-10-06 Thread jdd
On Oct 5, 8:08 pm, Andrea Francia [EMAIL PROTECTED] HERE.ohoihihoihoih.TO-HERE.gmx.it wrote: The right tool depends on the current problem. While some python users prefer to talk about when Python is the right tool I think that it is more instructive to know when it is not. Please, could you

Re: I built a nice html templater!

2008-10-06 Thread Steve Holden
Tim Roberts wrote: Derick van Niekerk [EMAIL PROTECTED] wrote: Ok - so it's not really an awesome achievement and only handles basic templating needs (no loops and other programming constructs) but maybe someone will find it useful. sarcasm Sure, that's what the world needed. We didn't

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread bieffe62
On 6 Ott, 06:16, process [EMAIL PROTECTED] wrote: If an OS was to be written in Python and the hardware optimized for it, what changes would be made to the hardware to accomodate Python strenghs and weaknesses? Some tagged architecture like in Lisp

ANN: Albow 2.0

2008-10-06 Thread greg
ALBOW - A Little Bit of Widgetry for PyGame Version 2.0 is now available. This version incorporates substantial additions and improvements. New widgets include TabPanel, TableView, CheckBox, RadioButton and an enhanced set of TextField-based controls.

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Holger
def highest_bit(n, maxbits = 256): bit = 0 while maxbits 1: maxbits = 1 a = n maxbits if a: bit += maxbits n = a return bit is sligtly better -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with lower() for unicode strings in russian

2008-10-06 Thread konstantin
On Oct 6, 8:39 am, Alexey Moskvin [EMAIL PROTECTED] wrote: Martin, thanks for fast reply, now anything is ok! On Oct 6, 1:30 am, Martin v. Löwis [EMAIL PROTECTED] wrote: I have a set of strings (all letters are capitalized) at utf-8, That's the problem. If these are really utf-8 encoded

New Jersey webcam: Landie

2008-10-06 Thread fernandena
Webcam: Landie,19 year.New Jersey. Viens me voir et tu verras! http://datesex.xhostar.com/landie1989.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread M.-A. Lemburg
On 2008-10-05 17:26, [EMAIL PROTECTED] wrote: Hi, I'm using python to develop some proof-of-concept code for a cryptographic application. My code makes extended use of python's native bignum capabilities. In many cryptographic applications there is the need for a function

Re: do you fail at FizzBuzz? simple prog test

2008-10-06 Thread Tobiah
Or to allow the numbers 3 and 5 to be easily changed: for i in range(1, 101): print 'fizz' * (not i % 3) + 'buzz' * (not i % 5) or i Tobiah for i in range(1,100): print ('fizz','','')[i%3] + ('buzz','','','','')[i%5] or i Write a program that prints the numbers from 1 to 100. But

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 5, 11:54 pm, Terry Reedy [EMAIL PROTECTED] wrote: Fuzzyman wrote: Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: if hasattr(clr,

Dict Comprehension ?

2008-10-06 Thread Ernst-Ludwig Brust
Given 2 Number-Lists say l0 and l1, count the various positiv differences between the 2 lists the following part works: dif=[abs(x-y) for x in l0 for y in l1] da={} for d in dif: da[d]=da.get(d,0)+1 i wonder, if there is a way, to avoid the list dif Ernst-Ludwig Brust --

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 7:16 am, Christian Heimes [EMAIL PROTECTED] wrote: Terry Reedy wrote: In 3.0, the test returns true because function attributes only get wrapped when bound. In the meanwhile, 'object' in repr(X.__lt__) should do it for you. This session should give you some hints how to

Class properties and object properties

2008-10-06 Thread SuperZE
Learning python I was rewriting some of my old programs to see the pros and cons of python when a steped in some weird (at least for me) behavior. Here it is simplified The code: class Test1: myList = [4 for n in range(4)] myInt = 4 a = Test1() b = Test1() a.myList [4, 4, 4,

how to start thread by group?

2008-10-06 Thread oyster
my code is not right, can sb give me a hand? thanx for example, I have 1000 urls to be downloaded, but only 5 thread at one time def threadTask(ulr): download(url) threadsAll=[] for url in all_url: task=threading.Thread(target=threadTask, args=[url]) threadsAll.append(task) for

Re: Using python Serial module on windows

2008-10-06 Thread Holger
Turns out there's a windows package that works bautifully with activestate python: pyserial-2.4.win32.exe Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Class properties and object properties

2008-10-06 Thread Diez B. Roggisch
SuperZE wrote: Learning python I was rewriting some of my old programs to see the pros and cons of python when a steped in some weird (at least for me) behavior. Here it is simplified The code: class Test1: myList = [4 for n in range(4)] myInt = 4 a = Test1() b = Test1() a.myList

Re: Class properties and object properties

2008-10-06 Thread SuperZE
Because you declare myList to be a *class*-level variable, which means *all* instances of that class (a and b in your case) *share* it. Python does not declare *instance* variables the way you do. Instead, do this: class Foo(object):     def __init__(self):         self.myList = []

Re: Class properties and object properties

2008-10-06 Thread Jerry Hill
On Mon, Oct 6, 2008 at 9:38 AM, SuperZE [EMAIL PROTECTED] wrote: Interesting, but that does not explain the difference in the behavior of myList and myInt Both were class-level variables, as far as I can see, and therefor a and b should also share it They did share it, until you assigned an

Re: Class properties and object properties

2008-10-06 Thread Diez B. Roggisch
SuperZE wrote: Because you declare myList to be a *class*-level variable, which means *all* instances of that class (a and b in your case) *share* it. Python does not declare *instance* variables the way you do. Instead, do this: class Foo(object): def __init__(self): self.myList = []

Re: Dict Comprehension ?

2008-10-06 Thread bearophileHUGS
Ernst-Ludwig Brust: Given 2 Number-Lists say l0 and l1, count the various positiv differences between the 2 lists ... i wonder, if there is a way, to avoid the list dif Instead of creating the list (array) dif, you can create a lazy iterator. Then you can fed it to a set. Bye, bearophile --

Re: Class properties and object properties

2008-10-06 Thread SuperZE
TYVM Diez and Jerry Now I understand how this works -- http://mail.python.org/mailman/listinfo/python-list

type-checking support in Python?

2008-10-06 Thread Joe Strout
I'm just re-learning Python after nearly a decade away. I've learned a good healthy paranoia about my code in that time, and so one thing I'd like to add to my Python habits is a way to both (a) make intended types clear to the human reader of the code, in a uniform manner; and (b) catch

Re: how to start thread by group?

2008-10-06 Thread bieffe62
On 6 Ott, 15:24, oyster [EMAIL PROTECTED] wrote: my code is not right, can sb give me a hand? thanx for example, I have 1000 urls to be downloaded, but only 5 thread at one time def threadTask(ulr):   download(url) threadsAll=[] for url in all_url:      

Re: Dict Comprehension ?

2008-10-06 Thread pruebauno
On Oct 6, 8:59 am, Ernst-Ludwig Brust [EMAIL PROTECTED] wrote: Given 2 Number-Lists say l0 and l1, count the various positiv differences between the 2 lists the following part works: dif=[abs(x-y) for x in l0 for y in l1] da={} for d in dif: da[d]=da.get(d,0)+1 i wonder, if there is a

Re: Cookielib in Jython

2008-10-06 Thread bieffe62
On 6 Ott, 13:19, Felipe De Bene [EMAIL PROTECTED] wrote: Hi There, I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and everything works fine except when I try to import the Standard CPython's cookielib. I know this may sound stupid, I could use an advice here on what's wrong.

Re: Builing Python 2.6 on AIX 5.2

2008-10-06 Thread pruebauno
On Oct 6, 4:16 am, brasse [EMAIL PROTECTED] wrote: Hello! I am having some trouble building Python 2.6 on AIX. The steps I have taken are: export PATH=/usr/bin/:/usr/vacpp/bin/ ./configure --with-gcc=xlc_r --with-cxx=xlC_r --disable-ipv6 make This is the error message I'm seeing:

Re: type-checking support in Python?

2008-10-06 Thread Diez B. Roggisch
Joe Strout wrote: I'm just re-learning Python after nearly a decade away. I've learned a good healthy paranoia about my code in that time, and so one thing I'd like to add to my Python habits is a way to both (a) make intended types clear to the human reader of the code, in a uniform manner;

Python - modules and netCDF

2008-10-06 Thread Michele Thornton
Greetings, I would like to use Python to open, edit, and write netCDF files. I mostly work as a GIS analyst and find myself needing to edit netCDF files in order to meet CF Metadata conventions. Along with Python, I need to include, as far as I can tell, at least 2 modules, Scientific Python

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Eric Wertman
If an OS was to be written in Python and the hardware optimized for it, what changes would be made to the hardware to accomodate Python strenghs and weaknesses? I'm no expert, but this would seem like a good example of something that python wasn't good for. I have always wondered, though,

Re: Builing Python 2.6 on AIX 5.2

2008-10-06 Thread Jesse Noller
Looks like AIX is missing sem_timedwait - see: http://bugs.python.org/issue3876 Please add your error to the bug report just so I can track it. -jesse On Mon, Oct 6, 2008 at 4:16 AM, brasse [EMAIL PROTECTED] wrote: Hello! I am having some trouble building Python 2.6 on AIX. The steps I have

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Dan Upton
On Mon, Oct 6, 2008 at 11:02 AM, Eric Wertman [EMAIL PROTECTED] wrote: If an OS was to be written in Python and the hardware optimized for it, what changes would be made to the hardware to accomodate Python strenghs and weaknesses? I'm no expert, but this would seem like a good example of

The recent SPAM messages, and a suggested solution

2008-10-06 Thread Barak, Ron
Hi, I think most of us are annoyed by the recent SPAM messages that crept onto our list. I'd like to suggest a possible solution, and maybe start a thread that eventually will rid us of this unpleasantness. My idea: Once every few messages from the list owners, they would send a new numerical

OptionParser: options and args passed to PyQT app

2008-10-06 Thread [EMAIL PROTECTED]
Hi, New with python, I've developped a small cmd line script parsing opts and args with an OptionParser: in myApp.py: ...blablabla... parser.add_option(...) parser.add_option(...) (options, args) = parser.parse_args() doCheckParams(parser, options, args) ...blablabla... I'm trying now to

Re: Cookielib in Jython

2008-10-06 Thread Felipe De Bene
On Oct 6, 10:36 am, [EMAIL PROTECTED] wrote: On 6 Ott, 13:19, Felipe De Bene [EMAIL PROTECTED] wrote: Hi There, I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and everything works fine except when I try to import the Standard CPython's cookielib. I know this may sound

gif creator

2008-10-06 Thread [EMAIL PROTECTED]
has anyone written a gif creator program purely in python that doesn't require PIL or tons of other claptrap? the GIF89a format is pretty straightforward and C is not required to create these files. i didn't want to have to upgrade to a newer release of python, install a huge bunch of stuff or

Re: The recent SPAM messages, and a suggested solution

2008-10-06 Thread skip
Ron I think most of us are annoyed by the recent SPAM messages that Ron crept onto our list. I'd like to suggest a possible solution, and Ron maybe start a thread that eventually will rid us of this Ron unpleasantness. Ron My idea: Ron Once every few messages from the

subprocess.Popen(..., cwd=...) and Makefile $(PWD) don't play nice

2008-10-06 Thread Miki
Hello All, Can anybody explain why Makefile $(PWD) does show the right directory when running under subprocess.Popen(..., cwd=...) For example: [18:07] tmp $cat /tmp/p/Makefile all: @echo $(PWD) [18:07] tmp $cat t #!/usr/bin/env python from subprocess import Popen

Re: type-checking support in Python?

2008-10-06 Thread Bruno Desthuilliers
Joe Strout a écrit : I'm just re-learning Python after nearly a decade away. I've learned a good healthy paranoia about my code in that time, and so one thing I'd like to add to my Python habits is a way to both (a) make intended types clear to the human reader of the code, Good naming and

Re: gif creator

2008-10-06 Thread Steve Holden
[EMAIL PROTECTED] wrote: has anyone written a gif creator program purely in python that doesn't require PIL or tons of other claptrap? the GIF89a format is pretty straightforward and C is not required to create these files. i didn't want to have to upgrade to a newer release of python,

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Paul Rubin
Eric Wertman [EMAIL PROTECTED] writes: I'm no expert, but this would seem like a good example of something that python wasn't good for. I have always wondered, though, what a Linux kernel module would look like that had a python (or java, or whatever) interpreter running low-level, so the

Re: If an OS was to be written in Python, how'w it look?

2008-10-06 Thread Paul Rubin
Dan Upton [EMAIL PROTECTED] writes: The closest I can think of to that is Singularity, Microsoft's research OS written in .NET (well, C# specifically I guess). Singularity is almost the exact opposite of this and I don't think it uses (unmodified) C#. It does away with use of hardware memory

Re: ABCs - infix syntax for isinstance() ?

2008-10-06 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Bruno Desthuilliers dixit : Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; x is

Re: gif creator

2008-10-06 Thread Miki
i didn't want to have to upgrade to a newer release of python, install a huge bunch of stuff or compile anything.  and i don't care about other formats or animation or whatever.  black and white is ok. One option is to install ImageMagick and use subprocess.Popen to communicate with it. This

AIR Jordan Fusions 13 NIKE Jordan Fusion 14 AIR Jordans 15Nike Jordan

2008-10-06 Thread [EMAIL PROTECTED]
shoes on AIR Jordan 1 (paypal payment)(www.youtetrade.com ) AIR Jordan 2 AIR Jordan 3 AIR Jordan 4 AIR Jordan 5 (paypal payment)(www.youtetrade.com ) AIR Jordan 6 Rings AIR Jordan 6 AIR Jordan 7 AIR Jordan 8 AIR Jordan 9 (paypal payment)(www.youtetrade.com ) AIR Jordan 10 AIR Jordan 11 AIR Jordan

AIR Jordan Fusions 13 NIKE Jordan Fusion 14 AIR Jordans 15Nike Jordan

2008-10-06 Thread 46768
shoes on AIR Jordan 1 (paypal payment)(www.youtetrade.com ) AIR Jordan 2 AIR Jordan 3 AIR Jordan 4 AIR Jordan 5 (paypal payment)(www.youtetrade.com ) AIR Jordan 6 Rings AIR Jordan 6 AIR Jordan 7 AIR Jordan 8 AIR Jordan 9 (paypal payment)(www.youtetrade.com ) AIR Jordan 10 AIR Jordan 11 AIR Jordan

Re: lint for Python?

2008-10-06 Thread Wolfgang Grafen
No need to develop another lint tool. Just give the creator of pylint an improvement proposal. This can be at least reported as a warning. Even in a highly dynamic language like Python it is good to follow some style guides. I try to avoid the same names if possible for different functionality.

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-06 Thread Harald Luessen
On Sun, 05 Oct 2008 Aaron \Castironpi\ Brady wrote: There's the possibility that the most important words should go first in this case: result_flag__t But, I'll admit that other people could have learned different orders of scanning words than I, especially depending on their spoken language

Re: Python 2.6: Determining if a method is inherited

2008-10-06 Thread Terry Reedy
Fuzzyman wrote: On Oct 5, 11:54 pm, Terry Reedy [EMAIL PROTECTED] wrote: Fuzzyman wrote: Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: if hasattr(clr,

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Aaron Castironpi Brady
On Oct 6, 4:30 am, Fuzzyman [EMAIL PROTECTED] wrote: On Oct 6, 1:13 am, MRAB [EMAIL PROTECTED] wrote: Fuzzyman wrote: Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the

Re: When Python should not be used?

2008-10-06 Thread Stef Mientki
Andrea Francia wrote: The right tool depends on the current problem. While some python users prefer to talk about when Python is the right tool I think that it is more instructive to know when it is not. Please, could you let me know what do you think about that? Thanks I'm programming in

do something in time interval

2008-10-06 Thread Petr Jakes
I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must be something more elegant. eventFlag = False while 1:

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Fredrik Johansson
On Oct 5, 5:26 pm, [EMAIL PROTECTED] wrote: Hi, My question to the group: Does anyone know of a non-hackish way to determine the required bit position in python? I know that my two ideas can be combined to get something working. But is there a *better* way, that isn't that hackish? No

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 7:01 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: On Oct 6, 4:30 am, Fuzzyman [EMAIL PROTECTED] wrote: On Oct 6, 1:13 am, MRAB [EMAIL PROTECTED] wrote: Fuzzyman wrote: Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix

Re: how to get the thighest bit position in big integers?

2008-10-06 Thread Aaron Castironpi Brady
On Oct 6, 3:37 am, Mark Dickinson [EMAIL PROTECTED] wrote: On Oct 5, 11:40 pm, Terry Reedy [EMAIL PROTECTED] wrote: Your point, that taking floor(log2(x)) is redundant, is a good catch. However, you should have added 'untested' ;-).  When value has more significant bits than the fp

Re: When Python should not be used?

2008-10-06 Thread cstorey
On Oct 6, 2:07 pm, Stef Mientki [EMAIL PROTECTED] wrote: and I'm working on a large application, which should be open source replacement for MatLab + LabView. cheers, Stef An Open Source Labview replacement would be really useful! Any preview of the project? Craig --

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Aaron Castironpi Brady
On Oct 6, 1:17 pm, Fuzzyman [EMAIL PROTECTED] wrote: On Oct 6, 7:01 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: It's a very object oriented solution.  Essentially you're inheriting all the classes that you want to fail, from a class that does. But not a very good solution to the

python -Ms-Word

2008-10-06 Thread gita saleh
Hello Everyone, I'd like to add header and footer to ms-word using python. Any hint would be appreciated. Thanks, /G* -- http://mail.python.org/mailman/listinfo/python-list

Re: do something in time interval

2008-10-06 Thread Leon Zhang
Petr, I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Good luck! Leon On Tue, Oct 7, 2008 at 2:07 AM, Petr Jakes [EMAIL PROTECTED] wrote: I have infinitive loop running script and I would like to

RE: When Python should not be used?

2008-10-06 Thread Blubaugh, David A.
Stef, May I see your open-source version of a combined Matlab + Labview program? Is there a website, I may visit?? Thanks, David Blubaugh -Original Message- From: Stef Mientki [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 2:07 PM To: python-list@python.org Subject:

Re: do something in time interval

2008-10-06 Thread Terry Reedy
Petr Jakes wrote: I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must be something more elegant. eventFlag = False while

Re: lint for Python?

2008-10-06 Thread Bruno Desthuilliers
Pat a écrit : I've been searching for a good multi-module lint checker for Python and I haven't found one yet. Pylint does a decent job at checking for errors only within a single module. Here's one of my problems. I have two modules. In module one, I have a function: def foo( host,

Re: PyOpenGL double-buffered hardware surface

2008-10-06 Thread Clay Hobbs
On Sun, 2008-10-05 at 14:16 -0400, Mike C. Fletcher wrote: Clay Hobbs wrote: How do I create a double-buffered hardware surface with PyOpenGL? I knew how to once, but forgot. Depends on your GUI library, most of them have a flag-set that you pass to the initializer of the

Re: Python 2.6 / 3.0: Determining if a method is inherited

2008-10-06 Thread Fuzzyman
On Oct 6, 7:23 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: On Oct 6, 1:17 pm, Fuzzyman [EMAIL PROTECTED] wrote: On Oct 6, 7:01 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: It's a very object oriented solution.  Essentially you're inheriting all the classes that you

Re: do something in time interval

2008-10-06 Thread Jerry Hill
On Mon, Oct 6, 2008 at 2:07 PM, Petr Jakes [EMAIL PROTECTED] wrote: I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must

Favorite Python System Administration Examples

2008-10-06 Thread Steve Holden
I'm giving a talk at LISA this year, and while the slides are ready I would like to go armed with as many examples of good system administration code as possible. If you have a favorite administration tool that you wouldn't mind me using I'd love to know about it. Feel free to email me personally

Re: do something in time interval

2008-10-06 Thread Petr Jakeš
I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Thanks for your reply. During the 5s period my script has to do some stuff instead of sleeping. Thats why it runs in the loop and once in 5s period

Is PyFIT dead and abandoned?

2008-10-06 Thread oakley
I was wanting to experiment with PyFIT but it seems DOA. Googling doesn't yield any information less than two years old. When I try to install 0.8a2 I get errors because setup.py references a non-existant file (FitFilter.py). I find it hard to believe that in two years nobody has stumbled over

Re: Builing Python 2.6 on AIX 5.2

2008-10-06 Thread pruebauno
On Oct 6, 11:03 am, Jesse Noller [EMAIL PROTECTED] wrote: Looks like AIX is missing sem_timedwait - see:http://bugs.python.org/issue3876 Please add your error to the bug report just so I can track it. -jesse On Mon, Oct 6, 2008 at 4:16 AM, brasse [EMAIL PROTECTED] wrote: Hello! I am

Re: do something in time interval

2008-10-06 Thread D'Arcy J.M. Cain
On Mon, 6 Oct 2008 21:13:21 +0200 Petr Jake? [EMAIL PROTECTED] wrote: I am not an expert, but why not to use time.sleep(5)? During the 5s period my script has to do some stuff instead of sleeping. Thats why it runs in the loop and once in 5s period it has to trigger some other

Re: do something in time interval

2008-10-06 Thread Mathieu Prevot
2008/10/6 Petr Jakeš [EMAIL PROTECTED]: I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Thanks for your reply. During the 5s period my script has to do some stuff instead of sleeping. Thats why

Re: When Python should not be used?

2008-10-06 Thread Stef Mientki
David, Craig, Thanks for your interest. Here are a few examples, containing links to some animations http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_screenshots.html and here is a collection of my notes until july this year:

Re: I built a nice html templater!

2008-10-06 Thread Eric S. Johansson
Steve Holden wrote: Tim Roberts wrote: Derick van Niekerk [EMAIL PROTECTED] wrote: Ok - so it's not really an awesome achievement and only handles basic templating needs (no loops and other programming constructs) but maybe someone will find it useful. sarcasm Sure, that's what the world

Re: lint for Python?

2008-10-06 Thread Pat
Bruno Desthuilliers wrote: Pat a écrit : I've been searching for a good multi-module lint checker for Python and I haven't found one yet. Pylint does a decent job at checking for errors only within a single module. Here's one of my problems. I have two modules. In module one, I have a

function(s) to decode a URL produced by encodeURIComponent in javascript

2008-10-06 Thread Merrick
I encoded a URL in javascript and would like to decode it in python. The urllib.unquote does not have an optional safe argument and I cannot find how to do urldecode. -- http://mail.python.org/mailman/listinfo/python-list

Re: lint for Python?

2008-10-06 Thread George Sakkis
On Oct 6, 3:49 pm, Pat [EMAIL PROTECTED] wrote: I'll come back with more intelligent questions after I've actually learned some Python. That's a wise self-advice ;-) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >