is a file open ?

2005-07-20 Thread luis
for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? Best regards Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: is a file open ?

2005-07-21 Thread luis
John Machin wrote: > Daniel Dittmar wrote: > >> luis wrote: >> >>> for root, dirs, files in os.walk(path): >>>for file in files: >>> # ¿ is opened ? >> >> >> >> On Linux and some other Unixes, you can probably rea

Re: is a file open ?

2005-07-21 Thread luis
John Machin wrote: > Daniel Dittmar wrote: > >> luis wrote: >> >>> for root, dirs, files in os.walk(path): >>>for file in files: >>> # ¿ is opened ? >> >> >> >> On Linux and some other Unixes, you can probably rea

conecting with a MsAcces DB by dao

2006-06-29 Thread luis
rks fine and return a no empty recordset, but with others mdb files, the recordsets are void (opening the tables or recorsets with Ms Access are not void). Some help is welcome, Thanks in advance Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: conecting with a MsAcces DB by dao

2006-06-30 Thread luis
Iain King ha escrito: > luis wrote: > > Hi > > I'm using activestate python 2.4 on win xp 2 ed. and Ms Access 2002 > > (reading first http://starship.python.net/crew/bwilk/access.html) > > I have writed the following code > > > > def append_fro

Re: conecting with a MsAcces DB by dao

2006-06-30 Thread luis
Iain King ha escrito: > luis wrote: > > Iain King ha escrito: > > > > > luis wrote: > > > > while not rs.EOF: > > > > id=rs.Fields(colName.Value) #colName, valid column name > > > > ... > > > &g

Re: conecting with a MsAcces DB by dao

2006-07-03 Thread luis
Iain King ha escrito: > luis wrote: > > Iain King ha escrito: > > > > > luis wrote: > > > > Iain King ha escrito: > > > > > > > > > luis wrote: > > > > > > while not rs.

ctypes: error passing a list of str to a fortran dll

2007-06-04 Thread luis
I'm using ctypes to call a fortran dll from python. I have no problems passing integer and double arryas, but I have an error with str arrys. For example: StringVector = c_char_p * len(id) # id is a list of strings Id_dat=StringVector() for i in range(len(Id)): ...Id_dat[i]=id[i] n=c_int(le

Re: ctypes: error passing a list of str to a fortran dll

2007-06-07 Thread luis
On 5 jun, 06:15, Charles Sanders <[EMAIL PROTECTED]> wrote: > luis wrote: > > I'm using ctypes to call afortrandllfrom python. I have no problems > > passing integer and double arryas, but I have an error with str arrys. > > For example: > > [snip] > > I

dislin titlin and string decode

2007-05-19 Thread luis
Hello! I have an unespectedn result with dislin titlin dislin.metafl ('WMF') dislin.disini () a="Andrés or Ramón" dislin.titlin (a.encode("Latin-1"), 1) # not error raised, is ok dislin.disfin () In the output file all is ok but the title is Andr s or Ram n Thanks in advance! --

Re: dislin titlin and string decode

2007-05-19 Thread luis
the code is: #!/usr/bin/env python def try_dislin(): ...import dislin ...dislin.metafl ('WMF') ...dislin.errdev ('FILE') ...dislin.disini () ...dislin.errmod('PROTOCOL','ON') ...dislin.hwfont () ...dislin.pagera () ...dislin.pagfll (255) ...dislin.color('BLACK') ...dislin.axspos (500, 1600) ...d

Re: dislin titlin and string decode

2007-05-19 Thread luis
On 19 mayo, 12:56, luis <[EMAIL PROTECTED]> wrote: > Hello! > > I have an unespectedn result with dislin titlin > > dislin.metafl ('WMF') > dislin.disini () > > > a="Andrés or Ramón" > dislin.titlin (a.encode("Latin-1"), 1)

Windows error 126 loading a dll on windows 2000

2007-07-25 Thread luis
Hi! I'm using ctypes with python 2.4 on windows xp the code if exists(join(getcwd(),'statistics.dll')): ...ap=windll.LoadLibrary(join(getcwd(),'statistics.dll')) works fine but on windows 2000, the some code raise the windows error 126, it can't load the module statistics.dll thanks in advan

unable to install gdal

2008-03-09 Thread luis
Hi On Windows xp sp2 and python 2.4 Yesterday I running old versions of gdal, and I try to upgrade I download gdalwin32exe150.zip and gdal-python-13.win32-py2.4.exe I unzip gdalwin32exe150.zip in C:\gdalwin32-1.5 I follow install's instructions from http://trac.osgeo.org/gdal/wiki/GdalOgrInPyt

Re: unable to install gdal

2008-03-10 Thread luis
On 9 mar, 16:37, luis <[EMAIL PROTECTED]> wrote: > Hi > > On Windows xp sp2 and python 2.4 > > Yesterday I running old versions of gdal, and I try to upgrade > > I download gdalwin32exe150.zip and gdal-python-13.win32-py2.4.exe > I unzip gdalwin32exe150.zip in

Re: unable to install gdal

2008-03-12 Thread luis
On 10 mar, 09:49, luis <[EMAIL PROTECTED]> wrote: > On 9 mar, 16:37, luis <[EMAIL PROTECTED]> wrote: > > > > > Hi > > > On Windows xp sp2 and python 2.4 > > > Yesterday I running old versions of gdal, and I try to upgrade > > > I downlo

maintain 2 versions of python on my computer

2010-01-14 Thread luis
Hi I am not an expert in programming and using Python for its simplicity I have 2 versions of python installed on my computer (windos xp) to begin the transition from version 2.4 to 2.6 or 3. maintaining the operability of my old scripts Is there any way to indicate the version of the python in

IDLEX association

2016-11-18 Thread Luis Marzulli
Hi When I double click a .py file, a windows appears and immediately disappears. How can I associate the .py file extension to the IDLEX EDITOR? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Style().configure don't works for all widgets

2016-11-18 Thread Luis Marzulli
Hi Why ttk.Style().configure(".", font=('Courier New', 30, "bold")) works for Button and Label widgets (and maybe others) and don't works for Entry widget? Example in Python 3: from tkinter import * from tkinter import ttk from tkinter import font root = Tk() ttk.Style().configure(".", font=(

Re: logging as root using python script

2005-04-07 Thread Luis Bruno
sudo(8) to not prompt for any password, BTW. Cheers! -- Luis Bruno -- http://mail.python.org/mailman/listinfo/python-list

Re: logging as root using python script

2005-04-07 Thread Luis Bruno
Martin Franklin wrote: > another alternative would be setuid I also thought about making the script setuid root, but I'm under the impression that Linux (at least) won't honor the suid bit on a script. That's from memory though. Cheers! -- http://mail.python.org/mailman/listinfo/python-list

Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2

2014-01-26 Thread Luis Marsano
I've installed python for all users with full permissions to all users (see picture). Python runs for all users. However, scripts only work when I run as Administrator. Running a script always results in an "ImportError: cannot import name" error. Here, for example, is the output of "pip -h" run as

Expert Advice

2012-01-04 Thread Luis Perez
hattan "loft" Lots of fun with Apple products and ereaders luis perez | principal winter wyman companies - technology staffing tel: 212.616.3582| fax: 212.616.3592 | aim: lpcnn23 I Please consider the environment before printing this email

wx mouse states

2006-07-17 Thread Luis Morales
Hello i using GetMouseState() to get the position in X and Y of the mouse pointer over time with the use of ScreenToCliente to get local windows coordinates in windows in work like a charm no problem the app is fast and works how it should. But on macos I get this damn error msg   ms = wx

IMAP4 search with special characters

2006-07-21 Thread Luis Corrales
# here I get the error "can't decode byte 0xf6 in position 10" conn.search('ISO-8859-1', '(BODY Lemböckgasse)'.encode('ISO-8859-1')) And so on. Does anybody have the remotest idea what I'm doing wrong and how I could find my e-mail? Thanks in advance, Luis Corrales -- http://mail.python.org/mailman/listinfo/python-list

Re: A problem from a Vim user

2006-08-07 Thread Luis Armendariz
when reading a line. Is there a way to use > that command within vim without raising errors? > > Thanks a lot. > You should read :help python-input On my version (Vim 7.0.17), it says that input() and raw_input() are not yet supported. So, submit a patch to the vim folks! -Luis -

rare error with python at execution

2006-07-06 Thread Luis Morales
I was trying the win32api to gather some system information.   But now I get this error everytime I run a script and I have no idea. It can be a simple print ‘hello’ that it wont work   This is the error I get   'import site' failed; use -v for traceback Traceback (most recent call l

Re: How to depress the output of an external module ?

2006-12-26 Thread Luis Armendariz
try: > result = function(*args, **kwargs) > finally: > # don't forget to restore stdout, or you > # really will regret it... > sys.stdout = savestdout > return result > There's no need for savestdout. There's a backup copy

Re: how to get function names from the file

2006-02-15 Thread luis . armendariz
Try the following: def printFoo(): print "Foo" def printFOO(): print "FOO" functions = ("printFoo", "printFOO")# list or tuple of strings from file, or wherever for function in functions: call = function + "()" eval(call) -- http://mail.python.org/mailman/listinfo/python-li

Re: multiple inheritance

2006-02-15 Thread luis . armendariz
Hi Thomas, When an object is created, the __init__ function will be called. Since you didn't define it in Foobar, the search path finds the __init__ function in Foo, so that's the one that is called. The second __init__ in Bar is masked since it comes second in the inheritance list.. If you want

Re: Attached images by plain email.

2006-02-15 Thread luis . armendariz
Hi Gaz, Perhaps this will help? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52243 -- http://mail.python.org/mailman/listinfo/python-list

Duck Typing and **kwds

2007-10-10 Thread Luis Zarrabeitia
performance, perhaps?) to break duck-typing in this situation? Regards, -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- "Al mundo nuevo corresponde la Universidad nueva" UNIVERSIDAD DE LA HABANA 280 aniversario -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to generate alternate toggling values in a loop?

2007-10-18 Thread Luis Zarrabeitia
webmail didn't respect the list* headers :(. Thanks, Grant! -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: vote for Python - PLEASE

2007-10-19 Thread Luis Zarrabeitia
nable way, but still in good faith (I believe). I wouldn't treat him so harshly, even though I didn't like being asked to lie. Anyway, I went to vote. I do use python with mysql. Python seems to be winning by a 16% margin, more or less. Impressive... but now I have to wonder how many p

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Luis Zarrabeitia
idiom because you are speaking the wrong language. You should be doing: if "something" in "string": do(something()) wich is clearer IMHO. > cheers, > > -jelle See ya, -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom

Re: how to clear up a List in python?

2006-05-26 Thread Luis Armendariz
ve skipped the consequent statement when reading his response. Why get so upset about something that didn't even apply to you? :-) -Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: hide python window

2006-05-26 Thread Luis Armendariz
exe instead of python.exe). -Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: translating Python to Assembler

2008-01-22 Thread Luis Zarrabeitia
you files with pdb extension and python in the name or contents, and the second one (quoted) should return pages with both words together, except for commas, spaces, dots, slashs, etc. However... one of the second query results is this thread in google groups... not a good sign. -- Luis Zarrab

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
e of python... I chose python _because_ of it. > and because it can also improve performance. Btw, for performance, there is __slots__, with the side-effect that it forbids attribute creation 'on the fly'. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
should access it] private = two leading underscores (name munging) [only you should access - implementation detail.] -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
likely make irrelevant if the members are private or public. But, for trusted code? Or at least code known at compile time? It's just not worth it... pylint should take care of that - and if it doesn't, the OP should go fix it. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y C

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
and guess what, C# not only needs a word for the concept of "objects should behave as you expect them to behave - we want no barking cats, ever", but it is even not polymorphic by default (the cursed "virtual" keyword). -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
On Wednesday 14 January 2009 11:18:51 am Paul Rubin wrote: > Luis Zarrabeitia writes: > > when you need to share some objects with potentially untrusted code > > (like, a plugin system). You can't, and you shouldn't, expect that the > > user will know what plugins h

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
On Wednesday 14 January 2009 11:45:46 am Paul Rubin wrote: > Luis Zarrabeitia writes: > > Why don't you do it backwards? > > You *can* implement a metaclass that will remove the dynasmism from its > > instances. Do it - I can give you a starting point if you wish. >

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
On Wednesday 14 January 2009 12:54:13 pm Paul Rubin wrote: > Bruno Desthuilliers writes: > > You'll find successful "monster" projects written in > > languages that are even more permissive than Python (C anyone ?), > > Could you name one written in C?

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Luis Zarrabeitia
at could have been prevented with more compile time checking > that made sure the structures understood by the one-off script matched > the ones in the program that generated the input data. Wait, do you _really_ believe that _static_ checks could prevent problems arising from _unexpected_ c

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-15 Thread Luis Zarrabeitia
Quoting Paul Rubin <"http://phr.cx"@NOSPAM.invalid>: > Luis Zarrabeitia writes: > > Wait, do you _really_ believe that _static_ checks could prevent problems > > arising from _unexpected_ conditions in the _data_? > > The data does not arrive from outer spa

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-16 Thread Luis Zarrabeitia
you can usually access the privates anyway - it's just a bit harder to do, and a lot harder to discover. You pointed out previously that Python wasn't up to the task of running untrusted code on my own application, and I agreed. _That_ is what you seem need, and enforced data hiding

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
enforced data hiding. You want something actually designed to try to prevent abuses from hostile programmers - go use .Net or Java, who attempt to do that (I don't know with what level of success, but they at least provide you the 'locks' and 'police' that you need).

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
rty access in C# is exactly the same. (Could it be that even if the syntax is the same, the compiled code differs? Don't know enough about .NET to answer that). I think I'm getting offtopic now. I better leave :D [snip the rest of the email, as I agree with it] -- Luis Zarrabeitia F

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
capsulate it later without > breaking the client's code. Python programmers don't _need_ to plan ahead and encapsulate the radius from the start. That's the whole point. No clairvoyance needed. I kind of like that. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
Quoting Luis Zarrabeitia : > > Quoting "Russ P." : > > > On Jan 19, 6:24 pm, "James Mills" > > wrote: > > > > > Python programmers tend to not have a need for > > > properties. Quite honestly they are a waste of time.

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
one I'm using right now (Horde/Imp), your only option is to reply-to-all and then delete the original sender. I can't blame anyone for forgetting about the last part. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
Quoting "Russ P." : > On Jan 19, 5:09 pm, Luis Zarrabeitia wrote: > > > Russ, I think _you_ are missing the point. > > If the attribute is already public, why does it need properties? Why would > a > > programmer go to the trouble of adding them

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
lic interface, you shouldn't change it... But, if you absolutely have to do it, complain loudly and as soon as possible. In python, I'd say that [a subclass of?] AttributeError would be the best solution for this ill-advised situation. -- Luis Zarrabeitia Faculta

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
Quoting Paul Rubin <"http://phr.cx"@NOSPAM.invalid>: > Luis Zarrabeitia writes: > > > Luis Zarrabeitia writes: > > class ImmutableType(type): ... > > Thanks for posting this, I haven't replied because I bookmarked the > post for later study,

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Luis Zarrabeitia
tion'?). It was a counterexample for your trust on compiler checks. Btw, what do you have against using pylint for detecting those 'access violations'? > If that reasoning is sound, think about what else is useless. I _hope_ that wasn't Bruno's reasoning. I don't want to switch sides on this discussion :D. Cheers, -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-20 Thread Luis Zarrabeitia
On Tuesday 20 January 2009 02:00:43 am Russ P. wrote: > On Jan 19, 10:33 pm, Luis Zarrabeitia wrote: > > (Why do you keep calling it 'encapsulation'?). > > I keep calling it encapsulation because that is a widely accepted, > albeit not universal,

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-20 Thread Luis Zarrabeitia
On Tuesday 20 January 2009 05:00:34 am Paul Rubin wrote: > Luis Zarrabeitia writes: > > No wonder you can't get Bruno's point. For the second, static checks > > to prevent accidents, you have pylint. For the first, not only you > > are using the wrong tool, but yo

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-21 Thread Luis Zarrabeitia
to be _part of the standard_ library (or whatever). If you need it in your project, _use_ it. If you don't, then don't use it. If _you_ need that thing you call security, just use it already and quit complaining that we don't use it. Is there a policy in your project that you

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-21 Thread Luis Zarrabeitia
On Tuesday 20 January 2009 09:52:01 pm Paul Rubin wrote: > Luis Zarrabeitia writes: > > > Whaat? Assuming a program is perfect unless a failure is proven > > > is not at all a sane approach to getting reliable software. It is > > > the person claiming perfection w

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-21 Thread Luis Zarrabeitia
On Wednesday 21 January 2009 02:03:07 pm Paul Rubin wrote: > Luis Zarrabeitia writes: > > But somehow the discussion shifted from an optional requirement (giving > > you the chance to explicitly use 'from lock import unlock; o = > > unlock(obj)') to "it

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-21 Thread Luis Zarrabeitia
On Wednesday 21 January 2009 04:16:38 pm Russ P. wrote: > On Jan 21, 9:34 am, Luis Zarrabeitia wrote: > > But you keep failing to explay why do you need it to be _part of the > > standard_ library (or whatever). > > Technically, it doesn't need to be. But if someone p

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-22 Thread Luis Zarrabeitia
; ...     __colour = 'blue' > ...     def __str__(self): > ...         return 'A %s parrot' % self.__colour > ...     __repr__ = __str__ > ... > > >>> class RedParrot(Parrot): # Just like Parrot, only red. > > ...     __colour = 'red' >

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-23 Thread Luis Zarrabeitia
On Friday 23 January 2009 06:31:50 am Antoon Pardon wrote: > On 2009-01-16, Luis Zarrabeitia wrote: > > Quoting "Russ P." : > >> If you "*shouldn't* mess with the implementation", then what is wrong > >> with enforcing that "shouldn'

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-23 Thread Luis Zarrabeitia
Quoting Steven D'Aprano : > On Fri, 23 Jan 2009 13:07:55 -0500, Luis Zarrabeitia wrote: > > > It should be in _our_ power as the team of all participant coders on > > _our_ project to decide if we should mess with the internals or not. > > > > What makes n

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Luis Zarrabeitia
Quoting "Russ P." : > On Jan 23, 6:36 pm, Luis Zarrabeitia wrote: > > > > Makes *no* sense? There's *no* good reason *at all* for the original > > > author to hide or protect internals? > > > > My bad, sorry. > > It makes sense... if

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Luis Zarrabeitia
Quoting Steven D'Aprano : > On Fri, 23 Jan 2009 21:36:59 -0500, Luis Zarrabeitia wrote: > > > Quoting Steven D'Aprano : > >> Makes *no* sense? There's *no* good reason *at all* for the original > >> author to hide or protect internals? > &g

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-24 Thread Luis Zarrabeitia
quot; every time an attribute is > accessed that it is not a private attribute. I think that was a reply to a message where I said that I used pylint run those checks on third party libraries. And I obviously can do the same with my own code. I don't have threading now, so I can't ch

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-25 Thread Luis Zarrabeitia
Quoting "Russ P." : > On Jan 24, 9:54 pm, Luis Zarrabeitia wrote: > > Quoting "Russ P." : > > > > It is. For starters, I'd lose the information of "this attribute was > intended to > > be internal and I'm accessing it anyway".

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Luis Zarrabeitia
e person. I have serious problems with names. [My apologies to both of you, if I said something that made you notice my confusion]. P.S: Just to be clear, I'm neither Russ P. nor Paul Robin :D -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.c

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Luis Zarrabeitia
h, as someone pointed out before me, can be done with tools like pylint). The objection is about the _user_ of the library. If you don't force it into the _user_, how is it different from the current situation? And if you do force it, how can you say that it is optional? -- Luis Zarrab

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Luis Zarrabeitia
On Tuesday 27 January 2009 02:56:51 pm Russ P. wrote: > On Jan 27, 11:40 am, Luis Zarrabeitia wrote: > > I think you still fail to see that what we are objecting is not that the > > original writer can "optionally" use the enforced data hiding (which, as > > someon

Re: is python Object oriented??

2009-02-01 Thread Luis Zarrabeitia
the dot is "self". If you can't trust yourself to access only the well identified "public" attributes, how can you trust that you will just not make "public" a private attribute anyway? -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-02-01 Thread Luis Zarrabeitia
ical* given the current design of Python. Well, then. Do you want dynamic checks? Go fix Bastion/rexec (that would be a _good_ thing, valuable for way more than data hiding). Or do you want static checks? In that case, you have it already. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemátic

Re: is python Object oriented??

2009-02-02 Thread Luis Zarrabeitia
complaint has nothing to do with enforced vs not-enforced data hiding, and everything to do with static typing. And mind you, must of us who use python, do so _because_ of the dynamism and not in spite of it. Funny thing is, you have the choice, _now, today_, of having your precious sta

Re: is python Object oriented??

2009-02-02 Thread Luis Zarrabeitia
the interpreter will simplify them more than having the checks on an external tool? -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-02-04 Thread Luis Zarrabeitia
ain. > Please, point out where, because I don't recall you explaining why is not enough to use a "validation script" on the code if you wish to. I _do_ recall you saying that you didn't want the validation script unless it is integrated with python, but I'm yet to

Re: is python Object oriented??

2009-02-04 Thread Luis Zarrabeitia
position: you can easily _check_ that everything is alright before executing, whereas in the office example, it cannot be done. Of course, if the analogy is flawed in such an essential aspect, I won't even humor it. I worry, though, that you obviously believe that it is not flawed. -- Luis

Re: is python Object oriented??

2009-02-04 Thread Luis Zarrabeitia
On Wednesday 04 February 2009 10:53:54 am Russ P. wrote: > On Feb 4, 5:35 am, Luis Zarrabeitia wrote: > > Quoting "Russ P." : > > This analogy is nonsense. There is no way you will execute code on my > > system if I don't authorize it, regardless of how "

Importing a file (not a module).

2009-02-08 Thread Luis Zarrabeitia
but I don't want to keep that script on the global python path nor on any of the project folders (it is required by more than one). Currently I have a symlink from the original modify_pythonpath.py to each project directory, but that seems clumsy. -- Luis Zarrabeitia Facultad de Mat

PyGILState: The assertion 'autoInterpreterState' has failed

2008-11-27 Thread Luis Carrion
greatly appreciated!!! Luis Orlando Carrión Rumiche Tata Consultancy Services Colonia 1329-Piso 3 Montevideo,. Uruguay Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Experience certainty. IT Services

Re: how to document a property

2008-11-27 Thread Luis Zarrabeitia
p(a.age) and always get "stores the age of the person", I don't think python has any syntactical way of doing that. You could simulate it using properties, though (do a 'help(property)' to see an example), but I'm not sure if that will be a good solution. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Rich Comparisons Gotcha

2008-12-07 Thread Luis Zarrabeitia
Quoting James Stroud <[EMAIL PROTECTED]>: > First, here is why the ability to throw an error is a feature: > > class Apple(object): >def __init__(self, appleness): > self.appleness = appleness >def __cmp__(self, other): > assert isinstance(other, Apple), 'must compare apples t

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
l. Even the transition itself could be done without breaking much code... Make the == op return an object that wraps the array of bools (instead of the array itself), give it the any() and all() methods, and make __nonzero__/__bool__ equivalent to all(). -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
On Wednesday 10 December 2008 10:50:57 am M.-A. Lemburg wrote: > On 2008-12-10 16:40, Luis Zarrabeitia wrote: > > Quoting Rasmus Fogh <[EMAIL PROTECTED]>: > >> Rhamphoryncus wrote: > > Rich comparisons were added to Python at the request of the > Numeric (now num

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
n the way to test for equality should be the equality test. > > I'm certain that something could be worked out. A quick paragraph that > > took me just a few minutes to type shouldn't be construed as a PEP that > > will solve all the problems :D. > > As always: t

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
e(a, numpy.array) or isisntance(b,numpy.array): res = compare_numpy(a,b) elif isinstance(a,some_otherclass) or isinstance(b,someotherclass): res = compare_someotherclass(a,b) ... else: res = (a == b) if res: # do whatever -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computaci

Re: New Python 3.0 string formatting - really necessary?

2008-12-21 Thread Luis Zarrabeitia
prefix - if that were the case, what magic would you propose for the compiler to guess when you are referring to locals, globals, class or instance variables?) -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Reading from stdin

2008-10-07 Thread Luis Zarrabeitia
e behavior. The stdin.readline() function doesn't share that behaviour (it returns as soon as I hit 'enter'). ??Is there any way to tell stdin's iterator not to buffer the input? Is it part of the standard file protocol? -- Luis Zarrabeitia (aka Kyrie) Fac. de Mate

Re: Reading from stdin

2008-10-07 Thread Luis Zarrabeitia
ill stands (how to turn off the buffering), but this is a nice workaround until it gets answered. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading from stdin

2008-10-07 Thread Luis Zarrabeitia
On Tuesday 07 October 2008 05:12:28 pm Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Luis > > Zarrabeitia wrote: > > I have a problem with this piece of code: > > > > > > import sys > > for line in sys.stdin: > > p

Re: Reading from stdin

2008-10-08 Thread Luis Zarrabeitia
the size argument is negative or omitted, read until EOF is reached. Notice that when in non-blocking mode, less data than what was requested may be returned, even if no size parameter was given. = But it doesn't say how to put the file object in non-blocking mode. (I was trying t

Parsing a file with iterators

2008-10-17 Thread Luis Zarrabeitia
e to leak the internals of the parsers to the outside. What could I do? (to the curious: the format is a dialect of the E00 used in GIS) -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: using "private" parameters as static storage?

2008-11-13 Thread Luis Zarrabeitia
27; variables. > If you don't understand that, or are > happy without having the choice, and have no answer to the question I > was asking, then that's fine. I believe he had an answer... You didn't like it, though. I hope mine was more palatable to you. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: using "private" parameters as static storage?

2008-11-14 Thread Luis Zarrabeitia
Quoting Joe Strout <[EMAIL PROTECTED]>: > Hi Luis, > > > A lot of languages have ditched the "concept" of a static variable > > on a method (how do > > you parse that sentence, btw?) in favour of using encapsulation. > > A static variable IS

Re: Challenge: Please break this! [Python Security]

2009-02-23 Thread Luis Zarrabeitia
ists None --- Versus: --- >>> import django >>> print django >>> import i_hope_this_doesnt_exists Traceback (most recent call last): File "", line 1, in ImportError: No module named i_hope_this_doesnt_exists --- ipython also gets broken after the import (not

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Luis Zarrabeitia
On Tuesday 24 February 2009 05:57:52 pm Lionel wrote: > from win32api import GetSystemMetrics I'd guess that win32api is patform specific, as in "api for win32". -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Luis Zarrabeitia
y, then it would be kind of irrelevant if it is on the stdlib or not. Of course, this only applies if you want to paint and your api provides that info. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman

Re: OT: handling multiple software repositories

2009-02-26 Thread Luis Zarrabeitia
nces are that you will love DrProject. It's quite good (and easy to install, unlike gforge), but the developers are moving on to a version 2.0 that you can find around here: http://basieproject.org/ (yeah, the website is ugly). If you like trac, take a look at DrProject and keep an e

  1   2   3   4   5   6   >