Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Irmen de Jong
On 10-6-2015 1:06, Chris Angelico wrote: > On Wed, Jun 10, 2015 at 6:07 AM, Devin Jeanpierre > wrote: >> There's a lot of subtle issues with pickle compatibility. e.g. >> old-style vs new-style classes. It's kinda hard and it's better to >> give up. I definitely agree it's better to use something

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-10 Thread Irmen de Jong
On 10-6-2015 11:36, Steven D'Aprano wrote: >> For most apps, the alternatives are better. Irmen's serpent library is >> strictly better on every front, for example. (Except potentially >> security, who knows.) > > Beyond simple needs, like rc files, literal_eval is not sufficient. You > can't use

Re: Bug in floating point multiplication

2015-07-02 Thread Irmen de Jong
core2quad processor, but using 32-bit python implementations from python.org: 2.7.9, 3.3.3, 3.4.2, and pypy-2.5.1. Irmen de Jong -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 resuma a file download

2015-07-02 Thread Irmen de Jong
On 2-7-2015 22:27, zljubi...@gmail.com wrote: > This is my final version which doesn't work. :( > Actually, it works with another file on another server, but doesn't work with > mp4 files on this particular server. > > I really don't know what to do? Do you really need to download these files us

Re: Bug in floating point multiplication

2015-07-03 Thread Irmen de Jong
On 3-7-2015 7:07, Ned Deily wrote: > In article <559579bb$0$2921$e4fe5...@news.xs4all.nl>, > Irmen de Jong wrote: >> Tested on Mac OSX 10.10.4, with a 64-bit core2duo processor. Below are all >> 64-bit python >> implementations: >> 2.6.9 (apple supplied), 2.7

Re: Good python news sites

2015-07-09 Thread Irmen de Jong
On 9-7-2015 11:28, Benj wrote: > Hello, > could you please recommend some python news sites: sites that post news, code > samples, good practices, new libraries... things like that, to follow daily. > > Thanks, > Benj > There's a lot of stuff appearing on the Python subReddit; https://www.reddi

Re: 0 + not 0

2015-07-11 Thread Irmen de Jong
On 11-7-2015 12:26, candide wrote: 0 + not 0 > File "", line 1 > 0 + not 0 > ^ > SyntaxError: invalid syntax > > > What is syntactically wrong with 0 + not 0? > I would say that the boolean operator 'not' cannot occur in an arithmetic expression. Maybe you meant to us

Re: Python Schduling

2015-07-21 Thread Irmen de Jong
On 21-7-2015 19:52, Madduri Anil kumar wrote: > Hello Experts, > > I am new to Python Programming.I have to work on Python. > I have a requirement to scheduling the script for every one hour. > could you please let me know which packages will be more helpful for > Scheduling. > if you post any sa

Re: problem with selecting remote procedure calls

2015-07-23 Thread Irmen de Jong
pypi.python.org/pypi/Pyro4 > > Pyro's certainly actively maintained and I've seen its developer, Irmen > de Jong, pop up on this list fairly recently. Hi! > Exactly how good a fit it is would depend on your precise setup. But I > think it's worth exploring.

Re: register cleanup handler

2015-07-24 Thread Irmen de Jong
On 24-7-2015 16:57, Neal Becker wrote: > I have code like: > > if (condition): > do_something_needing_cleanup > > code_executed_unconditionally > > or exception> > > Now, how can I make sure cleanup happens? Actually, what I really would > like, is: > > if (condition): > do_something_ne

Re: Python 3.4 Idle?

2015-07-25 Thread Irmen de Jong
On 25-7-2015 18:00, Steve Burrus wrote: > On Thursday, July 23, 2015 at 8:50:47 PM UTC-5, Steve Burrus wrote: >> On Thursday, July 23, 2015 at 8:41:03 PM UTC-5, Chris Angelico wrote: >>> On Fri, Jul 24, 2015 at 11:34 AM, Steve Burrus >>> wrote: I got Idle the other day biut had to get the ol

Re: Fwd: Request for Information XML-RPC (Python)

2015-07-29 Thread Irmen de Jong
On 29-7-2015 14:52, Davide D'Arenzo wrote: > I want to send a DOM instance through xmlrpc protocol. I know that the > istance are > impossible to manage by xmlrpclib library in Python but this is what I need. > I'm trying > to understand why is not possible to marshal the class Nodelist and I >

Re: using sched

2015-07-30 Thread Irmen de Jong
On 30-7-2015 17:57, Nkansah Rexford wrote: > Using sched, how can I run a function, at for instance, exactly 00:00 GMT, > and only that time. > > If sched wouldn't be the best to do so a job, please can you recommend > something? > The sched module is by itself not really a task scheduler. It

Re: Most Pythonic way to store (small) configuration

2015-08-04 Thread Irmen de Jong
On 4-8-2015 16:53, marco.naw...@colosso.nl wrote: > Why not use Python files itself as configuration files? It could create a security risk if the config files are user-editable. (it will make it easy to inject code into your application) Irmen -- https://mail.python.org/mailman/listinfo/python

Re: Silly question about pip

2015-09-08 Thread Irmen de Jong
On 8-9-2015 17:54, wxjmfa...@gmail.com wrote: > win7 / py433 > > How to downgrade from the latest pip (7.1.2) to > the previous one? > I'm sorry, I do not remember the numerous msgs > I saw when updating. (Yesterday) > > (I'm serious) > > Now, what? > I think: $ pip install --upgrade pip==7.0

Re: win32com.client .Cells

2015-10-09 Thread Irmen de Jong
On 9-10-2015 20:45, gall.pavgal.g...@gmail.com wrote: > Hi Guys, > > i wrote small function : > > Excel = win32com.client.Dispatch("Excel.Application") [...] > com_error: (-2147221008, 'CoInitialize has not been called.', None, None) > > Please, help me! :) > First hit on google when search

Re: general module auditing

2014-07-01 Thread Irmen de Jong
On 1-7-2014 12:38, Rita wrote: > i work in a group of developers (15 or so) who are located globally. I > would like to know what modules everyone is uses if I ever have to upgrade > my python. Is there mechanism which will let me see who is using what? > > ie, > > tom,matplotlib > bob, pylab >

Re: general module auditing

2014-07-02 Thread Irmen de Jong
On 2-7-2014 4:04, Rita wrote: > yes, this helps. But I want to know who uses the module, serpent. So, when > I upgrade it or remove it they won't be affected adversely. (Please don't top-post, it makes the discussion harder to follow.) > On Tue, Jul 1, 2014 at 2:16 PM, Irm

Re: general module auditing

2014-07-04 Thread Irmen de Jong
On 4-7-2014 1:09, Rita wrote: > > here is what I am doing now, > > egrep 'from|import' *.py | wc -l which is giving me that. But this does not > give me the number of times the particular module gets called. I was > thinking of adding a logging feature to all of my modules so every time > they ge

Re: general module auditing

2014-07-04 Thread Irmen de Jong
On 4-7-2014 19:05, Irmen de Jong wrote: > The code at the end of this message outputs the following on my machine: [...] hmm the formatting got screwed up a bit it seems. Here's the same code: https://gist.github.com/irmen/c3d07118a8e1a00367f5 Irmen -- https://mail.python.org/mailman/

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Irmen de Jong
On 20-7-2014 23:14, Rick Johnson wrote: > And since IDLE is not a "tabbed editor", only *1* document > is going to be displayed at a time. False. Idle opens any number of documents at the same time just fine (in different windows - rather than tabs). While I don't see the use case for the possib

Re: Execution Time and Memory taken by the program

2014-07-23 Thread Irmen de Jong
On 23-7-2014 17:50, Orochi wrote: > I want a timer to calculate the execution time of the program > actually I am trying to solve problems on codechef.com and want to find out > the time and memory taken by the program to execute. > > I know we can import time.time() in unix and time.clock() in

Re: Best place to find sample data

2014-07-26 Thread Irmen de Jong
On 26-7-2014 15:41, Nicholas Cannon wrote: > Hey I need some sample data to test out and do stuff with. Also I am having > strange errors with idle when i load a .txt file read it and then print it, > idle crashes well kind of freezes. Not sure what is wrong here. Also I am > having troubles wit

Re: Windows Studio 2008 Download

2014-07-28 Thread Irmen de Jong
On 28-7-2014 16:40, Colin J. Williams wrote: > I gather that Python is compiled with Windows Studio 2008. > > Unfortunately, the MS Download link points to a Studio 2010 advertising .ppx > > Could someone point to an alternative please? > > Colin W. > > PS I need it for Numpy-1.8.1, which does

Re: lxml and namespaces

2014-07-29 Thread Irmen de Jong
On 29-7-2014 20:35, Marc Aymerich wrote: > Got it! > xml = lxml.builder.ElementMaker( > nsmap = { > None: "urn:iso:std:iso:20022:tech:xsd:pain.008.001.02", > 'xsi': "http://www.w3.org/2001/XMLSchema-instance";, > } > ) > doc = xml.Document() Thanks for taking the tim

Re: Storing instances using jsonpickle

2014-09-05 Thread Irmen de Jong
On 5-9-2014 19:16, Marko Rauhamaa wrote: > Thus, ast.literal_eval() is superior to anything JSON has to offer. Incidentally, I've made a serialization library based on Python's literal expressions. It uses ast.literal_eval() to deserialize, and a bit of custom code to serialize Python objects:

Pyrolite, lightweight pickle and pyro client library, seeking a bit of testing help

2014-09-22 Thread Irmen de Jong
on that system? (just a one time request, to verify the current version). Irmen de Jong PS the reason why I'm posting a Java or .NET related issue here is because the core protocol my library handles is a Python invented one ;) -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyrolite, lightweight pickle and pyro client library, seeking a bit of testing help

2014-09-22 Thread Irmen de Jong
On 22-9-2014 19:53, Chris Angelico wrote: > On Tue, Sep 23, 2014 at 3:47 AM, Irmen de Jong wrote: >> I've developed Pyrolite (https://github.com/irmen/Pyrolite), a lightweight >> client >> library for Java and .NET to gain access to Python servers running Pyro. As >

Re: Pyrolite, lightweight pickle and pyro client library, seeking a bit of testing help

2014-09-23 Thread Irmen de Jong
On 22-9-2014 20:28, Chris Angelico wrote: > On Tue, Sep 23, 2014 at 4:23 AM, Irmen de Jong wrote: >> This is why Pyro has been using a different (and safe) serializer by default >> for a while >> now. You have to plow through the usual security warnings in the docs and &

Re: python on Linux

2014-10-09 Thread Irmen de Jong
On 10-10-2014 6:21, Igor Korot wrote: > Hi, ALL, > When I am on Windows, I can write something like this: > > sys.path.append('C:\Users\Igor\Documents\MyLib') While this might work on your system, it may not work on others. - you need to escape the backslashes (or just use forward slashes, they

Re: python on Linux

2014-10-10 Thread Irmen de Jong
On 10-10-2014 8:58, Chris Angelico wrote: > AIUI you can use os.path.expanduser() on Windows as well, and it'll > take care of USERPROFILE. Nice, didn't know that! I've been using the appdirs module (https://pypi.python.org/pypi/appdirs/) as well to avoid constructing paths manually altogether.

Re: windows log to event viewer

2014-10-17 Thread Irmen de Jong
On 17-10-2014 11:59, Arulnambi Nandagoban wrote: > Hello, > > > > I am trying to run a tcp server as a windows service. > > The project also includes an application layer protocol somewhat like CoAP > and few soap > calls to data base. > > There is some moment the code enter into exception d

ANN: Pyro 4.9 released

2011-09-18 Thread Irmen de Jong
Python versions, including Python 3.x. Enjoy, Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: Motion Tracking with Python

2011-09-30 Thread Irmen de Jong
y enjoyable to read about it. How was her project received at school? Thanks a lot for sharing this. Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Pyrolite 1.3 - native Pyro and Pickle library for Java and .NET

2011-10-30 Thread Irmen de Jong
o on Pyrolite: http://irmen.home.xs4all.nl/pyrolite/README.txt More info on Pyro: http://irmen.home.xs4all.nl/pyro/ Enjoy, Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: getting command line in python

2011-11-08 Thread Irmen de Jong
On 8-11-2011 23:19, MrSmile wrote: Hi people! I am looking for a way to get the command line in the script. Let us say I am in the folder "/tmp" okay! now from /tmp I execute in the console this: python /home/tamer/MyApp/MyScript.py in the app itself, I want to grep the path and the scriptname

Re: Uninstalling Py 2.5.2 from Windows 7

2011-11-13 Thread Irmen de Jong
On 13-11-11 18:46, W. eWatson wrote: For many months I had sporadically used 2.5.2 under Win 7, then something went awry. I tried an uninstall/install and it didn't get any better. I thought I'd take another shot at it today. The uninstall went OK, but c:\python25 remained with several py files a

Re: Monitoring/inventory client-server app

2011-11-17 Thread Irmen de Jong
stuff you want to know). Or have each client call into a central server, where it reports that stuff itself. Many ways to skin a cat. Regards, Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: What replaces log4py under Python 3.2?

2011-11-22 Thread Irmen de Jong
On 22-11-11 19:32, Rob Richardson wrote: Greetings! My company has been using the log4py library for a long time. A co-worker recently installed Python 3.2, and log4py will no longer compile. (OK, I know that's the wrong word, but you know what I mean.) What logging package should be used

Re: getting svn tag in version

2011-11-25 Thread Irmen de Jong
On 25-11-2011 12:15, Andrea Crotti wrote: > Given a project with many eggs, I would like to make it easy to have all the > version > numbers synchronized > to the upper level SVN version. > > So for example I might have svn tags > 0.1, > 0.2 > and a development version. > The development version

why is bytearray treated so inefficiently by pickle?

2011-11-27 Thread Irmen de Jong
Hi, A bytearray is pickled (using max protocol) as follows: >>> pickletools.dis(pickle.dumps(bytearray([255]*10),2)) 0: \x80 PROTO 2 2: cGLOBAL '__builtin__ bytearray' 25: qBINPUT 0 27: XBINUNICODE u'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' 52: qBINP

Re: why is bytearray treated so inefficiently by pickle?

2011-11-29 Thread Irmen de Jong
On 28-11-2011 3:09, Terry Reedy wrote: > Possibly. The two developers listed as particularly interested in pickle are > 'alexandre.vassalotti,pitrou' (antoine), so if you do open a tracker issue, > add them as > nosy. > > Take a look at http://www.python.org/dev/peps/pep-3154/ > by Antoine Pitrou

Re: Need some IPC pointers

2011-11-30 Thread Irmen de Jong
with minimal programming effort. You can just use normal Python method calls to call objects on other machines (or locally, ofcourse). It's written in 100% pure Python and works on Python 2.6 and upwards (including 3.x). Regards, Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: Need some IPC pointers

2011-11-30 Thread Irmen de Jong
On 30-11-11 23:28, Irmen de Jong wrote: On 30-11-11 22:03, Andrew Berg wrote: processes (that aren't necessarily written in Python) and communicates Oops, missed this on my first read. This rules out my suggestion of Pyro because that requires Python on both ends (or Java/.net o

Re: why is bytearray treated so inefficiently by pickle?

2011-12-06 Thread Irmen de Jong
On 06-12-11 20:27, John Ladasky wrote: On a related note, pickling of arrays of float64 objects, as generated by the numpy package for example, are wildly inefficient with memory. A half-million float64's requires about 4 megabytes, but the pickle file I generated from a numpy.ndarray of this siz

Re: why is bytearray treated so inefficiently by pickle?

2011-12-07 Thread Irmen de Jong
On 6-12-2011 23:24, Terry Reedy wrote: > On Nov 30, Irmen de Jong opened a tracker issue with a patch improve > bytearray pickling. > http://bugs.python.org/issue13503 > > Yesterday, Dec 5, Antoine Pitrou applied a revised fix. > http://hg.python.org/cpython/rev/e2959a6a

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Irmen de Jong
On 07-12-11 20:41, Hegedüs, Ervin wrote: Hello Everyone, I'm looking for a tool, which can add a trusted timestamp to an existing PDF file (and can sign - but currently only have to add TS). Note sure what a 'trusted timestamp' is, but pdftk can manipulate pdf files. See http://www.pdflabs.co

Re: Getting a patch accepted

2011-12-19 Thread Irmen de Jong
On 19-12-11 18:13, Tycho Andersen wrote: Hi all, A couple months ago I found a bug in a corner of the curses library (http://bugs.python.org/issue13051) and filed it. Unfortunately, there was nobody listed to cc on the noisy list, so it probably got lost in the shuffle. (There is even previous m

Re: Python3 on MacOsX Lion?

2012-01-03 Thread Irmen de Jong
On 2-1-2012 20:32, K Richard Pixley wrote: > Where would I look to find the current expected status of python3 on MacOsX > Lion? > > The distributed binaries aren't capable of allowing extensions that use gcc. > > I can build the source naked, but then it lacks some libraries, notably, > readli

Re: Good cross-version ASCII serialisation protocol for simple types

2013-02-23 Thread Irmen de Jong
On 23-2-2013 16:45, Paul Moore wrote: > I need to transfer some data (nothing fancy, some dictionaries, strings, > numbers and > lists, basically) between 2 Python processes. However, the data (string > values) is > potentially not ASCII, but the transport is (I'm piping between 2 processes, > b

Serpent, a serializer based on ast.literal_eval. Now also with Java and .net implementations

2013-04-03 Thread Irmen de Jong
this case. Find an efficient binary protocol (protobuf?) - Why only Python, Java and .NET, but no bindings for insert-favorite-language-here? Answer: I don't speak that language. Maybe you could port serpent yourself? Serpent on Pypi: http://pypi.python.org/pypi/serpent Cheers Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: Data storage Py 3.3

2013-04-03 Thread Irmen de Jong
On 4-4-2013 0:33, Joe Hill wrote: > IDLE wants to use Python33 as the data storage folder - with exe files > etc. > Typically the 'default data storage' is in 'last used' directory or most > programs even have a browse setting that one can quickly set and reset. > > What do people here generally d

Re: docs.python.org source

2013-04-04 Thread Irmen de Jong
On 4-4-2013 22:16, ஆமாச்சு wrote: > I am looking forward to checkout all rst files of docs.python.org to my > local for having a local copy of the site for quick reference. > > I couldn't find it immediately, searching for few minutes now. Any > pointers? > > -- > > Sri Ramadoss M > If you're

Re: socket programming

2013-05-04 Thread Irmen de Jong
ine: Socket programming on this level is hugely complicated. It doesn't seem too bad if you start of with these simple example programs, but that's false hope. If at all possible, avoid direct socket programming, and use a high-level protocol or library instead (ftp/http/some IPC library/Twisted). Let them deal with the complexity of the socket layer. Regards Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: Developing a network protocol with Python

2005-12-13 Thread Irmen de Jong
Laszlo Zsolt Nagy wrote: >> > I need to send Python objects too. They are too elaborate to convert > them to XML. (They are using cyclic weak references and other Python > specific stuff.) I can be sure that on both sides, there are Python > programs. Is there any advantage in using XML if I al

Re: Developing a network protocol with Python

2005-12-15 Thread Irmen de Jong
Laszlo Zsolt Nagy wrote: > "Mobile objects. Clients and servers can pass objects around - even when > the server has never known them before. Pyro will then automatically > transfer the needed Python bytecode." > > I believe that using cPickle and transferring data (but not the code) is > stil

Re: Sockets on Windows and Mac

2006-01-08 Thread Irmen de Jong
rodmc wrote: > I am new to Python and have been writing some socket based programmes > on Windows (with some success), however I am unable to get them to work > on Mac. Please elaborate on "unable to get them to work". What problems do you see? In my experience, there is no difference with the Ma

Re: Remote Function Call

2006-01-12 Thread Irmen de Jong
Mike wrote: > Hi, > > I have two machines. A python program on machine 1 needs to make a > python call to a method in machine 2. What is the most efficient / fast > / programmer friendly way to do it? > > - XML-RPC? > - Http Call? use Pyro http://pyro.sourceforge.net --Irmen -- http://mail.pyt

Re: Python linker

2006-07-18 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > I love python - I use it as a utility language to complement my C# > programming every day. However, the reason I do not use it as my > primary language is - surprise, surprise - not its lack of static type > checking, but the size of standalone executes (which embed the

Re: How to ask sax for the file encoding

2006-10-04 Thread Irmen de Jong
Edward K. Ream wrote: > What suits me best is what the *user* specified, and that got put in the > first xml line. > I'm going to have to parse this line myself. Please consider adding some elements to the document itself that describe the desired output format, such as: ... utf-8 ... Thi

Re: Is there an alternative to os.walk?

2006-10-04 Thread Irmen de Jong
Bruce wrote: > Hi all, > I have a question about traversing file systems, and could use some > help. Because of directories with many files in them, os.walk appears > to be rather slow. Provide more info/code. I suspect it is not os.walk itself that is slow, but rather the code that processes its

Re: How to ask sax for the file encoding

2006-10-04 Thread Irmen de Jong
Edward K. Ream wrote: >> Please consider adding some elements to the document itself that > describe the desired output format, > > Well, that's what the encoding field in the xml line was supposed to do. As others have tried to explain, the encoding in the xml header is not part of the document

Re: Sending binary pickled data through TCP

2006-10-13 Thread Irmen de Jong
er when your requirements get more complex and/or you discover problems with your networking code. Hth, ---Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
sed to be a simple socket recv() and a simple socket send()... In my opinion Python's socket module itself could implement these workarounds. That would make user code a lot cleaner and less error prone, and more portable. What do other people think? Regards --Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Altering the way exceptions print themselves

2006-10-22 Thread Irmen de Jong
ver on Python 2.5 it doesn't seem to have any effect... What am I doing wrong? Or is there perhaps a different way to do what I want? Thanks! --Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Jean-Paul Calderone wrote: > I think everyone can agree that Python shouldn't crash. Well, it doesn't really crash in a bad way, in my example: it doesn't work because it simply raises a socket exception all the time. > Whether Python should propagate other kinds of errors from the underlying > p

Re: Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Jean-François Piéronne wrote: > Which Python version, OpenVMS version, IP stack and stack version? OpenVMS 7.3-2, Python 2.3.5, no idea about IP stack version. > If you think this is a Python on OpenVMS problem, send me a small > reproduced anf I will take a look. I don't have any small case ly

Re: Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Jean-Paul Calderone wrote: > On Sun, 22 Oct 2006 19:58:44 +0200, Irmen de Jong > <[EMAIL PROTECTED]> wrote: >> Jean-Paul Calderone wrote: >>> I think everyone can agree that Python shouldn't crash. >> >> Well, it doesn't really crash in a bad

Re: Socket module bug on OpenVMS

2006-10-23 Thread Irmen de Jong
Fredrik Lundh wrote: > Irmen de Jong wrote: > >> This also raises the question to what extent Python itself should >> work around platform specific "peculiarities", such as this one. >> There's another problem with socket code on Windows and VMS systems, &

Re: Socket module bug on OpenVMS

2006-10-23 Thread Irmen de Jong
Martin v. Löwis wrote: > Irmen de Jong schrieb: >> In my opinion Python's socket module itself could implement these >> workarounds. That would make user code a lot cleaner and less >> error prone, and more portable. What do other people think? > > It depends: w

Re: Stylesheet not respected

2006-10-24 Thread Irmen de Jong
Suren wrote: > I was able to the see weird stylesheet behavior on opera, IE and > mozilla under > mod_python. [snip] I'm 99% sure this has nothing to do with Python but is just an error in your CSS file. Show the CSS so we might be able to see the problem. One thing to check for though is that y

Re: How set the source IP adress

2006-10-27 Thread Irmen de Jong
Maksim Kasimov wrote: > Hi, > > how to set source ip-address when do __socket.connect((host, port)) > on a machine that have a several ip-adresses? > > many thanks for advice. > > __socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > __socket.connect((host, port)) > > sock.connect (

Re: Pyro stability

2006-11-05 Thread Irmen de Jong
writeson wrote: [some questions about Pyro] I've replied to this on Pyro's mailing list. -Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyro stability

2006-11-06 Thread Irmen de Jong
writeson wrote: > Irmen, > > Thanks, you're very good about answering Pyro related questions! Well, I do have an advantage here, being Pyro's author... :) --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Irmen de Jong
Jorge Godoy wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > >> I think this sums up my point of view as well (although I would have >> used around 3215 more words to say it). > > H... Putting this on the discussion of the week: you'd have used > range(3215) or xrange(3215) more words? ;

Re: Why does this code crash python?

2006-11-11 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > I am trying to make a program that will basically simulate a chess > clock in python. To do this I have two threads running, one that > updates the currently running clock, and one that watches for a > keypress. I am using the effbot Console module, and that is where I ge

Re: billionlaughs, on me :-(( - on winXP help!

2006-06-15 Thread Irmen de Jong
ore or less shows what the problem is. And it is small enough to not crash your browser. Right click on any of the link and "save link as" to download the XML file for viewing in your favorite editor :) Cheers, --Irmen de Jong -- http://mail.python.org/mailman/listinfo/python-list

Re: socket programming question

2006-06-20 Thread Irmen de Jong
Kiran wrote: > Hello All, > My question is, is it possible to make python do some other > processing while it is waiting for a socket to timeout? sure, you have to use threads and/or use asynchronous socket programming. Google is your friend. --Irmen -- http://mail.python.org/mailman/listinfo

Re: Network Programming in Python

2006-06-22 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > > Really, was that so hard? > > Python makes sockets a total breeze. You can write an 80's style HTTP > server in less than a page of code. But making a *good* 80's style http/socket server is a lot of work. Better pick one of the high level protocols built on top of i

socket close problems with Python 2.5b1

2006-06-28 Thread Irmen de Jong
I'm having some troubles with closing sockets using Python 2.5b1 Simply closing a client socket (on the server side) doesn't seem to actually shutdown the socket anymore. A connected client simply hangs, while with older Pythons it aborted with a socket close error. Can someone confirm this for me

Re: locating strings approximately

2006-06-28 Thread Irmen de Jong
BBands wrote: > I'd like to see if a string exists, even approximately, in another. For > example if "black" exists in "blakbird" or if "beatles" exists in > "beatlemania". The application is to look though a long list of songs > and return any approximate matches along with a confidence factor. I

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > but why can't I get the value of i like this? > > c.i > > How can I implement such behaviour? Not supported by XMLRpc. Switch to Pyro: http://pyro.sourceforge.net --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Headers for Form Submision, and also HTTPrequests

2006-07-10 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > action="http://login.myspace.com/index.cfm?fuseaction=login.process"; > method="post" name="theForm" id="theForm"> > > > What happens when you add the form param "submit" with value "Login" to the request you're doing? Perhaps the page needs this third parameter

Re: about daemons and IPC

2006-08-29 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > Hey people! > For the first time I'm doing a client/server application, and I'm > really confused with IPC stuff. [...] > Any suggestions? http://pyro.sourceforge.net depending on your needs --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Python blogging software

2006-09-13 Thread Irmen de Jong
Cliff Wells wrote: > I'm currently using Frog, and it's decent, but lacks some fundamental > features (tags for one). Since Irmen is probably going to scrap it > anyway, I'm kind of fishing about for something new. That is not really true. I won't "scrap" Frog. One of the reasons would be that I'

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.

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

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: 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: 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

<    1   2   3   4   5   6   >