Re: I hate you all

2013-04-05 Thread Michael Torrie
On 04/05/2013 11:53 PM, Ian Kelly wrote: >> The new rules may look flexible at first sight, but the net effect they have >> is they push me to use non-default tab size (which is not good), > > What makes that not good? There is no law anywhere that says tabs are > 8 characters. That's just an ar

Re: I hate you all

2013-04-05 Thread Michael Torrie
On 04/05/2013 11:28 PM, Benjamin Kaplan wrote: > http://www.xkcd.com/1172/ How did I ever miss this before? That is truly awesome. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python module vs library

2013-04-09 Thread Michael Torrie
On 04/09/2013 03:58 AM, [email protected] wrote: > Hi, what is the difference between python module and library ? "library" doesn't really mean anything specifically to Python's interpreter. It's not a valid keyword and is only used by humans to describe the abstract function and nature of a

Re: Python module vs library

2013-04-09 Thread Michael Torrie
On 04/09/2013 08:29 AM, rusi wrote: > I guess Michael meant "...module or package." > Else the next question is going to be "Can you explain recursion in > python?" :-) You're right. On both counts. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: performance of script to write very long lines of random chars

2013-04-10 Thread Michael Torrie
On 04/10/2013 07:21 PM, gry wrote: > from sys import stdout > from array import array > import random > nchars = 3200 > rows = 10 > avail_chrs = > '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%& > \'()*+,-./:;<=>?@[\\]^_`{}' > a = array('c', 'X' * nchars) > > for l in ran

Re: People in the python community [was Re: Unicode issue with Python v3.3]

2013-04-11 Thread Michael Torrie
On 04/10/2013 10:50 AM, Νίκος Γκρ33κ wrote: > I'am not sure i follow you. How did my topic changed?! Is this > possible? This is a mailing list/nntp newsgroup. The subject line can be changed arbitrarily by anyone replying to another message. Normally this is done to indicate a natural progressi

Re: Message passing syntax for objects | OOPv2

2013-04-13 Thread Michael Torrie
On 04/13/2013 12:28 AM, Mark Janssen wrote: >> Mark, this proposal is out of place on a Python list, because it proposes an >> object methodology radically different from any that is implemented in >> Python now, or is even remotely likely to be implemented in Python in the >> future. > > Wow, you

Re: Process tuple contents on the fly

2013-04-15 Thread Michael Torrie
On 04/15/2013 02:35 PM, Tobiah wrote: > On 04/15/2013 11:25 AM, Gnarlodious wrote: >> Say I have a tuple I want to expand assigning to variables: >> >> tup = *func() > > What is the asterisk for? I assume it's a python 3 > thing, because I get a syntax error, but I'm having > trouble Googling it.

Re: Calling python script in dos and passing arguments

2013-04-16 Thread Michael Torrie
On 04/16/2013 08:14 AM, PEnergy wrote: > Greetings, > > I am trying to write a python script that, when called from the DOS > prompt, will call another python script and pass it input variables. > My current code will open the other python script but doesn't seem to > pass it any values: > > impo

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Michael Torrie
On 04/16/2013 04:38 PM, Mark Janssen wrote: > (Note this contrasts starkly with Java(script), which doesn't seem > to be based on anything -- can anyone clarify where Java actually > comes from?) Java is not equal in any way with JavaScript. The only thing they share are semicolons and braces.

Re: ask for note keeper tomboy's style

2013-04-21 Thread Michael Torrie
On 04/21/2013 12:20 AM, LordMax wrote: > Hi to all. > > I am new to python and I was asked to implement a system of notes in > tomboy's style for my company. > > As one of the requirements is the ability to synchronize notes > between multiple PC (program level or through cloud-folder does not >

Re: help..

2013-05-02 Thread Michael Herman
the problem is in your code: http://screencast.com/t/haF1NY5RvpMv On Thu, May 2, 2013 at 7:30 AM, Robert Kern wrote: > > On 2013-05-02 15:20, leonardo wrote: >> >> on codecademy there is an interactive box where you type your code, it is a >> kind of exercise program to practice. but i don't u

Re: Libroffice PMT equivalent in python

2013-05-04 Thread Michael Marshall
On Thursday, April 25, 2013 6:46:01 AM UTC-4, ஆமாச்சு wrote: > Hi, > > > > Are there equivalent in any Python libraries that could match function > > like PMT in libreoffice? > > > > Refer: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two#PMT > > > > -- > > > > Amachu Th

Re: Libroffice PMT equivalent in python

2013-05-04 Thread Michael Marshall
On Saturday, May 4, 2013 11:37:17 PM UTC-4, Michael Marshall wrote: > On Thursday, April 25, 2013 6:46:01 AM UTC-4, ஆமாச்சு wrote: > If the number of periods have a fractional part such as 10.5 years of 119.25 > months then besides the initial periodic payment, there may be 4 differen

Re: Libroffice PMT equivalent in python

2013-05-04 Thread Michael Marshall
On Saturday, May 4, 2013 11:37:17 PM UTC-4, Michael Marshall wrote: > 4) Partial period payment > > But then if the NPER has a fraction, you may still opt to pay or collect the > payment at the actual time period but the amount you pay is the fraction of > time period time

Using XML w/ Python...

2005-12-11 Thread Michael Williams
If you just want to get into it and use it, I'd recommend the following: http://uche.ogbuji.net/uche.ogbuji.net/tech/4suite/amara/It requires the installation of the 4Suite module as well, but it's well worth it.  I uses data binding techniques to convert your document into a large tree of named XM

Re: JOB: Telecommute Python Programmer - IMMEDIATE NEED

2005-12-12 Thread Michael Bernstein
more, and based on my experience today I cannot recommend doing business with Mr. Gould or Superior Staffing Services. - Michael R. Bernstein michaelbernstein.com Author of Zope Bible -- http://mail.python.org/mailman/listinfo/python-list

Re: Pattern matching with string and list

2005-12-12 Thread Michael Spencer
return re_pattern.search(sentence) ... >>> if matching(patterns, sentence): print "Match" ... Match >>> Finally, if you are going to be doing a lot of these it would be faster to take the pattern compilation out of the function, and simply use the pre-compiled r

Re: newbie: generate a function based on an expression

2005-12-12 Thread Michael Spencer
y ... >>> myenv = {'A': 3.0, 'off': -0.5, 'Max': 2.0, 'Min': -2.0} >>> fun1 = getFun(fun, myenv) >>> fun1(0) -0.5 >>> fun1(0.5) 1.0 >>> fun1(-10) -2.0 >>> fun1(10) 2.0 HTH Michael -- http://mail.python.org/mailman/listinfo/python-list

PyQt on Mac OS X

2005-12-13 Thread Michael McGarry
Hi, I am using the default Python installation that comes with Mac OS X Tiger. I want to use the Qt module. How can I install the Qt module? Qt is already installed. Michael -- http://mail.python.org/mailman/listinfo/python-list

Bad marshal data

2005-12-13 Thread Michael McGarry
thought the whole point of using Python and similar cross platform scripting languages to write once run everywhere, does that not hold for data too? Marshal should save the data in a readable text format, but I guess it does not. Any help would be appreciated, Michael -- http://mail.python.org

Re: PyQt on Mac OS X

2005-12-13 Thread Michael McGarry
Thanks, that worked. -- http://mail.python.org/mailman/listinfo/python-list

PyQt not working well on Mac OS X

2005-12-13 Thread Michael McGarry
Hi, I am running a Python/Qt app I developed that runs flawlessly in Linux on my Mac. It is unfortunate not running properly on the Mac OS X. The window will not come into focus and is grayed out. Does anyone have any ideas? Thanks, Michael -- http://mail.python.org/mailman/listinfo/python

Re: newbie: generate a function based on an expression

2005-12-13 Thread Michael Spencer
Bengt Richter wrote: > On 12 Dec 2005 21:38:23 -0800, "Jacob Rael" <[EMAIL PROTECTED]> wrote: > >> Hello, >> >> I would like write a function that I can pass an expression and a >> dictionary with values. The function would return a function that >> evaluates the expression on an input. For exampl

Re: Newbie needs help with regex strings

2005-12-14 Thread Michael Spencer
* field is quoted: >>> csv.reader(["Pie=peach,quantity=2,'ingredients=peaches,powdered sugar'"], quotechar = "'").next() ['Pie=peach', 'quantity=2', 'ingredients=peaches,powdered sugar'] >>> or the separato

Re: Newbie needs help with regex strings

2005-12-14 Thread Michael Spencer
and sugar' ... """ >>> >>> [eval("dict(%s)" % line, d) for line in source.splitlines()] [{'cooked': 'yes', 'ingredients': 'sugar and cinnamon', 'pie': 'apple', 'quantity': 1}, {'ingredients': 'peaches,powdered sugar', 'Pie': 'peach', 'quantity': 2}, {'cooked': 'no', 'price': 5, 'ingredients': 'cherries and sugar', 'Pie': 'cherry', 'quantity': 3}] >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Bad marshal data

2005-12-14 Thread Michael McGarry
Pickle is working well for me. I do not need speed or small file size. Flexibility is more important for me. If speed was important I would write the app in C. -- http://mail.python.org/mailman/listinfo/python-list

Python on GP2X (Linux Based Handheld Console)

2005-12-15 Thread Michael Sparks
u.co.uk/python.shtml Link for device: http://www.gp2x.com/product/product.asp Just thought I'd post about this, since I thought someone might find it useful :) Michael. -- [EMAIL PROTECTED], http://kamaelia.sourceforge.net/ British Broadcasting Corporation, Research and Development King

Re: Parser or regex ?

2005-12-16 Thread Michael Spencer
gt; With this set up, you can parse in one line! >>> eval(source, globals(), d) (('arg1', 'arg 2', 'arg 3'), {'default': ['val1', 'val2'], 'keywarg': 'value', 'keywarg2': 'value2'}) >>> If you don't like the risks of eval, then compiler.parse gives a form of the parse output that is fairly easy to deal with Cheers Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with exec

2005-12-16 Thread Michael Spencer
c c in globals(), dwrapper(cls) return cls @maketype def ClassA(): def __init__(self): self.init = True >>> a = ClassA() >>> a >>> a.init True >>> Michael Anyway, here's the function: #--- def_hacks.py "

Re: object oriented programming question

2005-12-17 Thread Michael Spencer
scussion ##print v def func(self): """I would like to do something with ´content´ here. """ print self.__parent__.content def __get__(self, obj, cls): """Store a reference to the referring obj""" if isinstance(obj, cls): self.__parent__ = obj return self class x(object): def __init__(self): self.content = ["I'm", "self.", "content"] a = _a() >>> inst = x() >>> inst.a.func() #no need to set inst.a.__parent__ = inst manually now ["I'm", 'self.', 'content'] >>> HTH Michael -- http://mail.python.org/mailman/listinfo/python-list

effbot ExeMaker: custom icon?

2005-12-17 Thread Michael Spencer
What is the recommended way to change the icon of the exe ExeMaker* produces? (I tried replacing the exemaker.ico file, and indeed removing it; but that had no effect.) Thanks Michael *http://effbot.org/zone/exemaker.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Michael Tobis
Clearly the Ruby/Rails folks are making an effort to place themselves as an easy-to-learn first language for people who might otherwise drift into the rather awkward template-first way of thinking that is PHP. I note that the Rails people are closely affiliated with the 37signals people who in tur

Re: type 'slice' is not an acceptable base type

2005-12-20 Thread Michael Hoffman
e > to subclass base types. So why doesn't this work? slice.__base__ == object. It's the basetype flag issue. You could propose a patch to make it subclassable. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Michael Schneider
Congratulations to Guide, Mike Harald Armin Massa wrote: > Guido at Google: a message in THE public forum c.l.p. > > A confirmation by Martellibot, that Guido is IN FACT sitting 15m > distant from him; and everybody in Python knows where Martellibot has > his desk. > > Can it get more official

Re: python coding contest

2005-12-30 Thread Michael Spencer
idental but not all permutations may work. > > I'm off to try to figure out how to do it the other way now, before the > code gets revealed. > > > -tim > -tim > > Mine was practically identical, but with another permutation of the loop variables: seven_seg=lambda n,s="".join:s( s(" _| |"[ord('w\x12][:koR\x7f{'[int(i)])>>r&j] for i in n for j in(4,1,2))+"\n"for r in(6,3,0)) More evidence that 'there is one obvious way to do it' ;-) Still curious about 119, though Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Tech Geekers and their Style

2005-12-30 Thread Michael Winter
aited. The DOM Level 3 Events module has been a Working Group Note since November 2003. This probably marks the end of its development. [/Aside] [snip] Mike -- Michael Winter Prefix subject with [News] before replying by e-mail. -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing pins to the RS232

2005-12-31 Thread Michael Schneider
Jay, Couple of points that may help you. 1) A serial port does not have data ports 0-n. A serial port takes a byte (8 bits), then shifts them down a single pipe using a chip called a UART (feel free to google for unfamiliar terms). example Bit pattern 1010 1010 would be shifted one bit at a

Re: python coding contest

2006-01-01 Thread Michael Spencer
e gains by optimizing algorithms. Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Michael Sparks
27;ve seen is in "School of Rock". Jack Black's character explains it far better than I ever could :) Regards, Michael. -- [EMAIL PROTECTED], http://kamaelia.sourceforge.net/ British Broadcasting Corporation, Research and Development Kingswood Warren, Surrey KT20 6NP This message (and

Re: inline function call

2006-01-05 Thread Michael Spencer
looked at it. > > I've been meaning to do a proof of concept, but I've hinted at these things > before, > and no one seems much interested. And besides it's really a distraction from > more radical > stuff I'd like to try ;-) > > Regards, > Bengt Ri

Re: itertools.izip brokeness

2006-01-05 Thread Michael Spencer
e, None, 5, None), (None, None, 6, None), (None, None, 7, None)] >>> list(izip2(range(5), range(3), range(8), range(2), fill="Empty")) [(0, 0, 0, 0), (1, 1, 1, 1), (2, 2, 2, 'Empty'), (3, 'Empty', 3, 'Empty'), (4, 'Empty', 4, 'Empty'), ('Empty', 'Empty', 5, 'Empty'), ('Empty', 'Empty', 6, 'Empty'), ('Empty', 'Empty', 7, 'Empty')] >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools.izip brokeness

2006-01-05 Thread Michael Spencer
Paul Rubin wrote: > Michael Spencer <[EMAIL PROTECTED]> writes: >> for i in range(10): >> result = [] >> ... > > Do you mean "while True: ..."? > oops, yes! so, this should have been: from itertools import repeat def izip2(

Re: Regex help needed

2006-01-10 Thread Michael Spencer
ces: parse(data) ... ('someFunction', ['test', 'foo']) ('someFunction', ['test foo']) ('getVersion()', ['@(#)$CDS: icfb.exe version 5.1.0 05/22/2005 23:36 (cicln01) $']) ('someFunction', [['test', 'test1', 'foo aasdfasdf', 'newline', 'test2']]) >>> Cheers Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex help needed

2006-01-10 Thread Michael Spencer
rh0dium wrote: > Michael Spencer wrote: >> >>> def parse(source): >> ... source = source.splitlines() >> ... original, rest = source[0], "\n".join(source[1:]) >> ... return original, rest_eval(get_tokens(rest)) > > This is

Re: How can I test if an argument is a sequence or a scalar?

2006-01-10 Thread Michael Spencer
_or_iterable): #do something One definition of safe_iter is below. Your definition may depend on the specific application: Cheers Michael def safe_iter(obj, atomic_types = (basestring, int, float, complex)): """Equivalent to iter when obj is iterable and not defined

Re: flatten a level one list

2006-01-11 Thread Michael Spencer
286 iterations, 389.08usec per call flatten5(...) 1219 iterations, 410.24usec per call >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: flatten a level one list

2006-01-11 Thread Michael Spencer
Tim Hochberg wrote: > Michael Spencer wrote: >> > Robin Becker schrieb: >> >> Is there some smart/fast way to flatten a level one list using the >> >> latest iterator/generator idioms. >> ... >> >> David Murmann wrote: >> > Some

Placing graphics & text on printed page - jan06call.jpg (0/1)

2006-01-12 Thread Michael Galvin
without success. Mark Lutz's wonderful book "Programming Python" has not one reference to the word "printer" in its index. Surely, I must be overlooking something or thinking about this wrong. Michael Galvin Muskegon, MI -- http://mail.python.org/mailman/listinfo/python-list

Re: Placing graphics & text on printed page - jan06call.jpg (0/1)

2006-01-12 Thread Michael Galvin
To see an example of what I am trying to accomplish, look at this page on my personal website: http://mysite.verizon.net/michaelgalvin/jan06call.html I now realize my attachement could not be posted on this usenet group. On Thu, 12 Jan 2006 12:16:02 -0500, Michael Galvin <[EMAIL PROTEC

Re: flatten a level one list

2006-01-12 Thread Michael Spencer
uences and un-equal lengths, with only modest loss of speed: def interleave(*args, **kw): """Peter Otten flatten7 (generalized by Michael Spencer) Interleave any number of sequences, padding shorter sequences if kw pad is supplied""" dopad = "pa

Re: How can I make a dictionary that marks itself when it's modified?

2006-01-12 Thread Michael Spencer
value.add_observer(self) def notify(self, obj, attr, newval): print "%s.%s = %s" % (obj, attr, newval) >>> a = Observable() >>> b = Observable() >>> D = DictObserver() >>> D["a"] = a >>> D["b"] = b >>> a.new_attribute = 4 .new_attribute = 4 >>> b.new_attribute = 6 .new_attribute = 6 >>> a.new_attribute = 5 .new_attribute = 5 >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: flatten a level one list

2006-01-13 Thread Michael Spencer
> Michael Spencer wrote: >> result[ix::count] = input + [pad]*(maxlen-lengths[ix]) Peter Otten rewrote: > result[ix:len(input)*count:count] = input Quite so. What was I thinking? Michael -- http://mail.python.org/mailman/listinfo/python-list

httplib or urllib2 tomcat username and password

2006-01-13 Thread Michael Oliver
I am trying to write a Python client to access a Tomcat servlet using Tomcat Realm authentication with no success. I can use the httplib to connect to localhost port 8080 ok and post and get and all that is fine, but when I try to set username and password and access a protected part of tomcat

Tomcat username and password2

2006-01-13 Thread Michael Oliver
Still trying to get python to access my local tomcat secured with the tomcat realm import urllib2 handler = urllib2.HTTPBasicAuthHandler() handler.add_password(None, 'localhost:8080/manager/html', 'root', 'root') opener = urllib2.build_opener(handler) urllib2.install_opener(opener)

Python Client accessing Tomcat

2006-01-14 Thread Michael Oliver
I am trying to write a Python client to access a Tomcat servlet using Tomcat Realm authentication with no success.   I can use the httplib to connect to localhost port 8080 ok and post and get and all that is fine, but when I try to set username and password and access a protected part of

Tomcat authentication from python

2006-01-15 Thread Michael Oliver
I need to access tomcat applications from python, some are Axis/SOAP web services, and some are file/WebDAV operations.   But so far I cannot get python to authenticate and access http://localhost:8080/manager/html much less to any of the other applications.   I have found examples for

Re: Determine the IP address of an eth interface

2006-01-19 Thread Michael Amrhein
28.130' > On win... you may call ipconfig: os.popen('ipconfig /all','r') - if ipconfig on your default path, otherwise specify full path - and retrieve the information you want from the output. Have fun Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert Active Directory Object to string

2006-01-19 Thread Michael Ströder
ia LDAP (e.g. using python-ldap) you will get back UTF-8 strings for textual attributes. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: ldap passwd need help

2006-01-19 Thread Michael Ströder
swd_s(). ldap.PROTOCOL_ERROR indicates that the server does not support it. Otherwise you have to send a modify request replacing the value of attribute 'userPassword' in the user's LDAP entry. Make sure you understand password hashes if needed with your server. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Last used directory?

2006-07-12 Thread Michael Yanowitz
ad of having initialdir='.' (current directory), I would like it set to the last visited directory, which can be from a previous run or even a previous day. Is that possible? If so how? Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining if an object is a class?

2006-07-13 Thread Michael Spencer
isinstance(object, types.ClassType) or hasattr(object, '__bases__') I wonder why the test isn't isinstance(object, (types.ClassType, type)) Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Cool Ebooks Site

2006-07-13 Thread Michael P.
Hey, pretty impressive list. I downloaded a few myself. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python strings outside the 128 range

2006-07-17 Thread Michael Piotrowski
ou shouldn't look directly at these variables (LANG and LC_*) but rather use the functions from the locale module, e.g.: import locale locale.setlocale(locale.LC_ALL, '') # use the current locale settings encoding = locale.nl_langinfo(locale.CODESET) -- Michael Piotrowski, M.

Re: Python strings outside the 128 range

2006-07-17 Thread Michael Piotrowski
gives you something "safe" and you can advise the user to set the locale. > On my system I have added LANG to .profile. That's certainly the right thing to do. -- Michael Piotrowski, M.A. <[EMAIL PROTECTED]> Public key at <http://www.dynalabs.de/mxp/pubkey.txt> -- http://mail.python.org/mailman/listinfo/python-list

Re: Dispatch with multiple inheritance

2006-07-19 Thread Michael Spencer
Michael J. Fromberger wrote: ... > > Of course, I could just bypass super, and explicitly invoke them as: > > C.__init__(self, ...) > D.__init__(self, ...) > > ... but that seems to me to defeat the purpose of having super in the > first place. As others hav

Ireland PyPy sprint 21th-27th August 2006

2006-07-21 Thread Michael Hudson
The next PyPy sprint will happen in the nice city of Limerick in Ireland from 21st till 27th August. (Most people intend to arrive 20th August). The main focus of the sprint will be on JIT compiler works, various optimization works, porting extension modules, infrastructure works like a buil

Functions, Operators, and Overloading?

2006-07-24 Thread Michael Yanowitz
operators can be overloaded. So can I define a new operator? If so, can I define func1 as an operator? (on the side, I have always wanted to define the ++ operator as +=1. Is that possible?) Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

Splitting a float into bytes:

2006-07-26 Thread Michael Yanowitz
and 'int' Is there some easy way to get what the bytes of the float are? Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

RE: Splitting a float into bytes:

2006-07-26 Thread Michael Yanowitz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Simon Forman Sent: Wednesday, July 26, 2006 2:56 PM To: [email protected] Subject: Re: Splitting a float into bytes: Michael Yanowitz wrote: > Hello: > > For some reason I can't figure ou

Static Variables in Python?

2006-07-31 Thread Michael Yanowitz
the set values for the next time it is called. Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

RE: Static Variables in Python?

2006-08-01 Thread Michael Yanowitz
-Original Message- From: Cliff Wells [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 4:55 PM To: Michael Yanowitz Cc: [email protected] Subject: Re: Static Variables in Python? On Mon, 2006-07-31 at 15:21 -0400, Michael Yanowitz wrote: > Is it possible to have a sta

Re: upgrading python...

2006-08-02 Thread Michael Brandt
veState (AS package (libcpp5*)): http://activestate.com/Products/Download/Download.plex?id=ActivePython Install it under /opt or somewhere else, where it doesn't conflict with your existing python installation. The drawback is, that you may install other 3rd party python packages on your

Negative division bug?

2006-08-03 Thread Michael Yanowitz
gt;> -10/3 -4 It behaves correct for positive numbers, but for negative integers it seems to subtract one from the expected result. Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

Make Object Oriented?

2006-08-10 Thread Michael Yanowitz
if not, C-to-C++ would be ok? Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

Defining our own types?

2006-08-16 Thread Michael Yanowitz
Python over-ride its rules so that if I type in a number followed by a dot followed by number followed by a dot followed by a number followed by a dot and another number, it can call make_ip_address() on the value? Thanks in advance: Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Michael Spencer
me * 100 / count else: unit = "msec" timeper = totaltime * 1000 / count return "%s(...) %s iterations, %.2f%s per call" % \ (func.__name__, count, timeper, unit) Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Michael Spencer
Mark E. Fenner wrote: > Michael Spencer wrote: > >> Mark E. Fenner wrote: >> >>> and the copy is taking the majority (42%) of my execution time. >>> So, I'd like to speed up my copy. I had an explicit copy method that did >>> what was needed a

Re: how do you get the name of a dictionary?

2006-08-23 Thread Michael Janssen
s name is the wrong place to store this information. Did I miss anything? regards Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-05 Thread Michael Ströder
gt; statement to be officially reduced to "2-3 people", since it is *really* not > required much more than that to setup a bug tracker installation, and no more > than 1 person to maintain it afterwards. Glancing over this thread I wonder what these people are supposed to do. Any

Re: Python to use a non open source bug tracker?

2006-10-05 Thread Michael Ströder
Ilias Lazaridis wrote: > > You need just 2 active contributors - and the python community, not > more Hmm, this number does not say much. It really depends on the required service level and how much time these two people can spend for maintaining the tracker service. Ciao, Michael.

Re: Python to use a non open source bug tracker?

2006-10-09 Thread Michael Ströder
o be used for python-ldap. And pydns would be another candidate to be moved away from SF. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-09 Thread Michael Ströder
frastructure already has to do spam filtering for mailing lists. Or does it simply resend all mail? Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python component model

2006-10-10 Thread Michael Sparks
Edward Diener No Spam wrote: > Michael wrote: > > Edward Diener No Spam wrote: > > > >> Has there ever been, or is there presently anybody, in the Python > >> developer community who sees the same need and is working toward that > >> goal of a com

Win32 python and excel macros

2006-10-18 Thread michael . pearmain
Hi Experts, Looking for a very quick bit on of advice on how to make some python code run. I'm a newbie to both VBA and Python, so i apologise if this is very easy but i'm about to tear my hair out after googling for the last 3 days. I have written a large python script which inside of it create

Re: UTF-8 to unicode or latin-1 (and yes, I read the FAQ)

2006-10-19 Thread Michael Ströder
to string. The char set used depends on your console Check this out for understanding it: >>> u = 'K\xc3\xb6ni'.decode('utf-8') >>> s=u.encode('iso-8859-1') >>> u u'K\xf6ni' >>> s 'K\xf6ni' >>> Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-19 Thread Michael Spencer
rownspencer.com/pycompiler/branches/new_ast/ Check out to a compiler2 directory on PYTHONPATH Test with python test/test_compiler.py Cheers Michael -- http://mail.python.org/mailman/listinfo/python-list

Py 2.5: Bug in sgmllib

2006-10-22 Thread Michael Butscher
ode string fails. Workaround (not thoroughly tested): Override convert_codepoint in a derived class with: def convert_codepoint(self, codepoint): return unichr(codepoint) Is this a bug or is SGMLParser not meant to be used for unicode strings (it should be documented then)? Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-23 Thread Michael Spencer
Georg Brandl wrote: > Michael Spencer wrote: >> Announcing: compiler2 >> - >> >> For all you bytecode enthusiasts: 'compiler2' is an alternative to the >> standard >> library 'compiler' package, with several adva

forcing a definition to be called on attribute change

2006-10-24 Thread Michael Malinowski
Hey All, Apologies if this is a stupidly obvious or simple question. If I have a class with a series of attributes, is there a way to run a function definition in the class whenever a specific attribute is changed? Something like the following class cSphere() : def __init__(sel

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-24 Thread Michael Spencer
d to use 2.5 trees. The compiler2 package does this (see http://svn.brownspencer.com/pycompiler/branches/new_ast/test/pyast.py ) - and the changes required to a 2.4 application are easy. Regards Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-24 Thread Michael Spencer
known to be broken (and perhaps still is). A replacement > implementation, especially if it comes with a new maintainer, would > be welcome. > > Regards, > Martin Thanks, I will raise this on python-dev soon. Regards Michael -- http://mail.python.org/mailman/listinfo/python-list

[no subject]

2006-10-24 Thread Michael S
, but when I call the function of my new module, wxPython doesn't respond when wx.Timer is supposed to fire. Any suggestions? Michael -- http://mail.python.org/mailman/listinfo/python-list

Re:

2006-10-25 Thread Michael S
oking. --- Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Tuesday 24/10/2006 23:25, Michael S wrote: > > >I extended part of my program in C, since that part > >was too involved for Python. Now when I import the > >module I created and call its functions

Re: [wxPython-users] Re:

2006-10-25 Thread Michael S
If I create a threading.Thread derived class, and run the wxPython code in the main thread; using a lock, will I be able to suspend the Thread, even though it will run the C code, which is essentially a while loop looping through millions of lines of a text file? Thanks in advance. Michael

255 argument limit?

2006-10-25 Thread Michael Yanowitz
,7,8,9,190,1,2, 3,4, 5,6,7,8,9,200,1,2,3,4,5,6,7,8,9,210,1,2,3,4,5,6,7,8,9,220,1,2,3,4,5,6,7,8,9, 230, 1,2,3,4,5,6,7,8,9,240,1,2,3,4,5,6,7,8,9,250,1,2,3,4,5,6,7,8,9) SyntaxError: more than 255 arguments Is there a way to increase this limit? (This is just a made up example, I would not normally do this). Thanks

Re: cleaner way to write this?

2006-10-25 Thread Michael S
How about this? def create_db_name(self): dlg = wx.TextEntryDialog(self.frame, 'Enter a database name:', 'Create New Database') db_name = None #or db_name = "" if dlg.ShowModal() == wx.ID_OK: db_name = dlg.GetValue()

Re: How to identify generator/iterator objects?

2006-10-25 Thread Michael Spencer
onsts import CO_GENERATOR >>> def is_generator(f): ... return f.func_code.co_flags & CO_GENERATOR != 0 ... >>> def f1(): yield 1 ... >>> def f2(): return 1 ... >>> is_generator(f1) True >>> is_generator(f2) False >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-26 Thread Michael Ströder
1 Public Primary Certification Authority > openssl x509 -inform der -in VSIGN1.CER -subject -issuer -noout -nameopt rfc2253 subject= OU=Class 1 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US issuer= OU=Class 1 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US Guess the second is what Python SSL object also should return. No idea whether this is available at OpenSSL's API level. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-26 Thread Michael Ströder
shed name. > > So if you parse out that string in those terms, and require > each of those key = value pairs to have reasonable values - > key has no embedded spaces, value has non-zero length - then > you should be OK. Re-join any invalid component to its > predecessor's valu

<    26   27   28   29   30   31   32   33   34   35   >