Re: unicode issue

2009-10-01 Thread Hyuga
On Sep 30, 3:34 am, gentlestone wrote: > Why don't work this code on Python 2.6? Or how can I do this job? > > _MAP = { >     # LATIN >     u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', > u'Æ': 'AE', u'Ç':'C', >     u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E', u'Ì': 'I', u'Í': '

Re: easy question, how to double a variable

2009-09-22 Thread Hyuga
On Sep 22, 9:57 am, Grant Edwards wrote: > On 2009-09-22, Mel wrote: > > > Tim Roberts wrote: > > >> daggerdvm wrote: > > >>>carl banks.you are a dork > > >> What are you, eleven years old? > > >> Look, you asked us to answer for you what is CLEARLY a homework question. > >> It is unethi

Re: OK to memoize re objects?

2009-09-22 Thread Hyuga
On Sep 21, 11:02 am, Nobody wrote: > On Mon, 21 Sep 2009 07:11:36 -0700, Ethan Furman wrote: > > Looking in the code for re in 2.5: > > _MAXCACHE = 100 > > On the other hand, I (a > > re novice, to be sure) have only used between two to five in any one > > program... it'll be a while before I hit

Re: An assessment of the Unicode standard

2009-09-15 Thread Hyuga
On Sep 14, 5:05 am, Christopher Culver wrote: > Hyuga writes: > > I just wanted to add, in defense of the Chinese written language > > ... that I think it would make a fairly good candidate for use at > > least as a universal *written* language.  Particularly simplified &g

Re: An assessment of the Unicode standard

2009-09-01 Thread Hyuga
On Aug 29, 8:20 pm, John Machin wrote: > On Aug 30, 8:46 am, r wrote: > > > > > Take for instance the Chinese language with it's thousands of > > characters and BS, it's more of an art than a language.  Why do we > > need such complicated languages in this day and time. Many languages > > have be

Re: are user defined classes hashable?

2009-07-21 Thread Hyuga
On Jul 20, 10:53 pm, a...@pythoncraft.com (Aahz) wrote: > In article <373d6c69-6965-4a88-bdd2-8028ef850...@k6g2000yqn.googlegroups.com>, > > Hyuga   wrote: > > >Regardless, Nicolas's example can be applied to the class too: > > >>>> class Foo(obje

Re: are user defined classes hashable?

2009-07-20 Thread Hyuga
On Jul 19, 11:39 am, Nicolas Dandrimont wrote: > * Alan G Isaac [2009-07-19 14:46:12 +]: > > > Again, my question is about the class not its instances, > > but still, checking as you suggest gives the same answer. > > That's what I get for answering before my coffee! Regardless, Nicolas's ex

Re: Perl's @foo[3,7,1,-1] ?

2009-06-18 Thread Hyuga
On Jun 13, 6:22 pm, Brian Quinlan wrote: > MRAB wrote: > > Brian Quinlan wrote: > >> kj wrote: > >>> In Nick Craig-Wood > >>> writes: > > However I can't think of the last time I wanted to do this - array > elements having individual purposes are usually a sign that you should > b

Re: matplotlib - overlaying plots.

2009-05-14 Thread Hyuga
On May 14, 7:41 am, Ant wrote: > Hi All, > > I am trying to get matplotlib to overlay a couple of graphs, but am > getting nowhere. I originally thought that the following may work: > > >>> x = [1,2,3,4,5] > >>> y = [2,4,6,8,10] > >>> y2 = [1,4,9,16,25] > >>> plot(x, y) > >>> plot(x, y2) > > Now t

Re: need to start a new project , can python do all that ?

2009-04-17 Thread Hyuga
On Apr 15, 10:54 am, Deep_Feelings wrote: > On Apr 15, 4:05 pm, Tim Rowe wrote: > > > > > 2009/4/15 Deep_Feelings : > > > > I want to start programming a new program (electronic health care > > > center) in python and before start learning python i wanna make sure > > > that python does have all

Re: Guidance on writing a top-like console

2009-03-16 Thread Hyuga
On Feb 27, 6:08 pm, ntwrkd wrote: > I am interested in writing an application that functions like a Unix > or Linux top in the way it displays data. > It should be command-line based but dynamically refreshing. > > I'm not sure what I should take into account or how I might go about > implementing

Re: setup.py install and bdist_egg

2009-03-16 Thread Hyuga
On Mar 13, 4:41 pm, Jasiu wrote: > Hey, > > I work at a company where I'm lucky enough to write web apps using > Python and WSGI :). We develop more and more stuff in Python and it's > becoming a mess of dependencies, so we thought we would create a > guideline for developers that describes the wh

Re: Will multithreading make python less popular?

2009-02-17 Thread Hyuga
On Feb 16, 4:34 am, rushen...@gmail.com wrote: > Hi everybody, > I am an engineer. I am trying to improve my software development > abilities. I have started programming with ruby. I like it very much > but i want to add something more. According to my previous research i > have designed a learning

Re: I always wonder ...

2008-12-29 Thread Hyuga
On Dec 22, 1:51 pm, Grant Edwards wrote: > On 2008-12-22, s...@pobox.com wrote: > > > ... shouldn't people who spend all their time trolling be > > doing something else: studying, working, writing patches which > > solve the problems they perceive to exist in the troll > > subject? > > I think yo

Re: Python 3 __cmp__ semantic change?

2008-11-21 Thread Hyuga
On Nov 21, 4:09 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Johannes Bauer <[EMAIL PROTECTED]> wrote: > > Seems it was removed on purpose - I'm sure there was a good reason for > > that, but may I ask why? Instead of the sleek __cmp__ function I had > > earlier, I now have code like: > > > def __

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Hyuga
On Jul 30, 3:53 am, "Russ P." <[EMAIL PROTECTED]> wrote: > Fair enough. I have no dog in this particular fight. I just think it > wouldn't hurt to add an "isempty()" or "isnonempty()" method to the > list type, and let people use it if they wish, or continue using "if > x" if that's what they prefe

Re: regarding SWIG

2008-07-22 Thread Hyuga
On Jul 22, 5:34 am, Anish Chapagain <[EMAIL PROTECTED]> wrote: > Hi.. > I'm new to SWIG and need to create Wrapper for C code, > so, I have installed the SWIG already but doesnot know how to run it > for generating Interface file... > My C code is in message.c so what do i need to do the first > st

Re: Iterate creating variables?

2008-06-16 Thread Hyuga
On Jun 13, 11:34 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > > Sent: Friday, June 13, 2008 11:11 AM > > To: [EMAIL PROTECTED] > > Subject: Iterate creating variable

Re: Setting Focus

2008-06-13 Thread Hyuga
On Jun 13, 9:34 am, Hyuga <[EMAIL PROTECTED]> wrote: > On Jun 12, 11:04 pm, Gandalf <[EMAIL PROTECTED]> wrote: > > > You know these application like ICQ or winamp which stay at the front > > of the desktop as long as the user doesn't minimize it. I wont to do

Re: Setting Focus

2008-06-13 Thread Hyuga
On Jun 12, 11:04 pm, Gandalf <[EMAIL PROTECTED]> wrote: > You know these application like ICQ or winamp which stay at the front > of the desktop as long as the user doesn't minimize it. I wont to do > the same with my application in python. > I still didn't manage to make pywinauto to auto set my

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Hyuga
On May 9, 5:10 am, [EMAIL PROTECTED] wrote: > I have a dictionary of which i'm itervalues'ing through, and i'll be > performing some logic on a particular iteration when a condition is > met with trusty .startswith('foo'). I need to grab the previous > iteration if this condition is met. I can do

Re: first time use of swig, python and c++ .. it's a mess ... please advice

2008-02-27 Thread Hyuga
tion) > error: command 'gcc' failed with exit status 1 > " > > and that's it. > > Any idea what I am doing wrong? > > Any help much appreciated > > Kris Well, the errors you got from the compiler are just confusing to me, but I suspect it goes back to the warning you got from SWIG. Some class in there is overriding the = operator, but since that can't be done in Python, you need to give it some special instructions on how to handle that. For example, if you have Foo::operator=, in your SWIG header include a line like: %rename(assign) Foo::operator= Then in the Python module, the Foo class will have an assign method. Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: Double underscores -- ugly?

2008-02-19 Thread Hyuga
mainfunc(): >... > I'd much rather type a few underscores than have to constantly use decorators. I don't see what's so ugly about __init__. To me it just looks like it's underscored, though maybe that comes from having worked with a lot of wikis. But I really don't find it an encumbrance, and the fact that it requires no special handling from the parser is just part of the beautiful simplicity of Python. Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: re question

2008-02-08 Thread Hyuga
precisely that. Just to be pedantic so that no one else who might read this does not get confused, re.search() does not "[have] a function groupdict()". re.search(), like many function in the re module returns a match object. Match objects have a groupdict() method. Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: How to autorun a python script when a specific user logs on?

2008-02-05 Thread Hyuga
You know, I'm all for responsible parenting, and teaching kids about about responsible computer use, and even to an extent checking out things like browser history to make sure they're up to no good. But this is outright spying--a total invasion of privacy. Might as well put a hidden web cam in t

Re: Help with Scons

2008-01-11 Thread Hyuga
o clear on what you're asking though. SCons scripts are written in Python (as is SCons itself)... Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: Help needed

2008-01-11 Thread Hyuga
imeit module (http:// docs.python.org/lib/module-timeit.html) but I'm not really sure how you're defining "performance". I mean, I can already tell you that overall UDP will be "faster", as it has much less overhead. Surely your course has covered this... Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: help parsing ipv6 addresses and subnets

2007-11-08 Thread Hyuga
mp;term=ipv6 > &submit=search And even if you do end up doing the IPv6 parsing yourself (which you shouldn't), regular expressions would be the wrong approach--there's no way an RE can deal with replacing a :: with the correct number of zeroes, among other complications. Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: python project ideas

2007-10-25 Thread Hyuga
On Oct 25, 12:09 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi to everyone > I wondered if this might be the right place to ask for some ideas for > python project for university. > I'd like it to be something useful and web-based. And the project must > be complete in 2-3 months by 2-3 p

Re: Pull Last 3 Months

2007-10-18 Thread Hyuga
4) > ['Ene', 'Dic', 'Nov', 'Oct'] > py> prev_months(datetime.datetime(2005,10,17), 3) > ['Sep', 'Ago', 'Jul'] Ah, you beat me to it. I was going to point out that if you're going to be using month strings, you s

Re: Python module for making Quicktime or mpeg movies from images

2007-10-15 Thread Hyuga
On Oct 12, 3:53 pm, jeremito <[EMAIL PROTECTED]> wrote: > > NodeBox; nodebox.org > > > GUI application that creates either PDFs or Quicktime vids from python > > code. Unix/Linux/MacOS. > > I actually found NodeBox in my googling. This seems to be a stand > alone application. I need to be able to

Re: Howto Launch a windows application ?

2007-10-08 Thread Hyuga
ould also point out how unnecessary all those 'cmd.append's are. You can initialize the list all at once simply like so: cmd =['D:\\PIC-tools\\JALxxx\\jalv2_3.exe', '-long-start', '-d', '-clear', '-sD:\\PIC-tools\\JAL

Re: Asking all python programmers.

2007-08-30 Thread Hyuga
On Aug 29, 11:09 am, "sjpiii" <[EMAIL PROTECTED]> wrote: > You mean use correct spelling and grammar? But what about all the time > we've spent creating cutesy little non-words like "l8er?" > > Actually, I'm less tolerant of those than of normal spelling and grammar > errors because of the number

Re: self extracting zipefile (windows) and (standard module) zipefile

2007-08-29 Thread Hyuga
First of all, there's really no such thing as a "self extracting zipefile". I mean, obviously you have to do something to unzip it. A file doesn't just execute itself. What you're dealing with is not a _zip file_. It's an executable that has a zip file bundled with it, and the code to unzip it,

Re: How to optimise this code?

2007-08-22 Thread Hyuga
. > > This leaves me with 'functionToCall = getattr(self, "testCase%s" % tc)'. > This achieves the optimisation/simplification I had been looking for. > > Thank you once again. Just out of curiosity, what about your environment prevents you from using unittest? Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: Symbolic Link

2007-08-20 Thread Hyuga
. Place a file called .htaccess in the "browser friendly area" and place in it the line: Options +FollowSymLinks Assuming your hosting service will allow that, then it should work. If not, then why not just copy the image files? Storage is cheap these days. Hyuga -- http://mail.py

Re: i am new to python-Please somebody help

2007-08-02 Thread Hyuga
On Aug 2, 8:51 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 02 Aug 2007 09:31:43 +, cool.vimalsmail wrote: > > [snip] > > You would be better off actually writing a sensible subject line instead > of grovelling. > > Subject: How to use gzip in Python? [beginner] > > Then, having wri

Re: sqlite3 bug??

2007-06-18 Thread Hyuga
On Jun 18, 11:01 am, Hyuga <[EMAIL PROTECTED]> wrote: > In fact, I have code in which references to a > db connection are passed around, so I have to be careful about > explicitly closing the connection, lest it be in use by some other > method somewhere. > Hate to reply to

Re: sqlite3 bug??

2007-06-18 Thread Hyuga
be in use by some other method somewhere. Maybe people will frown on this, but it's not uncommon. Hyuga -- http://mail.python.org/mailman/listinfo/python-list

Re: otsu threshold in python

2007-06-06 Thread Hyuga
I've tried it myself in Python, and it seems give good results. > I didn't hear about, but I used it through the ImageJ tool. It gave me > optimal results. I'm working on a project for my clases, and the last > thing I need to accomplish my goal is this filter. Is there anyon

Re: otsu threshold in python

2007-06-05 Thread Hyuga
tly* why it works, but it's understandable enough from that that I can see that it should work, and to see how to implement it. Not to mention that the above PDF basically *gives* you the implementation for free (just make sure not to miss the recurrence relations at the end of the sectio