Re: Too many imports to use a business class library?

2006-07-13 Thread Diez B. Roggisch
Sanjay schrieb: > Hi all, > > I am new to python. Sorry if this is too novice question, but I could > not find an answer yet. > > While coding a business class library, I think it is preferable to have > one class per source file, rather than combining all classes into one > file, considering mul

Re: Python strings outside the 128 range

2006-07-13 Thread Diez B. Roggisch
Sébastien Boisgérault schrieb: > Hi, > > Could anyone explain me how the python string "é" is mapped to > the binary code "\xe9" in my python interpreter ? > > "é" is not present in the 7-bit ASCII table that is the default > encoding, right ? So is the mapping "é" -> "\xe9" portable ? > (site-)c

Re: help in xml and python

2006-07-13 Thread Diez B. Roggisch
> can someone please with the code for this. Show us your efforts, and we'd be glad to help you correcting/enhancing them. Or use PayPal and pay one of the guys here - my hourly fee is 50€, and less than one hour work can't be booked. Diez -- http://mail.python.org/mailman/listinfo/python-lis

Re: Python strings outside the 128 range

2006-07-14 Thread Diez B. Roggisch
Gerhard Fiedler schrieb: > On 2006-07-13 12:04:58, Richard Brodie wrote: > >>> s = "é" >>> print s > >>> Is there a standard way to do this? >> Use Unicode strings, with an explicit encoding. Say no to ISO-8859-1 >> centrism. >> See: http://www.amk.ca/python/howto/unicode particularly the >>

Re: Python strings outside the 128 range

2006-07-14 Thread Diez B. Roggisch
Sybren Stuvel schrieb: > Diez B. Roggisch enlightened us with: >> Of course not. AFAIK there is no way figuring out which encoding the >> target console supports. The best you can do is to offer an option >> that allwos selection of the output encoding. > > You c

Re: Track keyboard and mouse usage

2006-07-17 Thread Diez B. Roggisch
dfaber schrieb: > Hi all, > I have been searching for a keyboard and mouse tracker on linux. I've > read solutions (watch at sourceforge) which look at /proc/interrupts to > check keyboard or mouse activity. I also read one post where "watch" > seems to have difficulty tracking usb keyboards and m

Re: Track keyboard and mouse usage

2006-07-17 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Diez> You could use the /dev/input/event* devices. > > On the only Linux system I have available (Mojam's CentOS-based web server), > /dev/input/* are readable only by root. That doesn't seem like it would be > very useful to tools like watch unless they were to r

Re: Track keyboard and mouse usage

2006-07-17 Thread Diez B. Roggisch
dfaber schrieb: > So, how would I access /dev/input/ devices? > Can I just 'cat' them or read in those files? Yes, just read them. Which is what cat does, btw. If you cat your keyboard, you should see garbage appearing in the terminal when you type any key. Same is true for the mouse. Diez --

Re: range() is not the best way to check range?

2006-07-18 Thread Diez B. Roggisch
Simon Forman wrote: > Nick Craig-Wood wrote: >> >> Sets are pretty fast too, and have the advantage of flexibility in >> that you can put any numbers in you like >> > > I know this is self-evident to most of the people reading this, but I > thought it worth pointing out that this is a great way t

Re: Defining functions in an implementation file

2006-07-18 Thread Diez B. Roggisch
westymatt schrieb: > I am fairly new to python and I want to put alot of my functions in > another python file and import or from it into my script so I can call > the functions. How is this done? import myfilefullofusefulfunctionsandclasses Works if you have the file myfilefullofusefulfuncti

Re: Can thread start other threads?

2006-07-18 Thread Diez B. Roggisch
John Henry schrieb: > Can Python thread start threads? It appears not. When I do that, the > sub-threads gets to certain point and just sit there. If I run the > code serially and not run the sub-thread code as threads, everything is > fine. It can. import threading, time class Test(threadin

Re: text representation of HTML

2006-07-19 Thread Diez B. Roggisch
Ksenia Marasanova wrote: > Hi, > > I am looking for a library that will give me very simple text > representation of HTML. > For example > TitleThis is a test > > will be transformed to: > > Title > > This is a > test > > > i want to send plain text alternative of html email, and would prefe

Re: Accessors in Python (getters and setters)

2006-07-19 Thread Diez B. Roggisch
>> Then why do you advise "(making) all attributes of a class >> private/protected" and systematically using properties ? >> > > Because you don't want third parties illegimately tampering with an > object's internal data and thus crashing your system? Ah, you mean like in JAVA where the compiler

Re: Accessors in Python (getters and setters)

2006-07-19 Thread Diez B. Roggisch
>> What I'm saying here is that it's totally useless to duplicate default >> behaviour. >> > > And who's doing that? Somebody who uses setters that only set a property? Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Track keyboard and mouse usage

2006-07-19 Thread Diez B. Roggisch
Lars wrote: > Diez B. Roggisch wrote: >> will make the devices world readable. While I haven't thought about any >> security implications that might have (and am not especially >> knowledgeable in such things to be honest), I'm convinced it is way less >> like

Re: Project organisation

2006-07-19 Thread Diez B. Roggisch
> You could introduce version numbers to your module hierarchy... > > --\globals\v1-0\util.py > \v1-1\util.py > \v2-0\utill.py > > ...then in your code do something like... > > from globals.v1-0 import util > > ...which would allow some sharing without needing to retest.

Re: Retrieve ext. variables in python program

2006-07-19 Thread Diez B. Roggisch
alfa1234 wrote: > Trying to convert TCL code to python. > > Have a property file from where I read some VAR's. Looks like this: > EARPROJECT = sgs-procDist > APPNAME = SGSProcedure > > > In my TCL code I confirm the existence of the VAR = f.ex EARPROJECT by > using code: > > if { ([info exists

Re: using names before they're defined

2006-07-19 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I have a problem. I'm writing a simulation program with a number of > mechanical components represented as objects. When I create instances > of objects, I need to reference (link) each object to the objects > upstream and downstream of it, i.e. > > supply = supply() >

Re: Weird MemoryError issue

2006-07-19 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi, > > I'm new at python as I just started to learn it, but I found out > something weird. I have wrote a little program to compute Mersenne > number: > > # Snipet on > def is_prime n: > for i in range(2, n): > if (n % i) == 0: > return 0 > else: >

Re: Warning when new attributes are added to classes at run time

2006-07-19 Thread Diez B. Roggisch
Matthew Wilson schrieb: > I sometimes inadvertently create a new attribute on an object rather > update a value bound to an existing attribute. For example: > > In [5]: class some_class(object): >...: def __init__(self, a=None): >...: self.a = a >...: >

Re: Accessors in Python (getters and setters)

2006-07-19 Thread Diez B. Roggisch
Ed Jensen schrieb: > Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> Ah, you mean like in JAVA > > Java is not an acronym. That is: it's "Java", not "JAVA". Now THAT was an important information RIGHT on topic. >> where the compiler preve

Weekly Python Patch/Bug Summary

2006-07-19 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 398 open ( +5) / 3334 closed (+19) / 3732 total (+24) Bugs: 904 open ( -4) / 6011 closed (+36) / 6915 total (+32) RFE : 222 open ( -1) / 231 closed ( +2) / 453 total ( +1) New / Reopened Patches __ Fix for #

Re: Accessors in Python (getters and setters)

2006-07-20 Thread Diez B. Roggisch
> Lol. I actually did *un*learn the hard way. > > Mystilleef, I've started programing 17 years ago, and have done it > professionnaly for almost 10 years now. I do not pretend to be a good > programmer, but please believe that I do know my job. I've read the Book > too, I've tried applying it blin

Re: Accessors in Python (getters and setters)

2006-07-20 Thread Diez B. Roggisch
> You mean: > > class Pythonic(object): > def __init__(self): > self._is_active = True > > @apply > def is_active(): > def fget(self): return self._is_active > def fset(self): raise SomeException('sorry, read-only') > return property(**locals()) Neat! That sli

Re: Using python code from Java?

2006-07-20 Thread Diez B. Roggisch
fortepianissimo schrieb: > Is there a solution to enable Java programmers to call functions > written in Python? Any wrapper generator that wraps Python code into > some Java-callable form? > > I briefly looked at Jython, but if I understand it right, it didn't > support full power of Python 2.3.x

Re: function v. method

2006-07-21 Thread Diez B. Roggisch
Alex Martelli schrieb: > danielx <[EMAIL PROTECTED]> wrote: > >>> ...and source code... >> *shudders* What happened to all the goodness of abstraction? > > Misses an l at the end: http://www.joelonsoftware.com/articles/LeakyAbstract

Re: Accessors in Python (getters and setters)

2006-07-21 Thread Diez B. Roggisch
Ed Jensen schrieb: > Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >>> Java is not an acronym. That is: it's "Java", not "JAVA". >> Now THAT was an important information RIGHT on topic. > > It was not meant offensively. Ok. >>&

Weekly Python Patch/Bug Summary

2006-07-26 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 401 open ( +3) / 3342 closed ( +8) / 3743 total (+11) Bugs: 896 open ( -8) / 6035 closed (+24) / 6931 total (+16) RFE : 224 open ( +2) / 233 closed ( +2) / 457 total ( +4) New / Reopened Patches __ pkgutil.w

Re: sending bytes to parallel port

2006-07-28 Thread Diez B. Roggisch
> > >>> fd = open('/dev/ppi0','w') > >>> fcntl.ioctl(fd.fileno(),'PPISCTRL',1000) > Traceback (most recent call last): > File "", line 1, in ? > TypeError: an integer is required > > i guess i'm failing to properly define the int i need for the 8byte > value ineed to send the port to set

Re: sending bytes to parallel port

2006-07-29 Thread Diez B. Roggisch
> *sigh* > if only pyparallel would install *sigh* If only you said _what_ failed we could maybe help you make it work... :) Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: metaclass : parse all class once before doing anything else ?

2006-07-29 Thread Diez B. Roggisch
Laurent Rahuel schrieb: > I got a metaclass named Foo I have the impression that you are not talking about a meta-class, but a normal class here. > Then I got two others classes: > > class Bar(Foo): > pass > > class Baz(Foo): > pass > > I know how to add some attrs, methods t

Re: HERE I BUILT A QUICK MATRIX TOOOK 5 MINS

2006-07-29 Thread Diez B. Roggisch
> I find myself in the unenviable position that I can no longer remember the > colour of magic as expressed in Terry Pratchett's books - was it something > like > Octarine? AFAIK yes. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: War chest for writing web apps in Python?

2006-07-29 Thread Diez B. Roggisch
> Synaptic is using aptitude as back-end (this is serious). No. It uses apt. > I also find deb system being the best. Managed with aptitude, not apt. > Windows is definitely worth the effort. aptitude as well as synaptic both depend transitive upon debconf, which depends on apt. Use apt-cache

Re: Small problem with print and comma

2006-07-31 Thread Diez B. Roggisch
Dustan wrote: > Dennis Lee Bieber wrote: >> > for i in range(0,len(param)): >> > print a[i], >> >> for it in param: >> print it, > > That's one way. However, if you need the position (this is for future > reference; you don't need the position number here): > > for i in range(len(param)+1):

Re: Using Python for my web site

2006-07-31 Thread Diez B. Roggisch
northband schrieb: > So seems the best approach would be a MVC model rather than server > scripting? Currently our site is built with a closed source hypertext > preprocessor much like PHP. So it would be easier for us to script > another site, but if we would gain performance via a MVC model, th

Re: how to get size of unicode string/string in bytes ?

2006-08-01 Thread Diez B. Roggisch
Stefan Behnel wrote: > [EMAIL PROTECTED] wrote: >> how can I get the number of byte of the string in python? >> with "len(string)", it doesn't work to get the size of the string in >> bytes if I have the unicode string but just the length. (it only works >> fine for ascii/latin1) In data structu

Re: how to get size of unicode string/string in bytes ?

2006-08-01 Thread Diez B. Roggisch
> So then the easiest thing to do is: take the maximum length of a unicode > string you could possibly want to store, multiply it by 4 and make that > the length of the DB field. > However, I'm pretty convinced it is a bad idea to store Python unicode > strings directly in a DB, especially as the

Re: fast pythonic algorithm question

2006-08-01 Thread Diez B. Roggisch
Guyon Morée wrote: > Memory is no problem. It just needs to be as fast as possible, if > that's what this is, fine. > > If not, I'd like to find out what is :) I'd say it is as fast as it can get - using hashing for lookups is O(n) in most cases, where bisection or other order-based lookups have

Re: fast pythonic algorithm question

2006-08-01 Thread Diez B. Roggisch
>> I'd say it is as fast as it can get - using hashing for lookups is O >> (n) in > > > I know you meant O(1) for hash lookups, but just in case anyone is > confused, I figured I'd correct this. Ooops. Thanks. Diez -- http://mail.python.org/mailman/listinfo/python-list

Weekly Python Patch/Bug Summary

2006-08-01 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 396 open ( -5) / 3354 closed (+12) / 3750 total ( +7) Bugs: 864 open (-32) / 6087 closed (+52) / 6951 total (+20) RFE : 226 open ( +2) / 234 closed ( +1) / 460 total ( +3) New / Reopened Patches __ Move fire

Re: Datetime objects

2006-08-02 Thread Diez B. Roggisch
Lad wrote: > How can I find days and minutes difference between two datetime > objects? > For example If I have > b=datetime.datetime(2006, 8, 2, 8, 57, 28, 687000) > a=datetime.datetime(2006, 8, 1, 18, 19, 45, 765000) a - b Lookup datetime.timedelta - all of this is neatly do

Re: Class definition within function

2006-08-02 Thread Diez B. Roggisch
Tomi Lindberg wrote: > Hi, > > With the following function definition, is it possible to > create an instance of class C outside the function f (and if > it is, how)? And yes, I think this is one of those times > when the real question is why :) > > >>> def f(): > class C(object): > def __init_

Re: Class definition within function

2006-08-02 Thread Diez B. Roggisch
Kay Schluehr wrote: > > Tomi Lindberg wrote: >> Hi, >> >> With the following function definition, is it possible to >> create an instance of class C outside the function f (and if >> it is, how)? > > def f(): > class C(object): > def __init__(self): > self.a = 'a' >

Re: Newbie Q: Class Privacy (or lack of)

2006-08-02 Thread Diez B. Roggisch
> I find that a strange purpose because when you are working on a class, > you don't necessarily know if you will ever know many instance of that > class. So should I use __slots__ in all my classes, just to be sure > for when someone wants many instances of one? I find that a strange reasoning b

Re: Datetime question

2006-08-03 Thread Diez B. Roggisch
56, 609000) > > I would like to make a new ,for example like this > > datetime.datetime(2006, 8, 12, 10, 13, 56, 609000) > > is it possible to do so? you'd been pointed to the resources yesterday - please read manuals carefully! a = datetime.datetime(2006, 8, 12, 10, 1

Re: distutils is not found

2006-08-03 Thread Diez B. Roggisch
Saketh schrieb: > Under openSUSE 10.0, I installed Python 2.4.1. I executed a setup.py > which imports distutils, but I received an error which gave an > "ImportError: module not found" for distutils. I thought that distutils > is part of the standard library under Python, but is there something >

Re: Which KDE IDE for Python?

2006-08-04 Thread Diez B. Roggisch
Bart Ogryczak schrieb: > Hi, > Rigth now I'm using two IDEs for Python, KDevelop and Eric. Both have > drawbacks. KDevelop is a multilanguage IDE, and doesn't really have > anything special for Python. There's no Python debugger, no PyDOC > integration, it's class browser doesn't display attributes

Re: Which KDE IDE for Python?

2006-08-04 Thread Diez B. Roggisch
> Actually I doubt it. For example on question why doesn't Eric use > katepart as editor, he responded: > "Because it is actually written using PyQt and is meant to work on > Win... and Mac OS X as well. Therefore it must not depend on KDE (or > any other non-portable or non-ported toolkit)." That

Re: Proposal: [... for ... while cond(x)]

2006-08-06 Thread Diez B. Roggisch
> No, the list comprehension lets you write an expression directly avoiding a > function call, and it also allows you to add in a condition which can be > used to filer the sequence. Your proposal adds nothing. It does. Consider this: whatever = [x for x in xrange(10) while x < 10] T

Re: is it possible to dividing up a class in multiple files?

2006-08-07 Thread Diez B. Roggisch
Martin Höfling wrote: > is it possible to put the methods of a class in different files? I just > want to order them and try to keep the files small. No, its not possible. What you can do is to create several classes and one that inherits from all of them. Better yet is to not write huge classe

Re: beginner questions on embedding/extending python with C++

2006-08-08 Thread Diez B. Roggisch
> Since the main program is still going to be the C++ application, I > guess we need to embedding the python scripts in the C++ code. So at > initialization stage, the python script needs to be loaded into the C++ > code. And this code can be simple, like > player = Player() > game.loadPlayer(pla

Re: Newbie - How to iterate list or scalar ?

2006-08-08 Thread Diez B. Roggisch
Andy Dingley wrote: > I seem to be writing the following fragment an awful lot, and I'm sure > it's not the best and Pythonic way to do things. Any advice on better > coding style? > > pluginVersionNeeded is a parameter passed into a method and it can > either be a simple scalar variable, or it c

Re: Newbie

2006-08-08 Thread Diez B. Roggisch
pranav wrote: > Hi, > I am new to python. I wanted to know how can i debug a python program. > Is there a gdb equivalent? pdb, a standard module. I use it like this: def some_method_I_want_to_debug(): import pdb pdb.set_trace() # more code to come But that is only one way of usin

Weekly Python Patch/Bug Summary

2006-08-08 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 402 open ( +6) / 3360 closed ( +6) / 3762 total (+12) Bugs: 861 open ( -3) / 6114 closed (+27) / 6975 total (+24) RFE : 228 open ( +2) / 234 closed ( +0) / 462 total ( +2) New / Reopened Patches __ Replace t

Re: import logging fails on MacPython 2.4.3

2006-08-09 Thread Diez B. Roggisch
Tod Olson schrieb: > Anyone have advice for importing the logging module using MacPython 2.4.3? > > MacPython installs the logging module in: > > /Library/Frameworks/Python.framework/Versions/2.4/lib/logging/ On my machine, that is /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4

Re: setup.py when you can't write to site-packages?

2006-08-09 Thread Diez B. Roggisch
andybak wrote: > There are several gaps in my Python knowledge, one of which is the what > exactly setuptools does and how it works. > > I'm on a shared host so can't write to site-packages therefore most > setup.py's fail. > > My strategy for pure python packages is to run setup.py locally and

Re: need hint for refactoring

2006-08-09 Thread Diez B. Roggisch
GHUM wrote: > I have a bunch of function like: > > def p2neufrage(_): > """ create new element""" > anfrage,ergebnis=getanfrage() > if ergebnis.get("status","ok") == "ok": > wert=anfrage["feld"] > # do something > # unique here > > > ergebnis["innerHT

Re: outputting a command to the terminal?

2006-08-13 Thread Diez B. Roggisch
John Salerno schrieb: > Here's my new project: I want to write a little script that I can type > at the terminal like this: > > $ scriptname package1 [package2, ...] > > where scriptname is my module name and any subsequent arguments are the > names of Linux packages to install. Running the scr

Re: Which KDE IDE for Python?

2006-08-14 Thread Diez B. Roggisch
> As a side note, Eric3 has no KDE integration because it's pure PyQt > application. Not fully true. While it certainly doesn't aim to be a fully integrated ide, it has some kde-support. Which you can disable using the --nokde argument, btw. It will then use kde color-dialogs, file-dialogs and th

Re: Newbie: calling the originating class ...

2006-08-15 Thread Diez B. Roggisch
donkeyboy wrote: > This is probably very straightforwards to someone with experience, but > I will try to explain my predicament: > > I'm trying to code a simulation, where you have a Simulation class that > knows everything about the simulation, and in turn classes that the > Simulation calls wh

Re: pickling or xml or other?

2006-08-15 Thread Diez B. Roggisch
placid wrote: > Hi all, > > I have an application were i want the user to "configure" some settings > which are variables within different classes. > > My question is should i just pickle out these variables to a file in > some particular order then read it back. Or use xml to save the config >

Weekly Python Patch/Bug Summary

2006-08-16 Thread Kurt B. Kaiser
import on cElementTree on Windows (2006-08-09) http://python.org/sf/1537685 reopened by thomasbhickey import on cElementTree on Windows (2006-08-09) http://python.org/sf/1537685 opened by Thomas B Hickey indent changes when copying command (2006-08-10) CLOSED http://python.org/

Re: iTunes Search Algorithm/Data Structure?

2006-08-17 Thread Diez B. Roggisch
Bill Mill schrieb: > Hello all, > > What data structure would you use to implement something analogous to > the iTunes search? I imagine that it must be a tree of some sort, but I > can't figure out an easy structure for it. > > Requirements (in case you haven't used it): > > You are given 4 row

Re: Simple Python App Server

2006-08-18 Thread Diez B. Roggisch
tom.purl schrieb: > I use the pyGTD script to manage my todo lists and such. From Vim, I > shell out a call to the gtd.py script, which updates my todo.txt file > after update one of the related pyGTD files. Since I make a lot of > updates to the related pyGTD files, I execute the gtd.py script d

Re: write eof without closing

2006-08-19 Thread Diez B. Roggisch
cage schrieb: > Marc 'BlackJack' Rintsch schreef: >> In <[EMAIL PROTECTED]>, cage wrote: >> >>> can i write a eof to a file descriptor without closing it? >>> like: >>> fd.write(EOF) >>> or something >> >> What do you expect this to to? Writing a byte to the file and you don't >> know which va

Re: Problem of function calls from map()

2006-08-21 Thread Diez B. Roggisch
Dasn wrote: > > Hi, there. > > 'lines' is a large list of strings each of which is seperated by '\t' lines = ['bla\tbla\tblah', 'bh\tb\tb', ... ] > > I wanna split each string into a list. For speed, using map() instead > of 'for' loop. 'map(str.split, lines)' works fine , but... > when I

Re: Create a Multilanguage PDF in Python

2006-08-21 Thread Diez B. Roggisch
Perseo wrote: > I can't upload in the PYTHONPATH but in a normal folder of our site. > Exist another way to do it? PYTHONPATH is an environment variable. You can set it to arbitrary paths, and python will look for module there, too. Or you modify sys.path before you try the import. Diez -- http

Re: Translating Javascript programs to python.

2006-08-22 Thread Diez B. Roggisch
Vyz schrieb: > Hi, > I have a script with hundreds of lines of javascript spread accross 7 > files. Is there any tool out there to automatically or > semi-automatically translate the code into python. Nope. Besides: in which environment does that script run - a browser? Then it would be difficul

Re: Python + Java Integration

2006-08-23 Thread Diez B. Roggisch
Chas Emerick wrote: > This may seem like it's coming out of left field for a minute, but > bear with me. > > There is no doubt that Ruby's success is a concern for anyone who > sees it as diminishing Python's status. One of the reasons for > Ruby's success is certainly the notion (originally adv

Re: How to ask sax for the file encoding

2006-10-04 Thread Diez B. Roggisch
Edward K. Ream wrote: >> [The value of the encoding field] _could_ be retained, but for what >> purpose? > > I'm asking this question because my app needs it :-) > Imo, there is *no* > information in any xml file that can be considered irrelvant. It sure is! The encoding _is_ irrelevant, in

Re: Oracle database export

2006-10-05 Thread Diez B. Roggisch
Tor Erik Soenvisen wrote: > Hi, > > I need to export an Oracle database to a DDL-formated file. On the Web, I > found a Python script that did exactly this for a MS Access database, but > not one for Oracle databases. > > Does anyone know of such a tool or Python script. Oracle is equipped with

Re: Request for recommendations: shared database without a server

2006-10-05 Thread Diez B. Roggisch
> -- A database application on a network drive > -- A variety of users will access the database application at various > times > -- All computing is done on the client machines (Windows XP), as there > is no server > -- I'll not be able to install a database program, or Python, on the > client

Re: Request for recommendations: shared database without a server

2006-10-05 Thread Diez B. Roggisch
Tim Chase schrieb: >> Access might really be the best solution. It is pretty good >> for what it is supposed to do, and the quick prototyping and >> UI-designing are strong arguments for it, especially if there >> already is a bias towards it. >> >> I also _think_ that the whole "db on a shared vol

Re: HOST - Assembla Inc. Breakout - Copyright Violation by Mr. Andy Singleton

2006-10-06 Thread Diez B. Roggisch
>> No, you should have found a forum where you know that the topic is >> appropriate -- even if that restricts it to your own website. > > ??? my website is not a forum (and I'm currently reducing it to the > minimum necessary information.) You obviously lack the skill to comprehend that a forum

Re: HOST - Assembla Inc. Breakout - Copyright Violation by Mr. Andy Singleton

2006-10-06 Thread Diez B. Roggisch
hanumizzle schrieb: > On 10/6/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > >> This is on the same level of interest to the communities of python, ruby >> & java as the color of my socks this morning - a deep black with cute >> little skulls imprinted. >

Skullsocks to the rescue - was [irrelevant squabble of IL]

2006-10-06 Thread Diez B. Roggisch
Fredrik Lundh schrieb: > Diez B. Roggisch wrote: > >> This is on the same level of interest to the communities of python, >> ruby & java as the color of my socks this morning - a deep black with >> cute little skulls imprinted. > > are they perhaps red or g

Re: HOST - Assembla Inc. Breakout - Copyright Violation by Mr. Andy Singleton

2006-10-06 Thread Diez B. Roggisch
Richard Brodie schrieb: > "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> This is on the same level of interest to the communities of python, ruby & >> java as the >> color of my socks this morning - a d

Re: Recursive descent algorithm able to parse Python?

2006-10-06 Thread Diez B. Roggisch
Lawrence D'Oliveiro schrieb: > In message <[EMAIL PROTECTED]>, Diez B. Roggisch wrote: > >> I have to admit that I have difficulties to compare LR(k) to recursive >> descent, but the fact that the latter contains backtracking makes it at >> least more pow

Weekly Python Patch/Bug Summary

2006-10-06 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 428 open ( +6) / 3417 closed ( +2) / 3845 total ( +8) Bugs: 939 open ( +6) / 6229 closed (+17) / 7168 total (+23) RFE : 240 open ( +3) / 239 closed ( +0) / 479 total ( +3) New / Reopened Patches __ Speed up

Re: Kde Taskbar

2006-10-07 Thread Diez B. Roggisch
DarkBlue schrieb: > Hello > > In linux I use kmail as my email client under KDE, > if a message comes in the Kontact button in the > taskbar changes to blue. > How can I have the same behaviour in a python app ? > > I have a python script which runs nicely under linux > now every so often I want

Re: need some regular expression help

2006-10-07 Thread Diez B. Roggisch
Chris wrote: > I need a pattern that matches a string that has the same number of '(' > as ')': > findall( compile('...'), '42^((2x+2)sin(x)) + (log(2)/log(5))' ) = [ > '((2x+2)sin(x))', '(log(2)/log(5))' ] > Can anybody help me out? This is not possible with regular expressions - they can't "re

Re: need some regular expression help

2006-10-08 Thread Diez B. Roggisch
hanumizzle wrote: > On 7 Oct 2006 15:00:29 -0700, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > > > > Chris wrote: > > > I need a pattern that matches a string that has the same number of '(' > > > as ')': > > > findall( compi

Re: need some regular expression help

2006-10-08 Thread Diez B. Roggisch
Mirco Wahab schrieb: > Thus spoke Diez B. Roggisch (on 2006-10-08 10:49): >> Certainly true, and it always gives me a hard time because I don't know >> to which extend a regular expression nowadays might do the job because >> of these extensions. It was so much ea

Re: Newbie - Stuck

2006-10-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > The perl version of this code works but not the python version. What am > I doing wrong? > > message = "abc" > password = "z12" > > scrambled = message ^ password > > I also wondered why this errored as well... > > int(messege) > > Is it not meant to convert a stri

Re: Dive Into Java?

2006-10-09 Thread Diez B. Roggisch
Bjoern Schliessmann wrote: > erikcw wrote: > >> DiveIntoPython.org was the first book I read on python, and I >> really >> got a lot out of it. I need to start learning Java (to maintain a >> project I've inherited), and was wondering if anyone knew of any >> similar books for Java? > > Perhaps

Re: Dive Into Java?

2006-10-09 Thread Diez B. Roggisch
Bjoern Schliessmann wrote: > Diez B. Roggisch wrote: > >> While I do not love java, this is one of the dumbest statements >> for a while in this NG - even though it is not meant to be too >> serious. > > Thanks for your concern. I didn't really state this f

Re: Python component model

2006-10-10 Thread Diez B. Roggisch
Paul Rubin schrieb: > "Nick Vatamaniuc" <[EMAIL PROTECTED]> writes: >> Python does not _need_ a component model just as you don't _need_ a RAD >> IDE tool to write Python code. The reason for having a component model >> or a RAD IDE tool is to avoid writing a lot of boiler plate code. > > It's als

Re: Everything is a distributed object

2006-10-10 Thread Diez B. Roggisch
Martin Drautzburg schrieb: > Hello all, > > I've seen various attempts to add distributed computing capabilities on top > of an existing language. For a true distributed system I would expect it to > be possible to instantiate objects of a remote class or to subclass a > remote class and other stu

Re: Python component model

2006-10-10 Thread Diez B. Roggisch
>> Nope. Things like CORBA and COM do have that property, but e.g. the Java >> beans spec has only a meaning inside the VM. Not sure about .NET, but I >> can imagine there it's the same thing. >> > Well the .NET component model is specifically designed to be > cross-language, but that's a feature

Re: Dive Into Java?

2006-10-10 Thread Diez B. Roggisch
ypes in C++? And I know of some very elaborated schemes called "common base class idiom" for e.g. template-based vector classes to introduce allocation optimization to arithmetic expressions in C++. The code _generated_ by the java compiler, and the C++ compiler, is not the issue here.

Re: Python component model

2006-10-10 Thread Diez B. Roggisch
> While I understand dynamic typing, I still think it is possible to > create attributes in a Python component model which could tell a RAD > tool what type the attribute will encompass for the purpose of > properties and events. Obviously a "name, type" tuple, among other > possible information wo

Re: Dive Into Java?

2006-10-10 Thread Diez B. Roggisch
Christophe wrote: > Diez B. Roggisch a écrit : >> The code _generated_ by the java compiler, and the C++ compiler, is not >> the issue here. If you as a programmer can write "a" + "b", its fine. >> Which is a thing to reach in C++, a bazilli

Re: hundreds of seconds?

2006-10-11 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi all > > How can I access partial seconds on the system clock? > > I measure air speed and water flow in a heat-exchanger test stand and > count pulses from both water meter and air speed meter. I divide the > amount of these counts over a certain interval with the t

Re: Dive Into Java?

2006-10-11 Thread Diez B. Roggisch
Bjoern Schliessmann schrieb: > Diez B. Roggisch wrote: > >> Yes. You can for example create a constructor for object Foo, >> which then is implicitly chosen when assigning an int to a >> variable of that kind. So it acts as a casting operator. I call >> that wicke

Re: dicts + amb

2006-10-11 Thread Diez B. Roggisch
> Something unrelated that I don't know where to put. > Recently I have seen the amb operator, it's not a simple operator. I > have seen a (very simple) Ruby implementation: > http://www.randomhacks.net/articles/2005/10/11/amb-operator > I think a good amb implementation is a very complex thing. Ca

Re: Click and Drag Functionality in Web Apps with Python

2006-10-13 Thread Diez B. Roggisch
Wijaya Edward schrieb: > Hi, > > Some recent webapps like Kiko , Google's gadget > , and spreadsheets > to name a few, > have this functionality. > > I wonder how can this funcitonalities be i

Re: SOAPpy and callback

2006-10-13 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hello, > > I'm trying to find how to use a callback in a SOAP client using SOAPpy. > Does SOAPpy have to manage it, or does Python include some API to do > it? I've never seen any callback mentioned in SOAP. Are you sure this is possible with any SOAP implementation,

Re: Click and Drag Functionality in Web Apps with Python

2006-10-13 Thread Diez B. Roggisch
Fredrik Lundh schrieb: > Diez B. Roggisch wrote: > >> There is mochikit, a javascript library that makes coding in javascript >> suck less. > > and which is written by an experienced Python programmer, so it also > makes your JavaScript look and feel a little mo

Re: Thread termination

2006-10-13 Thread Diez B. Roggisch
Teja schrieb: > Hi all, > > Does any one know how to terminate or kill a thread that is started > with "start_new_thread()" in the middle of its execution? > > Any pointers? This has been discussed a bazillion times in this NG. The short answer is: no. For the long answer: do some googling :)

Re: SOAPpy and callback

2006-10-13 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > SOAP standard doesn't provide any callback, and it looks like SOAPpy > doesn't too. > I remember using callbacks with Javascript and SOAP in Web pages. I was > just wondering if there could be the same with Python. How that? I seriously doubt that, it would mean that t

<    5   6   7   8   9   10   11   12   13   14   >