Re: Newbie: trying to twist my head around twisted (and python)

2006-10-11 Thread Jan Bakuwel
gt; once that processing has been completed. Many thanks... this helps me a great deal! kind regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Newbie: how to wait for callbacks...

2006-10-13 Thread Jan Bakuwel
right track... Any help is much appreciated... Jan def processEmail(emailMessage): sendSent = False def sendComplete(result): print "Message sent successfully" processEmail.sendSent = True #end sendComplete def sendFailed(error):

Re: IDE

2006-10-13 Thread Jan Bakuwel
may be the worst Python programmer (since Python is new for me)... but I have a lot of experience with IDEs and just looked into Python IDEs. My opinion: Eclipse is free but rather complex; WingIDE is commercial software but well worth the few $ - at least for someone like myself. cheers, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: trying to twist my head around twisted (and python)

2006-10-13 Thread Jan Bakuwel
= message_from_string(messageData) try: processEmail(emailMessage) return defer.succeed(None) except: return defer.fail #end eomReceived thanks, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb windows binaries for Python 2.5??

2006-11-11 Thread Jan Dries
ilt MySQLdb on Windows for 2.5, and are willing to share their installers. That's how I got my binaries. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Very nice python IDE (windows only)

2006-06-12 Thread Jan Bijsterbosch
the full source of the editor is available in the Delphi python VCL components package as an example from the same site. If you're a happy owner of Delphi, you just can change everything to your liking and recompile...;-)) Greetings from sunny Amsterdam, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Very nice python IDE (windows only)

2006-06-13 Thread Jan Bijsterbosch
h orange for reserved words, green > for strings, etc... With the above, no problem at all...;-)) Greetings from sunny Amsterdam, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Very nice python IDE (windows only)

2006-06-13 Thread Jan Bijsterbosch
have to say after more than 20 years of programming with Borland products in C, C++(Builder), Kylix and Delphi, there's certainly no end in sight yet...;-)) > -Jonathan Greetings from sunny Amsterdam, Jan -- http://mail.python.org/mailman/listinfo/python-list

lxml Windows binaries

2006-09-14 Thread Jan Dries
I'm trying to find Windows binaries for lxml. The cheeseshop is supposed to have such binaries, but I can't find them. Does anyone know where I might find such binaries? Thanks, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: lxml Windows binaries

2006-09-14 Thread Jan Dries
Fuzzyman wrote: > Jan Dries wrote: >> I'm trying to find Windows binaries for lxml. The cheeseshop is supposed >> to have such binaries, but I can't find them. >> Does anyone know where I might find such binaries? >> > > The lxml install docs point

Re: lxml Windows binaries

2006-09-14 Thread Jan Dries
Stefan Behnel wrote: > Jan Dries wrote: >> I'm trying to find Windows binaries for lxml. The cheeseshop is supposed >> to have such binaries, but I can't find them. >> Does anyone know where I might find such binaries? > > http://cheeseshop.python.org/pypi/l

Re: SSL meta data

2006-09-25 Thread Jan Dries
URL API directly, you can obtain the certificate information in a more direct way without having to rely on parsing the above output with regexps. Doing so might also be more complex though :-) Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: XSLT speed comparisons

2006-09-28 Thread Jan Dries
eportlab.org/pyrxp.html > Except that pyrxp, to the best of my knowledge, is an XML parser and doesn't support XSLT, which is a requirement for Damian. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb for Python 2.5

2006-09-30 Thread Jan Dries
Martin v. Löwis wrote: > Harold Trammel schrieb: >> Does anyone know the status of a version of MySQLdb that will work with >> Python 2.5? > > AFAICT, MySQLdb 1.2.1 builds and works just fine. > Does anyone know if Windows binaries for 2.5 are available somewhere?

UTF8 & HTMLParser

2006-11-30 Thread Jan Danielsson
ption: self.currentName = text However, I would like to convert the "text" (which is utf8) to latin-1. How do I do that? I've been trying to figure it out for some time now, and I'm just getting frustrated. :-( -- Kind Regards, Jan Danielsson Te audire non possum. M

Re: UTF8 & HTMLParser

2006-11-30 Thread Jan Danielsson
Jan Danielsson wrote: > Hello all, > >I'm writing a python script which fetches a HTML-page (using wget), > and then parses the retrieved page using a custom htmllib HTMLParser. > >The page I fetch is encoded in utf8, and my text-handler currently > lo

Re: Use of factory pattern in Python?

2006-12-07 Thread Jan Dries
def __init__(self, *args, **kw): pass def factory(kind, *args, **kw): return registry[kind](*args, **kw) That way you don't have to think about calling the register-function each time you derive a new class. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-08 Thread Jan Dries
erence for benchmarking C versus Python performance. And for the same reason: in the presence of excellent optimized Python libraries for matrix multiplication, you probably shouldn't be doing that in pure Python if performance matters, nor use that as a reference case in benchmarking Python. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: SSH File Transfer Protocol or SFTP

2006-12-11 Thread Jan Dries
iko/). It provides extensive support for the SSH protocol, and ships with, among other things, a sample script demonstrating SFTP. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-11 Thread Jan Dries
ops that I like so much can provide. I can't speak about Lisp, but the great thing about Python, IMHO, is that you can get quite far with not much more than Notepad. I find this important because I find GUIs a very tedious and ineffective way to describe whatever it is that I am tryin

Re: merits of Lisp vs Python

2006-12-11 Thread Jan Dries
t only from Bach but also other masters (Handel for instance), but turning the whole into "something popular and easy to sway and dance to". Come to think of it, there definitely is something pythonic to Mozart ... Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-11 Thread Jan Dries
imizing the code. Isn't that the same as saying "less dynamic" by the very meaning of the word in this context? The more the compiler knows or can deduce at compile time, the more static. At least that has always been my view on it. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-13 Thread Jan Dries
. >> The argument from popularity is invalid. French units have overtaken >> standard units, > Never heard of that French unit thing. Unless you talk about that > archaic unit system that was in use before the metric system was created. And who do you think created the me

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Jan Dries
a similar situation. Sure, it adds the overhead of setting up and running an LDAP, but managing users and their quota through python_ldap is much cleaner and more flexible than doing so using os.system(), certainly from within a web application. That doesn't alter the fact though that se

Re: Unsubscribing from the list

2007-01-03 Thread Jan Dries
nguage like that. Better rephrase it to: if you == "got_offended": dotan = "sorry" Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to implement a timed queue?

2007-01-04 Thread Jan Dries
following piece of code does the trick. Note that it allows worker threads to do something two times every second, and not once every half second, though it could easily be modified to accomodate that too. Also note that the code below keeps running forever as worker threads never stop w

Re: [ANNOUNCE] MyHDL 0.5 released

2006-01-22 Thread Jan Decaluwe
RTL) synthesizable. > Maybe I should continue this conversation on the MyHDL list, since I'd be > interested in getting started in this in a simple way. You're welcome! Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium Fro

Redirecting stdin/stdout to self

2006-01-23 Thread Jan Danielsson
but redirects its output to its own input, and reads it line by line. I would normally have done it like this: $ tcpdump -nelttt pflog0 | mypythonscript.py ...however, the Perl script solution looks interresting.. Is it possible to do something like that in Python? -- Kind Regards, Jan Danie

pylab: plot update

2005-05-11 Thread Jan Wienhausen
rogram does not run any further. But after closing the window ones it runs without any problems. Is there any better way to do this easily? Thanks, Jan -- http://mail.python.org/mailman/listinfo/python-list

soundcard readout on a windows system

2005-05-18 Thread Jan Wienhausen
Hi, I would like to read out the soundcard with python on a win system. Is there any possibillity to do so? Thanks, Jan -- http://mail.python.org/mailman/listinfo/python-list

Question about mutexes

2005-06-01 Thread Jan Danielsson
In OS/2 C, I would do this: main() { ... DosCreateMutexSem(NULL, &hmtx, 0UL, FALSE); ... } thread() { ... DosRequestMutexSem(hmtx); Locked! DosReleaseMutexSem(hmtx); ... } How would I go about doing that in Python? I figured this part out: lockobj = mutex() lockobj.lock(foo, "bar") Locked!

Re: Question about mutexes

2005-06-01 Thread Jan Danielsson
Reinhold Birkenfeld wrote: [---] >>How would I go about doing that in Python? > > I think you will want to create a threading.Lock object. It would seem so. Thanks for the tip! -- http://mail.python.org/mailman/listinfo/python-list

Newbie question: Allocation vs references

2005-06-02 Thread Jan Danielsson
Hello all, Behold: -- a = [ 'Foo', 'Bar' ] b = [ 'Boo', 'Far' ] q = [ a, b ] print q[0][0] print q[1][1] a[0] = 'Snoo' b[1] = 'Gnuu' print q[0][0] print q[1][1] -- This will output: Foo Far Snoo Gnuu I assume it does so because q stores _references_ to a and b. How would d

"Opposite" of splitting?

2005-06-05 Thread Jan Danielsson
Hello all, I have a list of integers: q = [ 1, 2, 4, 7, 9 ] which I would like to convert to a string: "1,2,4,7,9" This is *very* easy to do with a simple while loop.. But I suspect that there is a more elegant way to do it in Python. Is there? If so: How? -- http://mail.python.org/mailman

Creating file of size x

2005-06-06 Thread Jan Danielsson
Hello all, Is there any way to create a file with a specified size? -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating file of size x

2005-06-06 Thread Jan Danielsson
Erik Max Francis wrote: >>Is there any way to create a file with a specified size? > > What do you want to put in the file? Once you've answered that > question, the solution should present itself. Check blocks from an FEC-encoder (Freenet, more specifically). The problem is that the des

Re: Creating file of size x

2005-06-06 Thread Jan Danielsson
Grant Edwards wrote: Is there any way to create a file with a specified size? >>> >>>What do you want to put in the file? Once you've answered that >>>question, the solution should present itself. >> >>Check blocks from an FEC-encoder (Freenet, more specifically). >> >> The problem is tha

A question about time

2005-06-09 Thread Jan Danielsson
Hello all, I have a list of servers which an application connects to. If the connection fails, the application should mark the server as temporarily unavailable, and should try to use the server again after x units of time. In C, I would do this: server.invalidUntil = time(NULL) + 5*60; // fi

Re: A question about time

2005-06-09 Thread Jan Danielsson
Grant Edwards wrote: >>In C, I would do this: >> >>server.invalidUntil = time(NULL) + 5*60; // five minute delay > > In Python, I would do this: > > server.invalidUntil = time.time() + 5*60 # five minute delay Ah. Well. Um. I feel like an idiot. I found datetime by accident, and thought "it

Going crazy...

2005-06-13 Thread Jan Danielsson
Hello all, I'm 100% sure that I saw an example which looked something like this recently: >>> a=(1, 2, 3, 4, 5, 6) >>> b=(2, 3, 6) >>> a - b (1, 4, 5) The only new language I have been involved in lately is Python. Is my memory failing me, or have I seen such an Python-example somewhere? I

Re: Going crazy...

2005-06-14 Thread Jan Danielsson
Gary Herron wrote: [---] >> I just tried typing the above in Python, and it - obviously - doesn't >> work, so it must be some other syntax. >> >> > Not with tuples, lists or dictionaries. However a more recent addition > to the language is Sets, and they support set differences: > from s

FAQ: __str__ vs __repr__

2005-06-15 Thread Jan Danielsson
Sorry, but I Just Don't Get It. I did search the 'net, I did read the FAQ, but I'm too dumb to understand. As far as I can gather, __str__ is just a representation of the object. For instance: class ServerConnection: def __str__(self): buf = "Server: " + self.name + "\n" buf +

Output XML buffer?

2007-06-25 Thread Jan Danielsson
s the case). -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: Output XML buffer?

2007-06-26 Thread Jan Danielsson
XML anyway. Yeah, I checked the specs, and found a '?' there (but not where I expected it to be). I just checked the first mention of the "header", and didn't see it marked as optional. However, I want it to be there, simply because it feels better. I'll check lx

p & br using ElementTree?

2007-06-26 Thread Jan Danielsson
Hello all, This is probably a mind numbingly brain dead question.. But how do I generate the following: Current date:2000-01-01 ..using ElementTree? The element kind of needs two text blocks, as far as I can tell? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman

Re: p & br using ElementTree?

2007-06-26 Thread Jan Danielsson
= ET.SubElement(p, 'br') > > In [7]: br.tail = '2000-01-01' > > In [8]: ET.dump(p) > Current date:2000-01-01 That did the trick. Thanks! -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

ElementTree -- adding one structure to another?

2007-06-26 Thread Jan Danielsson
stick elem as a subelement of fooElement. Do I need to traverse the elem tree manually, or is there a way to just 'stick it in there'? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: ElementTree -- adding one structure to another?

2007-06-26 Thread Jan Danielsson
Jan Danielsson wrote: >If have an element tree representing an XML document, and I load > another tree from a file, is there an easy way to stick the second tree > into the first one? > >fooElement = ET.SubElement(...) > >tree = ET.parse(TEMPLDIR + 

Re: sort pygtk gtktreeview column containing dates

2007-07-02 Thread Jan Vorwerk
(sort_column_id, sort_func, user_data=None) Good luck! Jan psaroudakis a écrit , le 27.06.2007 16:28: > Hello... I have been trying to sort a gtktreelist column that contains > dates in the following format: > > eg: 01-Jan-1993 > 12-Dec-1992 etc > > i don't seem to

[mostly OT] mod_python & doc file system layout

2007-07-04 Thread Jan Danielsson
to make the python script load the images and style sheets.. A solution which I find to be particularly ugly. :-) Any mod_python users out there with any other solutions? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a string

2007-07-04 Thread Jan Vorwerk
27;hash', 'help', 'hex', 'id', 'input', 'int', 'intern', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'quit', 'range', 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 'vars', 'xrange', 'zip'] >>> reversed >>> dir(reversed) ['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__iter__', '__len__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'next'] >>> print reversed.__doc__ reversed(sequence) -> reverse iterator over values of the sequence Return a reverse iterator --- Far from me the idea that manuals are useless, but this is a nice thing about Python that you can look at what is available interactively. Cheers Jan -- http://mail.python.org/mailman/listinfo/python-list

"Empty" text

2007-07-08 Thread Jan Danielsson
when it is not the proper thing to do. Is it possible to force ElementTree to output the XHTML code I need it to? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: "Empty" text

2007-07-10 Thread Jan Danielsson
ust by changing content type from text/html to application/xml+xhtml. (Quite a positive surprise, to me) A big "Thank you!" goes to those who helped me find the source of the problem. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Jan Danielsson
with a "flatter" one). OTOH, I just went to an (Am.) English school my first school year, and language is not one of my fields of interest. So I'll just shut up and go away. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

pyHook equivalent for WH_SHELL hooks?

2007-04-21 Thread Jan Böcker
;) Regards, Jan Böcker -- http://mail.python.org/mailman/listinfo/python-list

doxygen

2007-03-04 Thread Jan Danielsson
stFunction(foo=None): pass --- ..is not. Is this by design? Is it possible to get doxygen to include standalone functions? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: Mod python - mysql lock

2007-03-05 Thread Jan Danielsson
a MySQL question. Or even a generic database design question. I would suggest you try asking in a more appropriate forum. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

mod_python demo

2007-03-14 Thread Jan Danielsson
ely look at for ideas). Is there any Python/web community site anywhere which allows users to upload template code for others to use? Note: I am a Python newbie, so there are probably lots of improvements to be done, if anyone cares enough). -- Kind regards, Jan Danielsson -- http://

Re: Mastering Python

2007-03-16 Thread Jan Danielsson
form independent? Mostly.. > What > is the best way?And how long would it take before I can develop > applications using python? Depends on your learning skills, and what kind of applications we're talking about. -- Kind regards, Jan Danielsson And now a word from o

Re: call to function by text variable

2007-03-25 Thread Jan Schilleman
Hi, try this: func = getattr(operations, ["Replace", "ChangeCase", "Move"][n]) HTH, Jan "ianaré" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > yeah the subject doesn't really make sense does it? > > anyway want I wa

Modules & positive surprises

2007-03-27 Thread Jan Danielsson
Yesterday I found another module which I fell in love with: Python Cryptography Toolkit (http://www.amk.ca/python/writing/pycrypt/). It's just so ... elegant, and functional. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

SimpleXMLRPCServer - client address

2007-04-01 Thread Jan Danielsson
Hello all, I writing an application based on the SimpleXMLRPCServer class. I would like to know the IP address of the client performing the RPC. Is that possible, without having to abandon the SimpleXMLRPCServer class? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman

SimpleXMLRPCServer - revisited

2007-04-03 Thread Jan Danielsson
-- If anyone has any hints or tips.. Please share them. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

mod_python & Cookie - unexpected dictionary value

2007-04-13 Thread Jan Danielsson
string containing "blah"? I can get this to work, by doing this: cookies = Cookie.get_cookies(req) c = str(cookies['sessId']).split('=', 1) ...then use c[1]. Is that the proper way? Seems kind of strange to store the cookies in a di

Re: mod_python & Cookie - unexpected dictionary value

2007-04-13 Thread Jan Danielsson
Jan Danielsson wrote: [---] Never mind. Cookie objects have a "value" attribute -- that's what I was doing wrong. -- Kind regards, Jan Danielsson And now a word from our sponsor -- Want to have instant messaging, and chat rooms, and discussion

Re: Standardizing XML

2007-04-15 Thread Jan Danielsson
XML. If you want to make XML out of something which isn't XML, you'll probably have to be a little more specific about how this other format works. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with "funny" characters

2007-10-20 Thread Gert-Jan
oding. But you should read this first: http://www.joelonsoftware.com/articles/Unicode.html It's an entertaining introduction to the world of codepages and unicode :-) Regards, Gert-Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlobject 0.8.0b1 and python 2.5

2007-01-13 Thread Jan Dries
ssign_mapper, actual use of SQLAlchemy comes very close to SQLObject. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Removing outdated files

2007-01-22 Thread Jan Danielsson
functions in Python to extract week numbers from a date. -- Kind regards, Jan Danielsson And now a word from our sponsor -- For a quality usenet news server, try DNEWS, easy to install, fast, efficient and reliable. For home servers or carrier class installations with m

Re: Removing outdated files

2007-01-22 Thread Jan Danielsson
o extract week numbers from a date. > > .isocalendar() .thanks() -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

interactive prompt in IDLE

2007-01-29 Thread Jan Kanis
e this has something to do with Idle and the python shell in it both running in different processes, with the prompts generated by the Idle process? Does anyone know if and how to change the prompts in IDLE's interactive python? Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python scripts to do parallel downloading?

2007-02-01 Thread Jan Danielsson
ow could I make full use of an SMP system?". I would never claim that multithreading is *easier* than singlethreaded. It's mererly a different way of thinking. OTOH, multithreaded does have a steeper learning curve. But once you get past that, there's really not a lot of d

Return images with matplotlib?

2007-02-04 Thread Jan Danielsson
return the image data, like so: def barchart(req, params): some_format = matplotlib.generate_fancy_graph(params) png_buf = make_png_buffer(some_format) return png_buf Is this possible? If so -- how? -- Kind regards, Jan Danielsson And now a word from our sponsor

Graphs, bar charts, etc

2007-02-06 Thread Jan Danielsson
Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Preallocate? -- potentially brain dead question about performance

2007-02-26 Thread Jan Danielsson
cond one is more appealing, when I think in terms of risk of memory fragmentation, etc. But since Python is such a high level language, I'm not sure my traditional reasoning applies. -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: Preallocate? -- potentially brain dead question about performance

2007-02-26 Thread Jan Danielsson
ly if you want to create a set, avoiding the list > creation: > > newlist = set(int(e[0]) for e in mylist) ...completely avoiding the design issue I raised altogether. Thanks! Exactly what I was hoping for! :-) -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list

Re: import pysqlite2 or import sqlite3?

2007-11-22 Thread Jan Claeys
Op Wed, 21 Nov 2007 21:11:59 +0100, schreef Hertha Steck: > After a second look at the error message: when I installed Gentoo, > Python 2.4 was installed, I got the new version a little later. And I > think I installed Pysqlite 2.3.5 separately. > > Python 2.5 comes with pysqlite - should I unins

Re: Python web frameworks

2007-11-25 Thread Jan Claeys
Op Fri, 23 Nov 2007 09:29:38 -0800, schreef BartlebyScrivener: > I'm just learning Django and feeling my way through all of this server > terminology. Where does Django's memcached feature fit into all of this? > When you all speak of start up costs and memory intensive loading for > each requests

Re: How to display unicode with the CGI module?

2007-11-25 Thread Jan Claeys
Op Sun, 25 Nov 2007 13:02:26 -0800, schreef coldpizza: > It is funny that encode() and decode() omit the name of the other > encoding (Unicode ucs2?), which makes it far less readable than a > s.recode('ucs2','utf8'). The internal encoding/representation of a "string" of Unicode characters is co

Re: "Python" is not a good name, should rename to "Athon"

2007-12-08 Thread Jan Claeys
Op Mon, 03 Dec 2007 14:20:52 +1300, schreef greg: > If you want a really appropriate name for a programming language, I'd > suggest Babbage. (not for Python, though!) Konrad Zuse wrote the first high-level programming language, so I think his name would be a better candidate... -- JanC -- ht

Re: Distinguishing attributes and methods

2007-12-09 Thread Jan Claeys
Op Sun, 09 Dec 2007 12:44:46 -0800, schreef MonkeeSage: > The point is that just because the attributes are "looked up the same > way" or whatever, doesn't make them the same *kind* of attribute. To say > that all attributes are the same in python muddies the water. They are > the same in a generi

Re: Newbie edit/compile/run cycle question

2007-12-09 Thread Jan Claeys
Op Sun, 09 Dec 2007 01:11:28 +, schreef Jeremy C B Nicoll: > What command (in XP) does one need to issue to syntax check a saved > python script without running it? > > Does a syntax check report all syntax errors or just the first one > found? python -c "import py_compile; py_compile.compil

Re: Newbie edit/compile/run cycle question

2007-12-17 Thread Jan Claeys
Op Mon, 10 Dec 2007 16:00:04 -0800, schreef Matimus: > better written: > > python -mpy_compile FILENAME The -m option doesn't work in all versions of cpython (I think since v2.4, or maybe 2.3?). -- JanC -- http://mail.python.org/mailman/listinfo/python-list

Re: DNS servers in Python - which ones are a good base for work?

2007-12-17 Thread Jan Claeys
Op Tue, 11 Dec 2007 11:10:52 -0800, schreef John Nagle: > I need to do a non-standard DNS server in Python. This is for a spam > blacklist type DNS server, not for IP lookup. "dnspython" seems to be > client side only. Oak DNS is deprecated. Suggestions? $ wajig search python-twisted-names py

Re: Best way to protect my new commercial software.

2007-12-18 Thread Jan Claeys
Op Fri, 14 Dec 2007 16:54:35 +, schreef Grant Edwards: > Uh what? I don't know what country you're in, but in the US, it doesn't > take any time at all to copyright something. The mere act of writing > something copyrights it. I thought it was the same in Europe as well. No, it's only copy

Re: Counter-spam: Change the subject

2007-12-26 Thread Jan Claeys
Op Tue, 11 Dec 2007 14:19:20 -0800, schreef Paul McGuire: > My ISP's news server only works for me when I am connected locally, not > when I am travelling. Gmane ? -- JanC -- http://mail.python.org/mailman/listinfo/python-list

pygresql - bytea

2006-04-26 Thread Jan Danielsson
have a working example? A simple insertion, and a simple select is all I'm looking for. -- Kind Regards, Jan Danielsson Te audire non possum. Musa sapientum fixa est in aure. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's great, in a word

2008-01-15 Thread Jan Claeys
Op Mon, 07 Jan 2008 05:09:15 -0800, schreef MartinRinehart: > Would you Python old-timers try to agree on a word or two that > completes: > > The best thing about Python is ___. > > Please, no laundry lists, just a word or two. I'm thinking "fluid" or >

Re: MyHDL (was Re: Will Python on day replace MATLAB...)

2008-02-01 Thread Jan Decaluwe
HDL which is a major new feature. This is mostly done and available from development releases (which I put on the website, not on SourceForge). Still have to write a significant amount of new documentation though. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Kaboutermans

Problem with Nose testing until forking process

2009-01-26 Thread Jan Koprowski
Hi ! I write application witch sometimes need fork to shell based process (some kind of shell command). I snatch stdin, stdout, stderr and two additional streams and fork process to run command and get results. # -*- encoding: utf-8 -*- import os import sys import subprocess def pipes_functio

ctypes and misaligned doubles

2008-12-11 Thread Jan Roelens
thout recompiling the whole ctypes package? If I can't change it, is there a way to define my own type based on c_double but with a different alignment? Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Why MyHDL?

2008-12-23 Thread Jan Decaluwe
Hello: MyHDL is a Python package for using Python as a Hardware Description Language. A new release is upcoming, and on this occasion we have prepared a page about why MyHDL may be useful to you: http://www.myhdl.org/doku.php/why Regards, Jan -- Jan Decaluwe - Resources bvba - http

Re: Why MyHDL?

2008-12-23 Thread Jan Decaluwe
Stef Mientki wrote: hello Jan, Jan Decaluwe wrote: Hello: MyHDL is a Python package for using Python as a Hardware Description Language. A new release is upcoming, and on this occasion we have prepared a page about why MyHDL may be useful to you: http://www.myhdl.org/doku.php/why Very

Integer arithmetic in hardware descriptions

2009-03-14 Thread Jan Decaluwe
x27;s native integer type, int. I have written an essay that explores these issues in detail: http://www.jandecaluwe.com/hdldesign/counting.html -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a hardware description language: http://www.myhdl.org -- http://mail.pytho

Re: global name 'self' is not defined - noob trying to learn

2009-03-30 Thread Jan Decaluwe
ly set value. I'm really cornfused now. In the past, someone referred you to the intbv class in MyHDL. You mentioned that it does "more than you want". However, it seems to me that what intbv really does, is to solve the kind of issues that you are struggling with. Perhaps you want to

Re: downloading a link with javascript in it..

2008-05-16 Thread Jan Claeys
Op Mon, 12 May 2008 22:06:28 +0200, schreef Diez B. Roggisch: > There is no way to interpret the JS in Python, There is at least one way: -- JanC -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-06-06 Thread Jan Claeys
Op Fri, 23 May 2008 14:00:33 -0700, schreef [EMAIL PROTECTED]: > Now this I can tell is false. The problem is not that it's difficult to > "make a native compiler for" dynamic languages, the problem is that it's > difficult to write native compiler for dynamic languages that generates > code that

Re: definition of a highlevel language?

2008-06-07 Thread Jan Claeys
Op Mon, 26 May 2008 15:49:33 -0400, schreef Dan Upton: > The point about them looking very little like x86/ARM/etc chips is the > important part though--IIRC, part of the failure of Java machines was > lousy support for preexisting code, due to the optimizations for Java > bytecode, and I expect t

Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error

2008-06-07 Thread Jan Claeys
Op Fri, 30 May 2008 22:37:14 +0200, schreef M.-A. Lemburg: > On 2008-05-30 17:41, Peter Otten wrote: >> Josep wrote: >>> My Python version is 2.5.2, Ubuntu Hardy .deb package. >> Python might get confused by an @EURO suffix in the locale: > Right, that's what's happening. > > The locale module

Re: Python internals

2008-07-15 Thread Jan Claeys
Op Tue, 15 Jul 2008 09:29:58 -0500, schreef Larry Bates: > Names are pointers in Python that point to values in memory. But "pointers" doesn't have the same meaning as in "C" here. Memory in Python is not (necessarily) an "array of bytes"; how & where the values are stored in "physical memory"

<    1   2   3   4   5   6   7   8   >