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

Load a CSV with different row lengths

2014-07-29 Thread Ryan de Vera
I am trying to load a csv with different row lengths. For example, I have the csv a,b a,b,c,d a,b,c How can I load this into python? I tried using both NumPy and Pandas. -- https://mail.python.org/mailman/listinfo/python-list

Re: Load a CSV with different row lengths

2014-07-29 Thread Ryan de Vera
Hey skip, I should've mentioned that I want to import my csv as a data frame or numpy array or as a table. Best regards, Ryan On Tue, Jul 29, 2014 at 6:29 AM, Skip Montanaro wrote: > > How can I load this into python? I tried using both NumPy and Pandas. > > To add to Peter's response, I wou

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

Collaps arrays/ list of intergers

2014-08-19 Thread Jurgens de Bruin
Hi All, I do hope somebody can help me with the following: I have the followings lists which represent the upper and lower value of a range/array. a = [1,50] b = [75,150] c = [25,42] d = [120,149] e = [35,55] What I would like to happen is that overlapping range will "collapse" to a single ran

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.

[ANN] pdb-clone 1.9 - a fast clone of pdb with the remote debugging and attach features

2014-10-15 Thread Xavier de Gaye
pdb-clone 1.9 has been released at Pypi: https://pypi.python.org/pypi/pdb-clone Features: * Improve significantly pdb performance. With breakpoints, pdb-clone runs just above the speed of the interpreter while pdb runs at 10 to 100 times the speed of the interpreter. * Extend pdb with remo

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

Re: Python Newbie

2013-02-24 Thread Vito De Tullio
piterrr.dolin...@gmail.com wrote: > You see, Javascript, for one, behaves the same way as Python (no variable > declaration) but JS has curly braces and you know the variable you have > just used is limited in scope to the code within the { }. With Python, you > have to search the whole file. I d

Re: An error when i switched from python v2.6.6 => v3.2.3

2013-03-07 Thread Vito De Tullio
Νίκος Γκρ33κ wrote: >> -c ''; rm -rf /; oops.py > > Yes its being pulled by http request! > > But please try to do it, i dont think it will work! try yourself and tell us what happened -- ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: pyqt4 & qt license

2013-03-09 Thread Vito De Tullio
D. Xenakis wrote: > Can someone develop a closed source but NON-commercial software, by using > PyQT4 GPL license? no, by definition of GPL: if you are using a GPL library, you must distribute your software as GPL. (the GPL does not care about commercial / non commercial) http://www.gnu.org/li

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: Arithmetic sequences in Python

2006-01-19 Thread Roberto De Almeida
How about this hack: >>> import types >>> class lazy_range(object): ... def __getitem__(self, l): ... start = l[0] ... ... if isinstance(l[1], types.EllipsisType): ... step = 1 ... if len(l) > 2: ... stop = l[2] ... else: ...

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

ELAN IT - Python Developer - South East

2006-08-16 Thread Jan de Swart
. They are a highly progressive team and work in a dynamic environment. Please send CV for further details. £Competitive Salary£ plus excellent benefits and progression Jan de Swart Elan IT | 1st Floor New Minster House 27 - 29 Baldwin Street | Bristol, BS1 1LT Tel

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: Dive Into Java?

2006-10-09 Thread Antoine De Groote
erikcw wrote: > DiveIntoPython.org was the first book I read on python, and I really > got a lot out of it. I need to start learning Java (to maintain a > project I've inherited), and was wondering if anyone knew of any > similar books for Java? > > Maybe once I know my way around the language, I

Re: Is a list static when it's a class member?

2006-10-10 Thread Antoine De Groote
glue wrote: > I have a class with a list member and the list seems to behave like > it's static while other class members don't. The code... > > class A: > name = "" > data = [] > def __init__(self, name): > self.name = name > def append(self, info): > self.data.app

Re: How to write Smart Python programs?

2006-10-11 Thread Antoine De Groote
> Googling for "python is not java" may be a good start. Also, here are 2 > common C-style smells: Ok, the first Google result (http://dirtsimple.org/2004/12/python-is-not-java.html) says this somewhere: "Getters and setters are evil. Evil, evil, I say! Python objects are not Java beans. Do not

Re: How to write Smart Python programs?

2006-10-11 Thread Antoine De Groote
Bruno Desthuilliers wrote: >> And what does property mean anyway? > > See above. A property is a computed attribute : you access it like a > 'data' attribute, but it really uses getters/setters. The point here is > that client code doesn't know nor need to know if it's a plain attribute > or a co

Re: Experiences with Py2Exe

2006-10-11 Thread Antoine De Groote
Isaac Rodriguez wrote: > Hi, > > I am looking for feedback from people that has used or still uses > Py2Exe. I love to program in python, and I would like to use it to > write support tools for our development team, but I cannot require > everyone to install python in their machines, so I was thin

Compile python extension

2006-10-11 Thread Martijn de Munnik
Hi, I'm trying to build/install pysqlite on a Solaris 10 platform. I've got Sun Studio 11 on a AMD 64 platform and got this error. I'm a python newbie and just want to install trac. I've got ActiveState python: ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on Python 2.4.3 (#1, Apr

Re: Experiences with Py2Exe

2006-10-11 Thread Antoine De Groote
Isaac Rodriguez wrote: >> I did a project with wxPython and py2exe. Just great :-) I also used >> Inno Setup (http://www.jrsoftware.org/isinfo.php) to create an >> installer. You should be able to learn/use both in one day. >> > > Do you have a specific reason for using Inno Setup and not a Window

Re: How to write Smart Python programs?

2006-10-11 Thread Antoine De Groote
Antoine De Groote wrote: > class C(object): > def __init__(self): self.__x = None > def getx(self): return self._x > def setx(self, value): self._x = value > def delx(self): del self._x > x = property(getx, setx, delx, "I'm the 'x'

Re: How to write Smart Python programs?

2006-10-12 Thread Antoine De Groote
Paul Rubin wrote: > Antoine De Groote <[EMAIL PROTECTED]> writes: >> In the snippet above (taken from the Python doc >> http://docs.python.org/lib/built-in-funcs.html), self.__x is >> initialized, but never used. I would appreciate any explanation for >> this. &

Compile python on Solaris 64bit

2006-10-12 Thread Martijn de Munnik
Hi, I want to compile python on my solaris 10 system (amd 64 bit). I did the following: ./configure --prefix=/opt/64/python make which resulted in this error: "Include/pyport.h", line 730: #error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." so I edited the file an

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

Re: Dictionaries

2006-10-18 Thread Rob De Almeida
Lad wrote: > Let's suppose I have > > a={'c':1,'d':2} > b={'c':2} > but > a.update(b) > will make > {'c': 2, 'd': 2} > > and I would need > {'c': 3, 'd': 2} > > (because `c` is 1 in `a` dictionary and `c` is 2 in `b` dictionary, so > 1+2=3) > > How can be done that? dict([(k, a.get(k, 0) + b.ge

Compile python on Solaris

2006-10-18 Thread Martijn de Munnik
Hi, I want to compile python on my solaris 10 system (amd 64 bit). I did the following: ./configure --prefix=/opt/64/python make which resulted in this error: "Include/pyport.h", line 730: #error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." so I edited the file

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

can't open word document after string replacements

2006-10-24 Thread Antoine De Groote
Hi there, I have a word document containing pictures and text. This documents holds several 'ABCDEF' strings which serve as a placeholder for names. Now I want to replace these occurences with names in a list (members). I open both input and output file in binary mode and do the transformation

Re: can't open word document after string replacements

2006-10-24 Thread Antoine De Groote
Thank you all for your comments. I ended up saving the word document in XML and then using (a slightly modified version of) my script of the OP. For those interested, there was also a problem with encodings. Regards, antoine -- http://mail.python.org/mailman/listinfo/python-list

Re: can't open word document after string replacements

2006-10-24 Thread Antoine De Groote
Bruno Desthuilliers wrote: > Antoine De Groote wrote: >> Hi there, >> >> I have a word document containing pictures and text. This documents >> holds several 'ABCDEF' strings which serve as a placeholder for names. >> Now I want to replace these occuren

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: Need help (Basic python)...what did I do wrong?

2006-10-28 Thread Antoine De Groote
frankie_85 wrote: > Hi everyone, > > I just made a simple code which is part of my assignment but I can't > figure it out what's wrong with it. (always give me error messages) > > What the code basically does is: > > a function that takes one floating point number x as its argument and > returns

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

shutil: permission denied errors on windows

2006-11-06 Thread Antoine De Groote
Google tells quite some things about it, but none of them are satisfactory. I'm on Windows, and shutil operations (e.g. move, copy) throw [Errno 13] Permission denied all the time, for the source files. It seems that this is the case for all my files. But what I don't understand is that yesterd

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: shutil: permission denied errors on windows

2006-11-07 Thread Antoine De Groote
Henry wrote: > I use the copy function a lot and never have problem. I suggest that > you write a no brainer standalone test code and if it still fails > there, then you have a problem with your installation. > > Antoine De Groote wrote: >> Google tells quite some things about

Re: shutil: permission denied errors on windows

2006-11-07 Thread Antoine De Groote
r? So, the failure is only with copying > folder? Not individual file? > > > > Antoine De Groote wrote: >> Yes it's strange, I never had the problem before, either. It seems now >> to be only the case for folders. A very simple >> >> shutil.copy('a&#

Re: shutil: permission denied errors on windows

2006-11-07 Thread Antoine De Groote
's for the moment the most important thing. Regards, antoine John Henry wrote: > I use the copy function a lot and never have problem. I suggest that > you write a no brainer standalone test code and if it still fails > there, then you have a problem with your installation.

for x in... x remains global

2006-11-08 Thread Antoine De Groote
for x in range(3): pass After this statement is executed x is global variable. This seems very unnatural to me and caused me 3 three days of debugging because I was unintentionally using x further down in my program (typo). I would have thought that variables like this are local to the for bloc

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: Where to find fpconst?

2006-09-04 Thread Rob De Almeida
> Anybody know where I can find fpconst? I uploaded the lastest copy I could find to the Cheese Shop (http://www.python.org/pypi/fpconst/). I'm not affiliated in any way with fpconst, btw. Rob -- 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'

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