Re: What is acceptable as 'open-source'? [was Python vs C++]

2014-08-27 Thread Frank Millman
re are plenty of other comments in the code, mostly reminders to myself about various issues. I don't know open-source etiquette. Should I spend the time to sort this out before going public, or is it acceptable to leave it as is for now? Any other comments? Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: What is acceptable as 'open-source'? [was Python vs C++]

2014-08-28 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmp_jfxth_l6us30gbotmbyhw_imu-pjdglevgj2nut...@mail.gmail.com... > On Wed, Aug 27, 2014 at 5:50 PM, Frank Millman wrote: >> >> This is quite a timely message for me. I am inching closer to releasing a >> version of my

python 3.4 use python-gcm can't import

2014-08-28 Thread Frank Liou
i just from gcm import GCM then Traceback (most recent call last): File "C:/Users/frank/Desktop/SinyiAPI/SinyiAPI.py", line 7, in from Model.Order import Order File "C:\Users\frank\Desktop\SinyiAPI\Model\Order.py", line 7, in from gcm.gcm import GCM File ""

Re: python 3.4 use python-gcm can't import

2014-08-29 Thread Frank Liou
what? So...My 3.4 can't use this package? now i use http.client reg_ids = [] reg_ids.append(GetCustomerGCMId[0]) API_KEY = 'xxx' mydata = {'registration_ids': reg_ids, 'data': data} jqs = json.dumps(mydata)

Keeping python code and database in sync

2014-08-29 Thread Frank Millman
numbers will no longer match, and I can run the upgrade program. The problem with that is that version numbers are usually reserved for tagged releases, but this could happen as the result of any commit in the current development cycle. Any suggestions? Frank Millman -- https

Re: Keeping python code and database in sync

2014-08-29 Thread Frank Millman
"Rustom Mody" wrote in message news:[email protected]... > On Friday, August 29, 2014 6:12:06 PM UTC+5:30, Frank Millman wrote: >> Hi all > >> Now that I have bitten the bullet and published my repository, I am >> forced

Re: Keeping python code and database in sync

2014-08-29 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmrJBciRuterUKWP=qtqxd8xyqum4nx+ofd-twm5oos...@mail.gmail.com... > On Fri, Aug 29, 2014 at 10:42 PM, Frank Millman > wrote: >> It is a simple matter to write a program that updates the database >> automatically. The ques

Re: Keeping python code and database in sync

2014-08-29 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmp68kh5zcxq50pi0yeaaapnqotxybg1+f58mv__xd9...@mail.gmail.com... > On Fri, Aug 29, 2014 at 11:31 PM, Frank Millman > wrote: >> Right now I am writing a tool to allow users to view and modify menu >> definitions. Th

AccInABox now has a wiki page (almost)

2014-09-03 Thread Frank Millman
Hi all After putting my AccInABox package up on GitHub and letting a few people know about it, I received the following response - > > From: "Stéfan van der Walt" > > Hi Frank > > It would be great if the readme would list some features of the software > > so

Python Crypto Singature do not support Android???

2014-09-05 Thread Frank Liou
I use Privatekey sign a signature by android and then send to python python can't use public key to verify and python signature result all is number but android is number and english words is that no support?? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Crypto Singature do not support Android???

2014-09-05 Thread Frank Liou
Sorry!! here is my code python : msg = '123' msg = msg.encode('utf-8') digest = SHA.new(msg).digest() signature = APP_key_Private.sign(digest, '') signature like: (3313609575189770456309776952388055366479183814159935747487353823698464644111856144652004406811762087026328804664486509214841694613

Run an http server on Apache without wsgi?

2014-09-05 Thread Frank Millman
started. Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: Passing a list into a list .append() method

2014-09-08 Thread Frank Millman
pports iteration, or an iterator object. If iterable is already a list, a copy is made and returned, similar to iterable[:]. [*] For example, list('abc') returns ['a', 'b', 'c'] and list( (1, 2, 3) ) returns [1, 2, 3]. If no argument is given, the constructor creates a new empty list, []. """ I marked the relevant line with [*] HTH Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

[OT] Question about Git branches

2014-09-15 Thread Frank Millman
ch is not always obvious - choose which altered files you want to add to the staging area - stage them and then commit This seems error-prone. Am I missing something? Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Question about Git branches

2014-09-16 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmr5gh8=1zPjG_KdTmA2QgT_5jj=kh=jyvrfv1atl1e...@mail.gmail.com... > On Tue, Sep 16, 2014 at 6:21 PM, Marko Rauhamaa wrote: >> "Frank Millman" : >> >>> You are encouraged to make liberal use of 'branche

Re: [OT] Question about Git branches

2014-09-16 Thread Frank Millman
"Albert-Jan Roskam" wrote in message > > > I like "Pragmatic guide to Git". 122 pages, to the point, practical. > Thanks, Albert-Jan. I have started reading it, and it looks useful. Thanks too for your previous response, which was also 'pragmatic and t

Re: [OT] Question about Git branches

2014-09-17 Thread Frank Millman
"Sergey Organov" wrote in message news:[email protected]... > "Frank Millman" writes: >> Hi all >> [snip lots of really valuable information] > Thanks a stack, Sergey, that is a really useful explanation. For the record, this is wher

Python assignment auto-grading

2014-09-19 Thread Frank Cui
Hi Folks, I'm seeking some suggestions and recommendations for python assignments auto grading. Hopefully this tool will have all or some of the following attributes : 1) Easy to set up and maintain (i.e. minimal workload in terms of sysadmin and webdev, is there a recommended cloud service ? )2)

PIL can't read binary

2014-09-23 Thread Frank Liou
I use PIL Image.open() but it show 'list' object has no attribute 'open' this is my code class Image2(): trans = connection.begin() session = Session() ProductId = session.query(ProductEntity.ProductId).filter(ProductEntity.CompanyId=="2").all() Image = session.query(ProductI

Graphing

2011-09-21 Thread Frank Ruiz
I am looking to plot some data points related to system metrics. Benchmarking, etc. Can someone give some recommendations on a good way to graph these datapoints in python. I started looking into matplotlib, however was interested in others experiences. -- http://mail.python.org/mailman/listinfo/p

Memory

2011-10-07 Thread Frank Ruiz
Quick question, What is the best way for pulling resource information for a system running linux? Was wondering if there was a python only way. Methods I am aware of are: 1. Parsing contents of /proc 2. Running a system command like free, or dmidecode and parsing the output. Is there any other

Question about 'iterable cursors'

2011-11-06 Thread Frank Millman
on that my thinking is correct on this issue. Or is there any way that I can have my cake and eat it? Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about 'iterable cursors'

2011-11-06 Thread Frank Millman
"Alain Ketterlin" wrote "Frank Millman" writes: I am using a few DB_API adaptors - ceODBC for Sql Server, psycopg2 for PostgreSQL, and sqlite3 for sqlite3. They all offer the feature that if a cursor executes a SELECT, the cursor returns an iterator which can be used t

Re: Newbie Question: Obtain element from list of tuples

2011-12-18 Thread Frank Millman
cPID = slice(15, 16) pid, = row[cPID] # note the trailing comma pid 15 Still nice, but not quite so elegant. Am I missing something? Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Explanation about for

2012-01-10 Thread Frank Millman
elements to their own names For the first iteration, row is the tuple ('foo', 7, 'IE6', '1/1/11') For the next iteration, row is the tuple ('bar', 42, 'Firefox', '2/2/10') For the next iteration, row is the tuple ('baz', 4, 

Re: Python scheduler

2013-02-20 Thread Frank Millman
ities, you could have one class per activity, or have a generic class, and pass in the executable and the timeout as parameters. HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Question about defaultdict

2013-02-23 Thread Frank Millman
s called without any arguments. It is not a problem, but it would be neat if I could get it to work. Am I missing anything? Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about defaultdict

2013-02-23 Thread Frank Millman
On 23/02/2013 12:13, Frank Millman wrote: Hi all I use a dictionary as a cache, and I thought that I could replace it with collections.defaultdict, but it does not work the way I expected (python 3.3.0). > [...] from collections import defaultdict my_cache = defaultdict(fetch_object) my_

Re: Question about defaultdict

2013-02-23 Thread Frank Millman
On 23/02/2013 13:02, Peter Otten wrote: Frank Millman wrote: On 23/02/2013 12:13, Frank Millman wrote: Hi all I use a dictionary as a cache, and I thought that I could replace it with collections.defaultdict, but it does not work the way I expected (python 3.3.0). > [...] f

Re: PyQT app accessible over network?

2013-02-24 Thread Frank Millman
y comments will be appreciated. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQT app accessible over network?

2013-02-25 Thread Frank Millman
On 25/02/2013 08:35, Chris Angelico wrote: On Mon, Feb 25, 2013 at 5:14 PM, Frank Millman wrote: On 24/02/2013 16:58, Chris Angelico wrote: MySQL has a philosophical structure of "user logs in to app, but app logs in to database as superuser regardless of user login". Out of cur

Just curious - I thought dict keys would maintain sequence

2013-03-18 Thread Frank Millman
same sequence. As you can see, the results appear to be totally random. Just out of interest, I would appreciate an explanation. Thanks Frank Millman F:\>type test.py test_list = [ 'ert', 'jhg', 'yer', 'nli', 'vrg', 'qnh&#

Re: Just curious - I thought dict keys would maintain sequence

2013-03-18 Thread Frank Millman
On 18/03/2013 09:31, Chris Angelico wrote: On Mon, Mar 18, 2013 at 6:26 PM, Frank Millman wrote: Hi all I know that you cannot rely on the order of keys in a dictionary, and I am not attempting to do so. Nevertheless, the following surprised me. A program creates a dictionary with a known

Best way to find starting directory

2013-03-19 Thread Frank Millman
will return the wrong result if os.chdir() has been executed, but I don't do that. Apart from that, is either version preferred over the other, or is there another way? Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to find starting directory

2013-03-19 Thread Frank Millman
On 19/03/2013 09:55, Peter Otten wrote: Frank Millman wrote: I want to locate a file relative to the directory from which the main program was launched. I have found two ways of finding the starting directory - 1. import os dir = os.getcwd() This gives the current working directory... 2

Re: Best way to find starting directory

2013-03-19 Thread Frank Millman
On 19/03/2013 14:46, Dave Angel wrote: On 03/19/2013 04:21 AM, Frank Millman wrote: On 19/03/2013 09:55, Peter Otten wrote: Frank Millman wrote: I want to locate a file relative to the directory from which the main program was launched. I have found two ways of finding the starting

Re: Best way to find starting directory

2013-03-19 Thread Frank Millman
On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: As you say, there is a variety of types of data that one might to store externally. My current scenario is that, in my business/accounting application, I use xml to store

Re: Best way to find starting directory

2013-03-20 Thread Frank Millman
On 20/03/2013 10:56, Dave Angel wrote: On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: In putting them there, you are making two assumptions. One is that only one user

True/False formats as 1/0 in a fixed width string

2013-03-27 Thread Frank Millman
rue/False in a fixed width string, but it returns 1/0 instead. Is there any way to make this work? Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: True/False formats as 1/0 in a fixed width string

2013-03-27 Thread Frank Millman
On 27/03/2013 10:52, Peter Otten wrote: Frank Millman wrote: >>> '{}'.format(True) 'True' >>> '{:<10}'.format(True) '1' One might want to format True/False in a fixed width string, but it returns 1/0 instead. Is there any way to

Re: True/False formats as 1/0 in a fixed width string

2013-03-27 Thread Frank Millman
On 27/03/2013 10:55, Dave Angel wrote: On 03/27/2013 04:40 AM, Frank Millman wrote: Hi all This is a bit of trivia, really, as I don't need a solution. But someone might need it one day, so it is worth mentioning. >>> '{}'.format(True) 'True' >>&

Re: How to get the local mac address?

2005-12-14 Thread Frank Millman
line.find('Ether') > -1: mac = line.split()[4] break return mac HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the local mac address?

2005-12-15 Thread Frank Millman
[EMAIL PROTECTED] wrote: > Frank Millman wrote: > > [EMAIL PROTECTED] wrote: > > > Sorry that I can't help you in any way but have a question myself. Is > > > there an OS independent way to get this thing(regardless of how to > > > format it) in Pytho

Re: Windows Services

2005-12-15 Thread Frank Millman
any program as a service. It is part of the NT Resource Kit. I downloaded it and it works fine for me. Google has plenty of references. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

xml with python <-> python deprecated - why?

2005-12-20 Thread Frank Millman
much identical. The second method results in a slightly longer string. I am curious. Why is xml frowned upon? Is my new method ok, or is there a better way? Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: xml with python <-> python deprecated - why?

2005-12-20 Thread Frank Millman
Duncan Booth wrote: > Frank Millman wrote: > > > > > I am curious. Why is xml frowned upon? Is my new method ok, or is there > > a better way? > > Using XML gives you portability at the expense of increased code > manipulating the data structures. > > Try cr

Preventing control characters from entering an XML file

2006-01-01 Thread Frank Niessink
e writexml method of the document created by the object returned by domImplementation() allow control characters? Isn't that a bug? - What is the easiest/most pythonic (preferably build-in) way of checking a unicode string for control characters and weeding those characters out? Thanks, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: inserting/retriving dates in psycopg

2006-01-05 Thread Frank Millman
ving a bit trickier, as I have standardised on using the datetime.datetime type throughout my app, but I have a mixture of DATE and TIMESTAMP types in my database. Therefore I convert the result as follows - import datetime as dt def DbToDate(dat): if isinstance(dat,dt.datetime): return dat # already in datetime format if isinstance(dat,dt.date): return dt.datetime.combine(dat,dt.time(0)) # convert to datetime HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: inserting/retriving dates in psycopg

2006-01-05 Thread Frank Millman
Michele Simionato wrote: > Frank Millman: > > > import datetime as dt > > > def DbToDate(dat): > >if isinstance(dat,dt.datetime): > >return dat # already in datetime format > >if isinstance(dat,dt.date): > >return dt.datetime.c

Re: Preventing control characters from entering an XML file

2006-01-05 Thread Frank Niessink
Scott David Daniels wrote: > Frank Niessink wrote: > >>- What is the easiest/most pythonic (preferably build-in) way of >>checking a unicode string for control characters and weeding those >>characters out? > > > drop_controls = [Non

Re: MVC programming with python (newbie) - please help

2006-01-06 Thread Frank Niessink
heme for wx.TreeCtrl, though that requires (much) more work because the TreeCtrl has no build-in virtual mode. That's what I did for the TreeListCtrl in Task Coach (http://taskcoach.niessink.com), see http://cvs.sourceforge.net/viewcvs.py/taskcoach/taskcoach/taskcoachlib/widgets/treectrl.py?view=markup HTH, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: decorator question

2006-01-08 Thread Frank Niessink
return wrapper return actual_timelogger @timelogger(logfile=file("hierher", "a"))### <<<<<< (1) def loops(a,b,c): sum = 0 for i in range(a): for j in range(b): for k in range(c): sum += 1 loops(100,100,100) Cheers, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Failing unittest Test cases

2006-01-10 Thread Frank Niessink
ibraryCannotComputeSquareOfZero(self): self.assertEqual(-1, tplibrary.square(0), 'They finally fixed that bug in tplibrary.square') Doesn't it defy the purpose of unittests to give them a easy switch so that programmers can turn them off whenever they want to? Cheers, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set a wx.textctrl can editable or readonly?

2006-01-18 Thread Frank Millman
Then do something like this - def onGotFocus(self,evt): if readonly: self.Navigate() This causes the control to react as if the user press 'tab'. By default it always tabs forwards, but it takes an optional 'IsForward' argument - set it to False to tab backwa

Re: How to set a wx.textctrl can editable or readonly?

2006-01-18 Thread Frank Millman
Frank Millman wrote: > > def onGotFocus(self,evt): > if readonly: > self.Navigate() > Oops - I meant 'if self.readonly' ... Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set a wx.textctrl can editable or readonly?

2006-01-18 Thread Frank Millman
lly, you should be able to copy text from a read-only > control, so ousting the focus may not be quite the right thing to do. > Good point. Alternative approaches would be to trap EVT_KEY_DOWN or EVT_TEXT to detect and block attempts to modify the contents of the control. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Frank Millman
ou can guarantee that one thread completes its processing before another one attempts to access the database. You can use threading locks to assist with this. HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: project ideas

2006-01-19 Thread Frank Niessink
Test-driven development" to your list, hope that's not a problem :-) Cheers, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set a wx.textctrl can editable or readonly?

2006-01-19 Thread Frank Millman
LY. You can toggle it on and off after creation by using self.SetEditable(True/False). When set to False, it behaves according to your requirements. It can receive focus, you can copy its contents, but any attempt to alter its contents, but any means, is ignored. I have learned something new - thanks. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Frank Millman
r = self.s.accept() Link(args=(self,conn)).start() # create thread to handle connection except KeyboardInterrupt: self.shutdown() Controller().mainloop() TIA Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple modules with database access + general app design?

2006-01-20 Thread Frank Millman
Daniel Dittmar wrote: > Frank Millman wrote: > > I have subclassed threading.Thread, and I store a number of attributes > > within the subclass that are local to the thread. It seems to work > > fine, but according to what you say (and according to the Python docs, > >

Re: XMLRPC Solution Code

2006-07-18 Thread Frank Millman
Win32 extensions or other complications. I have not run it in a heavy-duty environment so I don't know if there are any problems with it. I have it set up on my Windows 2003 Server, and after a restart, my server program is automatically started as a service and any client can connect straight away. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: TextCtrl focus events in wxWidgets

2006-07-19 Thread Frank Millman
t "set Plant" > > When the control loses focus, I don't get the message in the console. > I'm trapping other events successfuly elsewhere using similar code. > > Simon Hibbs > Try self.PlantCtrl.Bind(wx.EVT_KILL_FOCUS, self.OnUpdatePlantCtrl) Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: TextCtrl focus events in wxWidgets

2006-07-19 Thread Frank Millman
Simon Hibbs wrote: > Frank Millman wrote: > > > Try self.PlantCtrl.Bind(wx.EVT_KILL_FOCUS, self.OnUpdatePlantCtrl) > > And Voila! It works. Many, many thanks. > My pleasure > Any idea what is going on? I only understand it in simple terms, though it can get co

Re: TextCtrl focus events in wxWidgets

2006-07-19 Thread Frank Millman
nfortunately, it is not, and therefore it was not passed up to 'self' for handling. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: questions to anyone who uses wxPython

2006-07-19 Thread Frank Millman
ace gets corrupted? Nevertheless, the following pointer may help - http://tinyurl.com/hj84l It is an article in the wxPyWiki that discusses various ways of handling longrunning tasks. HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: 2 timers, doesnt work?

2006-07-25 Thread Frank Millman
ng the id. That way you are guaranteed to get a unique id. In a large project it can be difficult to keep track of which id's have been used if they are all hard-coded. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Zope hosting

2006-08-19 Thread Frank Krugmann
I'am searching a cheap ZPP Hoster. Some informations? Greetings Escorial2000 -- http://mail.python.org/mailman/listinfo/python-list

C++ to Python?

2006-10-10 Thread Frank Martinez
Hi, Everybody! Does anyone know of a cpp2py type application?  Without going into details, I need to port a bunch of C++ code to Python.  Any such converter/information would be helpful. Thanks. Hi, my name is Ray and, on Yesterday, my Daughter called me. -- A man named 'Ray'. -- http://mail.pytho

Re: C++ to Python?

2006-10-10 Thread Frank Martinez
Hi, Roman. Thanks.  I seem a bit confused.  Does Py++ actually convert the C++ code to Python or does it just provide a wrapper to C++ code? You say tomater, I zader matermorts. -- Coach Z, Homestarrunner.com On Oct 10, 2006, at 3:55 PM, Roman Yakovenko wrote:On 10/10/06, Frank Martinez <[EM

Re: correct parameter usage for "select * where id in ..."

2006-10-28 Thread Frank Millman
rsor() cu.execute(sql, values) It works with odbc from pywin32. I have not tried pysqlite. If you want it to handle a variable number of values, you will have to programmatically construct the sql statement with the appropriate number of parameters. HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: logo design

2006-10-29 Thread Frank Buss
don't like the "made with secret alien technology" text: http://www.lisperati.com/logo.html http://www.normal-null.de/lisp_logo.html -- Frank Buss, [EMAIL PROTECTED] http://www.frank-buss.de, http://www.it4-systems.de -- http://mail.python.org/mailman/listinfo/python-list

Re: wxFrame don't have Bind attribute ??

2006-10-30 Thread Frank Millman
0,105)) > self.posCtrl = wx.TextCtrl(panel, -1, "", pos=(130,100)) > > def OnMove(self, event): > pos = event.GetPosition() > self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y)) > > if __name__ == "__main__": > app = wx.PySimpleApp() > frame =

Re: wxFrame don't have Bind attribute ??

2006-10-30 Thread Frank Millman
Jia Lu wrote: > Frank Millman のメッセージ: > > This works perfectly for me, using wxPython 2.6.3.2, on both Linux and > > Windows. > > > > What platform are you using? > Yes this works OK for me too on my FedoraCore 5, but cannot work on my > FedoraCore 6... Th

Re: sqlite error?

2006-11-06 Thread Frank Millman
cattered throughout the command. Therefore the substitution is one-for-one from left to right using the values in the tuple. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance Question

2006-11-10 Thread Frank Millman
y, eats differently pass So I use multiple inheritance instead of subclassing to override the eat method. It works, but it feels ugly. Is there a cleaner solution? Thanks Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance Question

2006-11-11 Thread Frank Millman
Gabriel Genellina wrote: > At Saturday 11/11/2006 03:31, Frank Millman wrote: > > >Continuing your analogy of animals, assume a class A with a 'walk' > >method and an 'eat' method. > > > >Most animals walk the same way, but a few don't, so

Re: wxpython - wxtoolbar font size

2006-11-14 Thread Frank Niessink
? where i wrong? I use wxpython 2.6.3 on ubuntu edgy You need to call self.tb1.Realize(). BTW, you probably want to add some tools to the toolbar too. See attachment. Cheers, Frank import wx class Frame(wx.Frame): def __init__(self, *args, **kwargs): super(Frame, self).__init__(*args

Re: wxPython problems with Fedora Core 5

2006-06-03 Thread Frank Millman
t archive, which apparently gives the solution to your problem. http://tinyurl.com/gf276 I cannot vouch for it. I installed wxPython on FC5 without any problems, using the FC4 binary rpm's from wxPython.org. Hope it works for you. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: TreeCtrl to TreeListCtrl

2006-06-05 Thread Frank Niessink
menting with > TreeListCtrl, but it works fne with ListCtrl... And what exactly is your problem? Cheers, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression question

2006-06-07 Thread Frank Potter
pyparsing is cool. but use only re is also OK # -*- coding: UTF-8 -*- import urllib2 html=urllib2.urlopen(ur"http://www.yahoo.com/";).read() import re r=re.compile('[^"]+)"[^>]*>',re.IGNORECASE) for m in r.finditer(html): print m.group('image') I got these rusults: http://us.i1.yimg.com/us.yi

Re: what are you using python language for?

2006-06-07 Thread Frank Potter
I use python to grab imformations and embed it in my delphi app. I gather what I am intereted in so I can read them faster. And I also use python to do some othere everyday jobs, such as periodically copying and zipping a directory into another computer to backup the comtent. On 7 Jun 2006 16:11:

Re: The Nature of the “Unix Philosophy”

2006-06-07 Thread Frank Silvermann
sus predicate is certainly something that Confucious criticizes. frank -- tja -- http://mail.python.org/mailman/listinfo/python-list

XML, JSON, or what?

2006-06-07 Thread Frank Millman
s are not very large (maximum about 2k so far for a complex screen layout) so I don't think performance will be an issue. I would rather make a decision now, otherwise I will have a lot of changes to make later on. Does anyone have any recommendations? Thanks Frank Millman -- http://mail.

Re: The Nature of the “Unix Philosophy”

2006-06-08 Thread Frank Silvermann
? I'm only aware of the one from Outer Space. frank -- http://mail.python.org/mailman/listinfo/python-list

Re: XML, JSON, or what?

2006-06-08 Thread Frank Millman
Frank Millman wrote: > Hi all > > I am writing a multi-user accounting/business application, which uses > sockets to communicate between server and client. The server contains > all the business logic. It has no direct knowledge of the client. I > have devised a simple message

"groupby" is brilliant!

2006-06-12 Thread Frank Millman
Hope someone finds this of interest. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: "groupby" is brilliant!

2006-06-13 Thread Frank Millman
in which case you obviously have to do it the long way. Otherwise these are definitely neater, the last one especially. You could even do it as a one-liner - rows = list(csv.reader(open('trans.csv', 'rb'))) It still looks perfectly readable to me. Thanks Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Earthquake and Tornado Forecasting Programs June 13, 2006

2006-06-13 Thread Frank Silvermann
[snip] I look forward to a day when meteorology has more to do with precise models than models, although I'm all for Russian-style delivery of such data. I forecast that a lot of people will be surprised by the weather today, as they are categorical idiots, as is the OP. frank --

Re: "groupby" is brilliant!

2006-06-13 Thread Frank Millman
Benji York wrote: > Frank Millman wrote: > > reader = csv.reader(open('trans.csv', 'rb')) > > rows = [] > > for row in reader: > > rows.append(row) > > Why do you create a list of rows instead of just iterating over the > reader directl

Re: XML, JSON, or what?

2006-06-16 Thread Frank Millman
Alan Kennedy wrote: > [Frank Millman] > > I am writing a multi-user accounting/business application, which uses > > sockets to communicate between server and client. The server contains > > all the business logic. It has no direct knowledge of the client. I > > ha

Re: XML, JSON, or what?

2006-06-16 Thread Frank Millman
key,list): key = tuple(key) A bit of a kludge, but I can live with it. I will keep checking to see if any other anomalies crop up. Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython: how do i write this without the id parameter?

2006-06-17 Thread Frank Niessink
rame): def __init__(self, *args, **kwargs): super(InputForm, self).__init__(*args, **kwargs) ... Cheers, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: Segmentation fault only on Iinux

2006-06-20 Thread Frank Millman
e the GUI to be responsive during this > wait. > > When I run my program in Linux, a segmentation fault occurs. When I > run it in Windows XP, it works just fine. > Are you doing any xml processing? If so, it may be the same problem as described in this recent post - http://tinyurl.com/

Re: wx.Yield() during socket timeout

2006-06-21 Thread Frank Millman
d it works perfectly, on Windows and on Linux. Threading *is* the correct approach for what you are attempting. Don't give up. Try to isolate where the crash happens, and post the relevant section of code here. If I can't spot the error, there is a good chance someone else will. Frank M

Re: languages with full unicode support

2006-06-25 Thread Frank Buss
Xah Lee wrote: > Lisps → No. The Common Lisp spec (CLHS) doesn't require that implementations support Unicode characters, but it doesn't forbid it and some implementations support it, e.g. http://clisp.cons.org/impnotes.html -- Frank Buss, [EMAIL PROTECTED] http://www.frank-

Re: style question

2006-06-26 Thread Frank Millman
out in the input and isn't aligned there. How about message = ("This is line1. " "This is line2 " "This is line3\n") The brackets mean that the lines are automatically treated as continuous, without the need for the

Re: style question

2006-06-26 Thread Frank Millman
Frank Millman wrote: > > How about > > message = ("This is line1. " > "This is line2 " > "This is line3\n") > > The brackets mean that the lines are automatically treated as > continuous, without

Re: style question

2006-06-26 Thread Frank Millman
Fredrik Lundh wrote: > Frank Millman wrote: > > >> How about > >> > >> message = ("This is line1. " > >> "This is line2 " > >> "This is line3\n") > >> > >&

Re: handling unicode data

2006-06-29 Thread Frank Millman
Linux box (or from another Windows box, for that matter). I don't know if there are any implications there. Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   9   10   11   >