Re: win32com.client question

2008-02-13 Thread Mike Driscoll
On Feb 13, 8:05 am, Juan_Pablo <[EMAIL PROTECTED]> wrote: > import win32com.client > is posible in linux ? No. It's a Windows only Python extension. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Help Parsing an HTML File

2008-02-15 Thread Mike Driscoll
-4 > > > --HTML Example End-- Pyparsing, ElementTree and lxml are all good candidates as well. BeautifulSoup takes care of malformed html though. http://pyparsing.wikispaces.com/ http://effbot.org/zone/element-index.htm http://codespeak.net/lxml/ Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: basic wxpython help

2008-02-16 Thread Mike Driscoll
parent Then change your close event handler to this: def OnButtonClose(self, evt): dlg = wx.MessageDialog(self, "Are you sure you want to exit?", "Exit", wx.YES_NO | wx.ICON_QUESTION) if dlg.ShowModal() == wx.ID_YES: self.frame.Close() dl

Re: Pop-up Menu of a Graphics Image?

2008-02-16 Thread Mike Driscoll
Wayne Watson (Nevada City, CA) > > Web Page: wxPython can do a right-click menu like that and I know that PIL has been integrated into it as well. They have a Demo on the wxPython.org website that shows off all the official widgets as well as some custom scripts. If yo

Re: basic wxpython help

2008-02-17 Thread Mike Driscoll
On Feb 16, 3:06 pm, Vamp4L <[EMAIL PROTECTED]> wrote: > Thanks Mike, > Simple enough! I was wandering about the close method too, I had to > hack that together from what I knew about python already. I'll be > sure to join that mailing list. If you get the chance, che

Re: Cleaning Up an Application When the Window is Closed

2008-02-17 Thread Mike Driscoll
DELETE_WINDOW" in Tkinter. The following article details its usage near the bottom of the page under the heading "Protocols": http://www.pythonware.com/library/tkinter/introduction/events-and-bindings.htm It actually mentions your problem specifically. I've never done it as I

Re: Pmw Use and Grayson's Book

2008-02-17 Thread Mike Driscoll
think is now included with Python be default from 2.4 on up. It should be noted that PMW is not included with the standard Python distro though. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Pmw Use and Grayson's Book

2008-02-18 Thread Mike Driscoll
ut the > > lib he includes? Same folder as the example? > > Library modules (like Pmw) generally belong in site-packages (/usr/lib/ > python2.x/site-packages in most unixes... not sure about windows). > > HTH, > > Pete On Windows, most packages go here (adjust as needed for your setup): C:\Python24\Lib\site-packages Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: understaning "self"

2008-02-21 Thread Mike Driscoll
nvention, this argument is always named self. In the __init__ method, self refers to the newly created object; in other class methods, it refers to the instance whose method was called. Although you need to specify self explicitly when defining the method, you do not specify it when calling the method; Python will add it for you automatically." Hope that helps. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Plot always comes to focus on redraw

2008-02-21 Thread Mike Driscoll
he wxPython list where you'll get wx geeks to answer your question and you can learn a lot from them too. Here's a link where you can sign up: http://wxpython.org/maillist.php Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-21 Thread Mike Driscoll
can give me advice. > > But... Phatch is designed with flexibility in mind. If someone can point me > to a > free python library for Windows for EXIF and other metadata, I'll be happy to > integrate support for it in Phatch. Ideas anyone? > > Or you could write a python wrapper around the executable. > > Stani > -- > Phatch -http://photobatch.stani.be > SPE -http://pythonide.stani.be Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Windows Help

2008-02-21 Thread Mike Driscoll
import servicemanager > > servicemanager.LogInfoMsg("aservice - Recieved stop signal") > self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) > self.isAlive = False > > if __name__ == '__main__': > win32serviceutil.HandleCommandLine(BlobCheck) I would recommend cross-posting this to the PyWin32 mailing list. They'll either know what to do or tell you you can't. You can sign up here: http://mail.python.org/mailman/listinfo/python-win32 Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Ideas for a first course using Python

2008-02-21 Thread Mike Driscoll
guy's been doing it for a while now as a college course: http://mcsp.wartburg.edu/zelle/python/python-first.html Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-22 Thread Mike Driscoll
On Feb 22, 2:39 am, "SPE - Stani's Python Editor" <[EMAIL PROTECTED]> wrote: > On Feb 22, 1:41 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > On Feb 20, 4:19 am, Stani <[EMAIL PROTECTED]> wrote: > > > Even without python-pyexiv2 Phatch feat

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-25 Thread Mike Driscoll
efer exiv2 as it is much > faster:http://picurl.net/development/wiki/Exiv2vsExifTool > > I hope this gives enough pointers for people to bring EXIF & IPTC > support to Python and Phatch. > > Good luck, > Stani > -- > Phatch - PHoto bATCH processor -http://photobatch.stani.be > SPE- Python Editor & IDE -http://pythonide.stani.be I'll keep you posted, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a keypress

2008-02-25 Thread Mike Driscoll
his in a cross-platform way: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/134892 And a Windows only module: http://effbot.org/librarybook/msvcrt.htm HTH Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code for 2.5 and 2.4?

2008-02-25 Thread Mike Driscoll
at the beginning of your file by importing the sys module. Something like this: # untested import sys version = sys.version.split(' ')[0] if '2.5' not in version: # use custom all() script HTH Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code for 2.5 and 2.4?

2008-02-25 Thread Mike Driscoll
th the code that Robert gave you. I'm not sure of the exact syntax, but I would think you could do an IF statement that creates the custom definition and returns it if Python 2.4 or less is installed and return the normal version for 2.5 if it is installed. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows System Administration: State of the Art on Python?

2008-02-26 Thread Mike Driscoll
c.sabren.com/python/wmi_cookbook.html Tell us what you want to do and we'll tell you if (and maybe how) you can do it with Python. Mike -- http://mail.python.org/mailman/listinfo/python-list

Portable linux python install

2008-02-26 Thread Mike M
simple as installing the appropriate compat-* libraries. Is this possible? If so, what are the steps to do it? Has anyone ever tried to do something similar? I apologize if this is a ridiculously simple question, but things like this always throw me for a loop. Thanks in advance for any assi

Re: Run wxPython app remotely under XWindows

2008-02-29 Thread Mike Driscoll
the server? > > Just to close the loop I think think this is a problem with the ssh > server. > > ~Sean If it's not the server, then please post the issue to the wxPython list. They can probably help: http://wxpython.org/maillist.php Mike -- http://mail.python.org/mailman/listinfo/python-list

Trouble using XML Reader

2008-03-03 Thread Mike D
Hello, I'm using XML Reader (xml.sax.xmlreader.XMLReader) to create an rss reader. I can parse the file but am unsure how to extract the elements I require. For example: For each element I want the title and description. I have some stub code; I want to create a list of objects which include a

Regex loop question

2008-03-03 Thread Mike P
match.groups()[0] = "Activity_Time" time_manips = ("""COMPUTE %s = SUBSTR(%s,(INDEX(%s,'T'))+1) . COMPUTE %s = number(%s, TIME8). VARIABLE LABEL %s. VARIABLE LEVEL %s (SCALE). FORMATS %s (TIME8). VARIABLE WIDTH %s (8). EXECUTE.""") %(Var, Var, Var,time_variables[Var],Var,time_variables[Var],time_variables[Var],time_variables[Var],time_variables[Var]) print(time_manips) All help welcome, or if a different approach is better please let me know Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Talking to a usb device (serial terminal)

2008-03-03 Thread Mike Kent
> So my question is this - what is the easiest way to interface to this > "serial" device? > http://pyserial.sourceforge.net/ or perhaps http://pyusb.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Command line arguments in Windows

2008-03-03 Thread Mike Walker
I am having some problems with command line arguments in Windows. The same code under Linux works fine. In Windows I only get one argument no matter how many arguments are passed on the command line. I think there is some problem with the way the .py files are associated causing this. I'm just

Re: Command line arguments in Windows

2008-03-03 Thread Mike Walker
> If you run a python file, ie. just double clicking it the only > argument you will have will be the filename of the script. If you > create a shortcut to the script and in the target box add your > arguments (if you have quotation marks place them after not inside) > you will see your arguments

Re: Command line arguments in Windows

2008-03-03 Thread Mike Walker
\>ftype python.file python.file="C:\Python25\python.exe" "%1" %* I am using Python 2.5.2 from http://www.python.org/ running on Windows Vista. Would ActiveState's version be a better choice here? ~Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble using XML Reader

2008-03-04 Thread Mike D
On 3/3/08, Mike D <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm using XML Reader (xml.sax.xmlreader.XMLReader) to create an rss > reader. > > I can parse the file but am unsure how to extract the elements I require. > For example: For each element I want the tit

Re: Python an Exchange Server

2008-03-04 Thread Mike Driscoll
ailman/listinfo/python-win32 They talk about this sort of thing quite a bit. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a class?

2008-03-05 Thread Mike Driscoll
ork/defining_classes.html And for modules, check these out: http://docs.python.org/tut/node8.html http://www.penzilla.net/tutorials/python/modules/ Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Please keep the full address

2008-03-05 Thread Mike Driscoll
On Mar 5, 3:51 pm, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Wed, 5 Mar 2008 13:38:59 -0800 (PST) > > Mike Driscoll <[EMAIL PROTECTED]> wrote: > > On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote: > > I'm not sure why you change the addr

Re: Please keep the full address

2008-03-06 Thread Mike Driscoll
On Mar 5, 7:07 pm, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Wed, 5 Mar 2008 14:00:17 -0800 (PST) > > Mike Driscoll <[EMAIL PROTECTED]> wrote: > > What are you talking about? I didn't change the address at all. I'm > > not even

Re: Python on the renderfarm

2008-03-06 Thread Mike Driscoll
;s > also used to generate Python scripts automatically. These custom scripts > form unique pipelines for each computer graphics job to run on the > renderfarm." > > ''' That's neat. Phil Tippett has been one of my favorite Special Effects people and now he&#x

Re: system32 directory

2008-03-06 Thread Mike Driscoll
ider that > standard: it is in the python.org and ActivePython distros as of Python 2.5. > > Cheers, > Trent > > -- > Trent Mick > trentm at activestate.com As I understand it, ActivePython includes PyWin32 by default, unlike the "Official" Python distro. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Keep a python script running after browser window closed

2008-03-07 Thread Mike Driscoll
to open a second script that does the long-running process. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Intelligent Date & Time parsing

2008-03-07 Thread Mike Driscoll
y wrapper for the datetime module. The author's site has lots of examples as well as the source: http://labix.org/python-dateutil I use it quite a bit. HTH Mike -- http://mail.python.org/mailman/listinfo/python-list

DOM parsing not working!

2008-03-07 Thread Mike D
Hello, I've spent the morning trying to parse a simple xml file and have the following: import sys from xml.dom import minidom doc=minidom.parse('topstories.xml') items = doc.getElementsByTagName("item") text='' for i in items: t = i.firstChild print t.nodeName if t.nodeType == t.TEXT

Re: Uninstalling Eggs

2008-03-09 Thread Mike Driscoll
n2.3/site-packages/ directory? > > Cheers, Deleting the shove-egg folder is definitely the recommended and easiest way I know of to "uninstall" an egg. I've used it successfully before. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython/wxWidgets ok for production use ? (was Re: Quality assurance in Python projects containing C modules)

2008-03-10 Thread Mike Driscoll
n find out more about wxPython/wxWidget > problems? > > Thank you, > Malcolm We use wxPython here at work for new application development and have had no major problems with it once we knew what dlls to include. In my experience, I've needed gdiplus.dll, msvcp71.dll and MSVCR71.dll from time to time. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: lowercase u before string in "python for windows"

2008-03-10 Thread Mike Driscoll
o/python-win32 The maintainer of the project is a regular contributor to the list as are a number of other very knowledgeable Windows guys. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython/wxWidgets ok for production use ?

2008-03-10 Thread Mike Driscoll
e > API, for example). > > Stefan I agree with Stef. Boa is definitely goofy and while I know some people swear by it, I see far too many people having issues. I go with hand coding or XRC. Some also like SPE, but I haven't tried that to know. Mike -- http://mail.python.org/mailman/listinfo/python-list

[email protected]

2008-03-10 Thread Mike Driscoll
obably want to take a look at their wiki: http://wiki.wxpython.org/DragAndDrop http://wiki.wxpython.org/ListControls There's also a fair amount of data on the subject in their archives. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How to factor using Python?

2008-03-11 Thread Mike Hansen
8975665868645752218769838623717890808871334875974244952657480072373614614471639002293590745490978883 sage: b.is_prime() True --Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Dispatch("Excel.Application") failed

2008-03-13 Thread Mike Driscoll
of Windows are you using? Are you logged in as an admin? You also might try the PyWin32 user's mailing list: http://mail.python.org/mailman/listinfo/python-win32 Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for BlackBerry

2008-03-15 Thread Mike Driscoll
AM > To: [EMAIL PROTECTED] > Subject: Python for Palm OS > > Is there any other edition of Python for Palm OS instead of Pippy? > --http://mail.python.org/mailman/listinfo/python-list You might look at Mobile Python. I'm not sure if it works on Blackberry though: http://www.mobil

Re: Python and 3D

2008-03-15 Thread Mike Driscoll
em etc.. > > The goal is not to build a new renderer or something; just a small > program that I need to do some manipulations in bulk on a set of OBJs > > Any help much appreciated > > Eric I'm not aware of anything. You might look at pyOpenGL or pyglet. They shoul

Re: Code to send RSS news by Sendmail

2008-03-15 Thread Mike Driscoll
ks Try using Google next time. In the meantime, here's the wiki on RSS: http://wiki.python.org/moin/RssLibraries As for emailing it, you should check out the email module: http://docs.python.org/lib/module-email.html Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for BlackBerry

2008-03-16 Thread Mike Driscoll
On Mar 15, 9:52 pm, "Sandipan Gangopadhyay" <[EMAIL PROTECTED]> wrote: > Thanks, Mike. > This one seems to be for Nokia, particularly S60 and Symbian in general. > Does BlackBerry work on Symbian? Let me check. > Thanks. > Sandipan > > -Original

Re: Pycon disappointment

2008-03-16 Thread Mike Driscoll
tes weren't all bad. I thought the White Oaks guy was quite sincere and it was cool to hear about Python from the business side. And the Google rep probably had the slickest presentation I've ever seen. In retrospect, I'm not sure what it had to do with Python though. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython graphics query (newbie)

2008-03-17 Thread Mike Driscoll
newx = event.x >newy = event.y >canv.coords('current', newx, newy) > > makeFrame(root) > root.mainloop() > > Many thanks in advance > > -- Thomas Green Hmmm...I'm not sure how to do that. Please post this same question to the wxPython user's group. They'll know if anyone does: http://wxpython.org/maillist.php Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon Feedback and Volunteers ( Pycon disappointment)

2008-03-17 Thread Mike Driscoll
zed code." > --Bill Harlan You have a lot of good points, Aahz. I was thinking of the talks and such as a kind of seminar learning event, not a participatory community event. I went for two reasons: 1) To learn more Plone / Zope 2) To hang out with Python geeks The first one I didn't really get anywhere with, but I got lots of time with PyCon attendees, which was cool. I hope I can go next year, make new friends and maybe present some of my own stuff. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Pycon disappointment

2008-03-18 Thread Mike Orr
ions was unusually low. I did feel that. An advanced track would be a good idea. Because you do need to repeat stuff for the newbies. At least 30% of the attendees were at PyCon for the first time. --Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-18 Thread Mike Driscoll
n Activity (#9)" session with Mr. John Harrison was also quite full as was the one for Pyglet. I think the nose presentation had people sitting on the floor. Geeks like games! I know I do! Mike -- http://mail.python.org/mailman/listinfo/python-list

PODCasts

2008-03-19 Thread Mike D
I really should say net cast as I think it's a better term ;) Does anyone have any recommended net casts on Python, or programming in general? Whats everyone listening to? Cheers Guys! -- http://mail.python.org/mailman/listinfo/python-list

Re: Improving datetime

2008-03-19 Thread Mike Driscoll
the PEP process works though. If you give your thoughts in a PEP- like format, you'd probably be taken more seriously though. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: modules devoted to manipulationg .reg files

2008-03-19 Thread Mike Driscoll
just edit the Windows Registry directly using the built- in module: _winreg. There's also a more abstract wrapper called YARW. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: csv dictreader

2008-03-19 Thread Mike Driscoll
o this directory What do you mean? You can get each element in the dict by doing this: for row in reader: print row['Bytecode'] print row['Element'] > 2. why does the values come with two backslashs infront of the "x" The double back slash is for escaping purposes, I think. If you print this: '\\x09\\x00' you'll get this: \x09\x00 Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: csv dictreader

2008-03-19 Thread Mike Driscoll
On Mar 19, 1:55 pm, brnstrmrs <[EMAIL PROTECTED]> wrote: > On Mar 19, 2:32 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Mar 19, 1:06 pm, brnstrmrs <[EMAIL PROTECTED]> wrote: > > > > I am trying to use the dictionary reader to import the

Re: Is this valid ?

2008-03-19 Thread Mike Driscoll
t way... See http://www.python.org/doc/2.3.5/ref/comparisons.html for more info. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this doable

2008-03-21 Thread Mike Driscoll
d when the user logs on. So I'll leave that to you. Of course, my program is made into an executable, but it should work the same. Maybe that will give you some ideas anyway. Mike -- http://mail.python.org/mailman/listinfo/python-list

Open Web Vancouver 2008: A Conference on Open Web Technologies

2008-03-23 Thread Mike Cantelon
When: Monday April 14 - Tuesday April 15th 2008 Where: Vancouver Convention & Exhibition Centre (VCEC), 999 Canada Place. What: A conference showcasing open source technologies, communities and culture. We are featuring talks from all areas of open source technologies such as PHP, Python, Ruby on

Re: Is IronPython real Python?

2008-03-24 Thread Mike Driscoll
to import Java libraries. The main IronPython website has a wiki that outlines the differences: http://www.codeplex.com/IronPython/Wiki/View.aspx?title=Differences&referringTitle=Home Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: New to group

2008-03-24 Thread Mike Driscoll
quot; no such attribute " in module random > > platform is xp home and the python build is activestate 2.5 > > All help much appreciated ! Please post the code that throws this error along with the entire traceback. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon video editing

2008-03-24 Thread Mike Driscoll
t; > --amk Somebody has stuck a few videos on Youtube already: http://www.youtube.com/user/pycon08 Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: A question on decorators

2008-03-26 Thread Mike Driscoll
lly every time a method in dict or a sub class is called. I > feel like this must be possible. Has any one here done anything like > this before? > > Thank you for reading my long post, I hope you understand what I am > asking especially since the code in it is not very good. > > cheers > Tim Henderson Why aren't you using SQLAlchemy or SQLObject? I think they would work better than this and give you a lot more flexibility. Besides, you should use sqlite rather than pickle databases. It's especially easy since sqlite is included with Python 2.5. Mike -- http://mail.python.org/mailman/listinfo/python-list

Simple CGI-XMLRPC failure

2009-01-12 Thread Mike MacHenry
ine 1340, in _parse_response return u.close() File "/usr/lib/python2.5/xmlrpclib.py", line 787, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: :method "i" is not supported'> Does anyone know what might be wrong with this? Thanks for the help, -mik

Re: Simple CGI-XMLRPC failure

2009-01-13 Thread Mike MacHenry
e? If you which version? Does anyone know of any environment settings I could look into on Apache or Python? -mike On Mon, Jan 12, 2009 at 9:02 PM, Jeff McNeil wrote: > On Jan 12, 12:40 pm, "Mike MacHenry" wrote: >> I am having a difficult time understanding why my very s

Re: LGPL license for Qt 4.5

2009-01-14 Thread Mike Driscoll
ython uses native widgets whenever possible. While this allows Qt to have skinning (a plus!), it also can make them look less than native (a minus!). If they do release a LGPL version, I may take a look at it just to see how different it is, although I'm pretty happy with what I'm using. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get first/last day of the previous month?

2009-01-20 Thread Mike Driscoll
advance. I recommend the dateutil module: http://labix.org/python-dateutil I think it may also be possible to use the datetime module, but it's easier to just use dateutil. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
t; Thanks I'm not sure how you arrived at that low number. If you go to the main page on the Google Groups version, you'll count at least 20 on page 1: http://groups.google.com/group/comp.lang.python/topics Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
hings to do...and his employer probably doesn't want him spending all day answering stuff like that. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: pyAA for Python2.5

2009-01-27 Thread Mike Driscoll
> > Has anyone tried the same? Can anyone give any suggestions? You probably have to put mingw32 on your path or provide an absolute path to it. By the way, where did you get the source? I couldn't find it... Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
gt; -- [mdw] I don't know if we should encourage the use of pythons as thongs myself...I didn't even know there was a group on that topic. ;) Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
over the last 9 years, but only about once a > year for the last 3 years. > > For comparison, according to Google I've managed 2251 posts to clp since 1997 > which I find kind of scary. That's not scary! I've managed over 1100 posts since 2007... Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Monitor Internet connections in XP/Vista

2009-02-02 Thread Mike Driscoll
re taken, based on fixed policies. > This can be thought of a mini firewall. > > I am sure there must be some good libraries for this purpose. I need > the names of those libraries. > > Thanks, > > Pranav Prakash You could try urllib2, socket or just call ping with subproces

Re: Reading text file with wierd file extension?

2009-02-02 Thread Mike Driscoll
On Feb 2, 1:20 pm, Lionel wrote: > On Feb 2, 10:41 am, Mike Driscoll wrote: > > > > > On Feb 2, 12:36 pm, Lionel wrote: > > > > Hi Folks, Python newbie here. > > > > I'm trying to open (for reading) a text file with the following > >

Re: Reading text file with wierd file extension?

2009-02-02 Thread Mike Driscoll
Error opening " + ResourceFilepath) >             DataFH.close() >             return None > > Console output when invoking as "someObject = C8DataType("C:\ > \C8Example1.slc")" : > > C:\C8Example1.slc > C:\C8Example1.slc.src > [Errno 2] No such file

Re: Reading text file with wierd file extension?

2009-02-02 Thread Mike Driscoll
xtFile.slc.rsc) and get Python to open it as a text > file? Thanks in advance everyone! The extension shouldn't matter. I tried creating a file with the same extension as yours and Python 2.5.2 opened it and read it no problem. I tried it in IDLE and with Wing on Windows XP. What are you using? What's the complete traceback? Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: function scope

2009-02-02 Thread Mike Kent
On Feb 2, 6:40 pm, Baris Demir wrote: > def simpleCut(d=dict()): >        temp=d >        for i in temp.keys(): >            if    (temp[i] == ...) : >               temp[i]=new_value > return temp You have been bitten by the shared default parameter noobie trap: http://www.python.org/doc/fa

Re: Reading text file with wierd file extension?

2009-02-02 Thread Mike Driscoll
On Feb 2, 8:08 pm, Lionel wrote: > On Feb 2, 5:40 pm, "Rhodri James" wrote: > > > > > [Quoting restored for reduced > > > On Mon, 02 Feb 2009 22:33:50 -, Lionel wrote: > > > On Feb 2, 2:01 pm, Mike Driscoll wrote: > > >> On Feb 2, 3

Re: Locating python

2009-02-03 Thread Mike Driscoll
ools package, change directory into it. Then run something like this: /path/to/python setup.py install I think that will work...of course, your mileage may vary. I haven't used SUSE. Doesn't SUSE have a package manager like Ubuntu's apt-get? You might be able to just use that too.. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Couple of noobish question

2009-02-04 Thread Mike Driscoll
o far. You just use the keyword "import". Here's a goofy example: 1) foo.py contains a class called Foo 2) bar.py contains a script that imports Foo: import foo # create an instance of the Foo class myFoo = foo.Foo() I hope that was clear. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find wxPython method documentation??

2009-02-05 Thread Mike Driscoll
gt; can be worth it. > > good luck, > andrew I don't think the docs are any worse than any other complicated third party package. Reportlab comes to mind...and the wxPython list members are very helpful. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find wxPython method documentation??

2009-02-05 Thread Mike Driscoll
ho seems to have a lot of free time: http://xoomer.virgilio.it/infinity77/wxPython/index.html The wiki is also helpful: http://wiki.wxpython.org/ But I concur that the mailing list is definitely THE place to be to learn the most once you've gotten comfortable with the toolkit. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: database wrapper ?

2009-02-05 Thread Mike Orr
On Feb 1, 3:47 pm, Stephen Hansen wrote: > Googling, I found SQLalchemy, > which looks quit good. > SQLAlchemy is very good. I'm very slowly migrating our entire codebase to it. >   > > > But as I only want to choose once, > I googled for  "SQLalchemy alternatives", > but it didn't find many answe

Re: Object explorer for python ?

2009-02-06 Thread Mike Driscoll
ight like eric. Links are below: http://eric-ide.python-projects.org/index.html http://www.wingware.com/ Other editors: http://wiki.python.org/moin/PythonEditors Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython vs Glade?

2009-02-09 Thread Mike Driscoll
ling list regardless of what you pick though as you'll likely pick up a LOT of helpful tips and tricks there. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Pycon 2009 Hotel?

2009-02-11 Thread Mike Driscoll
#x27;m wondering if I'm being 'penny-wise and pound-foolish'?  I'd hate > to spend all that money to get there and then not enjoy it because I > was at the 'other' hotel. > > ... > Jay Graves As I understand it, the hotels are connected via a skywalk, so I don't think it will be a big deal either way. It just means a little extra walking. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Mike Driscoll
some kind of GUI and its GUI and IDLE's are clashing somehow. I see this sort of thing with some of my wxPython programs from time to time, although IDLE usually just crashes with no error message. I would recommend using the command line or something that can open it in a completely separate process, such as Wingware's IDE. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Mike Driscoll
ist.php I've never done this sort of thing with wxPython, but you may be able to use wx.Yield somehow. There are various tips and tricks in the wiki about working around long running processes that block the GUI's mainloop here: http://wiki.wxpython.org/LongRunningTasks Other than that, I would recommend doing this with pygame or pyglet as they might be easier to use for this use-case. Here are their sites: http://www.pyglet.org/ http://www.pygame.org/news.html HTH Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Mike Driscoll
Dunn can put the smack down on his web hosts... Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Mike Driscoll
lt: boom > c. run pyWin and execute program > d. do same as b for pyWin > resulst: all OK > e. repeat a and b. > Result: boom > > Repeat the above and you get the same results. > > I had running IDLE successfully w/o using Pywin, and IDLE goofed, as above. > I switched to it to see if it work there. It did. I double clicked on the py > file, and it worked fine. Can you explain this? > > -- >                                 W. eWatson > >               (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) >                Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet > >                      Web Page: What Steve (and I) are saying is that IDLE has it's own mainloop and your program has a mainloop too as it sounds like it is running a Tkinter app. Sometimes when you run a Tk app from another Tk app, the two mainloops clash and have weird issue like this one. If you just double-click it or run it from the command line, you only have one mainloop (i.e. the one that's part of your app). Thus, no conflicts. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Untangling pythonWin and IDLE Processes on XP Pro

2009-02-12 Thread Mike Driscoll
quot; N, 121° 2' 32" W, 2700 feet > >                      Web Page: I like IDLE too. However, I've experienced seemingly random crashes when programming wxPython programs in it. As already stated, the mainloops clash from time to time. So now I use Wingware or just edit the files in IDLE and run the program by double-click or via command line. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Upgrading standard library module

2009-02-13 Thread Mike Driscoll
in a virtualenv and then try the new version of Python 2.6 in another virtualenv. See http://pypi.python.org/pypi/virtualenv for more info. As long as your 3rd party packages are pure python, you should be ok. If they depend on c/c++ headers, then you may have issues. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there something easier than ORM?

2009-02-17 Thread Mike Driscoll
ore. If you don't want any unexpected database operations, don't call flush () or commit() or just call rollback() BEFORE you do any real operations. There is a good sqlalchemy mailing list where even the developers hang out and answer questions. I'm sure they could point you in the r

Re: wxPython and Croatian characters

2009-02-17 Thread Mike Driscoll
. > > Any examples? > > Regards, > John You'll need to look at the python database connector's docs and/or MySQL's docs to know how to do that. It would help to know what you are using to connect to the database: pyodbc, adodb, sqlalchemy? Most of those

Re: Which Version of wxPython for Win XP

2009-02-19 Thread Mike Driscoll
pyc files. This is normal and is a speed improvement. In fact, a lot of the scripts you write will create a pyc file when first run. In other words, wxPython does not affect your Python install in any way other than making itself available as a 3rd party package (i.e. adding itself to the path), just like any other good 3rd party package. I'm not sure why you're even talking about IDLE...wxPython is a GUI toolkit, not an IDE. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Newby Question for reading a file

2009-02-19 Thread Mike Driscoll
pen("someFile.txt") for line in f: # do something with the line print line f.close() Of course, you can read just portions of the file too, using something like this: f.read(64) Which will read 64 bytes. For more info, check the following out: http://www.diveintopython.org/file_h

Re: iterating through files

2009-02-19 Thread Mike Driscoll
loop that loops over the list of files. Anyway, that's one approach. I'm sure there are many others. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating through files

2009-02-19 Thread Mike Driscoll
On Feb 19, 4:22 pm, Mike Driscoll wrote: > On Feb 19, 3:56 pm, oamram wrote: > > > Hi Pythonist, > > new to python. i have a directory with about 50 text file and i need to > > iterate through them and get > > line 7 to 11 from each file and write those lines into

<    15   16   17   18   19   20   21   22   23   24   >