Problems with running Python in Npp

2021-09-08 Thread Ricardo
Hey Python and crew I'm having difficulties installing and running Python on my computer. I've seen plenty YouTube videos on how to set it up, but none of them have worked. Any help or guidance will be greatly appreciated. Sincerely, Ricardo Sent from [

Re: Spam user

2017-03-31 Thread Ricardo A Baila
Le vendredi 31 mars 2017 10:28:08 UTC+2, Ricardo A Baila a écrit : > Hi all, > > Could someone remove wucbad...@gmx.com from the group? > > Thanks > Ricardo And johnnypopo...@gmx.com as well. Didn't go deep on the issue but could it be @gmx.com the issue? Or at least, a

Spam user

2017-03-31 Thread Ricardo A Baila
Hi all, Could someone remove wucbad...@gmx.com from the group? Thanks Ricardo -- https://mail.python.org/mailman/listinfo/python-list

dbf remove fields.

2016-04-22 Thread Ricardo Aguilar
Hi there i try to remove to fields in dbf table, how I can remove two fields? I wanna to remove because I have this error "ValueError: could not convert string to float: " But I no need this field. How I can remove this fields o ignore this ValueError? Any advice. Ricar

Re: PyPI auth issues (Server response (401): basic auth failed)

2014-11-26 Thread Ricardo Bánffy
The second transcript was done without a .pypirc. That's why it asked for credentials. Can you post your .pypirc file (without password, of course) for comparison? On Wed, Nov 26, 2014, 05:04 dieter wrote: > Ricardo Bánffy writes: > > I must be doing something wrong, but I (

PyPI auth issues (Server response (401): basic auth failed)

2014-11-25 Thread Ricardo Bánffy
Hi folks. I must be doing something wrong, but I (and the clever folks at the #python channel) can't figure what. I'm doing a: python setup.py register -r pypitest And getting the following in return running register running egg_info writing Appengine_Fixture_Loader.egg-info/PKG-INFO writing t

Re: Python IDE.

2014-11-23 Thread Ricardo Aráoz
Spyder El 20/11/14 a las 18:47, TP escibió: On Thu, Nov 20, 2014 at 11:29 AM, Irmen de Jong mailto:irmen.nos...@xs4all.nl>> wrote: PyCharm *is* free, if you fall in one of several categories. See http://www.jetbrains.com/pycharm/buy/license-matrix.jsp Even when you have to buy it

Re: Editor for Python

2014-01-08 Thread Ricardo Aráoz
I use Spyder both in Windows as in Linux. Pretty good programing environment, lots of features, simple enough, works on both platforms and it's free. El 08/01/14 08:27, ayushpokha...@gmail.com escribió: On Friday, 23 November 2001 04:13:40 UTC+5:30, MANUEL FERNANDEZ PEREZ wrote: Hello, I'm

Re: Tree library - multiple children

2013-12-13 Thread Ricardo Aráoz
El 13/12/13 18:05, bucha...@gmail.com escribió: I have this simple/stupid tree module: https://github.com/abuchanan/bolts/blob/master/bolts/tree.py Thanks, I'll check it. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tree library - multiple children

2013-12-12 Thread Ricardo Aráoz
El 12/12/13 18:01, Mark Lawrence escribió: On 12/12/2013 18:56, Terry Reedy wrote: On 12/12/2013 1:14 PM, Ricardo Aráoz wrote: I need to use a tree structure. Is there a good and known library? Search tools, both for the web and on pypi.python.org, are your friend. stackoverflow is

Re: Tree library - multiple children

2013-12-12 Thread Ricardo Aráoz
El 12/12/13 15:56, Terry Reedy escribió: On 12/12/2013 1:14 PM, Ricardo Aráoz wrote: I need to use a tree structure. Is there a good and known library? Search tools, both for the web and on pypi.python.org, are your friend. I thought it was obvious that I've already looked around

Re: Tree library - multiple children

2013-12-12 Thread Ricardo Aráoz
El 12/12/13 16:26, Neil Cerutti escribió: On 2013-12-12, Ricardo Aráoz wrote: I need to use a tree structure. Is there a good and known library? Doesn't have to be binary tree, I need to have multiple children per node. Have you tried nested lists? [[1, 2], [3, 4] Can represent

Tree library - multiple children

2013-12-12 Thread Ricardo Aráoz
I need to use a tree structure. Is there a good and known library? Doesn't have to be binary tree, I need to have multiple children per node. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Re: Wrapping around a list

2013-11-28 Thread Ricardo Aráoz
El 27/11/13 07:46, amjad...@gmail.com escribió: Hello, I am working on a problem (Bioinformatics domain) where all possible combinations of input string needs to be printed as sublist For example: Input string : "LEQN" Output= "[L","E","Q","N"]["LE","EQ","QN","NL"] ["LEQ","EQN","QNE","NLE"] ["

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Ricardo Aráoz
El 12/11/13 01:46, Rick Johnson escribió: No, Python modules can be poked, prodded, and violated by any pervert who can spell the word "import". Attribute values can be reassigned and state can be externally manipulated resulting in all types of undefined behaviors -- Nice! My code, my respo

Re: Multiprocessing: killing children when parent dies

2013-10-18 Thread Ricardo Aráoz
El 18/10/13 13:18, John Ladasky escribió: What a lovely thread title! And just in time for Halloween! :^) LOL Couldn't that be construed as "sexism"? Next we'll have a new long moronic thread about sexism and discrimination in mail subjects. Which will, as usual, leave a lot of satisfied eg

Re: Restart the interactive python shell like in IDLE

2013-09-30 Thread Ricardo Abreu
On Thursday, June 11, 2009 1:48:42 AM UTC+2, Chris Rebert wrote: > On Wed, Jun 10, 2009 at 12:01 PM, Matt Burson wrote: > > Is there a way to reproduce the behavior of IDLE's restart shell ability by > > using a function? I thought there would be since you can exit python by > > executing the simpl

Why chunks is not part of the python standard lib?

2013-04-30 Thread Ricardo Azpeitia Pimentel
After reading How do you split a list into evenly sized chunks in Python? and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a chunks

Re: Question on for loop

2013-03-04 Thread Ricardo Aráoz
El 04/03/13 09:18, newtopython escribió: Hi all, I'm super new to python, just fyi. In the piece of code below, secretWord is a string and lettersGuessed is a list. I'm trying to find out if ALL the characters of secretWord are included in lettersGuessed, even if there are additional values i

PyCon US 2012 sprints

2011-12-17 Thread Ricardo Bánffy
Hi folks. Next March I'm planning to attend PyCon US (for the first time) and stay for the sprints. I am not sure how they work, however. Are there any "first-timer guide to PyCon sprints"? -- Ricardo Bánffy http://www.dieblinkenlights.com http://twitter.com/rbanffy -- http://

Re: Does py2app improves speed?

2011-11-24 Thread Ricardo Mansilla
do This? Probably i'm missing something here... On 24/11/2011, at 07:38, Dave Angel wrote: > On 11/24/2011 08:26 AM, Ricardo Mansilla wrote: >> Well, that's sad... I think Im gonna end getting back to C++ for This. But >> anyway, thanks a lot for the quick answer.

Re: Does py2app improves speed?

2011-11-24 Thread Ricardo Mansilla
Well, that's sad... I think Im gonna end getting back to C++ for This. But anyway, thanks a lot for the quick answer... Bye. -- http://mail.python.org/mailman/listinfo/python-list

Does py2app improves speed?

2011-11-23 Thread Ricardo Mansilla
Hi everyone.. My question is exactly as in the subject of This Mail. I have made a Python script which is to slow and i have heard (and common sense also suggest) that if you use some libraries to "frozen" the script the performance improves substantially. So I need to know; is This a myth or i

Re: Tweepy: Invalid arguments at function call (tweepy.Stream()) (Terry Reedy)

2011-10-31 Thread Ricardo Mansilla
way, i already have their IRC direction and i think it would be easier to find support there. Thanks again. Ricardo Mansilla ps: sometimes i get lazy about writing the whole link to a precise direction which lacks of importance in my point; please, don't judge me for my exquisite way of keep t

Tweepy: Invalid arguments at function call (tweepy.Stream())

2011-10-31 Thread Ricardo Mansilla
Hi i'm trying to fetch realtime data from twitter using tweepy.Stream(). So I have tried the following... After successfully authenticate using oauth: auth = tweepy.OAuthHandler(...) (it works fine, i have my access_token.key and secret) i did: streaming_api = tweepy.streaming.Stream(auth, Custom

Re: Motion Tracking with Python

2011-09-30 Thread Ricardo Mansilla
On Thursday 29 September 2011 21:16:52 you wrote: > Hello, > I have a neat Python project I'd like to share. It does real-time motion > tracking, using the Python bindings to the OpenCV library: > > http://derek.simkowiak.net/motion-tracking-with-python/ > > There is a YouTube video showing the s

Re: Python-list Digest, Vol 96, Issue 137

2011-09-24 Thread Ricardo Mansilla
On Saturday 24 September 2011 01:48:29 you wrote: > Ricardo wrote: > > Hi everyone > > I'm trying to use the cgi library to create a python script and loading > > it from a web page. I have already done the necessary imports, and the > > default commands to receive

can't load an script from html...

2011-09-23 Thread Ricardo
Hi everyone I'm trying to use the cgi library to create a python script and loading it from a web page. I have already done the necessary imports, and the default commands to receive data from "html" are written too. The final version is something like this: #!/usr/bin/python import subprocess

Building Python 2.5.6 on Ubuntu Natty

2011-07-12 Thread Ricardo Bánffy
[sharedmods] Error 1 when I do "make test" and Compiling /opt/python2.5/lib/python2.5/zipfile.py ... make: *** [libinstall] Error 1 when I do "make install" Any ideas? -- Ricardo Bánffy http://www.dieblinkenlights.com http://twitter.com/rbanffy -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to gain root privileges

2011-02-18 Thread Ricardo Aráoz
On 17/02/2011 06:46 p.m., Steven D'Aprano wrote: On Thu, 17 Feb 2011 19:44:20 +, Katie T wrote: Running any kind of script sudo'd is a bad idea, it's very very hard (in many cases impossible) to do securely. Root permissions in general should only be used for what they're needed for and not

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-14 Thread Ricardo Aráoz
On 14/07/2010 12:19 p.m., Kenneth Tilton wrote: Steven D'Aprano wrote: On Tue, 13 Jul 2010 23:24:12 -0400, Kenneth Tilton wrote: The moral? If you look for the spam, you'll find it. And if you *don't* look for spam, you can be sure that some goose will reply to it and get it past your filte

Re: I strongly dislike Python 3

2010-07-01 Thread Ricardo Aráoz
On 30/06/2010 01:23 p.m., Lie Ryan wrote: On 07/01/10 01:42, Michele Simionato wrote: On Jun 30, 2:52 pm, Lie Ryan wrote: On 06/27/10 11:24, Steven D'Aprano wrote: Producing print function takes a little bit more effort than producing a print statement. (1) The main use-cases for prin

Re: GUIs - A Modest Proposal

2010-06-14 Thread Ricardo Aráoz
On 14/06/2010 02:57 p.m., rantingrick wrote: On Jun 14, 11:17 am, Stephen Hansen wrote: And the recursive flow of the DOM is powerful This style of speaking reminds me of our former hillbilly president (no not Clinton, he was the eloquent hillbilly!) No i am referring to good old "Ge

Re: Sometimes the python shell cannot recognize the presence of an attribute.

2010-04-12 Thread Ricardo Aráoz
Aahz wrote: > In article , > Justin Park wrote: > >> The real problem is this. When I started working on the package, >> somehow all of indentations were made by space-bars instead of using >> tabs. But when I am implementing my own on top of it, I still use tabs >> to make indentations. >>

Re: "Usability, the Soul of Python"

2010-03-31 Thread Ricardo Aráoz
Lawrence D'Oliveiro wrote: > In message <20100331003241.47fa9...@vulcan.local>, Robert Fendt wrote: > > >> The braces are gone, and with them the holy wars. >> > > Let me start a new one. I would still put in some kind of explicit indicator > of the end of the grouping construct: > > c

Re: Classes as namespaces?

2010-03-26 Thread Ricardo Aráoz
Luis M. González wrote: > On 26 mar, 11:49, kj wrote: > >> What's the word on using "classes as namespaces"? E.g. >> >> class _cfg(object): >> spam = 1 >> jambon = 3 >> huevos = 2 >> >> breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos) >> > > I see no problem. > I wouldn't mix

Exception in pydoc

2010-02-26 Thread Ricardo Aráoz
I'm developing an in house app. Many coders here are not fluent in english, so docstrings must be in Spanish in spite of recommendations that docstrings better be in English. When I use accented characters (in this case an 'ó') in my docstrings I get : >>> help('OpMejoraBizobj') Traceback (most rec

Re: Your beloved python features

2010-02-10 Thread Ricardo Aráoz
Bruce C. Baker wrote: > "Terry Reedy" wrote in message > news:mailman.1929.1265328905.28905.python-l...@python.org... > >> Iterators, and in particular, generators. >> A killer feature. >> >> Terry Jan Reedy >> >> > > Neither unique to Python. > > And then're the other killer "features" s

Re: yet another list comprehension question

2009-05-05 Thread Ricardo Aráoz
namekuseijin wrote: > On May 4, 9:15 am, David Robinow wrote: > >> On Mon, May 4, 2009 at 2:33 AM, namekuseijin >> >> wrote: >> >> ls = [(1,2), (3,4), (5, None), (6,7), (8, None)] >> [(x,y) for (x,y) in ls if y] >> >>> [(1, 2), (3, 4), (6, 7)] >>> >> Nope.

PDB break

2009-04-24 Thread Ricardo Aráoz
where this condition may be set to true, and I might overlook some (and it would take an awful lot of time to identify them all). Is there a statement that allows me to stop execution when a condition is met regardless of where this happens? Thx. Ricardo. -- http://mail.python.org/mailman

Re: object knows which object called it?

2009-04-07 Thread Ricardo Aráoz
Reckoner wrote: >> hi, >> >> I have the following problem: I have two objects, say, A and B, which >> are both legitimate stand-alone objects with lives of their own. >> >> A contains B as a property, so I often do >> >> A.B.foo() >> >> the problem is that some functions inside of B actually need A

Re: python for loop

2009-04-01 Thread Ricardo Aráoz
Lada Kugis wrote: > On 01 Apr 2009 01:26:41 GMT, Steven D'Aprano > wrote: > > >> Why Python (and other languages) count from zero instead of one, and >> why half-open intervals are better than closed intervals: >> >> http://www.johndcook.com/blog/2008/06/26/why-computer-scientists-count-from-z

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

2009-01-22 Thread Ricardo Aráoz
Paul Rubin wrote: > Mark Wooding writes: > >> Some people (let's call them `type A programmers') have decided that >> they want to be assisted with writing correct programs... >> Other people (`type B programmers') don't like having their (apparently? >> possibly?) correct programs rejected

Formal specification and proof (was : Does Python really follow its philosophy of "Readability counts"?)

2009-01-22 Thread Ricardo Aráoz
Mark Wooding wrote: > Steven D'Aprano writes: > > > >> No it's not. It's *practical*. There are domains where *by law* code >> needs to meet all sorts of strict standards to prove safety and >> security, and Python *simply cannot meet those standards*. >> > > Codswallop. One can prove stu

Re: drive a desktop app from python?

2009-01-09 Thread Ricardo Aráoz
James Stroud wrote: > Tim Arnold wrote: >> Hi, I don't even know what to google for on this one. I need to drive >> a commercial desktop app (on windows xp) since the app doesn't have a >> batch interface. It's intended to analyze one file at a time and >> display a report. >> >> I can get the thi

Re: Snippets management

2008-11-07 Thread Ricardo Aráoz
Edwin B. wrote: > Robert Lehmann <[EMAIL PROTECTED]> writes: > >> I don't think there is a one-size-fits-all solution. > > I definetly agree. > >> Setting up a 'snippets' repository sounds good if you just want to be >> able to look back at what you've done and/or have a place to stash away >>

Re: a short-cut command for globals().clear() ??

2008-09-23 Thread Ricardo Aráoz
Terry Reedy wrote: > MRAB wrote: >> >> How about something like this: >> >> def clear_workspace(): >> keep_set = set(['__builtins__', '__doc__', '__name__', >> 'clear_workspace']) > > For 2.6/3.0, add __package__ to the list to be kept. > >> for x in globals().keys(): >> if x not

Re: Not fully OO ?

2008-09-22 Thread Ricardo Aráoz
Kay Schluehr wrote: > On 20 Sep., 23:07, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> > wrote: >> On Sep 20, 3:22 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: >> >> >> >>> On 20 Sep., 18:33, Bruno Desthuilliers >>> <[EMAIL PROTECTED]> wrote: The following definitions are AFAIK the only comm

Re: Can anyone suggest a good crypto package?

2008-09-10 Thread Ricardo Aráoz
Fett wrote: > On Sep 4, 2:23 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: >> On Sep 4, 1:39 pm, Fett <[EMAIL PROTECTED]> wrote: >> >> >> >>> I need a crypto package that works on windows with python 2.5. Can >>> anyone suggest one for me? >>> I have been searching for a couple days for a good crypt

Re: formating a filesystem with python

2008-09-10 Thread Ricardo Tiago
I understand that this is a very sensible unix question but i think fuse does this at least it mounts. I was wondering if there were other packages with similar functionality. On Wed, Sep 10, 2008 at 11:14 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Ricardo Tiago schrieb: >

formating a filesystem with python

2008-09-10 Thread Ricardo Tiago
Hi all, is there a package in python that allows to mount/umount and format (to ext3) a filesystem? I know that this is possible by just calling the os commands 'mount/umount and mkfs' but this would imply to have to change sudoers to run the script as non-root. Thanks Ric -- http://mail.python.o

Re: Read dbf file as read only

2008-08-26 Thread Ricardo Aráoz
ajak_yahoo wrote: Hi, How can I access a foxpro dbf file from my python program. I just want to read it as a read only file. Regards, Check Paul McNett's article in FoxTalk "Exploring Python from a Visual Foxpro Perspective" and check the code in : http://www.paulmcnett.com/vfp/09MCNES

Re: who to call a list of method inside the class itself

2008-08-20 Thread Ricardo Aráoz
Terry Reedy wrote: [EMAIL PROTECTED] wrote: Is the following code is ok. who to call all method. It is working but the call to m() without a reference to self seems strange The reference to self is bound to the methods by the way you look them up. class CustomMethod: def method1(self)

SSL

2008-06-21 Thread Ricardo Tiago
hrase. Thanks, Ricardo -- http://mail.python.org/mailman/listinfo/python-list

Re: Do this as a list comprehension?

2008-06-09 Thread Ricardo Aráoz
Mensanator wrote: On Jun 6, 1:40 pm, The Pythonista <[EMAIL PROTECTED]> wrote: On Thu, 05 Jun 2008 23:42:07 -0400, John Salerno wrote: Is it possible to write a list comprehension for this so as to produce a list of two-item tuples? base_scores = range(8, 19) score_costs = [0, 1, 1, 1, 1, 1, 1,

Re: python vs. grep

2008-05-13 Thread Ricardo Aráoz
Ville M. Vainio wrote: Ricardo Aráoz <[EMAIL PROTECTED]> writes: The easy/simple (too easy/simple?) way I see out of it is to read THE WHOLE file into memory and don't worry. But what if the file is too The easiest and simplest approach is often the best with Python. Keep forg

Re: python vs. grep

2008-05-12 Thread Ricardo Aráoz
Ville Vainio wrote: On May 8, 8:11 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: All these examples assume your regular expression will not span multiple lines, but this can easily be the case. How would you process the file with regular expressions that span multiple lines? re.f

Re: python vs. grep

2008-05-08 Thread Ricardo Aráoz
Anton Slesarev wrote: I try to save my time not cpu cycles) I've got file which I really need to parse: -rw-rw-r-- 1 xxx xxx 3381564736 May 7 09:29 bigfile That's my results: $ time grep "python" bigfile | wc -l 2470 real0m4.744s user0m2.441s sys 0m2.307s And python scrip

Re: SV: Where's GUI for Python?

2008-03-01 Thread Ricardo Aráoz
K Viltersten wrote: >>>import tkininter >>> >> When that fails, try without the stutter >> >> import tkinter > > > I must be doing something wrong because > neither tkinter nor tkininter works. > I tried both with and without stuttering. > I even asked my wife to stutter some but, > sadly, t

Re: Pb with 2.5.2 & PyScripter

2008-03-01 Thread Ricardo Aráoz
Méta-MCI (MVP) wrote: > Re! > > An exemple. With this script: > a=123 > b=456 > d=a+b+c > (note than 'c' is not defined). > > When I run, inside Pyscripter, the error-dialog is showed, and, one > second after, PyScripter is closed. > This problem is present since Python 2.5.2. > >

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread Ricardo Aráoz
zaley wrote: > On 2月25日, 上午10时35分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: >> zaley wrote: >>>>> So I hope I can find something helpful in open source IDE for python. >>>> Exactly so. PyScripter does it easy, besides you can have in different ...

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread Ricardo Aráoz
zaley wrote: >>> So I hope I can find something helpful in open source IDE for python. >> Exactly so. PyScripter does it easy, besides you can have in different >> tabs all the modules of your application. You just hit the run button >> and your program runs, you hit the debug button and you start

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread Ricardo Aráoz
zaley wrote: > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: >> Lie wrote: >>> On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: >>>> On Feb 22, 11:06 pm, "Jesper" wrote: >>>>> Give PyScripter fromhttp://www.mm

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-23 Thread Ricardo Aráoz
Lie wrote: > On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: >> On Feb 22, 11:06 pm, "Jesper" wrote: >> >> >> >>> Give PyScripter fromhttp://www.mmm-experts.com/atry >>> It is for Windows, though it is written in Delphi and not in C/C++ >>> /Jesper >>> "zaley" <[EMAIL PROTECTED]> skrev i en m

Re: ILeo (IPython-Leo bridge); a marriage made in heaven?

2008-02-23 Thread Ricardo Aráoz
Edward K Ream wrote: >> Here is something cool that will rock your world (ok, excuse the slight >> hyperbole): > > Many thanks for this posting, Ville. It is indeed very cool: > > - It shows how Leo can be used *now* as an IPython notebook. > > - It expands the notion of what is possible with

Re: The big shots

2008-02-23 Thread Ricardo Aráoz
Dotan Cohen wrote: > On 20/02/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> It's a bad sign. If you aren't keeping your thoughts to yourself, and >> thrashing about the world for a peer, a social network, a support >> group, or a community, then you missed the day in grammar school when

Re: Coverage.py reporting and UML tools - what exists already?

2008-02-13 Thread Ricardo Aráoz
J Peyret wrote: > I got coverage.py to work after somewhat of a difficult start... > > Hint: if moving your code from Windows to Linux and if running > 'coverage.py -r mymodule.py' causes SyntaxError/SyntaxException, the > 'flip' utility is your friend to deal with removing those nasty \r\n > new

Re: REALLY simple xml reader

2008-01-31 Thread Ricardo Aráoz
Diez B. Roggisch wrote: > Ricardo Aráoz schrieb: >> Diez B. Roggisch wrote: >>> Ricardo Aráoz schrieb: >>>> Thanks Ivan, it seems a elegant API, and easy to use. >>>> I tried to play a little with it but unfortunately could not get it off &g

Re: REALLY simple xml reader

2008-01-31 Thread Ricardo Aráoz
Diez B. Roggisch wrote: > Ricardo Aráoz schrieb: >> Thanks Ivan, it seems a elegant API, and easy to use. >> I tried to play a little with it but unfortunately could not get it off >> the ground. I kept getting >>>>> root = et.fromstring(doc) >> Tr

Re: REALLY simple xml reader

2008-01-31 Thread Ricardo Aráoz
Ivan Illarionov wrote: from xml.etree import ElementTree as et from decimal import Decimal root = et.parse('file/with/your.xml') debits = dict((debit.attrib['category'], Decimal(debit.find('amount').text)) for debit in root.findall('debit')) for cat, amount

Re: REALLY simple xml reader

2008-01-29 Thread Ricardo Aráoz
> What about : > > doc = """ > >99 > > >42 > > """ That's not an XML document, so what about it? Stefan -- Ok Stefan, I will pretend it was meant in good will. I don't know zit about xml, but I might need to, and I am saving the thread fo

Re: REALLY simple xml reader

2008-01-29 Thread Ricardo Aráoz
Diez B. Roggisch wrote: > Simon Pickles schrieb: >> Hi >> >> Can anyone suggest a really simple XML reader for python? I just want to >> be able to do something like this: >> >> xmlDoc = xml.open("file.xml") >> element = xmlDoc.GetElement("foo/bar") >> >> ... to read the value of: >> >> >> 42 >

Re: split parameter line with quotes

2008-01-14 Thread Ricardo Aráoz
teddyber wrote: > here's the solution i have for the moment : > > t = shlex.shlex(data) > t.wordchars = t.wordchars + "/+.-" > r='' > while 1: > token = t.get_token() > if not token: > break > if not token==',': r = r+token >

Re: how to generate html table from "table" data?

2007-12-27 Thread Ricardo Aráoz
Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > Vasudev Ram wrote: >>> Why not try writing your own code for this first? >>> If nothing else, it'll help you learn more, and may also help you >>> understand better, the other options. >>> >> Thanks for your reply even it was not really

Re: very newbie question about exception handling

2007-12-24 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > code sample: > -- > i=input() > try: > x=int(i) > print "you input an integer" > except ValueError: > print "you must input an integer" > > when I input a value like,

Re: Yet Another Tabular Data Question

2007-11-30 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > On Nov 29, 5:46 pm, [EMAIL PROTECTED] wrote: >> Hi all, >> >> Fairly new Python guy here. I am having a lot of trouble trying to >> figure this out. I have some data on some regulations in Excel and I >> need to basically add up the total regulations for each country--a

Re: better way to write this function

2007-11-26 Thread Ricardo Aráoz
Peter Otten wrote: > Kelie wrote: > >> Hello, >> >> This function does I what I want. But I'm wondering if there is an >> easier/better way. To be honest, I don't have a good understanding of >> what "pythonic" means yet. >> >> def divide_list(lst, n): >> """Divide a list into a number of list

Re: Problems with if/elif statement syntax

2007-11-23 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > On Nov 22, 12:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> On 22 Nov, 12:09, Neil Webster <[EMAIL PROTECTED]> wrote: >> >> >> >>> Hi all, >>> I'm sure I'm doing something wrong but after lots of searching and >>> reading I can't work it out and was wondering i

Re: Populating a dictionary, fast

2007-11-11 Thread Ricardo Aráoz
Michael Bacarella wrote: >>> This would seem to implicate the line id2name[id] = name as being > excruciatingly slow. >> As others have pointed out there is no way that this takes 45 >> minutes.Must be something with your system or setup. >> >> A functionally equivalent code for me runs in about 4

Re: Need some help...

2007-11-02 Thread Ricardo Aráoz
Gabriel Genellina wrote: > En Thu, 01 Nov 2007 20:12:52 -0300, Ricardo Aráoz <[EMAIL PROTECTED]> > escribió: > >>>>>>> def sumToOneDigit(num) : >>>>if num < 10 : >>>>return num >>>>else : >&g

Re: Need some help...

2007-11-01 Thread Ricardo Aráoz
Boris Borcic wrote: > Ricardo Aráoz wrote: >> Boris Borcic wrote: >>> [EMAIL PROTECTED] wrote: >>>> I want to create a program that I type in a word. >>>> >>>> for example... >>>> >>>> chaos >>>> >>>

Re: appending into a list

2007-10-31 Thread Ricardo Aráoz
Beema shafreen wrote: > hi everybody, > I have a file : >A B C D E > > 2717353 2717412A_16_P03641964214-59 > 2717626 2717685A_16_P4156365525-59 > 2717710 2717754

Re: Need some help...

2007-10-31 Thread Ricardo Aráoz
Boris Borcic wrote: > [EMAIL PROTECTED] wrote: >> I want to create a program that I type in a word. >> >> for example... >> >> chaos >> >> each letter equals a number >> >> A=1 >> B=20 >> >> and so on. >> >> So Chaos would be >> >> C=13 H=4 A=1 O=7 S=5 >> >> I want to then have those numbers >

Re: dictionary and list

2007-10-31 Thread Ricardo Aráoz
Beema shafreen wrote: > hi everbody, >I have a file, > a b c d e > 2722316 2722360A_16_P03641972150-44 > 2722510 2722554A_16_P2136023916-44 > 2722570 2722614A_16_P03

Re: two files into an alternate list

2007-10-31 Thread Ricardo Aráoz
Tim Chase wrote: >> i have a file : >> file 1: >> 1 >> 2 >> 3 >> 4 >> 5 >> 6 >> >> file2: >> a >> b >> c >> d >> e >> f >> how do i make the two files into list like this = >> [1,a,2,b,3,c,4,d,5,e,6,f] > > from itertools import cycle > def serialize(*sources): > while True: >

Re: Using msvcrt (in Windows), how to catch Enter key?

2007-10-29 Thread Ricardo Aráoz
Dick Moores wrote: > Windows XP Pro, Python 2.5.1 > > import msvcrt > while True: > if msvcrt.kbhit(): > key = msvcrt.getch() > if key == 'Enter' >do something > > Is there a way to catch the pressing of the 'Enter' key? > > Thanks, > > Dick Moores > You have ex

Re: sorting data

2007-10-29 Thread Ricardo Aráoz
Beema shafreen wrote: > hi all, >I have problem to sort the data.. the file includes data as > follow. > file: > chrX:123343123123343182A_16_P41787782 > chrX:123343417123343476A_16_P03762840 > chrX:123343460123343519A_16_P41787783 > chrX:12334336

Re: Really basic problem

2007-10-10 Thread Ricardo Aráoz
tomamil wrote: > i know this example is stupid and useless, but that's not the answer > to my question. > here it goes: > > status = 0.0 > for i in range(10): >status = status + 0.1 > >if status == 0.1: >print status >elif status == 0.2: >print status >elif status

Re: How to create a file on users XP desktop

2007-10-07 Thread Ricardo Aráoz
Matimus wrote: > On Oct 6, 8:31 pm, goldtech <[EMAIL PROTECTED]> wrote: >> Can anyone link me or explain the following: >> >> I open a file in a python script. I want the new file's location to be >> on the user's desktop in a Windows XP environment. fileHandle = open >> (., 'w' ) what I gues

Re: [Tutor] Top Programming Languages of 2013

2007-10-07 Thread Ricardo Aráoz
Alan Gauld wrote: > "Dick Moores" <[EMAIL PROTECTED]> wrote > >> >> > > Interesting, but I'm not sure what the criteria for "top" is. > Is it a measure of power, popularity, usage? > > Scary that HTML/CSS should be so high though > given its not a

Re: Convert on uppercase unaccentent unicode character

2007-10-05 Thread Ricardo Aráoz
Wildemar Wildenburger wrote: > Steve Holden wrote: >> Malheureusement, I see that absence of accented capitals is a modern >> phenomenon that is regarded as an impediment to the language mostly >> stemming from laziness of individual authors and inadequacy of low-end >> typesetting software. I h

Re: readline() - problem

2007-10-02 Thread Ricardo Aráoz
Paul Hankin wrote: > On Oct 2, 12:25 pm, [EMAIL PROTECTED] wrote: >> Hi! >> I'm a new user of python, and have problem. >> I have a plain ascii file: >> 11..1 >> 12..1 >> 11..1 >> I want to create a new file which contains only lines with '1' on 15th

Re: Can you please give me some advice?

2007-09-30 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: >> Hello World in Ruby (and a few other >> languages):http://www.oreillynet.com/ruby/blog/2005/12/hello_world.html > >> Hello World in >> Python:http://python.about.com/od/gettingstarted/ss/helloworld.htm > > I know nothing of Ruby, but just the fact that in Ruby the He

Re: Delete values from a string using the index

2007-09-26 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do > that? > > Thanks. > If you want to do it all at once : del a[1:4:2] -- http://mail.python.org/mailman/listinfo/pyth

Re: Delete values from a string using the index

2007-09-26 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: > How do I delete or remove values from a list or string using the > index. > > If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do > that? > > Thanks. > del a[1] del a[-5] -- http://mail.python.org/mailman/listinfo/python-list

Re: scope, modyfing outside object from inside the method

2007-09-24 Thread Ricardo Aráoz
Marcin Stępnicki wrote: > Hello. > > I thought I understand this, but apparently I don't :(. I'm missing > something very basic and fundamental here, so redirecting me to the > related documentation is welcomed as well as providing working code :). > > Trivial example which works as expected: >

Counting method calls

2007-09-21 Thread Ricardo Aráoz
Hi, I know I'm being dumb but, why does it not work? >>> class MyList(list): ... def __init__(self): ... self.calls = 0 ... def __getattr__(self, name): ... self.calls += 1 ... return list.__getattribute__(self, name) >>> a = MyList() >>> a [] >>> a.append(1) >>> a

Re: re question

2007-09-20 Thread Ricardo Aráoz
Dan Bar Dov wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4 , 254.10.0.0 , but not > 324.1.1.1, nor 010.10.10.1 ) > > This is what I come up with, and it does not work. >

Pseudo-Private Class Attributes

2007-09-18 Thread Ricardo Aráoz
That is self.__attributes Been reading about the reasons to introduce them and am a little concerned. As far as I understand it if you have a class that inherits from two other classes which have both the same name for an attribute then you will have a name clash because all instance attributes "w

Re: Python 3K or Python 2.9?

2007-09-14 Thread Ricardo Aráoz
Bruno Desthuilliers wrote: > TheFlyingDutchman a écrit : >> Well I'm with Bruce Eckel - there shouldn't be any argument for the >> object in the class method parameter list. > > def fun(obj, *args, **kw): ># generic code here that do something with obj > > import some_module > some_module.Som

  1   2   >