Re: About Trolltech QT OpenSource license.

2007-04-10 Thread king kikapu
Ο/Η Peter Decker έγραψε: > There is another alternative: Dabo, which wraps the wxPython toolkit. > It has a GUI designer, although not as polished as the Qt Designer. > Check out some of their screencasts to see their tools in action. You > can find them at http://dabodev.com/documentation I am a

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread king kikapu
On Apr 11, 10:56 am, Robert Kern <[EMAIL PROTECTED]> wrote: > Others have given good answers. I would only like to clarify what I think is > the > source of confusion here. While the FSF and many open source advocates make a > distinction between the words "commercial" (meaning that someone derive

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread king kikapu
> > Ok, i see...So i can use Qt OS edition and earn money from this as > > long as i explicitly say (is a reference to a GPL in a readme text > > file enough for this ?) that this software is under the GPL lisence > > and i have the obligation to give the source code with it. > > It's a bit more c

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread king kikapu
Ο/Η Robert Kern έγραψε: > It's a bit more complicated than that. There are good resources for > understanding the implications of the GPL on the FSF's site which other people > have pointed out. >From what i can understand, you can sell your product and you have to give the source. Also you must

Re: About Trolltech QT OpenSource license.

2007-04-12 Thread king kikapu
On Apr 12, 1:02 am, Robert Kern <[EMAIL PROTECTED]> wrote: > All parts of the software have to be licensed compatibly with the GPL. The FSF > has a fairly comprehensive list of the licenses they believe are > GPL-compatible. > The source that you provide needs to be the preferred form for making >

Re: About Trolltech QT OpenSource license.

2007-04-12 Thread king kikapu
I dig a little bit more on the Trolltech's site and i think that this page is telling all the truth: http://www.trolltech.com/developer/downloads/qt/faq So, this tells us all the good stuff people in this thread are talking about, i think is clear enough. -- http://mail.python.org/mailman/listi

Re: Python editor/IDE on Linux?

2007-04-13 Thread king kikapu
I experiment with Ubuntu nowadays, and i find my Windows combination a realy win also there, Eclipse and PyDev. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to generate alternate toggling values in a loop?

2007-10-18 Thread Iain King
On Oct 18, 2:29 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-10-17, Debajit Adhikary <[EMAIL PROTECTED]> wrote: > > > # Start of Code > > > def evenOdd(): > > values = ["Even", "Odd"] > > state = 0 > > while True: > > yield values[state] > > state = (state + 1)

PyODBC Stored proc calling

2007-01-18 Thread king kikapu
Hi to all, can anyone give me a jump-start about how to call Stored Procedures from PyODBC ?? I want to execute a very simple testing Stored Procedure on an Sql Server database. I started using PyODBC and code like the following cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=hercules;DATABASE

Re: PyODBC Stored proc calling

2007-01-19 Thread king kikapu
No one is using pyodbc ?? :) -- http://mail.python.org/mailman/listinfo/python-list

"Correct" db adapter

2007-01-31 Thread king kikapu
Hi to all, i have started a month ago to seriously studying Python. I am now looking at the databases stuff and i want the opinion of more experienced Python programmers (than me) at the following : I see that there are a lot of databases adapters on the net, some following the DB-API 2.0 and som

Re: "Correct" db adapter

2007-01-31 Thread king kikapu
Thanks for the replies. I think i do not need something like ORM, but just a db-module that i can "work" the database with it. I just want to know if pyodbc is the "correct" solution to do so or if it is another db-module that is more usefull for this job. -- http://mail.python.org/mailman/listi

Re: "Correct" db adapter

2007-02-01 Thread king kikapu
Ok, i see.. Thanks a lot all of you for the help. I know from my Win/.Net/Sql Server expertise that odbc put a layer in the mix. That's why, for example, in .Net we have a native SqlClient data provider that talks to Sql Server directly. But one of the reasons that i started learning Python, is t

Re: "Correct" db adapter

2007-02-02 Thread king kikapu
Thank you all! -- http://mail.python.org/mailman/listinfo/python-list

how to merge strings to a line

2007-02-02 Thread andy king
Hello, I have a file that contains the following: my name is larry is in 10th grade got A+ in math my name is john is in 10th grade got A+ in english my name is peter [...] i need to convert the file to look like: my name is larry my name is larry is in 10th grade --> (my name is larr

Object type check

2007-02-07 Thread king kikapu
Hi to all, in statically-types languages, let's say C# for example, we use polymorphism through interfaces. So we define an interface I with method M and then a class C that implements I interface and write code for the M method. So, if we have a function that takes a parameter of type I, we know

Re: Object type check

2007-02-07 Thread king kikapu
> Dont restrict them to particular types. You would > not restrict them to a particular class in C#. Instead, you define the > interfaces simply by how you use the objects. Of cource i restrict them to particular types! In C# you cannot pass something bad this way because the compiler will just ca

Re: Object type check

2007-02-07 Thread king kikapu
at first, thanks you all for your help! So, i will follow your advice.In a moment though, i thought that "ok, do not check anything of the parameter's type but do a try/catch at the calls inside the function" But this way, i would rather defeat the purpose because i have to try/ catch in *every*

Re: Object type check

2007-02-07 Thread king kikapu
> And so what ? Once an exception got caught, what are you going to do ? You have absolutely right, that's the reason i rejected this. > You're starting to see the light, my friend !-) > > > Strange world the dynamic one > > If that's too dynamic for you, then run for your life Hehe...you k

Re: Object type check

2007-02-08 Thread king kikapu
> def modify(list_of_x): > for x in list_of_x: > try: > x.change_in_place # don't call the method, just check it exists XX...what exactly is going on here ? I mean, what is actually happens if you omit the parenethesis as you just did ? I understand that it does not ca

Re: Object type check

2007-02-08 Thread king kikapu
Ο/Η Michele Simionato έγραψε: > See http://users.rcn.com/python/download/Descriptor.htm for more than > you ever wanted > to know about attribute access in Python. > > Michele Simionato Great stuff Michele, thanks! -- http://mail.python.org/mailman/listinfo/python-list

NetUseAdd mystery

2007-02-26 Thread king kikapu
Is anyone see any error in the following code: mapDrive = "MyServer\\C$" data = {'remote' : mapDrive, 'local' : 'M:', 'password' : 'mypassword', 'user' : 'Administrator', 'asg_type' : 0} win32net.NetUseAdd(None, 1, data) It gives me "pywintypes.error: (1326, 'NetUseAd

Re: NetUseAdd mystery

2007-02-26 Thread king kikapu
> I think your problem is that C$ is a "special" share. Try creating > a share and connect to it instead. It is either that your your userid/ > password are in fact incorrect. > > -Larry No, my credentials are absolutely correct. As for the "$", what is the possible problem with that ?? Net use

Re: NetUseAdd mystery

2007-02-27 Thread king kikapu
> You need to use level 2 info to pass the username. > Level 1 is for the old-style share with its own password. > Also, it should be 'username': instead of just 'user':. > > hth >Roger Roger many-many thanks! That was it, i had to put "username" instead of "user" and 2 instead of

Re: book for a starter

2007-02-27 Thread king kikapu
Me, i bought this http://www.amazon.com/Core-Python-Programming-2nd/dp/0132269937/sr=8-1/qid=1172592163/ref=pd_bbs_sr_1/105-9302229-1138834?ie=UTF8&s=books and i really think it is a great book for learning Python. It refers to the latest Python version (2.5) and covers a lot of things, besides the

jigsae puzzle issue

2007-11-03 Thread Joseph King
Hey i am trying to build a puzzle (jigsaw) game. I have most of the code for it written in python. But having an issue with one part. What i want is to give the player the ability to import there own picture and create a jigsaw from the picture with there own designation of the piece size and

manually cutting a picture

2007-11-06 Thread Joseph king
I have a kinda hard question i am trying to build a jigsaw game with python, i would like to give the option for people to create there own puzzle piece does anyone know how to accomplish this it is becoming increasingly difficult for me -- http://mail.python.org/mailman/listinfo/python-li

Re: manually cutting a picture

2007-11-07 Thread Joseph king
Thanks that is a pretty good idea one thought that i came up with (honestly the only one that made sense) was to give the user a type of cookie cutter approach. where they would be presented with a selection of premade piece's that could divide the picture that they chose to how ever many piec

manually cutting a picture

2007-11-07 Thread Joseph king
well so far the problem for me is not the linking i have a kinda good code for that. here is a little snippet of the idea that i used on an old version that split the picture without input from the user. #this code defines that the edges have a place on the grid. def join_point(self, type): o

Re: the annoying, verbose self

2007-11-27 Thread Iain King
On Nov 27, 9:20 am, Roy Smith <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> > > > > wrote: > > Steven D'Aprano a écrit : > > > On Mon, 26 Nov 2007 21:48:36 +0100, Ton van Vliet wrote: > > > >> On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desth

Re: the annoying, verbose self

2007-11-27 Thread Iain King
On Nov 27, 12:03 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Iain King <[EMAIL PROTECTED]> wrote: > > FTR, I won't be using this :) I do like this syntax though: > > > class Vector: > > def __init__(self, x, y, z): > > self.x =

Tip of the day generator.

2007-11-28 Thread Joseph king
Hey i was wondering if any one would know if there was a way to have python randomly read form a file or would you ahve to know the byte postion and somehow randomize splicing the file so the sentence you want show's up. i.e have a file with a lot of tips and useless facts and then have python ran

tip of the day generator

2007-11-28 Thread Joseph king
thanks for all the help... -- http://mail.python.org/mailman/listinfo/python-list

python not a good name.

2007-11-30 Thread Joseph king
sorry for not responding to the thread the regular way...[cough] just to prove everyone i counted what was found while searching python in google. i only looked at the first 6 pages but out of them only one did not mention the language plus i can't beleive people would be so synical abou

Story generator....

2007-12-03 Thread Joseph king
I don't know how to pose this question so i will just say what i am trying to do. i am not sure if this is at all possible i am trying to make a story generator like the ones that i did in elementry school where they would supply a story with blanks and you would have to place the nouns-v

Eclipse/PyQt/Eric4 question

2007-12-13 Thread king kikapu
Hi, this is actually goes to whoever is using Eclipse and Eric4, the IDE that comes bundled with PyQt. I was using Eclipse until i saw Eric4 and i started experiment with it, very nice work. Eric4 has a feature that actually reminds us the work of some expensive IDEs, like Visual Studio, Delphi an

Re: Eclipse/PyQt/Eric4 question

2007-12-13 Thread king kikapu
> You can create a builder for calling an external program to do that on > builds (right-click project -> properties > Builders). > > Another option is configuring an external program run --> menu: run > > external tools > open external tools dialog (and you can bind a > shortcut to rerun the last

Re: Eclipse/PyQt/Eric4 question

2007-12-14 Thread king kikapu
On 14 Δεκ, 01:09, "Fabio Zadrozny" <[EMAIL PROTECTED]> wrote: > > Hmmm...but this means that i am forced to do this for ALL .ui files on > > the project, either changed or not and this can slow things down... > > (pyuic.bat can run for one or for ALL .ui files) > > The goal is to find a way to auto

Re: threading, how to?

2006-04-21 Thread Iain King
akrapus wrote: > Thanks for reply. > > So would it be implemented as follows: > > Func 1 > Func 2 > Func 3 > > Thread for Func 1 > Thread for Func 2 > Thread for Func 3 > > Cheers > > Stevan Here's how I'm doing it, using the thread module (there's a higher level class-based module: threading, but

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Iain King
Wildemar Wildenburger wrote: > Over the time I've seen lots of remarks about python that read like "a > lot like lists in lisp" or "like the hashtable in java" or any other > form of "like in ". > > Are there any concepts that python has not borrowed, concepts that were > not even inspired by oth

Re: Counting elements in a list wildcard

2006-04-25 Thread Iain King
hawkesed wrote: > If I have a list, say of names. And I want to count all the people > named, say, Susie, but I don't care exactly how they spell it (ie, > Susy, Susi, Susie all work.) how would I do this? Set up a regular > expression inside the count? Is there a wildcard variable I can use? > He

Re: Counting elements in a list wildcard

2006-04-25 Thread Iain King
John Machin wrote: > On 25/04/2006 6:26 PM, Iain King wrote: > > hawkesed wrote: > >> If I have a list, say of names. And I want to count all the people > >> named, say, Susie, but I don't care exactly how they spell it (ie, > >> Susy, Susi, Susie all wor

Re: Counting elements in a list wildcard

2006-04-26 Thread Iain King
Edward Elliott wrote: > John Machin wrote: > > On 25/04/2006 6:26 PM, Iain King wrote: > >> iain = re.compile("(Ia(i)?n|Eoin)") > >> steven = re.compile("Ste(v|ph|f)(e|a)n") > > > > IMHO, the amount of hand-crafting that goes into a *

wxpython warnings

2006-04-26 Thread Iain King
I have a wxpython program that displays TIF images. Sometimes it will encounter a tag the tiff loader cant handle. Rather than silently ignoring it, it pops up a window: Python Warning unknown field with tag blah blah I don't want it to do this, but I can't work out how to turn it off. Anyone k

Re: wxpython warnings

2006-04-26 Thread Iain King
Michele Petrazzo wrote: > Philippe Martin wrote: > > I had a similar but simple problem (the file was missing) and had to > > check by hand before calling wxPython. > > > > Can you check the tag by hand before calling wxPython ? > > > > > > Philippe > > > > > > Hi, > also I have the same problem w

pytiff for windows

2006-04-27 Thread Iain King
Does anyone have a link for a compiled-for-windows version of pytiff? (or alternatively tell me how to get PIL to save a multipage tiff). Iain -- http://mail.python.org/mailman/listinfo/python-list

Re: returning none when it should be returning a list?

2006-05-02 Thread Iain King
John Machin wrote: > > # Doh! Looks like recursion not necessary. Google 'eliminate tail > recursion' :-) > I did, and found this: http://www.biglist.com/lists/dssslist/archives/199907/msg00389.html which explains that the Scheme compiler optimises (obvious) tail recursion into iterative code. I

Web framework comparison video

2006-05-08 Thread Iain King
http://compoundthinking.com/blog/index.php/2006/03/10/framework-comparison-video/ Thought this might be interesting to y'all. (I can't watch it 'cos I'm at work, so any comments about it would be appreciated :) Iain -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Iain King
Oh God, I agree with Xah Lee. Someone take me out behind the chemical sheds... Iain Xah Lee wrote: > Tabs versus Spaces in Source Code > > Xah Lee, 2006-05-13 > > In coding a computer program, there's often the choices of tabs or > spaces for code indentation. There is a large amount of confus

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Dale King
Iain King wrote: > Oh God, I agree with Xah Lee. Someone take me out behind the chemical > sheds... > > Xah Lee wrote: Please don't feed the troll! And for the record, spaces are 100% portable, tabs are not. That ends the argument for me. Worse than either tabs or spaces

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Iain King
Ant wrote: > I think Duncan has hit the nail on the head here really. I totally > agree that conceptually using tabs for indentation is better than using > spaces. Pragmatically though, you can't tell in an editor where spaces > are used and where tabs are used. > Um, I don't follow this. If you

Re: noob import question

2006-05-19 Thread Iain King
Brian Blazer wrote: > OK, I have a very simple class here: > > class Student: > """Defines the student class""" > > def __init__(self, lName, fName, mi): > self.lName = lName > self.fName = fName > self.mi = mi > > Then I have a small script that I am using as

Re: John Bokma harassment

2006-05-25 Thread Dale King
Therefore you do not have the "right" to do what you want with Usenet. You have a responsibility to use Usenet in a way that benefits the group as a whole (e.g. asking interesting questions that educate others). -- Dale King -- http://mail.python.org/mailman/listinfo/python-list

Trying to get FreeImagePy to work.

2006-05-26 Thread Iain King
I've installed ctypes and FreeImagePy. When I do this: >>> import FreeImagePy >>> f = FreeImagePy.Image() I get: find Traceback (most recent call last): File "", line 1, in ? File "C:\Python\Lib\site-packages\FreeImagePy\FreeImagePy.py", line 1952, in _ _init__ super(Image, self).__init_

Re: Trying to get FreeImagePy to work.

2006-05-26 Thread Iain King
Michele Petrazzo wrote: > Iain King wrote: > > I've installed ctypes and FreeImagePy. When I do this: > > > >>>> import FreeImagePy f = FreeImagePy.Image() > > > > I put a 'print self._name' in the ctypes __init__ file, just before &g

question

2008-01-25 Thread Joseph king
I just need to pass this through... How does everyone feel about the fact that SUN bought mySQL for $1 billion. I don't find it possible that they would keep it a free product if they invested that much money on it. -- http://mail.python.org/mailman/listinfo/python-list

Re: String To List

2008-03-17 Thread Iain King
On Mar 17, 6:56 am, Dan Bishop <[EMAIL PROTECTED]> wrote: > On Mar 17, 1:15 am, Girish <[EMAIL PROTECTED]> wrote: > > > I have a string a = "['xyz', 'abc']".. I would like to convert it to a > > list with elements 'xyz' and 'abc'. Is there any simple solution for > > this?? > > Thanks for the help.

Re: String To List

2008-03-17 Thread Iain King
On Mar 17, 9:27 am, Iain King <[EMAIL PROTECTED]> wrote: > On Mar 17, 6:56 am, Dan Bishop <[EMAIL PROTECTED]> wrote: > > > On Mar 17, 1:15 am, Girish <[EMAIL PROTECTED]> wrote: > > > > I have a string a = "['xyz', 'abc']"..

Re: What is The Eric4 IDE???

2008-03-20 Thread king kikapu
I use it for some time now and i think it is the best Python IDE out there, especially if someone wants to "play" with Qt. If you are on Windows, just install the Windows binary, it' all there! -- http://mail.python.org/mailman/listinfo/python-list

Psyco alternative

2008-03-27 Thread king kikapu
Hi, it seems that Psyco's author will not port it for the upcoming Python 3000 release :( So, for us who use it we will continue to use CPython 2.5.x version for some time to come. Is there an alternative to Psyco so i can have a look at ? Thanks in advance. -- http://mail.python.org/mailman/li

Re: Psyco alternative

2008-03-27 Thread king kikapu
On 27 Μαρ, 14:35, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > king kikapu <[EMAIL PROTECTED]> writes: > > it seems that Psyco's author will not port it for the upcoming Python > > 3000 release :( > > I think the idea is it will be part of PyPy and you sho

Re: Psyco alternative

2008-03-27 Thread king kikapu
On 27 Μαρ, 15:56, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > king kikapu wrote: > > On 27 Μαρ, 14:35, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > >> king kikapu <[EMAIL PROTECTED]> writes: > >> > it seems that Psyco's auth

Re: Psyco alternative

2008-03-27 Thread king kikapu
> > > As for psyco, are there any alternatives to use now ? > > Nope, but I heard through the grapevine that while it won't be supported for > all times to come, a new version is in the making. Aha!! It seems you have better "sources" than me! :) > But ultimately, the author says that the appro

Re: Psyco alternative

2008-03-27 Thread king kikapu
> If it's about "some problems", then maybe Cython is an alternative. > > http://cython.org > > Stefan Hmmm...thanks but i think Pyrex-like solution is not the ideal one. Coming from C# and having 8 years of expertise on it, i have gain a very positive thinking about jit compilers and i think that

Re: Psyco alternative

2008-03-27 Thread king kikapu
> One reason attention is going to PyPy instead of Psyco... > > Jean-Paul I had a look at PyPy, it, indeed, have a very long way to go so we can consider it an alternative. -- http://mail.python.org/mailman/listinfo/python-list

Eclipse and PyDev Package explorer

2008-03-28 Thread king kikapu
Hi, i am trying to "fit" Eclipse/Pydev in my needs/preference, so i want to ask this: As it is now, i see all my projects in that TreeView (PyDev Package Explorer). I would rather want this to behave like a more "normal" IDE where you Open one project and if you want close it and Open another, ju

Re: Eclipse and PyDev Package explorer

2008-03-28 Thread king kikapu
A, and another one: If i set a custom builder for a pydev project, is there a way for this builder to automatically be "assigned" to every (pydev) project i will create from now on or i have to re-define it for every new one ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple equates

2008-11-25 Thread Iain King
On Nov 17, 7:41 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > It doesn't matter as none of this is valid Python. In Python you have to > > write > > > array[x1] = False > > array[x2] = False > > Uh...not so much... > > >>> a = [1,2,3,4,5] > >>> x1, x2 = 1, 3 > >>> a[x1] = a[x2] = False > >>>

Re: Multiple equates

2008-11-25 Thread Iain King
On Nov 25, 11:29 am, Iain King <[EMAIL PROTECTED]> wrote: > On Nov 17, 7:41 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > > > > > It doesn't matter as none of this is valid Python. In Python you have to > > > write > > > > array

Re: Accessing Modification Time of an Outlook Mail in Python

2008-11-25 Thread Iain King
On Nov 25, 5:11 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi all, >I am writing a small application which reads the contents of an > Outlook Mail using python. I am able to read the contents, subject > along with senders and receivers of a mail using MAPI objects. But may > I kno

Re: Obama's Birth Certificate - Demand that US presidential electors investigate Obama's eligibility

2008-12-03 Thread Iain King
On Dec 3, 10:16 am, [EMAIL PROTECTED] wrote: > On Dec 3, 12:53 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] wrote: > > > This message is not about the meaningless computer printout called > > > More importantly, it's not about Python. I'm setting follow-ups to > > talk.pol

Re: RELEASED Python 3.0 final

2008-12-04 Thread Iain King
On Dec 4, 1:51 am, Barry Warsaw <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On behalf of the Python development team and the Python community, I > am happy to announce the release of Python 3.0 final. > > Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a

Netbeans Early Access and Python3

2008-12-06 Thread king kikapu
Hi, have anyone using this release of NetBeans (6.5 with Python support) with Python 3 without any problems ? I mean, does it work with Python3 or only with 2.x ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Netbeans Early Access and Python3

2008-12-07 Thread king kikapu
On Dec 6, 12:54 pm, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > > have anyone using this release of NetBeans (6.5 with Python support) > with Python 3 without any problems ? I mean, does it work with Python3 > or only with 2.x ? No-one is using NetBeans for Python d

Re: Why is lambda allowed as a key in a dict?

2009-03-10 Thread Iain King
On Mar 10, 6:38 am, Daniel Fetchinson wrote: > On 3/9/09, bearophileh...@lycos.com wrote: > > > See here Daniel Fetchinson: > > >http://groups.google.com/group/comp.lang.python/browse_thread/thread/... > > > But be quite careful in using that stuff, it has some traps. > > Thanks a lot for all the

Re: Scraping a web page

2009-04-08 Thread Iain King
On Apr 7, 1:44 pm, Tim Chase wrote: > > f = urllib.urlopen("http://www.google.com";) > > s = f.read() > > > It is working, but it's returning the source of the page. Is there anyway I > > can get almost a screen capture of the page? > > This is the job of a browser -- to render the source HTML.  A

Re: Any idea to emulate tail -f

2009-05-05 Thread Iain King
On May 5, 7:00 am, Joel Juvenal Rivera Rivera wrote: > I want to make something very similar to  the command tail -f (follow a > file), i have been trying  with some while True and some microsleeps > (about .1 s); did someone has already done something like this? > > And about the file is the apac

Re: Adding a Par construct to Python?

2009-05-20 Thread Iain King
On May 19, 10:24 am, Steven D'Aprano wrote: > On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > > Let me clarify what I think par, pmap, pfilter and preduce would mean > > and how they would be implemented. > > [...] > > Just for fun, I've implemented a parallel-map function, and done a couple >

Re: do replacement evenly

2009-06-02 Thread Iain King
On Jun 2, 12:10 pm, oyster wrote: > I have some strings, and I want to write them into a text files, one > string one line > but there is a requirement: every line has a max length of a certain > number(for example, 10), so I have to replace extra SPACE*3 with > SPACE*2, at the same time, I want t

Re: Learning Python for no reason

2008-05-12 Thread king kikapu
Same for me here too! C# on the work, Python earning at the evening. I am bored to death with so many .net/C# years and i wanted to learn something different and cross platform. I think it will pay back some time... On May 12, 10:50 pm, JustMe <[EMAIL PROTECTED]> wrote: > On 12 May, 20:02, Mensana

wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Iain King
Hi. I have a modal dialog whcih has a "Browse..." button which pops up a file selector. This all works fine, but the first thing the user has to do when they open the dialog is select a file, so I would like the dialog to automatically call the onBrowse function as soon as the dialog opens. Howe

Re: wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Iain King
On May 13, 2:20 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Iain King wrote: > > Hi. I have a modal dialog whcih has a "Browse..." button which pops > > up a file selector. This all works fine, but the first thing the user > > has to do when they open th

Re: wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Iain King
On May 13, 2:43 pm, Iain King <[EMAIL PROTECTED]> wrote: > On May 13, 2:20 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > > > > Iain King wrote: > > > Hi. I have a modal dialog whcih has a "Browse..." button which pops > > > up a file se

Rename field in Access DB

2008-05-14 Thread Iain King
I'm manipulating an MS Access db via ADODB with win32com.client. I want to rename a field within a table, but I don't know how to. I assume there is a line of SQL which will do it, but nothing I've tried (from searching) has worked. Basic code: import win32com.client connection = win32com.client

Re: wxpython dialog - do something after ShowModal()?

2008-05-15 Thread Iain King
On May 14, 9:37 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > Iain King <[EMAIL PROTECTED]> wrote: > > > Hi. I have a modal dialog whcih has a "Browse..." button which pops > > up a fil

Re: Rename field in Access DB

2008-05-15 Thread Iain King
On May 14, 4:29 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Iain King wrote: > > I'm manipulating an MS Access db via ADODB with win32com.client. I > > want to rename a field within a table, but I don't know how to. I > > assume there is a line of SQL whi

Re: Bug in floating-point addition: is anyone else seeing this?

2008-05-22 Thread Iain King
On May 22, 1:14 am, bukzor <[EMAIL PROTECTED]> wrote: > On May 21, 3:28 pm, Dave Parker <[EMAIL PROTECTED]> wrote: > > > On May 21, 4:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > Which is exactly what the python decimal module does. > > > Thank you (and Jerry Hill) for pointing that

Re: Python and Flaming Thunder

2008-05-23 Thread Iain King
On May 23, 3:35 am, Charles Hixson <[EMAIL PROTECTED]> wrote: > On Thursday 22 May 2008 13:30:07 Nick Craig-Wood wrote: > > > ... > > >From Armstrong's book: The expression Pattern = Expression causes > > > Expression to be evaluated and the result matched against Pattern. The > > match either succ

Re: Interesting Math Problem

2008-06-05 Thread Iain King
On Jun 4, 9:03 am, "BEES INC" <[EMAIL PROTECTED]> wrote: > I've been awfully busy programming lately. My Django-based side > project is coming along well and I hope to have it ready for use in a > few weeks. Please don't ask more about it, that's really all I can say > for now. Anyways, I came acro

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Iain King
On Jun 5, 1:41 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > Greetings all. > > The subject line of this thread is probably one of the worst ever. I > was trying to encapsulate what I am doing. Based on my new-found > knowledge from another thread, I'm able to get a list of directories > and they com

Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Iain King
Hi. I'm using the win32 module to access an Access database, but I'm running into the File Sharing lock count as in http://support.microsoft.com/kb/815281 The solution I'd like to use is the one where you can temporarily override the setting using (if we were in VB): DAO.DBEngine.SetOption dbmax

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-02 Thread Iain King
On Jul 2, 3:29 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Iain King wrote: > > Hi.  I'm using the win32 module to access an Access database, but I'm > > running into the File Sharing lock count as > > inhttp://support.microsoft.com/kb/815281 > > The so

Re: Win32.client, DAO.DBEngine and exceeding the file sharing count lock

2008-07-03 Thread Iain King
On Jul 2, 8:13 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > In case it helps, there's a recipe just shown up > on the Python Cookbook which at least illustrates > DAO use: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/572165 > > TJG On Jul 2, 6:30 pm, "M.-A. Lemburg" <[EMAIL PROTECTED

Re: How to bypass Windows 'cooking' the I/O? (One more time, please) II

2008-07-07 Thread Iain King
On Jul 7, 10:18 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 07 Jul 2008 01:03:10 -0700, norseman <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > >  > Normal file I/O sequence: > > >  > fp = open(target, 'wb') > > >  > fp.seek(-1, 2) > > >  > fp.write(record

Re: How to make python scripts .py executable, not bring up editor

2008-07-08 Thread Iain King
On Jul 7, 10:56 pm, korean_dave <[EMAIL PROTECTED]> wrote: > From command Prompt, i type in a script,  "tryme.py". > > This, instead, brings up PythonWin editor and Interactive Window. > > Path variable is "C:\Python24". (I need Python 2.4 installed, not 2.5) > > How do I make it so that the script

Re: start reading from certain line

2008-07-10 Thread Iain King
On Jul 10, 2:45 pm, jstrick <[EMAIL PROTECTED]> wrote: > Here's a simple way to do it with a minimum amount of loopiness (don't > forget to use 'try-except' or 'with' in real life): > > f = open("item1.txt") > > for preline in f: >     if "Item 1" in preline: >         print preline, >         for

Re: start reading from certain line

2008-07-10 Thread Iain King
On Jul 10, 4:54 pm, Iain King <[EMAIL PROTECTED]> wrote: > On Jul 10, 2:45 pm, jstrick <[EMAIL PROTECTED]> wrote: > > > Here's a simple way to do it with a minimum amount of loopiness (don't > > forget to use 'try-except' or 'with' in re

Re: Best Python packages?

2008-07-18 Thread Iain King
On Jul 18, 11:23 am, Ben Sizer <[EMAIL PROTECTED]> wrote: > On Jul 16, 3:31 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > Ben Sizer wrote: > > > make my development a lot easier. > > > Knowing what kind of development you do might help, of course.  Some > > libraries are excellent in some cont

Re: Best Python packages?

2008-07-19 Thread Iain King
On Jul 19, 8:56 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Iain King wrote: > > Well, if you're looking for a list of excellent 3rd party Python > > libraries, then I can give you the ones I like and use a lot: > [...] > > BeautifulSoup : for real-wo

Re: Python Written in C?

2008-07-21 Thread Iain King
On Jul 21, 6:58 am, "Krishnakant Mane" <[EMAIL PROTECTED]> wrote: > > First off all c# is absolute rubbish waist of time.  if I need to > learn it then I better lern java or pythonfor that matter.  and by the > way what is a "real programmer?" The story of a Real Programmer: http://www.pbm.com/~

<    1   2   3   4   5   >