doubt About import machine

2021-11-21 Thread Daniel Eduardo Almeida Correa
Hello, I'm trying to use the machine library in python 3.10 version, but I can't import it with the pip install machine, could you tell me a way to solve it or a python version compatible with the library? Thank you a lot for your answer. -- https://mail.python.org/mailman/listinfo/python-list

Re: strip bug?

2015-02-24 Thread Eduardo
Well, from the docstring of strip: -- S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping

Re: Strange behavior with sort()

2014-02-26 Thread Eduardo A . Bustamante López
.sort() >>> The method does not return a value, that's why the direct comparison fails. What you might want is to use the sorted() method on the list, like this: >>> sorted([2,1,3]) [1, 2, 3] >>> sorted([2,1,3]) == [1,2,3] True -- Eduardo Alan Bustamante López -- https://mail.python.org/mailman/listinfo/python-list

Re: Apache restart after source changes

2013-12-25 Thread Eduardo A . Bustamante López
reloading (for example, the web server that Django uses). -- Eduardo Alan Bustamante López -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Eduardo A . Bustamante López
ate two strings: "foo" + "bar" == "foobar" - Converted the number from integer to string, you can't do: + directly, you have to either int() + if you want to do an integer addition, or: str() + , if you want string concatenation. You didn't use an operator, and «"string" variable "string"» is not valid python. -- Eduardo Alan Bustamante López -- https://mail.python.org/mailman/listinfo/python-list

argparse - specify order of argument parsing?

2013-08-31 Thread Eduardo Alvarez
ne switches, which should have higher priority. Thank you in advance, -- Eduardo Alvarez -- http://mail.python.org/mailman/listinfo/python-list

copy on write

2012-01-13 Thread Eduardo Suarez-Santana
I wonder whether this is normal behaviour. I would expect equal sign to copy values from right to left. However, it seems there is a copy-on-write mechanism that is not working. Anyone can explain and provide a working example? Thanks, -Eduardo $ python Python 2.7.2 (default, Oct 31 2011

Re: copy on write

2012-01-13 Thread Eduardo Suarez-Santana
El 13/01/12 11:33, Eduardo Suarez-Santana escribió: I wonder whether this is normal behaviour. Even simpler: $ python Python 2.7.2 (default, Oct 31 2011, 11:54:55) [GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more inform

Re: mailbox module difficulties

2011-11-28 Thread Eduardo Alvarez
On 2011-11-28, Peter Otten <__pete...@web.de> wrote: > Eduardo Alvarez wrote: > >> however, if I do the following: >> >> b = mailbox.Maildir("~/Maildir") >> b.items() >> >> I get an empty list. >> >> I don't understa

mailbox module difficulties

2011-11-28 Thread Eduardo Alvarez
object being created. Why does this happen? yours, -- Eduardo Alvarez -- http://mail.python.org/mailman/listinfo/python-list

Multiple threads

2011-11-16 Thread Eduardo Oliva
Hello, I have a py script that reads for all "m2ts" video files and convert them to "mpeg" using ffmpeg with command line. What I want to do is: I need my script to run 2 separated threads, and then when the first has finished, starts the next onebut no more than 2 threads. I know that

Nautilus Python

2010-09-27 Thread Eduardo Ribeiro
I'm a python noob and wrote the following code for a nautilus extension: #!/usr/local/bin/python # -*- coding: utf-8 -*- import urllib import gtk import pygtk import nautilus import gconf import gtk.glade class Slide (nautilus.MenuProvider): f = None def __init__(self): self

confusing error with nntplib

2010-05-26 Thread Eduardo Alvarez
endall socket.error: [Errno 32] Broken pipe As this is a broken pipe, I reconnect to the server, the same way as before. When I *then* retrieving the newsgroup's info, I get no errors. I'm pretty baffled by this. It might be an issue with the server itself, but still, any input would be v

[ANN] doit - automation tool 0.8 released

2010-05-17 Thread Eduardo Schettino
pypi: http://pypi.python.org/pypi/doit homepage: http://python-doit.sourceforge.net/ `doit` comes from the idea of bringing the power of build-tools to execute any kind of task. It will keep track of dependencies between "tasks" and execute them only when necessary. It was designed to be easy to

Re: Wanted: Python solution for ordering dependencies

2010-04-25 Thread Eduardo Schettino
On Sun, Apr 25, 2010 at 11:44 PM, Jonathan Fine wrote: > Eduardo Schettino wrote: >> >> On Sun, Apr 25, 2010 at 4:53 AM, Jonathan Fine wrote: >>> >>> Hi >>> >>> I'm hoping to avoid reinventing a wheel (or other rolling device).  I've

Re: Wanted: Python solution for ordering dependencies

2010-04-25 Thread Eduardo Schettino
On Sun, Apr 25, 2010 at 4:53 AM, Jonathan Fine wrote: > Hi > > I'm hoping to avoid reinventing a wheel (or other rolling device).  I've got > a number of dependencies and, if possible, I want to order them so that each > item has its dependencies met before it is processed. > > I think I could get

[ANN] doit 0.5

2009-12-01 Thread Eduardo Schettino
python.org/pypi/doit license: MIT contact: https://launchpad.net/~schettino72 Regards, Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected python exception

2009-11-11 Thread Eduardo Lenz
lobal scope, using the "global"-statement. > > def foo(): > global x > print x > x = 10 > > > Beware though that then of course *assigning* to x is on global level. > This shouldn't be of any difference in your case though, because of th

Re: ANN: psyco V2

2009-07-27 Thread Eduardo Lenz
: error: ‘PRINT_NEWLINE_TO’ undeclared here (not in a function) c/mergepoints.c:250: error: ‘BUILD_CLASS’ undeclared here (not in a function) c/mergepoints.c:250: error: ‘IMPORT_NAME’ undeclared here (not in a function) c/mergepoints.c:250: error: ‘IMPORT_FROM’ undeclared here (not in a function) c

Re: Drawing in PDF

2009-06-30 Thread Eduardo Lenz
Em Ter 30 Jun 2009, às 04:19:13, Grant Edwards escreveu: > On 2009-06-30, Eduardo Lenz wrote: > > Em Seg 29 Jun 2009, às 20:39:22, Lawrence D'Oliveiro escreveu: > >> In message >> > >> d7fe56d05...@g19g2000yql.googlegroups.com>, Jun wrote:

Re: Drawing in PDF

2009-06-30 Thread Eduardo Lenz
t should run on any Python platform without any dependencies on external libraries. It can also work entirely on StringIO objects rather than file streams, allowing for PDF manipulation in memory. It is therefore a useful tool for websites that manage or manipulate PDFs. -- Eduardo Lenz Car

Re: ODE, GUI, plotter in Python

2009-06-16 Thread Eduardo Lenz
e them > for instance, or alter some other properties of nodes and/or links > across them). > > I am just starting out, hence I'd rather get some advice and experiment > a bit for my self as I go along. > > Thank you. you should take a look at http://pyode.sourceforge.

Re: Install NumPy in python 2.6

2009-04-22 Thread Eduardo Lenz
know, I think netlib.org will be back soon. You need LAPACK > for scipy, it is not possible to build it without it. I believe suse > has a package for it, though. > > David > -- > http://mail.python.org/mailman/listinfo/python-list try ATLAS instead. -- Eduardo Lenz Cardoso Dr.

ANN: doit 0.2.0 released

2009-04-17 Thread Eduardo Schettino
doit comes from the idea of bringing the power of build-tools to execute any kind of task. It will keep track of dependencies between “tasks” and execute them only when necessary. It was designed to be easy to use and “get out of your way”. check the new website http://python-doit.sourceforge.net/

Re: read file with multiple data per line

2009-04-14 Thread Eduardo
On Apr 14, 12:32 am, Steven D'Aprano wrote: > On Tue, 14 Apr 2009 00:15:18 -0700, Eduardo wrote: > > Hello all, > > > I googled a lot but couldn't find anything that i could consider a > > possible solution (though i am fairly new to the language and i thin

read file with multiple data per line

2009-04-14 Thread Eduardo
and i apologise for eventual typos. Eduardo Martins -- http://mail.python.org/mailman/listinfo/python-list

Re: any(), all() and empty iterable

2009-04-12 Thread Eduardo O. Padoan
   element = iterable.next() >    except StopIteration: >      raise UnderdefinedBecauseNoElementsToCompareToTrue >    while element: >      try: >        element = iterable.next() >      except StopIteration: >        return True >    return False > > > Tweaking the docu

Re: A different kind of interface

2009-01-23 Thread Eduardo Lenz
http://mail.python.org/mailman/listinfo/python-list How about Eric ? -- Eduardo Lenz Cardoso Dr. Eng. Associate Professor State University of Santa Catarina Department of Mechanical Engineering 89223-100 - Joinville-SC - Brasil Tel: +55 47 4009-7971 - Fax: +55 47 4009-7940

Re: A different kind of interface

2009-01-23 Thread Eduardo O. Padoan
On Thu, Jan 22, 2009 at 5:01 PM, wrote: > Eduardo O. Padoan: >> You are almost *describing* reinteract: > > - Thank you for the link and the software, I have not tried it yet, > but from the screencast it looks quite nice. > - I am glad that there are people that don&

Re: A different kind of interface

2009-01-22 Thread Eduardo O. Padoan
teractive-python/ It is a mix of a shell and an editor, that lets you go back and rewirte history, and execute it again. It is GTK+, and you can write plugins to plot graphics or display html, for example. -- Eduardo de Oliveira Padoan http://djangopeople.net/edcrypt/ "Distrust those

Re: multiprocessing question/error

2009-01-17 Thread Eduardo Lenz
On Saturday 17 January 2009 00:43:35 Aaron Brady wrote: > On Jan 16, 11:39 pm, Eduardo Lenz wrote: > > Hi, > > > > I was using the former processing package with python 2.5 with no > > problems. After switching to python 2.6.1 I am having some problems with > > th

Re: dynamic module import?

2009-01-16 Thread Eduardo Lenz
On Friday 16 January 2009 16:13:49 Steven D'Aprano wrote: > On Fri, 16 Jan 2009 21:34:01 -0800, Eduardo Lenz wrote: > > modu = "os" > > exec("from " + modu + " import *") > > "from module import *" is generally frowned upon, alth

multiprocessing question/error

2009-01-16 Thread Eduardo Lenz
t;, line 477, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.6/multiprocessing/pool.py", line 225, in _handle_tasks put(task) PicklingError: Can't pickle : attribute lookup __builtin__.instancemethod failed Thanks for your help. -

Re: dynamic module import?

2009-01-16 Thread Eduardo Lenz
ently named Python modules which the user will > specify at run-time with a command-line option > > And help with this would be most appreciated > > Best regards, > > Lawson Hanson > -- > Melbourne, Victoria, Australia > -- > http://mail.python.org/mailman/

multiprocessing question/error

2009-01-16 Thread Eduardo Lenz
t;, line 477, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.6/multiprocessing/pool.py", line 225, in _handle_tasks put(task) PicklingError: Can't pickle : attribute lookup __builtin__.instancemethod failed Thanks for your help. -

Re: "as" keyword woes

2008-12-04 Thread Eduardo O. Padoan
7;s to heart because they are > born of honest frustration and practical concern. Hopefully developers for > python 2.7 are listening and won't break backward compatibility just because > the "Zen of Python" suggests it might be a good idea. Even I, who am not, by really far, legendary on anything, could give my 2¢ one time or another on python-dev or python-ideas. If you really care and think you have a good argument, I'm sure you are welcome to post there! But they cant hold the release until everyone in the world have voiced his concerns, its just not pratical. -- Eduardo de Oliveira Padoan http://djangopeople.net/edcrypt/ "Distrust those in whom the desire to punish is strong." -- Goethe, Nietzsche, Dostoevsky -- http://mail.python.org/mailman/listinfo/python-list

Re: What about a decorator module version 3.0?

2008-12-01 Thread Eduardo O. Padoan
f, but given how much I use decorators, I probably should. -- Eduardo de Oliveira Padoan http://djangopeople.net/edcrypt/ "Distrust those in whom the desire to punish is strong." -- Goethe, Nietzsche, Dostoevsky -- http://mail.python.org/mailman/listinfo/python-list

Re: Python3 - it's awesome

2008-11-17 Thread Eduardo O. Padoan
nn auf bewusste Verlogenheit, > verlästerung von Gott, Bibel und mir und bewusster Blasphemie." > -- Prophet und Visionär Hans Joss aka HJP in de.sci.physik > <[EMAIL PROTECTED]> > -- > http://mail.python.org/mailman/listinfo/python-lis

Re: Not fully OO ?

2008-09-20 Thread Eduardo O. Padoan
ready lost much of its magic > powers. What are the most powerful fetishes these days? A year ago I > would have suspected "purely functional" but I'm not sure it has > really caught on. I think the current fetish is paralelism and erlang's share-nothing concurrency m

Re: Multiple variable control in for loops. Doable in Python?

2008-07-18 Thread Eduardo O. Padoan
ure would be much appreciated > > - Mark > > -- > http://mail.python.org/mailman/listinfo/python-list > Ops, sorry, sent only to Mark. Here is the asnwer again: for i, j in zip(range(0, I_MAX, 5), range(0, J_MAX, 10)): do_stuff(...) -- Eduardo de Oliveira Padoan http://www.petitiononline.com/veto2008/petition.html http://djangopeople.net/edcrypt/ http://whoisi.com/p/514 http://pinax.hotcluboffrance.com/profiles/edcrypt/ -- http://mail.python.org/mailman/listinfo/python-list

Static memory allocation in Python

2008-06-17 Thread Eduardo Henrique Tessarioli
? Regards, Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Re: Does the python library of Google Data API is truly free?

2008-06-11 Thread Eduardo O. Padoan
r"), they will be hated just as you seem to hate Microsoft. I would hate Google if, after proving so much good stuff as free software, they gonne bankrupt for providing services without restrictions, completely for free. http://en.wikipedia.org/wiki/Scarcity -- Eduardo de Oliveira Padoan http://www.advogato.org/person/eopadoan/ http://twitter.com/edcrypt Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Harry Potter?

2008-06-05 Thread Eduardo O. Padoan
core developer. :-) Maybe Guido himself: "The Harry Potter Theory of Programming Language Design" http://www.artima.com/weblogs/viewpost.jsp?thread=123234 > -- > Hans Nowak (zephyrfalcon at gmail dot com) > http://4.flowsnake.org/ > -- > http://mail.python.org/mai

Re: should I put old or new style classes in my book?

2008-05-30 Thread Eduardo O. Padoan
class two: pass > ... >>>> two > >>>> one > >>>> type(one) > >>>> type(two) > >>>> Both classes are new style. -- Eduardo de Oliveira Padoan http://www.advogato.org/person/eopadoan/ http://twitter.com/edcrypt Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-list

Re: What is wrong with my Python threading?

2008-05-20 Thread Eduardo O. Padoan
ratio coming from you! > And it's not the first I've seen - whatever pills you're taking, they're > good for you... This is why I shouldn't be so eager adding people to the killfile. -- Eduardo de Oliveira Padoan http://www.advogato.org/person/eopadoan/ http:/

Re: can't delete from a dictionary in a loop

2008-05-16 Thread Eduardo O. Padoan
duces something else altogether (call a view > of the dictionary) which would provoke the same problem, so yet another > solution would have to be found then. In Python 3.0, list(procs_dict.keys()) would have the same effect. > Gary Herron > >> >> I'm afraid this wi

Re: HASH TABLES IN PYTHON

2008-05-14 Thread Eduardo O. Padoan
l calculations. http://docs.python.org/lib/typesmapping.html > Thank You, > > David Blubaugh -- Eduardo de Oliveira Padoan http://www.advogato.org/person/eopadoan/ http://twitter.com/edcrypt Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Eduardo O. Padoan
on which is not easy in c++/java !? Programming in a pure duck typing style http://en.wikipedia.org/wiki/Duck_typing > Tnx, > Raxit > www.mykavita.com > -- > http://mail.python.org/mailman/listinfo/python-list > -- Eduardo de Oliveira Padoan http://www.advogato.org/per

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-23 Thread Eduardo Schettino
em with "smart" re-build and dependency support. "doit" target is not on creating releases for python projects only. it can do it also, but it can do much more. You can read about my motivation to start another build tool project on http://schettino72.wordpress.com/2008/04/14/doit-a-build-tool-tale/ > But it's still *slightly* too big: > man, it is hard to make you happy :) the doit egg file containg the whole packge is 27782 bytes on my system. but you also need the command line script 154 bytes. cheers, Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Eduardo Schettino
I guess I should post a link to the project in this thread... http://python-doit.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

2008-04-21 Thread Eduardo Schettino
action' and another function to create the task. but not implement yet also. > > I've looked around a bit for python "make" replacement, but there does > not seem to be a simple & straightforward solution around (read - > straight-python syntax, one .py file installation, friendly license). apart from one .py file installation (easy_install is not enough?) thats what i am trying to do. thanks for the feedback. cheers, Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] DoIt 0.1.0 Released (build tool)

2008-04-19 Thread Eduardo Schettino
On Sun, Apr 20, 2008 at 2:04 AM, John Machin <[EMAIL PROTECTED]> wrote: > You may like to consider the possibility of confusion caused by the > similarity of some characters in some fonts (DoIt, Do1t, Dolt) ... > google("dictionary dolt") :-) > -- > http://mail.python.org/mailman/listinfo/pyth

Re: random.random(), random not defined!?

2008-04-19 Thread Eduardo Schettino
On Sun, Apr 20, 2008 at 12:58 AM, globalrev <[EMAIL PROTECTED]> wrote: > do i need to import something to use random? > -- you need to import random :) Python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright",

[ANN] DoIt 0.1.0 Released (build tool)

2008-04-19 Thread Eduardo Schettino
This make DoIt specially suitable for running test suites. DoIt can be used to perform any task or build anything, though it doesn't support automatic dependency discovery for any language. Cheers, Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good time to start learning python?

2008-04-01 Thread Eduardo O. Padoan
C. The standards committee could eliminate these > warts to make the language "cleaner", but it would break a lot of > systems. It would not "break" anything that not move from C to C++, this is my point. People not willing to take the migration path (porting to 2.6, usi

Re: Is this a good time to start learning python?

2008-04-01 Thread Eduardo O. Padoan
asking first. The desired path is that, if somene wants to port his software to Python 3.0, that he follow the migration plan. Final users will install Python 3.0 as python3.0 anyway, with Python 2.x as default 'python' binary. > Backward compatibility is important. C++ coul

Re: Why must implementing Python be hard unlike Scheme?

2008-02-20 Thread Eduardo O. Padoan
On Feb 19, 2008 3:15 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Does this have to be true? Beneath the more complex syntax are there > a few core design principles/objects/relationships to help in grokking > the whole thing? Got any related links? Take a look at a simpler implementation,

Re: Does anyone else use this little idiom?

2008-02-05 Thread Eduardo O. Padoan
On Feb 5, 2008 1:30 PM, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Ruby has a neat little convenience when writing loops where you don't > > care about the loop index: you just do n.times do { ... some > > code ... } where n is an integer repres

Re: type, object hierarchy?

2008-02-04 Thread Eduardo O. Padoan
On Feb 4, 2008 1:36 AM, 7stud <[EMAIL PROTECTED]> wrote: > print dir(type) #__mro__ attribute is in here > print dir(object) #no __mro__ attribute > > > class Mammals(object): > pass > class Dog(Mammals): > pass > > print issubclass(Dog, type) #False > print Dog.__mro__ > > --outpu

Re: Python Standardization: Wikipedia entry

2008-02-02 Thread Eduardo O. Padoan
On Jan 29, 2008 2:43 PM, John Nagle <[EMAIL PROTECTED]> wrote: >Submitting Python 2.5 to ISO/ANSI might be a good idea. >From GvR himself: """ - Does a specification (ISO, ECMA, ..) is planned for Python and when ? No, never. I don't see the point. """ http://blogs.nuxeo.com/sections/blogs/ta

Re: PLEASE ACCEPT MY SINCERE APOLOGIES

2008-02-01 Thread Eduardo O. Padoan
On Feb 1, 2008 5:19 AM, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > On Feb 1, 5:08 am, Paddy <[EMAIL PROTECTED]> wrote: > > On Feb 1, 1:26 am, "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: > > > > > > > > > To Everyone on the planet Earth, > > > > > Please accept my apologies for > > > > > Wh

Re: Removing objects

2008-01-23 Thread Eduardo O. Padoan
On Jan 23, 2008 9:55 AM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > For that to work, you need to give your class an __eq__ method, and have > it match by name: > > # put this in MyClass > def __eq__(self, other): > return self.name == self.other Do you mean: # put this in M

Re: Bug in __init__?

2008-01-18 Thread Eduardo O. Padoan
On Jan 18, 2008 3:09 PM, Zbigniew Braniecki <[EMAIL PROTECTED]> wrote: > I found a bug in my code today, and spent an hour trying to locate it > and then minimize the testcase. > > Once I did it, I'm still confused about the behavior and I could not > find any reference to this behavior in docs. >

Scales question

2008-01-04 Thread Eduardo Matus
Hi all... I want to represent a point in 800 X 600 board in a 640 X 480 board..., for example (13, 50) in 640X480 to 800X600 so.. will be like this... Xscale = (13 * 800)/640 Xscale = 16.25 Yscale = (50 * 600)/480 Yscale = 62.5 what happend with the decimals??? I round up or down??? or there is

Re: Oh no, my code is being published ... help!

2007-11-30 Thread Eduardo O. Padoan
On Nov 30, 2007 11:36 AM, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > "Eduardo O. Padoan" <[EMAIL PROTECTED]> writes: > > > No, writing this way will confound the 2to3 tool. > > Why? print("foo") is a perfectly valid Python 2 statement. Maybe &

Re: Oh no, my code is being published ... help!

2007-11-30 Thread Eduardo O. Padoan
On Nov 30, 2007 11:18 AM, Peter Decker <[EMAIL PROTECTED]> wrote: > On Nov 30, 2007 1:19 AM, Tim Roberts <[EMAIL PROTECTED]> wrote: > > > You also have a couple of instances of: > > print("Error Squeezing %s...") > > > > The parentheses serve no purpose here, and are unidiomatic. > > I thought

Re: A Python 3000 Question

2007-10-30 Thread Eduardo O. Padoan
On 10/29/07, brad <[EMAIL PROTECTED]> wrote: > Will len(a_string) become a_string.len()? I was just reading > > http://docs.python.org/dev/3.0/whatsnew/3.0.html > > One of the criticisms of Python compared to other OO languages is that > it isn't OO enough or as OO as others or that it is inconsist

Re: Script to Download Ubuntu Gutsy ASAP

2007-10-18 Thread Eduardo O. Padoan
On 10/18/07, danfolkes <[EMAIL PROTECTED]> wrote: > I thought I would post the source to a program that I made that will > download the http://ubuntu.media.mit.edu/ubuntu-releases/gutsy/ > as soon as its posted. > > It checks the site every 10 min time.sleep(600) > > This is mostly untested so I wo

Re: Duck Typing and **kwds

2007-10-11 Thread Eduardo O. Padoan
On 10/11/07, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > > Hi there. > > I just tried this test: > > > def f(**kwds): > print kwds > > import UserDict > d = UserDict.UserDict(hello="world") > f(**d) > > > And it fails with a TypeError exception ("f() argument after ** must be a > di

Re: unit testing

2007-10-05 Thread Eduardo O. Padoan
> What's the equivalent of unittest's "assertRaises"? > In certain situations it is also useful to test wether an exception > (along its type) is raised or not. > Does py.test support such thing? import py.test py.test.raises(NameError, "blablabla") -- http://www.advogato.org/person/eopadoan/ B

Re: Python 3.0 migration plans?

2007-09-27 Thread Eduardo O. Padoan
On 9/27/07, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > It seems that Python 3 is more significant for what it removes than > what it adds. > > What are the additions that people find the most compelling? - dict.items(), .values() and .keys() returns "dict views", and the .iter*() removal h

Gobject

2007-09-21 Thread Eduardo Matus
hi all... I'm trying to get a event when a pipe of a process is no longer receiving data, in this case a EOF... the process start with no problems... but... the gobject_io_add_watch does not trigger the test method when the file in mplayer has finish... any ideas?? Thks :) the codes is this (the r

Re: Python statements not forcing whitespace is messy?

2007-09-15 Thread Eduardo O. Padoan
On 9/15/07, J. Cliff Dyer <[EMAIL PROTECTED]> wrote: > And I'd hate to have to remember all of the rules for what can go > together and what can't, especially when it comes time to debug. No. > I don't think it should be forced, but maybe put it in PEP8 or PEP3008. It is: see "Whitespace in Expre

Re: how to join array of integers?

2007-09-15 Thread Eduardo O. Padoan
> > It's nice people have invented so many ways to spell the > > builting "map" ;) > > > ",".join(map(str,[1,2,3])) > > '1,2,3' > > IIRC, map's status as a builtin is going away. Actually, py3k built-in map == itertools.imap >>> map(str, []) -- http://www.advogato.org/person/eopadoan/ Boo

Re: How to avoid overflow errors

2007-09-15 Thread Eduardo O. Padoan
On 9/15/07, Carl Banks <[EMAIL PROTECTED]> wrote: > On Fri, 14 Sep 2007 22:59:13 -0300, Eduardo O. Padoan wrote: > > > On 14 Sep 2007 18:08:00 -0700, Paul Rubin > > <"http://phr.cx"@nospam.invalid> wrote: > >> "Eduardo O. Padoan" <[

Re: How to avoid overflow errors

2007-09-14 Thread Eduardo O. Padoan
On 14 Sep 2007 18:08:00 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Eduardo O. Padoan" <[EMAIL PROTECTED]> writes: > > Not totally unrelated, but in Py3k, as it seems, overflows are really > > things of the past: > > &g

Re: How to avoid overflow errors

2007-09-14 Thread Eduardo O. Padoan
On 9/14/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I thought that overflow errors would be a thing of the past now that > Python automatically converts ints to longs as needed. Unfortunately, > that is not the case. > > >>> class MyInt(int): > ... pass > ... > >>> MyInt(sys.maxint) > 2147

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Eduardo O. Padoan
On 9/13/07, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > because I'm trained to interpret the underscore as a synonym for one > space. It's not particularly beautiful, but that is probably a matter of > habituation. And that exact word is probably the reason why I'd still > use self or s (exp

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-02 Thread Eduardo O. Padoan
> No. http://www.artima.com/weblogs/viewpost.jsp?thread=211430 Ops, I meant: http://www.artima.com/forums/threaded.jsp?forum=106&thread=211200 -- http://www.advogato.org/person/eopadoan/ Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-list

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-02 Thread Eduardo O. Padoan
On 9/2/07, llothar <[EMAIL PROTECTED]> wrote: > I'm afraid that the GIL is killing the usefullness of python for some > types of applications now where 4,8 oder 64 threads on a chip are here > or comming soon. > > What is the status about that for the future of python? > > I know that at the moment

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread Eduardo O. Padoan
> For example, if I have x=[ [1,2], [3,4] ] > > What I want is a new list of list that has four sub-lists: > > [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] [[a, [f(b) for b in a]] for a in x] -- http://mail.python.org/mailman/listinfo/python-list

Re: Flatten a list/tuple and Call a function with tuples

2007-07-25 Thread Eduardo \"EdCrypt\" O. Padoan
def flatten(listOfLists): return list(chain(*listOfLists)) >From http://www.python.org/doc/2.4/lib/itertools-recipes.html -- EduardoOPadoan (eopadoan->altavix::com) Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickled objects over the network

2007-07-18 Thread Eduardo \"EdCrypt\" O. Padoan
On 7/18/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley <[EMAIL PROTECTED]> wrote: [...] > The obvious thing you're doing wrong is using pickle over a network. ;) > > http://jcalderone.livejournal.com/15864.html Ok, maybe not the best tools

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Eduardo \"EdCrypt\" O. Padoan
On 7/4/07, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > On 6/22/07, Eduardo EdCrypt O. Padoan <[EMAIL PROTECTED]> wrote: > > Remember that pure CPython has no different "compile time" and > > runtiime. But Psyco and ShedSkin could use the annotations the way &

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-30 Thread Eduardo \"EdCrypt\" O. Padoan
On 6/30/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Eduardo "EdCrypt" O. Padoan a écrit : > > Remember that pure CPython has no different "compile time" and > > runtiime. > > Oh yes ? So what's the compiler doing, and what are those

Re: Voluntary Abstract Base Classes

2007-06-29 Thread Eduardo \"EdCrypt\" O. Padoan
On 6/29/07, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > Hi list, > > Well, the short question is: what are they? I've read Guido's python > 3000 status report on > http://www.artima.com/weblogs/viewpost.jsp?thread=208549 where he > mentions ABC's but don't quite understand what the whole story is >

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Eduardo \"EdCrypt\" O. Padoan
On 6/27/07, Stephen R Laniel <[EMAIL PROTECTED]> wrote: > On Thu, Jun 28, 2007 at 09:08:16AM +0200, Bruno Desthuilliers wrote: > > You said ? > > I could link again to Mark-Jason Dominus, who writes that > people often make the following inference: > > 1) C is strongly typed. > 2) C's typing sucks.

Re: Using PSE under Win32

2007-06-26 Thread Eduardo Dobay
e the same error happened when I installed 3.0.6 and tried to run a test script. Anyway, I think that's it for now. Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Re: Collections of non-arbitrary objects ?

2007-06-25 Thread Eduardo \"EdCrypt\" O. Padoan
> I don't think there is anything wrong with the data structures that > exist in python. I was just wondering if there was a structure that > would restrict a collection to only allow certain types. The > "restrictedlist" class discussed in another thread may be the sort of > thing I was looking fo

Re: Do eval() and exec not accept a function definition? (like 'def foo: pass) ?

2007-06-23 Thread Eduardo Dobay
, 'start') start_body = generate_html_tag_function('body', 'start') end_html = generate_html_tag_function('html', 'end') end_body = generate_html_tag_function('body', 'end') That seems to do what you want. Eduardo -- http://mail.python.org/mailman/listinfo/python-list

Using PSE under Win32

2007-06-23 Thread Eduardo Dobay
Hello, I've been playing around with mod_python these days (using Publisher and PSP), and it has been working smoothly under Windows XP (using Apache 2.2). But when I installed PSE and went to use it with mod_python, it didn't work. The error I get whenever I try to load a PSE page is: Traceback (

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-22 Thread Eduardo \"EdCrypt\" O. Padoan
On 6/22/07, John Nagle <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > P.S. I agree with the sentiment that the annotations feature of Python > > 3000 seems like a lot of baggage. Aside from some benefits around > > writing C/C++/Java wrappers, it's the lowest common denominator type > > annota

Re: Should: "for k,v in **dictionary_instance" work?

2007-06-16 Thread Eduardo \"EdCrypt\" O. Padoan
> Actually since you asked, I had to try this out > > x = range(10) > a, *b = x PEP 3132: Extended Iterable Unpacking http://www.python.org/dev/peps/pep-3132/ -- EduardoOPadoan (eopadoan->altavix::com) Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-lis

Re: strange PyLint configuration (was: PEP 8 style enforcing program)

2007-05-31 Thread Eduardo \"EdCrypt\" O. Padoan
On 5/31/07, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Alexander Eisenhuth wrote: > > > Pylint is one of them (http://www.logilab.org/857) > > BTW: Why does pylint want all names with underscores? I tested it > and it complains about malformed names in e.g. the following cases > that are conf

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread Eduardo \"EdCrypt\" O. Padoan
> > Perhaps you meant that second one to be: > > (key, mydict[key] for key in mydict if key in xrange(60, 69) or key == > > 3) > > > Clearly not! Its called *list*-comprehension, not tuple-comprehension. ;) With () instead of [], it is a generator expression. http://docs.python.org/ref/genexpr.html

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Eduardo \"EdCrypt\" O. Padoan
> The thoughts of the inventor of Python on "Adding Optional Static > Typing to Python" are at > http://www.artima.com/weblogs/viewpost.jsp?thread=86641 > . I wonder if the idea will be implemented in Python 3.0. No. He says it in another newer post and in PEP 3099, AFAIK. -- EduardoOPadoan (e

Re: why I don't like range/xrange

2007-02-16 Thread Eduardo \"EdCrypt\" O. Padoan
> But this long int => int issue should not exist in a future python > version any more, IIRC int and long int is scheduled to be merged > somehow. (Or isn't it?) It is done. http://mail.python.org/pipermail/python-3000-checkins/2007-January/000251.html -- EduardoOPadoan (eopadoan->altavix::com

Re: Pep 3105: the end of print?

2007-02-16 Thread Eduardo \"EdCrypt\" O. Padoan
On 2/15/07, Edward K Ream <[EMAIL PROTECTED]> wrote: > > Isn't the very concept of major releases (1.x, 2.x, 3.x) that they *can* > > be not backwards-compatible with previous releases? > > Not at all. [...] It is the only intent of Python 3.0: be free of backward compatibity constraints. There ar

Re: The Python interactive interpreter has no command history

2007-02-15 Thread Eduardo \"EdCrypt\" O. Padoan
> Hello, > > How to configure Python2.5's interactive interpreter to get command > history ? > > I always got ^[[A and ^[[B . > Are you using Ubuntu? The last comes with 2.4.x and 2.5. This only occurs on 2.5. This happens when you compile Python with libreadline installed, AFAIK. FIll a bug in th

Re: idea for testing tools

2007-02-08 Thread Eduardo \"EdCrypt\" O. Padoan
> That's hardly desirable. If one is writing a test library that goes as > far as reparsing the assert statements, I can't see the point of > requiring the user to clutter his test suite with such spurious print > statements. After all, that's one of the main points of test suites in > the first pl

  1   2   >