RELEASE: twill 0.8.5

2006-06-05 Thread Titus Brown
ANNOUNCING twill v0.8.5. twill is a simple language for browsing the Web. It's designed for automated testing of Web sites, but it can be used to interact with Web sites in a variety of ways. In particular, twill supports form submission, cookies, redirects, and HTTP authentication. A twill

Re: C# equivalent to range()

2006-06-05 Thread Erik Max Francis
Neuruss wrote: Dennis Lee Bieber wrote: What most of us saw was a blunt request on how to implement a Python construct in some other language that may not be familiar to us. I'm curious, who are us? The regular readers of comp.lang.python. If you don't think we haven't seen this a

attribute error using fnmatch

2006-06-05 Thread s99999999s2003
hi i have script like this: from fnmatch import fnmatch from glob import glob ... f = ['file1','file2','file3'] r = d:\\somepath pat = *.bat listof_files = [i for i in f if not fnmatch(os.path.join(r,i),pat) and os.path.isfile(os.path.join(r,i))] ... .. I get this error: File

Re: Is device Connected Windows?

2006-06-05 Thread placid
Tim Golden wrote: [placid] | Just wondering is there a way (not brute force) to check if a usb | storage device is connected? Hmmm. How do you identify a usb storage device to know that it is or isn't connected? You can certainly do something useful with wmi. eg, code import wmi c =

Re: attribute error using fnmatch

2006-06-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: listof_files = [i for i in f if not fnmatch(os.path.join(r,i),pat) and os.path.isfile(os.path.join(r,i))] ... .. I get this error: File C:\Python24\Lib\fnmatch.py, line 37, in fnmatch pat = os.path.normcase(pat) File C:\Python24\lib\ntpath.py, line 42,

Re: attribute error using fnmatch

2006-06-05 Thread Fredrik Lundh
did you verify that the code you posted really has the problem (it does use the 'os' module which isn't important message.replace(important, imported) -- http://mail.python.org/mailman/listinfo/python-list

Re: FreeImagePy and PIL

2006-06-05 Thread Michele Petrazzo
David Isaac wrote: I am just starting to think about image processing. What are the overlaps and differences in intended functionality between FreeImagePy and PIL? Thanks, Alan Isaac http://tinyurl.com/m5kal For any other questions, I'm here :) Bye, Michele --

Re: Trying to get FreeImagePy to work.

2006-06-05 Thread Iain King
Michele Petrazzo wrote: Iain King wrote: I'll try out FIPY's resizing tomorrow too. OTOH, I have functions to convert between PIL and wxPython, and functions to convert betweem PIL and FIPY, but I don't see a function to convert FIPY to wxPython? Image at:

Re: Python less error-prone than Java

2006-06-05 Thread Martin v. Löwis
Ilpo Nyyssönen wrote: Buggy library code is what prompted that article. Yes, but it is an error type that happens very rarely still. And so it seems that very few programs even notice that bug in that library. That's certainly the case. The bug went unnoticed in the Java library for nearly

Re: HOST - dreamhost.com / Liberality (Hosting, Basic Requirement)

2006-06-05 Thread Tim X
Joachim Durchholz [EMAIL PROTECTED] writes: Ilias Lazaridis schrieb: crossposted to 5 groups, which are affected by this case. followup not applicable. Actually, in this case, yes. It _seems_ that Mr. Xah Les's account was terminated by dreamhost.com because of a) the inability of

Apologies for cross post [was Re: HOST - dreamhost.com / Liberality (Hosting, Basic Requirement)]

2006-06-05 Thread Tim X
My apologies for not trimming the long list of crossposted groups. I hit 'y' when thinking 'n'! Tim -- tcross (at) rapttech dot com dot au -- http://mail.python.org/mailman/listinfo/python-list

Re: Python less error-prone than Java

2006-06-05 Thread Martin v. Löwis
Christoph Zwerschke wrote: Anyway, in Python, you would first define: def wrap(x, at=131): if x -at: x += at*2 elif x = at: x -= at*2 return x Then, the Python program would be as simple: Distance = lambda t1,t0: wrap(t1-t0) In Python 2.4 and later, you

Re: Where is the ucs-32 codec?

2006-06-05 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: Python seems to be missing a UCS-32 codec, even in wide builds (not that it the build should matter). Is there some deep reason or should I just contribute a patch? The only reason is that nobody has needed one so far, and because it is quite some work to do if done

Pmw ScrolledCanvas: How to scroll to specific item?

2006-06-05 Thread MrBlueSky
Hi, I've got a ScrolledCanvas object (sc) and have identified an item on the canvas to which I wish to scroll. I've been reading around and experimenting but with not much success. So far I've managed to get the item's bbox using sc.bbox(item) And got the proportion of the canvas that's visible

Re: Trying to get FreeImagePy to work.

2006-06-05 Thread Fredrik Lundh
Michele Petrazzo wrote: Yes it's min-is-white:: michele:~$ tiffinfo example.tif TIFFReadDirectory: Warning, example.tif: unknown field with tag 37680 (0x9330) encountered. TIFF Directory at offset 0x1520 (5408) Subfile Type: (0 = 0x0) Image Width: 1696 Image Length: 1162

Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Girish Sahani
I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of features. Now i want to check each pair to see if

Re: Where is the ucs-32 codec?

2006-06-05 Thread Erik Max Francis
Martin v. Löwis wrote: The only reason is that nobody has needed one so far, and because it is quite some work to do if done correctly. Why do you need it? Why would it be quite some work? Converting from UTF-16 to UTF-32 is pretty straightforward, and UTF-16 is already supported. -- Erik

Re: in python , could I accomplish the purpose that a=Console.read() used in C?

2006-06-05 Thread Ravi Teja
Bruno Desthuilliers wrote: python a écrit : in python , could I accomplish the purpose that a=Console.read() used in C? ot mode='pedantic' There's nothing like Console.read() in ansi-C. /ot He probably got it mixed up with C# which ( almost - Console.Read() ) has that. --

Re: re beginner

2006-06-05 Thread Bruno Desthuilliers
John Machin a écrit : On 5/06/2006 10:38 AM, Bruno Desthuilliers wrote: SuperHik a écrit : hi all, (snip) I have an old(er) script with the following task - takes a string I copy-pasted and wich always has the same format: (snip) def to_dict(items): items =

Re: HOST - dreamhost.com / Liberality (Hosting, Basic Requirement)

2006-06-05 Thread Vincenzo Ciancia
Joachim Durchholz wrote: People can then decide if they still wish to send the abuse complain (e.g. can follow a link within the autoresponder). Nope. Finding out the provider is enough of a barrier. Additional barriers are not really necessary. Xah Lee has been irritating people for

Re: Trying to get FreeImagePy to work.

2006-06-05 Thread Michele Petrazzo
Fredrik Lundh wrote: So you *need* to invert it to work correctly with PIL! PIL has no problem reading min-is-white TIFF images. it would be nice if you stopped posting bogus support information for other libraries. Sorry if my posts make to seem that other libraries has problems! Sure

Re: check for dictionary keys

2006-06-05 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : hi in my code, i use dict(a) to make to a into a dictionary , a comes from user input, so my program does not know in the first place. Then say , it becomes a = { '-A' : 'value1' , '-B' : value2 , -C : value3 , '-D' : 'value4' } somewhere next in my code, i

Re: Large Dictionaries

2006-06-05 Thread Lawrence D'Oliveiro
In article [EMAIL PROTECTED], Scott David Daniels [EMAIL PROTECTED] wrote: For example, time timsort (Python's internal sort) on pre-sorted data; you'll find it is handled faster than random data. But isn't that how a reasonable sorting algorithm should behave? Less work to do if the data is

Re: summarize text

2006-06-05 Thread Lawrence D'Oliveiro
... sorry, I thought you said summarize Proust. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: TreeCtrl to TreeListCtrl

2006-06-05 Thread Frank Niessink
sendhil kumar: Hi all, whwn working with xml connectvity to python, i have a sash window, in which first window has a Tree Control that has 'n' parent fields preceded by + sign and on leftdown all the childs got from external xml file. when the particular parent field is selected and

Re: re beginner

2006-06-05 Thread Fredrik Lundh
John Machin wrote: Fantastic -- at least for the OP's carefully copied-and-pasted input. Meanwhile back in the real world, there might be problems with multiple tabs used for 'prettiness' instead of 1 tab, non-integer values, etc etc. yeah, that's probably why the OP stated which always has

Re: An oddity in list comparison and element assignment

2006-06-05 Thread Slawomir Nowaczyk
On Sat, 03 Jun 2006 17:03:00 -0700 [EMAIL PROTECTED] (Alex Martelli) wrote: # Terry Reedy [EMAIL PROTECTED] wrote: # # Depends what one means by 'copy'. See below for your alternate wording. # # Please give me a reasonable definition of the unadorned word copy # which would make this

Re: Where is the ucs-32 codec?

2006-06-05 Thread Martin v. Löwis
Erik Max Francis wrote: The only reason is that nobody has needed one so far, and because it is quite some work to do if done correctly. Why do you need it? Why would it be quite some work? Converting from UTF-16 to UTF-32 is pretty straightforward, and UTF-16 is already supported. I would

Re: Python less error-prone than Java

2006-06-05 Thread Christoph Zwerschke
Martin v. Löwis wrote: In Python 2.4 and later, you could write def Distance(t1, t0, maxint=(132)-1): return (t1-t0) maxint No, this function behaves differently. It never returns a negative value. The only difference in Python 2.4 is that 132 was 0 before. -- Christoph --

How to search for substrings of a string in a list?

2006-06-05 Thread Girish Sahani
Given a length k string,i want to search for 2 substrings (overlap possible) in a list consisting of length k-1 strings. These 2 substrings when 'united' give the original string. e.g given 'abc' i want to search in the list of 2-length strings ['ab',ac','cd','bc','bd'] to extract either 1) 'ab

Re: Python less error-prone than Java

2006-06-05 Thread Christoph Zwerschke
Ilpo Nyyssönen wrote: It is not different. Your crash can tell you that it was a null pointer. Your crash can tell you that you stomped over memory. You just get the information about the error in different way. Not all stomping over memory must result in a crash. You might just get wrong

Re: re beginner

2006-06-05 Thread Fredrik Lundh
SuperHik wrote: I'm trying to understand regex for the first time, and it would be very helpful to get an example. I have an old(er) script with the following task - takes a string I copy-pasted and wich always has the same format: print stuff Yellow hat2 Blue shirt 1

Re: Best way to check that a process is running on a Unix system?

2006-06-05 Thread Nick Craig-Wood
BJörn Lindqvist [EMAIL PROTECTED] wrote: What is the best way to check that a process is running (or better yet number of instances) based on the name of the process? Would have to work on a unix/linux system. Use ps -C proc_name. Then either read the nr of lines in the output (for the

Re: HOST - dreamhost.com / Liberality (Hosting, Basic Requirement)

2006-06-05 Thread Ilias Lazaridis
Tim X wrote: [...] I think the other point here is that everyone *assumes* Xah's account was cancelled simply because of a campaign to report him for spamming multiple newsgroups. I suspect there were other factors involved. for all anyone knows, the provider might have been getting complaints

Re: Installation Problem

2006-06-05 Thread Fredrik Lundh
Marshall Dudley wrote: Is it not possible to install the latest version of python on my FreeBSD system? Upgrading the FreeBSD is not an option since this is a production system and everything else is working fine. that's really a FreeBSD question, isn't it? You are using: 2.2.2 (#1, Jun

Re: Which exceptions are recommended to me handled?

2006-06-05 Thread Fredrik Lundh
Delaney, Timothy (Tim) wrote: Note that it's a particularly bad idea to just replace one exception with another exception (not suggesting that that is what you intended - just something I've seen a lot ;) try: int(val) except ValueError: raise MyValueError('Bad

Re: re beginner

2006-06-05 Thread Bruno Desthuilliers
Fredrik Lundh a écrit : John Machin wrote: Fantastic -- at least for the OP's carefully copied-and-pasted input. Meanwhile back in the real world, there might be problems with multiple tabs used for 'prettiness' instead of 1 tab, non-integer values, etc etc. yeah, that's probably why

Re: in python , could I accomplish the purpose that a=Console.read() used in C?

2006-06-05 Thread Bruno Desthuilliers
Ravi Teja a écrit : Bruno Desthuilliers wrote: python a écrit : in python , could I accomplish the purpose that a=Console.read() used in C? ot mode='pedantic' There's nothing like Console.read() in ansi-C. /ot He probably got it mixed up with C# which ( almost - Console.Read() ) has

Re: How to search for substrings of a string in a list?

2006-06-05 Thread Christoph Zwerschke
Girish Sahani schrieb: Given a length k string,i want to search for 2 substrings (overlap possible) in a list consisting of length k-1 strings. These 2 substrings when 'united' give the original string. e.g given 'abc' i want to search in the list of 2-length strings ['ab',ac','cd','bc','bd']

Re: John Bokma harassment

2006-06-05 Thread Ilias Lazaridis
Xah Lee wrote: Thanks to the great many people who has written to my ISP in support of [...] As to dreamhost my webhosting company canceling my account, i will try to reason with them, and see what is the final outcome. They have the legal right to kick me because in the contract that allowed

Python to C converter

2006-06-05 Thread praveenkumar . 117
Hi All, I have an application return in python. I want this to be converted to C. I will be kind enough if somebody suggest is there any tool or compiler to do that. Regards- Praveen Kumar A.S -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-06-05 Thread Steve Holden
Lawrence D'Oliveiro wrote: In article [EMAIL PROTECTED], Scott David Daniels [EMAIL PROTECTED] wrote: For example, time timsort (Python's internal sort) on pre-sorted data; you'll find it is handled faster than random data. But isn't that how a reasonable sorting algorithm should

Re: ANN: PQRC - Python Quick Reference Card - v 0.55

2006-06-05 Thread AdSR
Laurent Pointal wrote: [for those who dont read clp.announce] The Python Quick Reference Card (PQRC) aims to provide a printable quick reference documentation for the Python language and some of its main standard libraries (currently for Python 2.4). [etc.] Great job, Laurent! If this is

Re: An oddity in list comparison and element assignment

2006-06-05 Thread Steve Holden
[EMAIL PROTECTED] wrote: Yes. You stated it quite precisely. I believe l1==l2 should always return True and l1==l3 should always be False. (unless l3 is reassigned as l3=l1). Your idea of a separate operator for 'all elements have numerically equal values at the moment of comparision' is a

Re: Python to C converter

2006-06-05 Thread Rene Pijlman
[EMAIL PROTECTED]: I have an application return in python. I want this to be converted to C. http://www.python.org/doc/faq/general/#can-python-be-compiled-to-machine-code-c-or-some-other-language -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-06-05 Thread Dražen Gemić
Ilias Lazaridis wrote: Xah Lee wrote: for whatever advice or action i can solicit. Meanwhile, if you do know a web hosting company that can take some 80 G of bandwidth/month for less than $25 a month, please let me know! (i do hope if someone here runs a hosting business and can host my site.

Re: re beginner

2006-06-05 Thread John Machin
On 5/06/2006 7:47 PM, Fredrik Lundh wrote: John Machin wrote: Fantastic -- at least for the OP's carefully copied-and-pasted input. Meanwhile back in the real world, there might be problems with multiple tabs used for 'prettiness' instead of 1 tab, non-integer values, etc etc. yeah,

Re: C# equivalent to range()

2006-06-05 Thread Neuruss
Erik Max Francis wrote: I'm curious, who are us? The regular readers of comp.lang.python. If you don't think we haven't seen this a zillion times before, you're kidding yourself. If you want help on a language, ask in that language's newsgroup/mailing list/forum/whatever. It surprises

finding file

2006-06-05 Thread su
Hi , I am trying to understand myself with some basic programs in python, I have written a small script to search for core files in the current dir. but when i tried to execute, it is searching the core files in the subdir also. could someone help me on how can i restrict my code to search the

Re: finding file

2006-06-05 Thread Christoph Zwerschke
su wrote: could someone help me on how can i restrict my code to search the file in the current dir only Use os.listdir(). -- Christoph -- http://mail.python.org/mailman/listinfo/python-list

Re: finding file

2006-06-05 Thread K.S.Sreeram
su wrote: import os, os.path import re def core_finder(arg, dir, files): for file in files: path = os.path.join (dir, file) if re.search(core.*, path): print found print path os.path.walk('.', core_finder, 0) Here's a simpler solution:

How to add few pictures into one

2006-06-05 Thread Lad
Hello , is it possible to add( with PYTHON language) several image files into one? Thanks for reply L. -- http://mail.python.org/mailman/listinfo/python-list

Re: re beginner

2006-06-05 Thread John Machin
On 5/06/2006 10:30 PM, Bruno Desthuilliers wrote: John Machin a écrit : On 5/06/2006 10:38 AM, Bruno Desthuilliers wrote: SuperHik a écrit : hi all, (snip) I have an old(er) script with the following task - takes a string I copy-pasted and wich always has the same format: (snip)

Re: finding file

2006-06-05 Thread K.S.Sreeram
K.S.Sreeram wrote: filepaths = [os.path.join(os.getcwd(),f) for f in filenames] you can use os.path.abspath filepaths = [os.path.abspath(f) for f in filenames] signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How to add few pictures into one

2006-06-05 Thread K.S.Sreeram
Lad wrote: Hello , is it possible to add( with PYTHON language) several image files into one? Google for 'Python Imaging Library'... Regards Sreeram signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Freezing a static executable

2006-06-05 Thread Serge Orlov
Will Ware wrote: I am trying to freeze a static executable. I built a static Python executable this way: ./configure --disable-shared --prefix=/usr/local make make install Even that didn't give me a really static executable, though: AFAIK it's not supported because the

Re: Python to C converter

2006-06-05 Thread gene tani
Rene Pijlman wrote: [EMAIL PROTECTED]: I have an application return in python. I want this to be converted to C. http://www.python.org/doc/faq/general/#can-python-be-compiled-to-machine-code-c-or-some-other-language

Simple question

2006-06-05 Thread bigodines
Hi guys! I'm a complete newbie in Python and I'm trying to make a small software to watch my network. It will be a simple snmpget report for a specific machine. I would like to make a small program in python to be runed with crontrab that will store the whole output in a txt file. I know its not

Re: Open Source Charting Tool

2006-06-05 Thread Harry George
A.M [EMAIL PROTECTED] writes: Hi, I developed a HTML reporting tool that renders Oracle data to HTML and Oracle. At this point I have to add charts (3d bars and pie charts) to this application. I don't think that I have to do it from scratch. Is there any open source

is it possible to find which process dumped core

2006-06-05 Thread su
to find which process dumped core at the promt we give $ file core.28424 core.28424: ELF 32-bit LSB core file of 'soffice.bin' (signal 11), Intel 80386, version 1 (SYSV), from 'soffice.bin' from this command we know 'soffice.bin' process dumped core. Now can i do the same using python i.e.

Re: Simple question

2006-06-05 Thread bigodines
SOLVED, thanks for your time. :) bigodines wrote: Hi guys! I'm a complete newbie in Python and I'm trying to make a small software to watch my network. It will be a simple snmpget report for a specific machine. I would like to make a small program in python to be runed with crontrab

Re: Simple question

2006-06-05 Thread Steve Holden
bigodines wrote: Hi guys! I'm a complete newbie in Python and I'm trying to make a small software to watch my network. It will be a simple snmpget report for a specific machine. I would like to make a small program in python to be runed with crontrab that will store the whole output in a

Re: is it possible to find which process dumped core

2006-06-05 Thread K.S.Sreeram
su wrote: from this command we know 'soffice.bin' process dumped core. Now can i do the same using python i.e. finding which process dumped core? if so how can i do it? You're best bet would be to run the 'file' program using the subprocess module and parse the output that it generates.

Re: is it possible to find which process dumped core

2006-06-05 Thread Steve Holden
su wrote: to find which process dumped core at the promt we give $ file core.28424 core.28424: ELF 32-bit LSB core file of 'soffice.bin' (signal 11), Intel 80386, version 1 (SYSV), from 'soffice.bin' from this command we know 'soffice.bin' process dumped core. Now can i do the same

Re: Large Dictionaries

2006-06-05 Thread Aahz
In article [EMAIL PROTECTED], Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Scott David Daniels [EMAIL PROTECTED] wrote: For example, time timsort (Python's internal sort) on pre-sorted data; you'll find it is handled faster than random data. But isn't that how a

strategy pattern and non-public virtual functions

2006-06-05 Thread pythoncurious
Hi python experts In C++ I can do something like this: class Base { public: void f() { this-f_(); } private: virtual void f_() = 0; }; class Derived : public Base { private: void f_() { // Do something } }; int main() { Derived d; d.f(); } The point of this is that

Re: Python to C converter

2006-06-05 Thread Fuzzyman
gene tani wrote: Rene Pijlman wrote: [EMAIL PROTECTED]: I have an application return in python. I want this to be converted to C. http://www.python.org/doc/faq/general/#can-python-be-compiled-to-machine-code-c-or-some-other-language

Re: How to add few pictures into one

2006-06-05 Thread Lad
K.S.Sreeram wrote: Lad wrote: Hello , is it possible to add( with PYTHON language) several image files into one? Google for 'Python Imaging Library'... Regards Sreeram Thank you for your reply. I was thinking about this: to open each image file in binary mode , read it and write

Re: An oddity in list comparison and element assignment

2006-06-05 Thread Alex Martelli
Slawomir Nowaczyk [EMAIL PROTECTED] wrote: On Sat, 03 Jun 2006 17:03:00 -0700 [EMAIL PROTECTED] (Alex Martelli) wrote: # Terry Reedy [EMAIL PROTECTED] wrote: # # Depends what one means by 'copy'. See below for your alternate wording. # # Please give me a reasonable definition of the

Re: strategy pattern and non-public virtual functions

2006-06-05 Thread Duncan Booth
wrote: The users of the derived classes are unable to bypass this base class function. Just to be clear, the users of the derived C++ classes *are* able to bypass the base class function and call f_() directly, they just have to be prepared to twist the rules somewhat. I know: I've been in

Re: Large Dictionaries

2006-06-05 Thread Iain King
Lawrence D'Oliveiro wrote: In article [EMAIL PROTECTED], Scott David Daniels [EMAIL PROTECTED] wrote: For example, time timsort (Python's internal sort) on pre-sorted data; you'll find it is handled faster than random data. But isn't that how a reasonable sorting algorithm should behave?

Re: strategy pattern and non-public virtual functions

2006-06-05 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: Just translating this code to python won't work, due to the name mangling of private functions: class B(object): def f(self): self.__f() class D(B): def __f(self): pass d = D() d.f() So my questions are: 1. Is there a pythonic way

Re: is it possible to find which process dumped core

2006-06-05 Thread Serge Orlov
su wrote: to find which process dumped core at the promt we give $ file core.28424 core.28424: ELF 32-bit LSB core file of 'soffice.bin' (signal 11), Intel 80386, version 1 (SYSV), from 'soffice.bin' from this command we know 'soffice.bin' process dumped core. Now can i do the same using

Re: Open Source Charting Tool

2006-06-05 Thread Bryan
Harry George wrote: See pygdchart http://www.nullcube.com/software/pygdchart.html this looks pretty nice. i don't see in the docs if and how it can be integrated with other gui toolkits such wxpython. :( bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-06-05 Thread Tim Peters
[Scott David Daniels] For example, time timsort (Python's internal sort) on pre-sorted data; you'll find it is handled faster than random data. O(N) vs O(N log N), in fact. [Lawrence D'Oliveiro] But isn't that how a reasonable sorting algorithm should behave? Less work to do if the data is

Re: How to add few pictures into one

2006-06-05 Thread Grant Edwards
On 2006-06-05, Lad [EMAIL PROTECTED] wrote: is it possible to add( with PYTHON language) several image files into one? Google for 'Python Imaging Library'... I was thinking about this: to open each image file in binary mode , read it and write into the result image file? Is that possible?

Re: How to add few pictures into one

2006-06-05 Thread Steve Holden
Lad wrote: K.S.Sreeram wrote: Lad wrote: Hello , is it possible to add( with PYTHON language) several image files into one? Google for 'Python Imaging Library'... Regards Sreeram Thank you for your reply. I was thinking about this: to open each image file in binary mode , read it

embedding Python in COM server loaded with win32com

2006-06-05 Thread Fozzie
Hi, I have a problem which is quite circular, and hopefully either someone has encountered something similar or has a reason why this will not work. We have a COM library providing mathematics to various systems, most functions are hard-coded but we want to embed a scripting language to allow

Re: Python to C converter

2006-06-05 Thread Paul Boddie
gene tani wrote: http://pyfaq.infogami.com/can-python-be-compiled-to-machine-code-c-or-some-other-language shd probably mention Shedskin, boost, ctypes, any others? I've added a comment, which is seemingly all that can be done right now on that page. See also this overview I wrote about Python

Little question about Tkiner: window focus

2006-06-05 Thread Bernard Lebel
Hello, I have this Tkinter window that when you click on a certain button, another instance of Tk is created, and thus a new windows is spawned. That second windows holds a few widgets to browse files and directories. Now, as soon as I start browsing files and directories, the first window comes

Re: Pmw ScrolledCanvas: How to scroll to specific item?

2006-06-05 Thread MrBlueSky
MrBlueSky wrote: Hi, I've got a ScrolledCanvas object (sc) and have identified an item on the canvas to which I wish to scroll. I've been reading around and experimenting but with not much success. So far I've managed to get the item's bbox using sc.bbox(item) And got the proportion of the

follow-up to FieldStorage

2006-06-05 Thread John Salerno
If I want to get all the values that are entered into an HTML form and write them to a file, is there some way to handle them all at the same time, or must FieldStorage be indexed by each specific field name? -- http://mail.python.org/mailman/listinfo/python-list

Re: Starting New Process

2006-06-05 Thread D
Sorry to bring it back up, but is there a way to spawn the process without Twisted? -- http://mail.python.org/mailman/listinfo/python-list

Re: Installation Problem

2006-06-05 Thread Marshall Dudley
Fredrik Lundh wrote: Marshall Dudley wrote: Is it not possible to install the latest version of python on my FreeBSD system? Upgrading the FreeBSD is not an option since this is a production system and everything else is working fine. that's really a FreeBSD question, isn't it? You

Re: strategy pattern and non-public virtual functions

2006-06-05 Thread Maric Michaud
Le Lundi 05 Juin 2006 16:07, [EMAIL PROTECTED] a écrit : class Base {   public:     void f() { this-f_(); }   private:     virtual void f_() = 0; }; class Derived : public Base {   private:     void f_() { // Do something } }; int main() {     Derived d;     d.f(); } This is just

[twisted] PyOpenSSL and PyCrypto are outdated!

2006-06-05 Thread Mike Meng
Hi all, I'm learning Twisted and downloaded pyOpenSSL and pycrypto win32 installer on http://twisted.sourceforge.net/contrib/ . But I find the lastest version are for Python 2.3. I try to rebuild pyOpenSSL from source, but get lots of compile errors. Are these two packages obsolated? Where

xml.sax problem: getting parse() to read a string

2006-06-05 Thread [EMAIL PROTECTED]
Hey all, I recently came across the xml.sax libraries and am trying to use them. I am currently making a string variable, and am attempting to pass it into a parser instance as follows: def parseMessage(self, message): #create a XML parser parser = make_parser()

Re: Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Roberto Bonvallet
Girish Sahani [EMAIL PROTECTED]: I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of features. Note

Re: Installation Problem

2006-06-05 Thread Fredrik Lundh
Marshall Dudley wrote: That is what I did originally, downloaded the latest version from the main python site. I compiled by the README file instructions, and I compiled by the instructions on the python url which are different, but both gave identical results, compiles fine, runs fine

Re: xml.sax problem: getting parse() to read a string

2006-06-05 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: So in recap, it looks like it is trying to take my string argument as a file handler. How can I get around this? if you want to parse a string, use xml.sax.parseString instead of xml.sax.parse. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: reordering elements of a list

2006-06-05 Thread greenflame
Thanks all for your help! -- http://mail.python.org/mailman/listinfo/python-list

Expanding Search to Subfolders

2006-06-05 Thread PipedreamerGrey
This is the beginning of a script that I wrote to open all the text files in a single directory, then process the data in the text files line by line into a single index file. os.chdir(C:\\Python23\\programs\\filetree) mydir = glob.glob(*.txt) index = open(index.rtf, 'w') for File in mydir:

Storing nothing in a dictionary and passing it to a function

2006-06-05 Thread 63q2o4i02
Hi, I'm writing a hand-written recursive decent parser for SPICE syntax parsing. In one case I have one function that handles a bunch of similar cases (you pass the name and the number of tokens you're looking for). In another case I have a function that handles a different set of tokens and so

Re: logging

2006-06-05 Thread Baurzhan Ismagulov
Hello Vinay, On Sun, Jun 04, 2006 at 05:23:55AM -0700, Vinay Sajip wrote: It's not propagated to the root logger (or to ancestor loggers in general) - just to the handlers associated with ancestor loggers. ... You can set levels on handlers as well as loggers. So if you add a syslog handler

Re: Starting New Process

2006-06-05 Thread david brochu jr
try os.spawn() using the os module -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing nothing in a dictionary and passing it to a function

2006-06-05 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Hi, I'm writing a hand-written recursive decent parser for SPICE syntax parsing. In one case I have one function that handles a bunch of similar cases (you pass the name and the number of tokens you're looking for). In another case I have a function that handles a

Re: Storing nothing in a dictionary and passing it to a function

2006-06-05 Thread Maric Michaud
Le Lundi 05 Juin 2006 19:18, [EMAIL PROTECTED] a écrit : Any thoughts? In [24]: a, b = (lambda : 'works like this'), (lambda a, b : (a,b)) In [25]: a(*()) Out[25]: 'works like this' In [26]: b(4,3) Out[26]: (4, 3) -- _ Maric Michaud _ Aristote - www.aristote.info

Re: Storing nothing in a dictionary and passing it to a function

2006-06-05 Thread Maric Michaud
Le Lundi 05 Juin 2006 19:40, Maric Michaud a écrit : Le Lundi 05 Juin 2006 19:18, [EMAIL PROTECTED] a écrit : Any thoughts? oups wanted to wirte this : In [27]: a, b = (lambda : 'works like this'), (lambda *a : a) In [28]: a(*()) Out[28]: 'works like this' In [29]: b(*()) Out[29]: () --

Re: re beginner

2006-06-05 Thread SuperHik
WOW! Thanks for all the answers, even those not related to regular expressions tought me some stuff I wasn't aware of. I appreciate it very much. SuperHik wrote: hi all, I'm trying to understand regex for the first time, and it would be very helpful to get an example. I have an old(er)

Re: How to add few pictures into one

2006-06-05 Thread Lad
Steve Holden wrote: Lad wrote: K.S.Sreeram wrote: Lad wrote: Hello , is it possible to add( with PYTHON language) several image files into one? Google for 'Python Imaging Library'... Regards Sreeram Thank you for your reply. I was thinking about this: to open each

  1   2   >