Re: ancestor class' __init__ doesn't call other methods

2006-09-15 Thread Rob De Almeida
Luis P. Mendes wrote: > Method a() is not called. Why is this? What is the best option to > solve this? Have Cotacoes returning values and not to be an ancestor > class of CruzaEmas? It works for me, after rearranging your code a little bit: class Ema: pass class Sistema: def __init__

Compile AST to bytecode?

2006-09-19 Thread Rob De Almeida
Hi, I would like to compile an AST to bytecode, so I can eval it later. I tried using parse.compileast, but it fails: >>> import compiler, parser >>> ast = compiler.parse("42") >>> parser.compileast(ast) Traceback (most recent call last): File "", line 1, in ? TypeError: compilest() argument 1

Re: Compile AST to bytecode?

2006-09-19 Thread Rob De Almeida
Duncan Booth wrote: > > I would like to compile an AST to bytecode, so I can eval it later. > I'm not sure there are any properly documented functions for converting an > AST to a code object, so your best bet may be to examine what a > pycodegen class like Expression or Module actually does. Than

Re: new string method in 2.5 (partition)

2006-09-20 Thread Irmen de Jong
Terry Reedy wrote: > "Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] >> Err... is it me being dumb, or is it a perfect use case for str.split ? > > s.partition() was invented and its design settled on as a result of looking > at some awkward constructions in t

Re: new string method in 2.5 (partition)

2006-09-20 Thread Irmen de Jong
Gabriel Genellina wrote: > Nope, a python string has both a length *and* a null terminator (for > ease of interfacing C routines, I guess) so you can't just share a > substring. Ofcourse, that makes perfect sense. Should have thought a little bit further myself :) --Irmen -- http://mail.

ruby %w equivalent

2006-09-24 Thread Antoine De Groote
Hi everybody, is there a python equivalent for the ruby %w operator? %w{a b c} creates an array with strings "a", "b", and "c" in ruby... Thanks a lot Regards, antoine -- http://mail.python.org/mailman/listinfo/python-list

Re: ruby %w equivalent

2006-09-26 Thread Antoine De Groote
Antoine De Groote wrote: > Thorsten Kampe wrote: >> * John Machin (24 Sep 2006 15:32:20 -0700) >>> Antoine De Groote wrote: >>>> is there a python equivalent for the ruby %w operator? >>>> %w{a b c} creates an array with strings "a", "b"

Re: ruby %w equivalent

2006-09-26 Thread Antoine De Groote
Thorsten Kampe wrote: > * John Machin (24 Sep 2006 15:32:20 -0700) >> Antoine De Groote wrote: >>> is there a python equivalent for the ruby %w operator? >>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby... >>>

Re: a different question: can you earn a living with *just* python?

2006-09-26 Thread Antoine De Groote
John Salerno wrote: > It's a nice thought that a person can earn a living programming with > Python, which is fun enough to use just for its own sake. But for > someone like me (i.e. no programming experience) it's always a little > disheartening to see that most (if not all) job descriptions th

Re: ruby %w equivalent

2006-09-27 Thread Antoine De Groote
Thorsten Kampe wrote: > * Antoine De Groote (Tue, 26 Sep 2006 12:06:38 +0200) >> Thorsten Kampe wrote: >>> * John Machin (24 Sep 2006 15:32:20 -0700) >>>> Antoine De Groote wrote: >>>>> is there a python equivalent for the ruby %w operator? >>

retry in exception

2006-09-29 Thread Antoine De Groote
Hi, I hope I don't upset anybody by comparing Python to Ruby (again). Is there something like Ruby's retry keyword in Python? I couldn't find any thing... Regards, antoine -- http://mail.python.org/mailman/listinfo/python-list

Re: creating a small test server on my local computer

2006-09-29 Thread Irmen de Jong
John Salerno wrote: > Ok, this is completely unnecessary so I don't intend to get into stuff > that's beyond my skill, but I'm wondering how simple it would be to use > Python to create a server that runs on my computer so I can test my > webpages (because otherwise I have to keep sending them t

builtin regular expressions?

2006-09-30 Thread Antoine De Groote
Hello, Can anybody tell me the reason(s) why regular expressions are not built into Python like it is the case with Ruby and I believe Perl? Like for example in the following Ruby code line = 'some string' case line when /title=(.*)/ puts "Title is #$1" when /track=(.*)/ puts "

Re: builtin regular expressions?

2006-09-30 Thread Antoine De Groote
Just to get it clear at the beginning, I started this thread. I'm not a newbie (don't get me wrong, I don't see this as an insult whatsoever, after all, you couldn't know, and I appreciate it being so nice to newbies anyway). I'm not an expert either, but I'm quite comfortable with the language

Re: builtin regular expressions?

2006-09-30 Thread Antoine De Groote
Jorge Godoy wrote: > Antoine De Groote <[EMAIL PROTECTED]> writes: > >> Just to get it clear at the beginning, I started this thread. I'm not a >> newbie > > Sorry :-) I got to this wrong conclusion because of the way I read your > message. no problem ;-

Re: php and python: how to unpickle using PHP?

2006-10-02 Thread Irmen de Jong
Ted Zeng wrote: > Hi, > > I store some test results into a database after I use python > To pickle them (say, misfiles=['file1','file2']) > > Now I want to display the result on a web page which uses PHP. > How could the web page unpickle the results and display them? > Is there a PHP routine th

Re: What value should be passed to make a function use the default argument value?

2006-10-03 Thread Rob De Almeida
LaundroMat wrote: > Suppose I have this function: > > def f(var=1): > return var*2 > > What value do I have to pass to f() if I want it to evaluate var to 1? > I know that f() will return 2, but what if I absolutely want to pass a > value to f()? "None" doesn't seem to work.. If you *absolutely* w

Re: [IronPython] [ANN] IronPython Community Edition 1.0r2

2006-10-04 Thread Miguel de Icaza
Hello, > And here's the license and the summary of applied patches: > http://fepy.sourceforge.net/license.html > http://fepy.sourceforge.net/patches.html Do the patches include the various extensions that are being shipped? Am wondering if you could distribute a IPCE that contains all the docume

Re: WSGI with mod_python (was: Python, WSGI, legacy web application)

2006-11-23 Thread Rob De Almeida
Ben Finney wrote: > I was under the impression that WSGI in mod_python was a rather kludgy > way to do WSGI, but I don't know what the alternatives are. CGI? > Python http server (e.g. CherryPy)? Something else? You can use FastCGI or SCGI too, with Apache, lighttpd or Cherokee. I have a short des

Re: synching with os.walk()

2006-11-24 Thread Antoine De Groote
Andre Meyer wrote: > Hi all > > os.walk() is a nice generator for performing actions on all files in a > directory and subdirectories. However, how can one use os.walk() for > walking through two hierarchies at once? I want to synchronise two > directories (just backup for now), but cannot see

Re: Dynamic function execution

2006-11-25 Thread Irmen de Jong
Andy Wu wrote: > Say I have a string 'minutes' and a integer 30, now I need to call the > func this way: func(minutes = 30), how do I do this? d={"minutes": 30} func(**d) This is "extended call syntax". You can read more about this when you look up the (deprecated) "apply" function in the manual.

Re: why would anyone use python when java is there?

2006-11-29 Thread Antoine De Groote
+1 Éric Daigneault wrote: > > wtf > > a reasonable question... > > But before I run circle yelling "the trolls are here, the trolls are > here" I got one for you... > > why would anyone use java when python is there?? > > ;-) > > .^_^. > > Eric :D, > -- http://mail.python.org/mailman/li

Re: client/server design and advice

2006-12-01 Thread Irmen de Jong
TonyM wrote: > Lastly, as far as the networking goes, i have seen posts and such about > something called Pyro (http://pyro.sourceforge.net) and wondered if > that was worth looking into for the client/server interaction. I'm currently busy with a new version of Pyro (3.6) and it already includes

Re: client/server design and advice

2006-12-01 Thread Irmen de Jong
bruce wrote: > hi irmen... > > happened to come across this post. haven't looked at pyro. regarding your > 'work packets' could these essentially be 'programs/apps' that that are > requested by the client apps, and are then granted by the dispatch/server > app? > Pyro supports a limited form of

Re: client/server design and advice

2006-12-02 Thread Irmen de Jong
John Henry wrote: > On the subject of passing things around, is there a no brainer way of > sending files back and forth over Pyro? > > I am currently using a shared drive to do that. May be I missed that > feature? > Sending files around is just a special case of passing large amounts of data

Re: newb: Can I use PYRO

2006-12-06 Thread Irmen de Jong
johnny wrote: > What I want to do is the following: > > Web user uploads a word doc (web app written in php), and I need it to > move the uploaded word > doc, on to another machine and conver it to pdf. Then update the > database and allow immediate pdf download. I am thinking of using ftp > fro

Re: do design patterns still apply with Python?

2006-03-03 Thread Irmen de Jong
Roy Smith wrote: > >> For example, the Factory pattern is mostly to work around the fact that >> it's difficult in Java and C++ to dynamically load classes. > > You're over-specifying. Most of most design patterns is to work around the > fact that it's difficult in Java and C++ to do many thing

Re: cgi "print statement" in multithreaded enviroment?

2005-05-02 Thread Irmen de Jong
vegetax wrote: > How can i use cgi'like print statement in a multitreaded web framework? > each thread has its own Servlet instance with request/response objects, > sys.stdout = self.response(which is a file like object) wont work because > all threads will set the same file object and it will be a

Re: Speed of the different python-based HTTP-servers

2005-05-12 Thread Irmen de Jong
Thomas W wrote: > I don't expect this project to have alot of traffic once online, but it > would kinda suck if my software couldn't handle it if it really took > off. What would be "a lot" > So my question is; based on the very brief description above, are there > any of the python-based fr

Re: Web server platform for beginner

2005-05-16 Thread Irmen de Jong
Chris wrote: > Hi, > > I'm looking at python as a serious alternative for Windows Forms, C# > and ASP.Net as it is completely open source. > > I've determined that wxPython is the best replacement for Windows Forms > but have not managed to find a comprehensive list of all the web > platforms tha

Re: Pyro2.3 problem

2005-05-25 Thread Irmen de Jong
Golawala, Moiz M (GE Infrastructure) wrote: > Hi All, > > I am seeing some interesting behavior with Pyro 2.3. I created a server using > Pyro2.2 > and a client on a different machine with Python2.2 and communication was just > fine (I > am not using a Name server). However when I upgraded the c

Re: [ANN] XPN 0.4.6

2005-05-27 Thread Irmen de Jong
Nemesis wrote: > XPN (X Python Newsreader XPN) is a multi-platform newsreader with > Unicode support. It has features like scoring/actions, X-Face and Face > decoding, muting of quoted text, newsrc import/export, find article and > search in the body, spoiler char/rot13, random taglines, and > conf

Re: Comparing 2 similar strings?

2005-05-28 Thread Irmen de Jong
Rob W. W. Hooft wrote: > After reading this thread, I have wrapped up a different approach, > probably not what you were looking for, but it is very good for what I > wanted: comparing a command string typed by a user with all possible > commands a program can accept, to be able to do typo-corre

Re: Seti-like program

2005-06-01 Thread Irmen de Jong
Magnus Lycka wrote: > Both CORBA implementations and simpler things like PYRO could help, but > these systems are more aimed at enabling communication between programs > running in a distributed fashion, and I don't think they target tasks > such as job queues, starting and stopping jobs, or load

Re: how to convert string to list or tuple

2005-06-01 Thread Ruud de Jong
_subclasses__. Weird perhaps, but non-evil. Non-standard, sure . Too clever for my own good, very likely. Regards, Ruud -- Ruud de Jong '@'.join('.'.join(s) for s in (['ruud','de','jong'],['tiscali','nl'])) -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Snakelets 1.41 and Frog 1.6

2005-06-03 Thread Irmen de Jong
nd more info on both projects here: http://snakelets.sourceforge.net/ Download: http://sourceforge.net/project/showfiles.php?group_id=41175 The detailed release notes have been added to the version section. Have fun! --Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Snakelets 1.41 and Frog 1.6

2005-06-04 Thread Irmen de Jong
thinfrog wrote: > It's very interesting, i'm glad to try. > > And it can access data by MYSQL/SQL or other database software? "it" meaning Snakelets, I assume. (because Frog, the blog server, doesn't use any database for storage) Snakelets does not contain ANY database connector. You can therefo

Problem on python 2.3.x was: [ANN] Snakelets 1.41 and Frog 1.6

2005-06-04 Thread Irmen de Jong
...darn, some users have reported that a strange problem occurs when running Snakelets 1.41 on Python 2.3.x (Python 2.4 is fine!) It seems that there is a bug in older versions of inspect.getmodule() and that bug causes Snakelets to stop working correctly on Python 2.3.x If you experience this bu

Re: Sending mail from 'current user' in Python

2005-06-11 Thread Irmen de Jong
Grig Gheorghiu wrote: > I use this function as a platform-independent way of finding out the > current user name: > > def get_username(): > if sys.platform == 'win32': > return win32api.GetUserName() > else: > return getpass.getuser() > [e:\]python Python 2.4.1 (#65, Mar

Re: Going crazy...

2005-06-13 Thread Irmen de Jong
Jan Danielsson wrote: > 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 h

Re: Python in Games (was RE: [Stackless] Python in Games)

2005-06-14 Thread Irmen de Jong
Patrick Down wrote: > My understanding is that the upcoming Civilization IV will have python > scripting. > Also, alledgedly the new BattleField II uses Python in a way... because I heard that you had to comment out a certain line in a certain .py file to remove the time limit of the demo :-) --

Re: What was that web interaction library called again?

2007-06-22 Thread Rob De Almeida
On Jun 22, 11:19 am, Harald Korneliussen <[EMAIL PROTECTED]> wrote: > Hi, > > I remember I came across a python library that made it radically > simple to interact with web sites, connecting to gmail and logging in > with four or five lines, for example. I thought, "that's interesting, > I must loo

Re: Rappresenting infinite

2007-06-27 Thread Rob De Almeida
On Jun 27, 6:41 am, andrea <[EMAIL PROTECTED]> wrote: > I would like to have a useful rappresentation of infinite, is there > already something?? from numpy import inf -- http://mail.python.org/mailman/listinfo/python-list

Re: Tiny/small/minimalist Python?

2007-07-02 Thread Irmen de Jong
Paul Rubin wrote: > rtk <[EMAIL PROTECTED]> writes: >> FYI.. I wanted a simple version of Python to run on an ancient DEC >> Alpha box. I got VMS Python 2.5 up and running but it is too slow to >> use. It takes *minutes* to get the interpreter prompt after typing >> 'python'! > > Something is w

Re: Python and ARexx (was Re: Tiny/small/minimalist Python?)

2007-07-03 Thread Irmen de Jong
Dennis Lee Bieber wrote: > On 3 Jul 2007 10:03:45 GMT, Jorgen Grahn > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > >> How does Python combine with ARexx? Can you control applications >> which provide an ARexx interface? >> > Irmen had supplied a Python module that ha

Re: socket: connection reset by server before client gets response

2007-07-07 Thread Irmen de Jong
ahlongxp wrote: > me again. > > "Connection reset by peer" happens about one in fifth. > I'm using python 2.5.1 and ubuntu 7.04. > > -- > ahlongxp > > Software College,Northeastern University,China > [EMAIL PROTECTED]://www.herofit.cn > > Post the code. Without it we can only help when o

Re: Best method for inter process communications

2007-07-17 Thread Irmen de Jong
JamesHoward wrote: > I am looking for a way of performing inter process communication over > XML between a python program and something else creating XML data. What is that "something else"? --irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickled objects over the network

2007-07-19 Thread Irmen de Jong
Rustom Mody wrote: > Sure pyro may be the solution but it may also be overkill > Why not use safe_load from the yaml module? In what way would Pyro be overkill where Yaml (also a module that you need to install separately) wouldn't be? -irmen -- http://mail.python.org/mailman/listinfo/python-lis

Re: how to transfer integer on socket?

2007-04-21 Thread Irmen de Jong
Frank Potter wrote: > Is there any easy way to transfer 4 bit integer on socket? I think you mean a 4-byte integer? Look at the struct module, anyway. --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Select weirdness

2007-04-22 Thread Irmen de Jong
Ron Garret wrote: > Here's my code. It's a teeny weeny little HTTP server. (I'm not really > trying to reinvent the wheel here. What I'm really doing is writing a > dispatching proxy server, but this is the shortest way to illustrate the > problem I'm having): > > from SocketServer import *

Re: Select weirdness

2007-04-22 Thread Irmen de Jong
Ron Garret wrote: > I don't understand why socketserver calling select should matter. (And > BTW, there are no calls to select in SocketServer.py. I'm using > Python2.5.) You don't *need* a select at all. Socketserver just blocks on accept() and dispatches a handler on the new connection. >>

Re: Numbers and truth values

2007-04-28 Thread Irmen de Jong
Szabolcs wrote: > Newbie question: > > Why is 1 == True and 2 == True (even though 1 != 2), > but 'x' != True (even though if 'x': works)? Please check before you post: [E:\Projects]python Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copy

Re: getmtime differs between Py2.5 and Py2.4

2007-05-07 Thread Irmen de Jong
Martin v. Löwis wrote: >> Is this a bug? > > Why don't you read the responses posted earlier? John Machin > replied (in <[EMAIL PROTECTED]>) > that you are mistaken: There is NO difference between the outcome > of os.path.getmtime between Py2.5 and Py2.4. It always did return > UTC, and always wi

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Irmen de Jong
Leo Kislov wrote: > > Let me guess: your E drive uses FAT filesystem? > > -- Leo > Nope, its all NTFS on my system. Anyway this doesn't matter, as the true cause is explained in another reply in this thread (bug in c runtime library of Python 2.4). --Irmen -- http://mail.python.org/mail

Re: Python Power Point Slides

2007-05-14 Thread Irmen de Jong
Krypto wrote: > Hi, > > I want to give a short presentation in my group about benefits of > python, why should one use python and some basic starting information > about python, about its data type, etc. > > Can somebody point me to the right references on the web. I have > searched a lot and I d

Re: Problem with socket.recv()

2007-05-17 Thread Irmen de Jong
xreload wrote: > Hello ! > > So, lets do : > sock.py "http://forums.childrenwithdiabetes.com/showthread.php?t=5030"; > - it not ok , only some part of document. > wget "http://forums.childrenwithdiabetes.com/showthread.php?t=5030"; - > it ok ! > sock.py "http://www.google.com/"; - it ok ! > > Wh

ANN: Pyro 3.7 (remote objects)

2007-05-19 Thread Irmen de Jong
nymore - wxnsc updated to recent WxPython API, deprecation warning is gone Have fun, and thanks for your interest, support, and feedback! --Irmen de Jong ---> What is Pyro? Pyro is an acronym for PYthon Remote Objects. Pyro is an advanced and powerful Distributed Object Technology system writ

Re: Components for a client/server architecture

2007-05-22 Thread Irmen de Jong
John Nagle wrote: > You don't hear much about CORBA any more. It used to be derided > as a bulky way to marshall data, but then came XML. CORBA is much more than just a way to marshall data. GIOP (or its more often used implementation IIOP) is the marshaling protocolused in CORBA. And it is

Re: Shared Memory Space - Accross Apps & Network

2007-05-25 Thread Irmen de Jong
Hendrik van Rooyen wrote: >>> Just to get the ball rolling, I'd suggest two things: >>> >>> Pyro -http://pyro.sf.net > > This is good advice, if you have the power to run it. What do you mean exactly by "the power to run it"? --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Periodic tasks.

2007-05-30 Thread Irmen de Jong
Ramashish Baranwal wrote: > Hi, > > I am trying to execute some tasks periodically, those familiar with > unix can think of it as equivalent to cron jobs. I have tried looking > around, but couldn't find a way. Would appreciate any pointers or > clues.. > > Thanks, > -Ram > Have a look at Kron

Re: Directory

2007-07-30 Thread Irmen de Jong
Rohan wrote: > I would like to get a list of sub directories in a directory. > If I use os.listdir i get a list of directories and files in that . > i only want the list of directories in a directory and not the files > in it. > anyone has an idea regarding this. > Look up os.walk (allows you to

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Irmen de Jong
John Machin wrote: > > (you_are_confused and/or > function_returns_bool_but_has__side_effects()) > That above expression should be written more explicitly like: function_result = function_returning_bool_but_with_side_effects() if you_are_confused or function_result: do_something_nice() -

Re: Auto run/Timer

2007-08-04 Thread Irmen de Jong
Rohan wrote: > Hello, > I would like my script to run once a week with out any external > interference. > More like a timer. Can it be done in python or should some other shell > scripting be used. > If anyone knows anything please let me know. > Have a look at my 'kronos' task scheduler, availab

Re: distutils

2007-08-07 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > Hello again, > > Is there any patch for python "distutils", for this > from distutils import log,dir_util > ImportError: cannot import name log > > > Regards, > Vedran > Are you sure you haven't written a module yourself called distutils.py ? (that one will hid

Re: question: howto transfer objects between server and client?

2007-08-11 Thread Irmen de Jong
OpenPavilion wrote: > Since XMLRPC has limited features: Is there any other server/client > technique to transfer objects (not strings, or dictionaries, but self > defined object types) ? Take a look at Pyro; http://pyro.sourceforge.net --Irmen -- http://mail.python.org/mailman/listinfo/pytho

Re: ANN: Compyler 0.1

2007-08-12 Thread Irmen de Jong
Grant Olson wrote: > Compyler is a pre-alpha x86 native code compiler. In what ways is this similar or different to Shed Skin? http://mark.dufour.googlepages.com/ --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Compyler 0.1

2007-08-13 Thread Irmen de Jong
Thanks Grant for the very informative response. -irmen -- http://mail.python.org/mailman/listinfo/python-list

looking for Java final/Ruby freeze functionality in Python

2007-03-04 Thread Antoine De Groote
Hello, I've been googling for quite a while now but can't find anything about a function/keyword to make a list (or something else) immutable. Could anybody point me to docs about this matter or give me a reason why this (apparently) doesn't exist in Python? Kind regards, antoine -- http://ma

Re: looking for Java final/Ruby freeze functionality in Python

2007-03-04 Thread Antoine De Groote
yes thanks, that is quite what I was looking for. Arnaud Delobelle wrote: > On Mar 4, 7:38 pm, Antoine De Groote <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I've been googling for quite a while now but can't find anything about a >> function/keyword t

about application deployment

2007-03-09 Thread Alessandro de Manzano
Hello, I'ld ask you all about deployment of python applications. Sometimes (if not most times..) I would make deployment easy (easier) for my customers (and for me too...) What I mean, would be very useful to have a "jar-like" archive/single file / multiple platform in order to deploy also compl

Re: How to test if a key in a dictionary exists?

2007-03-10 Thread Irmen de Jong
Frank wrote: > Hi, > > does anyone know how one can test if, e.g., a dictionary 'name' has a > key called 'name_key'? name_key in name e.g. >>> name={"john": 42} >>> "john" in name True >>> "julie" in name False --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: distributed queue?

2007-03-11 Thread Irmen de Jong
Paul Rubin wrote: > Does anyone have an implementation of a distributed queue? I.e. I > have a long running computation f(x) and I'd like to be able to > evaluate it (for different values of x) on a bunch of different > computers simultaneously, the usual "worker thread" pattern except > distribut

ANN: Pyro 3.6 (remote objects)

2007-03-20 Thread Irmen de Jong
oo long to include here. Please view it online: http://pyro.sourceforge.net/manual/12-changes.html#latest Have fun, and thanks for your interest, support, and feedback! --Irmen de Jong ---> What is Pyro? Pyro is an acronym for PYthon Remote Objects. Pyro is an advanced and powerful Distr

Re: replace illegal xml characters

2007-03-21 Thread Irmen de Jong
killkolor wrote: >> Does InDesign export broken XML documents? What exactly is your problem? > > yes, unfortunately it does. it uses all possible unicode characters, > though not all are alowed in valid xml (see link in the first post). Are you sure about this? Could you post a small example? I

Re: Create new processes over telnet in XP

2007-03-23 Thread Irmen de Jong
Shane Geiger wrote: > This reminds me of something I once wanted to do: How can I install > Python in a totally non-gui way on Windows (without the use of VNC)? I > think I was telnetted into a computer (or something like that) and I was > unable to run the usual Python installer because it us

Re: How can I find out the size of a file

2007-03-28 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > How can I find out the size of a file in a disk in python? os.path.getsize(filename) -Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: low level networking in python

2007-04-04 Thread Irmen de Jong
Maxim Veksler wrote: > I'm trying to bind a non-blocking socket, here is my code: > """ > #!/usr/bin/env python > > import socket, select > from time import sleep > > s_nb1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s_nb1.setblocking(0) > > s_nb1.bind(('192.168.2.106', 10

Re: Getting word frequencies from files which are in folder.

2007-04-04 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > Hello to all, > > I'm beginer in learning Python I wish somebody help me with solving > this problem. I would like to read all text files wchich are in some > folder. For this text files I need to make some word frequencies using > defined words like "buy", "red", "good

[offtopic?] problem with UDP broadcast on Windows XP

2007-04-09 Thread Irmen de Jong
to receive any broadcast packets. Is this a known 'feature' of a windows NT service? Doesn't windows allow a service to receive broadcast packets? Again, sorry that I post this here it is probably more of a windows question. But I don't know a good place to ask this type of thing. T

Re: [offtopic?] problem with UDP broadcast on Windows XP

2007-04-09 Thread Irmen de Jong
Gabriel Genellina wrote: > Try running the service impersonating another user (not LOCAL_SERVICE, > the default). > You can change that from the service control panel. Alas, that didn't change anything. I made it run as a user account that has admin privileges even, and it still doesn't respond

Re: [offtopic?] problem with UDP broadcast on Windows XP

2007-04-09 Thread Irmen de Jong
Gabriel Genellina wrote: > Ouch, no more ideas from me. You'll surely get more answers from a > Windows networking group - this appears not to be related to Python anyway. Yeah I know that... That's what I mentioned in my original post... But I'm a noob on that type of thing, no idea where to ge

Re: [offtopic?] problem with UDP broadcast on Windows XP

2007-04-10 Thread Irmen de Jong
> Hendrik van Rooyen wrote: >> I am not sure if this is at all relevant - but I seem to recall seeing >> something once that had a list of socket numbers, splitting them >> between UDP & TCP - can the socket actually rx UDP? Yeah, as I wrote: when I'm sending UDP packets to the port directly on t

Re: problem with UDP broadcast on Windows XP

2007-04-10 Thread Irmen de Jong
Paul McGuire wrote: > I would investigate Windows security settings as a likely culprit. My > guess is that you are running WinXP SP2 with the default security > policies, which are likely to prohibit such promiscuous behavior. > > Here's a URL that may shed some light, it seems surprisingly > i

Re: RMI with Pyro et al

2007-10-11 Thread Irmen de Jong
Sells, Fred wrote: > Diez B. Roggisch wrote > . Why do you want that (hot deploy) >> anyway? Does startuptime of a script really bother you? >> shouldn't take >> more than a few seconds. > > My primary need is development/debug. I'm a Pyro newbie and I add a > feature and then test. The only

Re: RMI with Pyro et al

2007-10-11 Thread Irmen de Jong
Diez B. Roggisch wrote: > Go install cygwin (but not it's included python-interpreter, or at least > make sure you have your python path properly under control) and then simply > start the script from the command-line. And hit C-c if you need it to stop, > and restart it. Only start it as service

Re: socket.inet_ntop, and pton question

2007-01-28 Thread Irmen de Jong
Andrew wrote: > Hi > > Are these functions (inet_ntop(), inet_pton()) from the socket library > supported on Windows. > > If not is there an equivalent for them using Windows > > Ive seen mention of people creating their own in order to use them > > Appreciate the help > > ty Why didn't you

Re: socket.inet_ntop, and pton question

2007-01-28 Thread Irmen de Jong
Gabriel Genellina wrote: > But these are not the requested functions, inet_ntop() and inet_pton(): > > py> socket.inet_ntop > Traceback (most recent call last): > File "", line 1, in ? > AttributeError: 'module' object has no attribute 'inet_ntop' > > Oops, my bad. Should have had more coff

Re: Python, readline and OS X

2007-02-01 Thread Irmen de Jong
Ron Garret wrote: > I have installed Python 2.5 on my new Intel Mac but I can't for the life > of me get readline to work. I have libreadline installed, I've tried > copying readline.so from my Python 2.3 installation into 2.5, I've > searched the web, and no joy. Could someone please give me

Re: Calculating future dates

2007-02-01 Thread Irmen de Jong
Toine wrote: > Hello, > > I'm new to Python so please bare with me... > > I need to calculate a date that is exactly 31 days from the current > date in -MM-DD format. I know that date.today() returns the > current date, but how can I add 31 days to this result? I'm sure this > task is simple,

ANN: Pyro 3.6 beta released

2007-02-12 Thread Irmen de Jong
t has been done, read the 'changes' chapter in the manual, and/or visit Pyro's "todo" wiki page: http://www.razorvine.net/python/PyroTodoList Thanks for your support, and I'm looking forward to release a final Pyro-3.6 version soon ! Sincerely, --Irmen de Jong PS

Re: How to Speed Up Internet Searches??

2007-02-12 Thread Irmen de Jong
Patrick Klos wrote: > In article <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> wrote: >> How to Speed Up Internet Searches?? >> When you go to a web site, the first thing that happens is that. >> and for networking tips see at >> : : : > > Please don't post this kind of stu

Re: message processing/threads

2007-02-17 Thread Irmen de Jong
Jonathan Curran wrote: > I need a program running in the background to process messages (FIFO order) > which I would send using soap/xmlrpc/pyro (haven't decided yet). According to > my thinking I would need to make this a threaded application. One thread to > process the messages and the other

Re: Forking SocketServer daemon -- updating state

2007-02-19 Thread Irmen de Jong
Reid Priedhorsky wrote: > Another possibility is that the signal handler simply sets a needs_update > flag, which I could check for in a handle_request() loop. The disadvantage > here is that the update wouldn't happen until after the next request is > handled, and I would like the state to be ava

Re: Possible to set cpython heap size?

2007-02-22 Thread Irmen de Jong
Andy Watson wrote: > > Why do you want that? And no, it is not possible. And to be honest: > I have >> no idea why e.g. the JVM allows for this. >> >> Diez > > The reason why is simply that I know roughly how much memory I'm going > to need, and cpython seems to be taking a fair amount of time

Re: pickle problem - frexp() out of range

2007-02-26 Thread Irmen de Jong
ahaldar wrote: > Hi: > > I have some large data structure objects in memory, and when I attempt > to pickle them, I get the following error: > > SystemError: frexp() out of range > > Are there some objects that are just too large to serialize, and if > so, is there an easy workaround without bre

Re: python's thread problem on Linux platform

2006-04-22 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > I found that multi-threaded program(io-centralize ) runs very slowly > on linux while the same program runs very quickly on windows.If I > change the thread number to one ,the program runs quickly on linux, in > fact the speed is quicker than the multi-threaded vers

Re: do "some action" once a minute

2006-05-09 Thread Irmen de Jong
Petr Jakes wrote: > OK, to be more specific, I would like to run the code, when the value > of seconds in the timestamp become say "00". > The whole code will run in the infinitive loop and other actions will > be executed as well, so it can not "sleep" for 60 seconds :). Have a look at my 'Kronos

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread Irmen de Jong
Christian Heimes wrote: > John Nagle wrote: >> It's possible to use "pickle" for interprocess communication over >> pipes, but it's not straightforward. > > IIRC the processing module uses pickle for IPC. Maybe you can get some > idea by reading its code? > > http://pypi.python.org/pypi/processin

Re: vb2py status?

2009-01-17 Thread Vito De Tullio
axtens wrote: > So is vb2py dead? If not, any idea when it'll support python 3? I don't know this vb2py, but you can do a 2 pass conversion [vb] -> (vb2py) -> [py2] -> (2to3) -> [py3] -- By ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: vb2py status?

2009-01-17 Thread Vito De Tullio
Giampaolo Rodola' wrote: >> > So is vb2py dead? If not, any idea when it'll support python 3? >> I don't know this vb2py, but you can do a 2 pass conversion >> [vb] -> (vb2py) -> [py2] -> (2to3) -> [py3] > ...and presumibly get something which doesn't work at all. =) why? AFAIK there aren't probl

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