Re: A "scopeguard" for Python

2010-03-05 Thread Mike Kent
On Mar 4, 8:04 pm, Robert Kern wrote: > No, the try: finally: is not implicit. See the source for > contextlib.GeneratorContextManager. When __exit__() gets an exception from the > with: block, it will push it into the generator using its .throw() method. > This > raises the exception inside the

Re: equivalent of Ruby's Pathname?

2010-03-09 Thread Mike Orr
here were no implementations. Now there are a few projects active on this, such as http://groups.google.com/group/stdpyfs . This is probably the future of any path object, so it would make sense to define a path now that can work with all these backends. --Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Need advice on starting a Python group

2010-03-18 Thread Mike Orr
d, here the specialized groups are getting more attendance than the general groups are. The local Plone and Django groups get more people than the Python group does. --Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: (a==b) ? 'Yes' : 'No'

2010-03-30 Thread Mike Kent
On Mar 30, 11:40 am, gentlestone wrote: > Hi, how can I write the popular C/JAVA syntax in Python? > > Java example: >     return (a==b) ? 'Yes' : 'No' > > My first idea is: >     return ('No','Yes')[bool(a==b)] > > Is there a more elegant/common python expression for this? return ('Yes' if a ==

Re: PEP: possibility of inline using of a symbol instead of "import"

2011-01-06 Thread Mike Kent
On Jan 6, 11:02 am, Duncan Booth wrote: > Your complaint seems to be that: > >    r1 = myFunc1(...) > > is unclear when you don't know where myfunc1 originates, so why don't > you write: > >    r1 = MyModule1.myFunc1(...) > > -- > Duncan Boothhttp://kupuguy.blogspot.com My interpretation of his

Re: WxPython versus Tkinter.

2011-01-24 Thread Mike Driscoll
how that wx is better. I like the concept of creating a challenge to see which toolkit can do what, but this is not the way to go about it. Bryan, on the other hand, has been a Tkinter luminary who has helped me in the past when I was learning Tkinter and I won't be too surprised if he help

Re: WxPython versus Tkinter.

2011-01-24 Thread Mike Driscoll
On Jan 24, 9:02 am, rantingrick wrote: > On Jan 24, 8:49 am, Mike Driscoll wrote: > > > On Jan 24, 7:24 am, Bryan wrote: > > > In my experience, segfaults with wxPython aren't daily, but they are > > > pretty much weekly. There are weeks that can go by wit

8-Day Python Power Course in Leipzig/Germany

2011-02-03 Thread Mike Müller
2011 High Performance XML with Python Venue: Python Academy, Leipzig, Germany Trainers: Mike Müller, Stefan Behnel About the Trainers ------ Mike Müller, Ph.D has been teaching Python since 2004. He is the founder of Python Academy and regularly gives open and in-house Python cours

Re: packaging multiple python scripts as Windows exe file

2010-04-13 Thread Mike Driscoll
the answer is. But I think you're talking about a certain MS DLL that Python distributes. If so, I've read multiple threads on this topic that claim that since Python distributes it, there is an implied permission that you can as well. Since I'm not a lawyer, I can't say for su

Re: Relocatable python install

2010-04-14 Thread Mike Kent
On Apr 14, 4:50 pm, Michel wrote: > Hi, > > I would like to create a binary package of python that we will ship > with our product. I need to be able to install the package anywhere in > the file system. > > The interpreter seems to be ok with that, but a few other tools that > are installed in th

Re: Reactive programming in Python ?

2010-04-16 Thread Mike Kent
On Apr 16, 11:18 am, pca wrote: > Dear all, > > Could “reactive programming” still increase the productivity and joy > of Python programming?  I’d like to hear your thoughts on the idea > that object-oriented “programming by formula”, as in a spreadsheet, > would simplify our work, because we woul

SEC apparently about to mandate Python for a particular financial use

2010-04-16 Thread Mike Kent
http://jrvarma.wordpress.com/2010/04/16/the-sec-and-the-python/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Fedora and CentOS

2010-05-29 Thread Mike Fedyk
On Sat, May 29, 2010 at 12:03 PM, Wesley Brooks wrote: > On 29 May 2010 19:58, Paul Rubin wrote: >> John Nagle writes: >>>   The major Red Hat based Linux distros are still shipping with Python 2.4. >> >> Fedora 12 ships with Python 2.6, I think. > > I've got Fedora 10 here with 2.5, and 11 at t

Re: Python source checkout problem

2010-07-15 Thread Mike Nerone
trunk' " > Assuming trunk is what you actually want, I would guess that your environment has a proxy server that's not compatible with subversion getting in your way. Ask your network admins if you're at a business location. Mike Nerone -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie problem with str.replace

2010-08-04 Thread Mike Kent
On Aug 4, 9:10 am, BobAalsma wrote: > I'm working on a set of scripts and I can't get a replace to work in > the script - please help. >                         bestandsnaam_nieuw.replace(KLANTNAAM_OUT,KLANTNAAM_IN) I'm not sure what you are intending to do here, but string.replace does not do i

Re: Python -Vs- Ruby: A regexp match to the death!

2010-08-09 Thread Mike Kent
On Aug 8, 8:43 pm, rantingrick wrote: > Hello folks, > > You all know i been forced to use Ruby and i am not happy about that. ***Blablabla cut long rant*** Xah, this is really you, isn't it. Come on, confess. -- http://mail.python.org/mailman/listinfo/python-list

Re: Specify the sorting direction for the various columns/

2009-06-11 Thread Mike Kazantsev
'date': datetime.datetime(2007, 9, 30, 16, 43, 54)}, {'name': 'AA2', 'username': 'AA2','date': datetime.datetime(2007, 9, 30, 16, 43, 54)}] entries.sort(lambda x: (x['name'], -time.mktime(x['date'].timetuple( Here time is inversed, yielding reverse sort order by that column. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] Multi-Threading and KeyboardInterrupt

2009-06-12 Thread Mike Kazantsev
gt; > ... a .join() call, which is the most likely position at which the > keyboard interrupt will be processed, killing the main program thread > and probably generating some errors as dangling active threads are > forceably killed. There was quite interesting explaination o

Re: Lexical scope: converting Perl to Python

2009-06-12 Thread Mike Kazantsev
nyway? It's not like you'd be able to accomplish it - code can easily grep it's process body in memory and harvest all the "private" values, so I'd suggest getting some fresh air when you start to feel like doing that. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: moving Connection/PipeConnection between processes

2009-06-13 Thread Mike Kazantsev
s' table (with it's own numbering), which is usually done via special flag for sendmsg(2) in C, so you should probably look out for py implementation of this call, which I haven't stumbled upon, but, admittely, never looked for. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-Threading and KeyboardInterrupt

2009-06-13 Thread Mike Kazantsev
re other > links? Thanks for sharing this link, although I prefer such information in written form - it's easier/faster to work with and much more accessible. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-13 Thread Mike Kazantsev
;with", file should end up closed, else os.rename might replace valid path with zero-length file. It should be easy to use cursor with contextlib, consider using contextmanager decorator: from contextlib import contextmanager @contextmanager def get_cursor(): try: cursor = conn.c

Re: Make upof Computer

2009-06-14 Thread Mike Kazantsev
On Sun, 14 Jun 2009 00:46:16 -0700 (PDT) "Mr . Waqar Akbar" wrote: ... Judging by the typo in the last subject, someone indeed types all this crap in manually! Oh my god... -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailma

Re: Different types of dicts with letter before the curly braces.

2009-06-14 Thread Mike Kazantsev
x27;d prefer to use dict() to declare a dict, not some mix of letters and incomprehensible symbols, thank you. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Different types of dicts with letter before the curly braces.

2009-06-14 Thread Mike Kazantsev
or of "{0}".format(var) and I think it's a good call. There's only so much sugar to add before it'll transform into salt and you'll start seeing lines like these: s**'@z!~;()=~$x>;%x>l;$(,'*e;y*%z),$;@=!;h(l~;*punch jokers;halt;*;print; I

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread Mike Kazantsev
On Mon, 15 Jun 2009 05:37:14 -0700 (PDT) OdarR wrote: > On 13 juin, 07:25, Mike Kazantsev wrote: > > There was quite interesting explaination of what happens when you send > > ^C with threads, posted on concurrency-sig list recently: > > > >  http://bli

Re: parsing json using simplejson

2009-06-15 Thread Mike Kazantsev
On Sun, 14 Jun 2009 22:45:38 -0700 (PDT) deostroll wrote: > I need to be able to parse a json data object using the simplejson > package. First of all I need to know all the task needed for this job. Note that py2.6 has a bundled json module. -- Mike Kazantsev // fraggod.net signatu

Re: waling a directory with very many files

2009-06-15 Thread Mike Kazantsev
t; themselves, as I was thinking. I wish listdir had been changed in 3.0 > along with map, filter, and range, but I made no effort and hence cannot > complain. Why? We have itertools.imap, itertools.ifilter and xrange already. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing json using simplejson

2009-06-15 Thread Mike Kazantsev
nces # You can always use it as a regular dict print 'port' in data print data['see_also'] # Data model propagnates itself to any sub-mappings data.see_also.new_item = dict(x=1, y=2) print data.see_also.keys() data.see_also.new_item['z'] = 3 print data.see_also.new_item.z -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread Mike Kazantsev
d processes with a simple "while True: ..." loop, consider using twisted framework - it'll allow you to do incredible stuff with any number of sockets with just few lines of code in a clean, abstracted way. Latter would also mean that you can always replace os pipes with network sockets just

Re: persistent composites

2009-06-16 Thread Mike Kazantsev
nthusiasm. I've read this thread from the beginning, being tempted to insert remarks about shelve module or ORMs like SQLAlchemy, but that'd be meaningless without the problem description, which I haven't seen anywhere. Is it some trick idea like "let's walk on our heads"?

Re: simple GUI for my application?

2009-06-16 Thread Mike Driscoll
UIs I needed to reimplement, so I went with wxPython. I've heard good things about pyQT. If you want the ultimate look-and-feel for Windows, you should go with IronPython. - Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: simple GUI for my application?

2009-06-16 Thread Mike Driscoll
On Jun 16, 1:24 pm, Tim Harig wrote: > On 2009-06-16, Mike Driscoll wrote: > > > On Jun 16, 9:20 am, Filipe Teixeira wrote: > >> Hi, I'm really struggling to find the best GUI to make a simple > >> application. > [SNIP] > >> Basically I will use

Re: Newbie help for using multiprocessing and subprocess packages for creating child processes

2009-06-16 Thread Mike Kazantsev
o read/write data from/to the pipes more than once (aka communicate), using threads or any more python subprocesses seem like hammering a nail with sledgehammer - just _read_ or _write_ to pipes asynchronously. -- Mike Kazantsev // fraggod.net -- http://mail.python.org/mailman/listinfo/python-list

Re: walking a directory with very many files

2009-06-16 Thread Mike Kazantsev
95ea with only hundred of them in each path. Former case (all-in-one-path) would even outperform the latter with ext3 or reiserfs by a small margin. Sadly, that's not the case with filesystems like FreeBSD ufs2 (at least in sixth branch), so it's better to play safe and create subdirs if

Re: Logging multiple lines

2009-06-16 Thread Mike Kazantsev
refix at the beginning of every line? I'd log exception name and timestamp (or id) only, pushing the full message with the same id to another log or facility (like mail it to some dedicated bug-report box). -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http:

Re: walking a directory with very many files

2009-06-16 Thread Mike Kazantsev
On Wed, 17 Jun 2009 03:42:02 GMT Lie Ryan wrote: > Mike Kazantsev wrote: > > In fact, on modern filesystems it doesn't matter whether you > > accessing /path/f9e95ea4926a4 with million files in /path > > or /path/f/9/e/95ea with only hundred of them in each path. Former

Re: walking a directory with very many files

2009-06-17 Thread Mike Kazantsev
> Why is that a problem? So you can os.listdir them? Don't ask me what for, however, since that's the original question. Also not every fs still in use handles this situation effectively, see my original post. -- Mike Kazantsev // fraggod.net signature.asc Description: PGP sig

Re: walking a directory with very many files

2009-06-17 Thread Mike Kazantsev
On Wed, 17 Jun 2009 23:04:37 +1200 Lawrence D'Oliveiro wrote: > In message <20090617142431.2b25f...@malediction>, Mike Kazantsev wrote: > > > On Wed, 17 Jun 2009 17:53:33 +1200 > > Lawrence D'Oliveiro wrote: > > > >> > Why not us

Re: walking a directory with very many files

2009-06-17 Thread Mike Kazantsev
On Thu, 18 Jun 2009 10:33:49 +1200 Lawrence D'Oliveiro wrote: > In message <20090617214535.10866...@coercion>, Mike Kazantsev wrote: > > > On Wed, 17 Jun 2009 23:04:37 +1200 > > Lawrence D'Oliveiro wrote: > > > >> In message <200906

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-18 Thread Mike Driscoll
ng you all there! > > Chris > > -- > Simplistix - Content Management, Zope & Python Consulting >             -http://www.simplistix.co.uk As I recall, these utilities don't allow the programmer to access Excel's formulas. Is that still an issue? Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Once again, comparison wxpython with PyQt

2009-06-18 Thread Mike Driscoll
ts I've ever needed are already implemented and when they aren't there, it always seems that one of the other developers releases one. I would recommend trying to create something small in each toolkit (like a minimal calculator) and see which one makes the most sense to you. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: walking a directory with very many files

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 17:53:40 +1200 Lawrence D'Oliveiro wrote: > In message <20090618081423.2e035...@coercion>, Mike Kazantsev wrote: > > > On Thu, 18 Jun 2009 10:33:49 +1200 > > Lawrence D'Oliveiro wrote: > > > >> In message <20090617

Re: multiprocessing and process run time

2009-06-19 Thread Mike Kazantsev
it can get the same results as well, w/o having to invoke shell commands: http://code.google.com/p/procpy/ -- Mike Kazantsev // fraggod.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
/env python import sys open('/tmp/argv', 'w').write(repr(sys.argv)) And replace 'vlc' with a path to this script, then invoke it from a shell, compare the results. If it gets the right stuff, try the same with os.environ (prehaps vlc keeps socket location there, just like ssh/gpg-agents?). -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
time w/o blocking. Try this recipe: http://code.activestate.com/recipes/576759/ -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Retrieving column values by column name with MySQLdb

2009-06-19 Thread Mike Kazantsev
result = db.store_result() data = result.fetch_row(maxrows=0, how=1) -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Retrieving column values by column name with MySQLdb

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 10:32:32 -0500 Tim Chase wrote: > Mike gave you a good answer, though I think it's MySQL specific. I don't have to deal with MySQL frequently but I've remembered that I used got the fields out somehow, and now, looking at the code, I wonder myself, why &qu

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 08:28:17 -0700 Tyler Laing wrote: > Thanks mike, the idea that maybe some of the info isn't being passed is > certainly interesting. > > Here's the output of os.environ and sys.argv: > ... I'm afraid these doesn't make much sense without

Re: Calling subprocess with arguments

2009-06-19 Thread Mike Kazantsev
On Fri, 19 Jun 2009 22:00:28 +0600 Mike Kazantsev wrote: > On Fri, 19 Jun 2009 08:28:17 -0700 > Tyler Laing wrote: > > > Thanks mike, the idea that maybe some of the info isn't being passed is > > certainly interesting. > > > > Here's the output of

Re: n00b confusion re: local variable referenced before assignment error

2009-06-19 Thread Mike Kazantsev
t;, since the try has failed here. You might want to insert return or avoid (possibly endless) recursion altogether - just wrap it into while loop with some counter (aka max_tries). Also, you can get rid of code duplication by catching some basic urllib2 exception, then checking if it's ur

Pyowa is this Monday!

2009-07-04 Thread Mike Driscoll
mming language. Be prepared to share! We may have another presentation in our Standard Library series as well or just something random. Let me know if you think you'll be there. Pop & water will be provided. We hope to see you there! -- Mike Driscoll http://www.

Re: Bug in IEHtmlWindow?

2009-07-30 Thread Mike Driscoll
r seen that error. Could you re-post to the wxPython user's list? They can probably help you there: http://groups.google.com/group/wxPython Mike -- http://mail.python.org/mailman/listinfo/python-list

Python- javascript

2009-08-15 Thread Mike Paul
I'm trying to scrap a dynamic page with lot of javascript in it. Inorder to get all the data from the page i need to access the javascript. But i've no idea how to do it. Say I'm scraping some site htttp://www.xyz.com/xyz request=urllib2.Request("htttp://www.xyz.com/xyz") response=urllib2.urlopen

Python - scraping - javascript

2009-08-15 Thread Mike Paul
I'm trying to scrap a dynamic page with lot of javascript in it. Inorder to get all the data from the page i need to access the javascript. But i've no idea how to do it. Say I'm scraping some site htttp://www.xyz.com/xyz request=urllib2.Request("htttp://www.xyz.com/xyz") response=urllib2.urlopen

Re: IDE for Python

2009-08-31 Thread Mike Driscoll
PE (Stani's Python Editor). If you want a nigh-complete list, check the Python wiki: http://wiki.python.org/moin/PythonEditors --- Mike Driscoll Blog: http://blog.pythonlibrary.org -- http://mail.python.org/mailman/listinfo/python-list

Re: win32ui DLL Load Failed

2009-08-31 Thread Mike Driscoll
machine. Is it possible that that is the problem? Running Depends > didn't get me anywhere. I would appreciate any help you can offer. Did you install PyWin32? If so, which version? Here's a link: http://sourceforge.net/projects/pywin32/ - Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: What python can NOT do?

2009-09-04 Thread Mike Coleman
On Aug 28, 5:37 pm, qwe rty wrote: > i know that an interpreted language like python can't be used to make > an operating system or system drivers. > > what else can NOT be done in python? what are the limitations of the > language? Neither of those is strictly true. It is true, though, that Pyt

Re: How do I post to the wxPython mailing list?

2009-09-08 Thread Mike Driscoll
e. And Robin Dunn sent out multiple notices about the switch and why he was doing it about a month before the switch. --- Mike Driscoll Blog: http://blog.pythonlibrary.org -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess woes

2009-09-15 Thread Mike Driscoll
has no > attribute 'fileno'". > > How can I capture stderr in the scenario depicted above? > > TIA! > > kynn According to the docs for subprocess module (which you don't appear to be using even though that's what you used for your subje

Re: python database

2010-09-03 Thread Mike Kent
On Sep 3, 2:36 am, shai garcia wrote: > can you pls help me to make a database program in python? It's better if you do your homework yourself. You learn more that way. Now, if you have a specific question about some detail of your assignment, and can show us that you've really tried to do the

Re: Does MySQLdb rollback on control-C? Maybe not.

2010-09-03 Thread Mike Kent
On Sep 3, 12:22 am, John Nagle wrote: >     I would expect MySQLdb to rollback on a control-C, but it doesn't > seem to have done so.   > Something is broken. I wouldn't expect it to, I'd expect to roll back on an exception, or commit if not. Perhaps this will help you. I use it in production

Re: New to python - parse data into Google Charts

2010-09-03 Thread Mike Kent
On Sep 3, 1:52 pm, alistair wrote: > I'm new to python and my programming years are a ways behind me, so I > was looking for some help in parsing a file into a chart using the > Google Charts API. > Try this: http://pygooglechart.slowchop.com/ -- http://mail.python.org/mailman/listinfo/python-li

The PSF Blog Gets a Transfusion!

2010-09-06 Thread Mike Driscoll
The Python Software Foundation’s Blog staff has been recently expanded by a new set of top-notch bloggers to bring you the latest in PSF news, ranging from the scintillating projects that the PSF has its fingers in to the mundane, but necessary board minutes. Don’t despair if you hate reading blog

Re: Ordering tests in a testsuite

2010-10-08 Thread Mike Kent
But sometimes you just wanna do it the way you wanna do it. If you name your tests like 'test_01_yadda' and test_02_whatever', then they will be run in the order you want, as given by the numbers. -- http://mail.python.org/mailman/listinfo/python-list

Re: what happens to Popen()'s parent-side file descriptors?

2010-10-13 Thread Mike Kent
You might want to check out the Python 2.7 'pipes' standard library module: http://docs.python.org/library/pipes.html -- http://mail.python.org/mailman/listinfo/python-list

removing a post from python

2010-10-21 Thread Mike L
http://www.mail-archive.com/[email protected]/msg175722.html hello could you remove above post... off topic and spam thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: Bigotry (you win, I give up)

2017-04-27 Thread Mike Reveile
On Wednesday, April 19, 2017 at 9:44:15 AM UTC-7, Rurpy wrote: > On 04/18/2017 04:34 PM, Chris Angelico wrote: > > On Wed, Apr 19, 2017 at 8:28 AM, Ben Finney > > wrote: > >> Chris Angelico writes: > >> <> Interesting thread... but volatile. I find imaginary numbers to be quite useful for under

Re: Bigotry (you win, I give up)

2017-04-27 Thread Mike Reveile
On Thursday, April 27, 2017 at 9:19:43 PM UTC-7, Rustom Mody wrote: > On Friday, April 28, 2017 at 9:36:02 AM UTC+5:30, Mike Reveile wrote: > > On Wednesday, April 19, 2017 at 9:44:15 AM UTC-7, Rurpy wrote: > > > On 04/18/2017 04:34 PM, Chris Angelico wrote: > > > > O

Re: Bigotry (you win, I give up)

2017-04-27 Thread Mike Reveile
On Thursday, April 27, 2017 at 9:36:26 PM UTC-7, Rustom Mody wrote: > On Friday, April 28, 2017 at 9:36:02 AM UTC+5:30, Mike Reveile wrote: > > On Wednesday, April 19, 2017 at 9:44:15 AM UTC-7, Rurpy wrote: > > > On 04/18/2017 04:34 PM, Chris Angelico wrote: > > > > O

PyCon.DE 2017 - Call for Proposals

2017-06-19 Thread Mike Müller
Call for Proposals -- The Call for Proposals for the PyCon.DE 2017 is open until July 30, 2017. Please submit your proposals here: https://www.papercall.io/pyconde2017 We’re looking for proposals on every aspect of Python: programming from novice to advanced levels, applications

PyCon.DE 2017 - Early Bird Deadline July 2, 2017

2017-06-30 Thread Mike Müller
PyCon.DE 2017 - Early Bird Deadline July 2, 2017 There are only 2 days left to by a ticket at the earl bird rate for PyCon.DE. https://de.pycon.org/#tickets About PyCon.DE -- The next PyCon.DE will be held from 25-27th October 2017 at

EuroSciPy 2017 - Call for Contributions extended to July 2

2017-06-30 Thread Mike Müller
Call for Contributions -- There are only 2 days left to submit a talk, tutorial, or poster for EuroSciPy 2017 (https://www.euroscipy.org/2017/). Don't miss the change to talk about what you do with Python in science. Submit your proposal today: https://www.papercall.io/eurosci

Re: adding a simulation mode

2012-07-04 Thread Mike C. Fletcher
the thing should return globalsub.subs( shutil.copytree, fake_copytree ) $ pip install globalsub HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org

Re: pygame - importing GL - very bad...

2013-01-03 Thread Mike C. Fletcher
used by the small variations from C OpenGL, making the API look entirely different wouldn't be a good direction to move, IMO. HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread Mike C. Fletcher
one: Does not match PEP8 recommended style" making it clear that this is *not* an error, it is a *style* related *warning*. HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: handling return codes from CTYPES

2013-01-21 Thread Mike C. Fletcher
take a pointer to a data-value to fill in their data, but not *your* function. That pattern looks like: result = c_short(0) my_ctypes_function( ..., byref(result) ) print result.value i.e. you have to pass the variable into the function (as a reference/pointer). HTH, Mike -- __

Re: handling return codes from CTYPES

2013-01-21 Thread Mike C. Fletcher
On 13-01-21 11:52 AM, Steve Simmons wrote: Mike, Thanks for your response - I was puzzled by one part of it though... On 21/01/2013 15:14, Mike C. Fletcher wrote: That's because you've just discarded the object you created I (mis?)understood from the ctypes document

Re: XSLT to Python script conversion?

2012-02-13 Thread Mike C. Fletcher
rate.py, model.py and templates/section.kid files are all you need to look at to understand the docbook processing. HTH, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://ma

Decoratored functions parsed differently by ast stdlib between 3.7 and 3.8

2021-04-30 Thread Mike Lee Williams
AST, but none of the changes look relevant as they all refer to typing https://docs.python.org/3/whatsnew/3.8.html#ast So: what changed? Why? Can I and should I try to get the old behavior back? Thanks! Mike Lee Williams -- https://mail.python.org/mailman/listinfo/python-list

Re: Decoratored functions parsed differently by ast stdlib between 3.7 and 3.8

2021-04-30 Thread Mike Lee Williams
On Friday, April 30, 2021 at 7:55:10 PM UTC-7, Mike Lee Williams wrote: > This trivial bit of code is parsed differently by the ast module between > python > 3.7 and python 3.8. I'm trying to figure out what changed and why, and once I > know that, if it's possible and d

Re: Decoratored functions parsed differently by ast stdlib between 3.7 and 3.8

2021-05-03 Thread Mike Lee Williams
On Monday, May 3, 2021 at 10:41:14 AM UTC-7, Terry Reedy wrote: > > Answering my own question: the behavior was changed by > > https://github.com/python/cpython/pull/9731. > Since this patch, Mark Shannon has revised line numbering and tracing > and replaced the internal lineno data structure. Yo

Re: py2exe and OpenGL problem

2005-09-25 Thread Mike C. Fletcher
Line 13:17 of OpenGL.__init__.py, replace with: try: filename = os.path.join(os.path.dirname(__file__), 'version') __version__ = string.strip(open(filename).read()) except Exception, err: __version__ = '2.0.2.02' HTH, Mike [EMAIL PROTECTED] wrote: >I am using the new py2

Re: Teenagers of busses do *what*?

2005-09-29 Thread Mike C. Fletcher
t scared and fix your society. Entirely off-topic, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-06 Thread Mike C. Fletcher
iterators[1][0]) == 1: iterators.sort() continue if __name__ == "__main__": s1 = [10, 20, 30, 40, 50] s2 = [15, 25] s3 = [17, 27, 37] s4 = [] for value in inorder(cmp, s1, s2, s3, s4): print value Anyway, have fun, Mike --

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-07 Thread Mike C. Fletcher
value in inorder(cmp, s1, s2, s3, s4): print value s1 = [{'a':'b'}, {'a':'e'}] s2 = [{'a':'d'}, {'a':'z'}] def comp( a,b ): return cmp( a['a'],b['a']) for value in in

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-10 Thread Mike C. Fletcher
It's never used AFAICS. >def merge_by_sort(streams): > sources = [[s.next(), i, s.next] for i, s in enumerate(streams)] > while sources: >sources.sort(reverse=True) >best_source = sources[-1] > yield best_source[0] >try: best_source[0] = b

Re: graphic memory & animation

2005-10-17 Thread Mike C. Fletcher
ct direction to take? If so is it easy to interface with Python > (it seems PyOpenGL is not freeware...) PyOpenGL has a BSD-style license, that's about as 'free' as one can get in the freeware sense. Just a note, Mike -- ____ M

Re: System tray Icon

2005-10-24 Thread Mike C. Fletcher
I have a sample up here: http://blog.vrplumber.com/scripts/recordingdevices.py using wxPython. The sample application is Linux-specific, but it should give you a fairly good idea of how to use the system tray icon control in wxPython. HTH, Mike Mike Pippin wrote: > How would I have

Re: 3d Transformation

2005-11-29 Thread Mike C. Fletcher
nd has an accelerator C module for much of the functionality. The higher levels in OpenGLContext support compositing multiple transformations in a containment hierarchy for a scenegraph. See e.g. OpenGLContext/scenegraph/transform and OpenGLContext/scenegraph/nodepath module for that high

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Mike C. Fletcher
on version, but once you know that, Pythonicity in Gentoo is pretty straightforward. Anyway, just a vote that's trying very hard to keep on-topic for the python list, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http:

Re: new in programing

2005-12-09 Thread Mike C. Fletcher
r the last variable name). HTH, Mike Efrain Marrero wrote: >i want to now how to do this in python >this is java > > >for(int i=1 ; i<=lim ; i++){ > > for(int j=i+1; j<=lim+1; j++){ > > ... --

Re: Writing huve ge Sets() to disk

2005-01-10 Thread Mike C. Fletcher
randomly but just to walk down the pre-sorted data. Again, you don't really have a cursor with a dictionary (and since it's randomly ordered, a cursor wouldn't mean anything). A *btree* has an order, but not a dictionary. You

Re: Game programming in Python

2005-01-11 Thread Mike C. Fletcher
Lucas Raab wrote: Baza wrote: I'm looking for any books or on-line resources on game programming using Python. Does anyone have any advice? -- Computer says, 'no' www.panda3d.com, www.pygame.org, www.blender3d.com ... http://www.vrplumber.com/py3d.py?category

Re: Help Optimizing Word Search

2005-01-11 Thread Mike C. Fletcher
then some tweaks to the "expensive" loop to allow for up to wildcard-count ValueErrors. There's some (informal) analysis in the comments of that post regarding why its a fairly good mechanism for searching large sets of words. HTH, Mike Case Nelson wrote: ... Basically, the p

Re: Class introspection and dynamically determining function arguments

2005-01-21 Thread Mike C. Fletcher
t to pick out which names match the parameters for a function in order to pass them in to the function/method/callable object. That said, doing this for __init__'s with attribute values from an object's dictionary doesn't really seem like the proper way to approach the proble

Re: Class introspection and dynamically determining function arguments

2005-01-22 Thread Mike C. Fletcher
Bengt Richter wrote: On Fri, 21 Jan 2005 20:23:58 -0500, "Mike C. Fletcher" <[EMAIL PROTECTED]> wrote: On Thu, 20 Jan 2005 11:24:12 -, "Mark English" <[EMAIL PROTECTED]> wrote: ... Does the BasicProperty base class effectively register itself as an

Weakref.ref callbacks and eliminating __del__ methods

2005-01-23 Thread Mike C. Fletcher
ereabouts, so I gather there must be *some* way of handling the problem generally. The thing is, weakref callbacks trigger *after* the object is deconstructed, while __del__ triggers before... must be something clever I'm missing. Throw an old doggie a bone? Mike Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Weakref.ref callbacks and eliminating __del__ methods

2005-01-23 Thread Mike C. Fletcher
Alex Martelli wrote: Mike C. Fletcher <[EMAIL PROTECTED]> wrote: weakref.ref( self, self.close ) but the self.close reference in the instance is going away *before* the object is called. Uh -- what's holding on to this weakref.ref instance? I guess the weakreference

Re: Weakref.ref callbacks and eliminating __del__ methods

2005-01-24 Thread Mike C. Fletcher
ct (close btree if necessary)""" self() and we store one of these as self.close in the OIDStore instance' dictionary. self.close = Closer( self ) If the user explicitly calls storage.close() we don't want the __del__ trying to re-close the storage late

<    21   22   23   24   25   26   27   28   >