Re: Seek the one billionth line in a file containing 3 billion lines.

2007-08-07 Thread Sullivan WxPyQtKinter
On Aug 8, 2:35 am, Paul Rubin wrote: > Sullivan WxPyQtKinter <[EMAIL PROTECTED]> writes: > > This program: > > for i in range(10): > > f.readline() > > is absolutely every slow > > There are two problems: > > 1) range(10) builds a list of a bill

Re: Seek the one billionth line in a file containing 3 billion lines.

2007-08-07 Thread Paul Rubin
Sullivan WxPyQtKinter <[EMAIL PROTECTED]> writes: > This program: > for i in range(10): > f.readline() > is absolutely every slow There are two problems: 1) range(10) builds a list of a billion elements in memory, which is many gigabytes and probably thrashing your

Re: Seek the one billionth line in a file containing 3 billion lines.

2007-08-07 Thread Evan Klitzke
On 8/7/07, Sullivan WxPyQtKinter <[EMAIL PROTECTED]> wrote: > I have a huge log file which contains 3,453,299,000 lines with > different lengths. It is not possible to calculate the absolute > position of the beginning of the one billionth line. Are there > efficient way to seek to the beginning of

Seek the one billionth line in a file containing 3 billion lines.

2007-08-07 Thread Sullivan WxPyQtKinter
I have a huge log file which contains 3,453,299,000 lines with different lengths. It is not possible to calculate the absolute position of the beginning of the one billionth line. Are there efficient way to seek to the beginning of that line in python? This program: for i in range(10):

Re: Issues of state (was: Tkinter or wxpython?)

2007-08-07 Thread Paul Rubin
[EMAIL PROTECTED] (Cameron Laird) writes: > >application in the web app model (I haven't even touched on the whole > >stateless HTTP being mapped to a stateful environment issue, or the > >need to manage the local web server) actually buys you anything. I > . > Go ahead: touc

Re: How can I programmatically find the name of a method from within that method?

2007-08-07 Thread Jay Loden
kj7ny wrote: > Is there a way that I can programmatically find the name of a method I > have created from within that method? I would like to be able to log > a message from within that method (def) and I would like to include > the name of the method from which it was written without having to >

How can I programmatically find the name of a method from within that method?

2007-08-07 Thread kj7ny
Is there a way that I can programmatically find the name of a method I have created from within that method? I would like to be able to log a message from within that method (def) and I would like to include the name of the method from which it was written without having to hard-code that value in

Re: Web based Reporting tool for Python

2007-08-07 Thread Madhu Alagu
Thanking so much for all the informations and links.I would like to use Mako Templates(www.makotemplates.org).I like to use simple and python default module... Thanks Madhu Alagu On Aug 8, 12:29 am, Jay Loden <[EMAIL PROTECTED]> wrote: > Madhu Alagu wrote: > > I am looking template based r

Re: Something in the function tutorial confused me.

2007-08-07 Thread greg
Steve Holden wrote: > OK. The difference is that [] is a mutable value, while None is > immutable. No, it's not. It has nothing to do with mutability vs immutability. The difference is that in the first version the expression [] is evaluated only *once*, when the function is defined. Therefore t

Re: Importing * From a Package

2007-08-07 Thread greg
Patrick Doyle wrote: > This is the part that has me confused -- why does "from package import > *" go on to import names that were explicitly loaded by previous > import statements? Because there's no easy way for it *not* to do that. All it does is grab whatever names are defined in the module at

Re: Emacs + python

2007-08-07 Thread hg
Ben Finney wrote: > hg <[EMAIL PROTECTED]> writes: > >> how about a cscope equivalent ? > > How about reading what was posted earlier in the thread, and give us a > description of what you want instead of a name that people might not > recognise? > > -- > \ "The judge asked, 'What do you

Re: Something in the function tutorial confused me.

2007-08-07 Thread Steve Holden
Ricardo Aráoz wrote: > Lee Fleming wrote: >> Thanks for all the help, everyone. I guess I was confused with default >> arguments that were mutable and immutable. I will continue to look >> over these posts until I understand what is happening. >> >> I cannot believe the number of helpful responses

Re: Something in the function tutorial confused me.

2007-08-07 Thread David Wahler
On 8/7/07, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Lee Fleming wrote: > > Thanks for all the help, everyone. I guess I was confused with default > > arguments that were mutable and immutable. I will continue to look > > over these posts until I understand what is happening. > > > > I cannot beli

Re: step through .py file in a .NET application written in C# in Visual Studio

2007-08-07 Thread jingwu . mail
On Aug 7, 9:24 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Aug 6, 5:22 pm, Bo <[EMAIL PROTECTED]> wrote: > > > > > Hello All, > > > I am experimenting IronPython in Visual Studio. Here is what I have, > > what I did and what I want > > > 1. I have installed Visual Studio SDK 4.0 according to

Re: ensuring GNU readline isn't used

2007-08-07 Thread Ben Finney
Josh Paetzel <[EMAIL PROTECTED]> writes: > Is there a way to ensure that GNU readline isn't used (even though > support may have been compiled in?). I'm experiencing a licensing > problem Note that the GPL (the license terms of readline) is like any other valid copyright license in that it only

Re: Something in the function tutorial confused me.

2007-08-07 Thread Ricardo Aráoz
Lee Fleming wrote: > Thanks for all the help, everyone. I guess I was confused with default > arguments that were mutable and immutable. I will continue to look > over these posts until I understand what is happening. > > I cannot believe the number of helpful responses I got! > Apparently he di

Destruction of generator objects

2007-08-07 Thread Stefan Bellon
Hi all, I'm generating a binding from Python to C using SWIG. On the C side I have iterators over some data structures. On the Python side I currently use code like the following: def get_data(obj): result = [] iter = make_iter(obj) while more(iter): item =

Re: Email

2007-08-07 Thread Rohan
On Aug 3, 7:22 pm, SMERSH009 <[EMAIL PROTECTED]> wrote: > On Aug 3, 9:47 am,Rohan<[EMAIL PROTECTED]> wrote: > > > > > On Aug 2, 1:06 pm, Laurent Pointal <[EMAIL PROTECTED]> wrote: > > > >Rohanwrote: > > > > I was wondering if there could be an arrangement where a file could be > > > > attached and

Re: passing vars to py scipts in cron jobs

2007-08-07 Thread Will Maier
On Tue, Aug 07, 2007 at 05:45:46PM -0400, brad wrote: > What's the proper way to call a py script and pass in variables > while doing cron jobs? I can run the scripts fine from idle, > python, etc using raw_input() to prompt users. The scripts have > classes with methods that need arguments. This

Re: Heterogeneous lists

2007-08-07 Thread faulkner
On Aug 7, 2:53 pm, Gordon Airporte <[EMAIL PROTECTED]> wrote: > This is one of those nice, permissive Python features but I was > wondering how often people actually use lists holding several different > types of objects. > It looks like whenever I need to group different objects I create a > class

Re: Heterogeneous lists

2007-08-07 Thread Tony
On Aug 7, 8:53 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: . > > I love my lists of classes. I know, I'll go to hell for that. > > -- > Jarek Zgodahttp://jpa.berlios.de/ And I love my shelved lists of classes.. Tony -- http://mail.python.org/mailman/listinfo/python-list

passing vars to py scipts in cron jobs

2007-08-07 Thread brad
What's the proper way to call a py script and pass in variables while doing cron jobs? I can run the scripts fine from idle, python, etc using raw_input() to prompt users. The scripts have classes with methods that need arguments. Here's an example... I want to run c1.d1(v,v,v) then c2.d2(v,v,v

Re: Buffering HTML as HTMLParser reads it?

2007-08-07 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hello, > > I am working on a project where I'm using python to parse HTML pages, > transforming data between certain tags. Currently the HTMLParser class > is being used for this. In a nutshell, its pretty simple -- I'm > feeding the contents of the HTML page to HTMLP

Re: Misleading wikipedia article on Python 3?

2007-08-07 Thread John J. Lee
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> Do you *really* think that projects will fall 50-50 into the "yes" and >> "no" camps, as you seem to imply -- after all, if you thought that one >> case was more common, why wouldn't you mention which it was? > > I know you didn't ask me this time,

Re: Web based Reporting tool for Python

2007-08-07 Thread Jay Loden
Madhu Alagu wrote: > I am looking template based report tools for python.It has the ability > to deliver rich content onto the screen, to the printer or into PDF, > HTML, XLS, CSV and XML files. As others have mentioned, I don't believe that all of the above is implemented in a single package. How

Re: Misleading wikipedia article on Python 3?

2007-08-07 Thread Martin v. Löwis
> Do you *really* think that projects will fall 50-50 into the "yes" and > "no" camps, as you seem to imply -- after all, if you thought that one > case was more common, why wouldn't you mention which it was? I know you didn't ask me this time, but I answer anyway: I don't know. I *really* think

Re: ensuring GNU readline isn't used

2007-08-07 Thread John J. Lee
Duncan Booth <[EMAIL PROTECTED]> writes: > Josh Paetzel <[EMAIL PROTECTED]> wrote: > >> Is there a way to ensure that GNU readline isn't used (even though >> support may have been compiled in?). I'm experiencing a licensing >> problem, I'd like to use the "cmd" module, for example, but my code is

[pyserial - winXP] Serial port stop receiving data after a few hours, raise no error

2007-08-07 Thread pauland80
>My soft passively listen to a device sending +- 300 bytes of data each >second. After several hours of work, the soft abruptly stops receiving >data without any error, (while the device sends properly, of course) >and I need to restart it (the python soft) to "reactivate" the port

Re: Misleading wikipedia article on Python 3?

2007-08-07 Thread John J. Lee
Carsten Haese <[EMAIL PROTECTED]> writes: > On Sun, 2007-08-05 at 23:09 +, John J. Lee wrote: >> I just wanted to know: is it easy to make my code so it >> runs on 2.6 and 3.0, without funny stuff like a code translator? > > That depends on your definitions of "easy" and "funny stuff." I'm pre

Re: Web based Reporting tool for Python

2007-08-07 Thread Jon Rosebaugh
On 2007-08-06 23:29:16 -0500, Madhu Alagu <[EMAIL PROTECTED]> said: > Hi > I am looking template based report tools for python.It has the ability > to deliver rich content onto the screen, to the printer or into PDF, > HTML, XLS, CSV and XML files. I don't think this has been implemented in Pytho

Python FNV Hash

2007-08-07 Thread Edward Blake
Before I go through the work of wrapping the FNV hash source found on http://isthe.com/chongo/tech/comp/fnv/ I thought I would ask here to see if anyone already has an implementation of it available. I'm particularly interested in hash_64, the 64 bit Fowler/Noll/Vo-0 FNV-1a hash code. -- http://ma

Re: Adding a list of descriptors to a class

2007-08-07 Thread Bruno Desthuilliers
Bob B. a écrit : > I've been playing with descriptors lately. I'm having one problem I > can't seem to find the answer to. I want to assign a descriptor to a > list of attributes. I know I should be able to add these somewhere in > the class's __dict__, but I can't figure out where. Here's some

Re: Adding a list of descriptors to a class

2007-08-07 Thread Bruno Desthuilliers
Marc 'BlackJack' Rintsch a écrit : > On Tue, 07 Aug 2007 09:25:32 -0700, Bob B. wrote: > > >>Ok, that "exec" is an ugly hack. There's gotta be someway to plop >>this straight into the class's __dict__ without doing that, but when I >>try adding self.__class__.__dict__[attr] = MyDesc(attr) in MyC

Re: Heterogeneous lists

2007-08-07 Thread Jarek Zgoda
Bruno Desthuilliers napisał(a): > Gordon Airporte a écrit : >> This is one of those nice, permissive Python features but I was >> wondering how often people actually use lists holding several >> different types of objects. > > Depends on the definition of 'type'. I often have instances of differe

Tuning - Styling

2007-08-07 Thread airconditi
Cool cars, tuning & styling, here you can find many tuned cars with tons of pictures!!! http://tuning-styling.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Heterogeneous lists

2007-08-07 Thread Bruno Desthuilliers
Gordon Airporte a écrit : > This is one of those nice, permissive Python features but I was > wondering how often people actually use lists holding several different > types of objects. Depends on the definition of 'type'. I often have instances of different - possibly unrelated - classes in a

re: mmm-mode, python-mode and doctest-mode?

2007-08-07 Thread John J Lee
On Tue, 7 Aug 2007, Edward Loper wrote: > [John J Lee] >> Is it possible to get doctest-mode to work with mmm-mode and python-mode >> nicely so that docstrings containing doctests are editable in doctest-mode? > > I recently released a new version of doctest-mode [1], and I came across your > em

Heterogeneous lists

2007-08-07 Thread Gordon Airporte
This is one of those nice, permissive Python features but I was wondering how often people actually use lists holding several different types of objects. It looks like whenever I need to group different objects I create a class, if only so I can use more meaningful names than '[2]' for the items

Re: Dealing with multiple excel sheets

2007-08-07 Thread Neil Cerutti
On 2007-08-07, Rohan <[EMAIL PROTECTED]> wrote: > I would like to write a script which does the following job. > Take column1 and 7 from 10 different excel sheets and pasthe > them into a new excel worksheet. Any ideas on how to do it Get the xlrd Python module. It'll come in handy. -- Neil Ceru

Re: Dealing with multiple excel sheets

2007-08-07 Thread kyosohma
On Aug 7, 1:05 pm, Rohan <[EMAIL PROTECTED]> wrote: > Hello, > I would like to write a script which does the following job. > Take column1 and 7 from 10 different excel sheets and pasthe them into > a new excel worksheet. > Any ideas on how to do it > Thanks, Try studying this code: http://snippe

Re: re.sub does not replace all occurences

2007-08-07 Thread Christoph Krammer
Neil Cerutti schrieb: > In other words, the fourth argument to sub is count, not a set of > re flags. I knew it had to be something very stupid. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils

2007-08-07 Thread Peter Otten
[EMAIL PROTECTED] wrote: > On 7 kol, 19:37, Irmen de Jong <[EMAIL PROTECTED]> wrote: >> Are you sure you haven't written a module yourself called distutils.py ? >> (that one will hide the standard distutils module) > I was search for all distutils files and folders and I'am sure there > is no d

Re: re.sub does not replace all occurences

2007-08-07 Thread Neil Cerutti
On 2007-08-07, Christoph Krammer <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I wanted to use re.sub to strip all HTML tags out of a given string. I > learned that there are better ways to do this without the re module, > but I would like to know why my code is not working. I use the > followi

Dealing with multiple excel sheets

2007-08-07 Thread Rohan
Hello, I would like to write a script which does the following job. Take column1 and 7 from 10 different excel sheets and pasthe them into a new excel worksheet. Any ideas on how to do it Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils

2007-08-07 Thread vedrandekovic
On 7 kol, 19:37, Irmen de Jong <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello again, > > > Is there any patch for python "distutils", for this > > from distutils import log,dir_util > > ImportError: cannot import name log > > > Regards, > > Vedran > > Are you sure you haven't

Re: re.sub does not replace all occurences

2007-08-07 Thread Marc 'BlackJack' Rintsch
On Tue, 07 Aug 2007 10:28:24 -0700, Christoph Krammer wrote: > Hello everybody, > > I wanted to use re.sub to strip all HTML tags out of a given string. I > learned that there are better ways to do this without the re module, > but I would like to know why my code is not working. I use the > foll

Re: Another question about variable args.

2007-08-07 Thread Neil Cerutti
On 2007-08-07, Steven W. Orr <[EMAIL PROTECTED]> wrote: > I have a structure I need to pack. I call struct.pack about a dozen times > and each call takes about 53 arguments. > > I create a sequence of the arguments: > a1 = 1 > a2 = 2 > a3 = 3 > etc... > a54 = 88 > myseq = (a1, a2, a3, a4 etc... a5

Re: distutils

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

Re: distutils

2007-08-07 Thread vedrandekovic
On 7 kol, 18:00, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On 7 kol, 14:53, Steve Holden <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> Hello again, > >>> Is there any patch for python "distutils", for this > >> from distutils import log,dir_util > >

re.sub does not replace all occurences

2007-08-07 Thread Christoph Krammer
Hello everybody, I wanted to use re.sub to strip all HTML tags out of a given string. I learned that there are better ways to do this without the re module, but I would like to know why my code is not working. I use the following: def stripHtml(source): source = re.sub("[\n\r\f]", " ", source)

Re: Adding a list of descriptors to a class

2007-08-07 Thread Bob B.
> Probably the simplest thing is to just add the attributes after the > class body, e.g.:: > > >>> class MyClass(object): > ... pass > ... > >>> for attr in ['attr1', 'attr2']: > ... setattr(MyClass, attr, MyDesc(attr)) > ... > >>> c = MyClass() > >>>

Re: Adding a list of descriptors to a class

2007-08-07 Thread Steven Bethard
Bob B. wrote: > I've been playing with descriptors lately. I'm having one problem I > can't seem to find the answer to. I want to assign a descriptor to a > list of attributes. I know I should be able to add these somewhere in > the class's __dict__, but I can't figure out where. Here's some co

Re: Adding a list of descriptors to a class

2007-08-07 Thread Marc 'BlackJack' Rintsch
On Tue, 07 Aug 2007 09:25:32 -0700, Bob B. wrote: > Ok, that "exec" is an ugly hack. There's gotta be someway to plop > this straight into the class's __dict__ without doing that, but when I > try adding self.__class__.__dict__[attr] = MyDesc(attr) in MyClass's > __init__ method, I get the error:

Adding a list of descriptors to a class

2007-08-07 Thread Bob B.
I've been playing with descriptors lately. I'm having one problem I can't seem to find the answer to. I want to assign a descriptor to a list of attributes. I know I should be able to add these somewhere in the class's __dict__, but I can't figure out where. Here's some code: class MyDesc(obje

Re: python system subprocess win32

2007-08-07 Thread kyosohma
On Aug 7, 11:07 am, "mclaugb" <[EMAIL PROTECTED]> wrote: > At the moment, I cannot figure a way of running this precompiled "conv.exe" > using commandline arguments. > > Thus, I need Python to call the program, wait until it loads up, then enter > a known sequence of characters so that the function

Re: python system subprocess win32

2007-08-07 Thread mclaugb
At the moment, I cannot figure a way of running this precompiled "conv.exe" using commandline arguments. Thus, I need Python to call the program, wait until it loads up, then enter a known sequence of characters so that the function will run. The program conv.exe I call looks like this.

Re: All leading tabs or all leading spaces - why isn't that enforced?

2007-08-07 Thread James Antill
On Tue, 07 Aug 2007 02:53:18 +, John Nagle wrote: > One can argue over tab vs. space indentation, but mixing the two is just > wrong. Why not have CPython report an error if a file has both leading > tabs and leading spaces? I know that was proposed at some point, but I > don't think it ever

Another question about variable args.

2007-08-07 Thread Steven W. Orr
I have a structure I need to pack. I call struct.pack about a dozen times and each call takes about 53 arguments. I create a sequence of the arguments: a1 = 1 a2 = 2 a3 = 3 etc... a54 = 88 myseq = (a1, a2, a3, a4 etc... a53) Also I made def mpack ( fmt, *ss ): print type(ss) for ii in

Re: distutils

2007-08-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On 7 kol, 14:53, Steve Holden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> Hello again, >>> Is there any patch for python "distutils", for this >> from distutils import log,dir_util >>> ImportError: cannot import name log >> What version of Python are yo

Re: parsing a dbIII file

2007-08-07 Thread Jerry Hill
On 8/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have to parse a file (that is a dbIII file) whose stucture look like > this: > |string|, |string|, |string that may contain commas inside|, 1, 2, 3, | > other string| The CSV module is probably the easiest way to go: >>> data = "|string|

Re: parsing a dbIII file

2007-08-07 Thread Paul McGuire
On Aug 7, 2:21 am, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello everybody, I'm new to python (...I work with cobol...) > > > I have to parse a file (that is a dbIII file) whose stucture look like > > this: > > |string|, |string|, |string that may contain commas insid

Re: python system subprocess win32

2007-08-07 Thread kyosohma
On Aug 7, 9:48 am, "mclaugb" <[EMAIL PROTECTED]> wrote: > Hello ALl, > I have a compiled program "conv.exe" that works as follows:>>conv.exe > > - > Please selection from the following options. press "h" for help, "p" for > print, "r" for readfile. > Enter your request

Re: Tkinter or wxpython?

2007-08-07 Thread kyosohma
On Aug 7, 9:00 am, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>, > Paul Rubin wrote: > . > . > . > > > > >I should also add: there is also the possibility of running a Py

Re��: ��get wikipedia source failed�� (��urrlib2��)

2007-08-07 Thread Michael J��. ��Fromberger
In article‭ <[EMAIL PROTECTED]>,‬ ‭ [EMAIL PROTECTED] wrote‭:‬ ‭> ‬Hi‭,‬ ‭> ‬I'm trying to get wikipedia page source with urllib2‭:‬ ‭> ‬usock‭ = ‬urllib2‭.‬urlopen‭("‬http‭://‬e

python system subprocess win32

2007-08-07 Thread mclaugb
Hello ALl, I have a compiled program "conv.exe" that works as follows: >>conv.exe - Please selection from the following options. press "h" for help, "p" for print, "r" for readfile. Enter your request now: ... Is there a way to script python using

Re: parsing a dbIII file

2007-08-07 Thread Jay Loden
[EMAIL PROTECTED] wrote: > Hello everybody, I'm new to python (...I work with cobol...) > > I have to parse a file (that is a dbIII file) whose stucture look like > this: > |string|, |string|, |string that may contain commas inside|, 1, 2, 3, | > other string| There are a number of relatively sim

Re: distutils

2007-08-07 Thread vedrandekovic
On 7 kol, 14:53, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello again, > > > Is there any patch for python "distutils", for this > > from distutils import log,dir_util > > ImportError: cannot import name log > > What version of Python are you running with? It look

Re: All leading tabs or all leading spaces - why isn't that enforced?

2007-08-07 Thread Neil Cerutti
On 2007-08-07, Omari Norman <[EMAIL PROTECTED]> wrote: >> I suppose we Pythonistas are just too permissive for our own good. >> Consider the opportunity to use mixed tabs and spaces a piece of rope of >> your preferred length ... > > I thought I remembered reading somewhere that Python 3000 will

Re: Importing * From a Package

2007-08-07 Thread Patrick Doyle
On 7 Aug 2007 13:54:21 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > "Patrick Doyle" <[EMAIL PROTECTED]> wrote: > > > Why does Python include the submodules that were explicitly loaded by > > previous imports? Does it go out of it's way to do so? If so, why? > > What purpose does it serve? Or,

Re: making a opc client in Python and use opc server Events

2007-08-07 Thread jp . eugster
On 28 juin, 16:55, [EMAIL PROTECTED] wrote: > On 4 juin, 11:32, [EMAIL PROTECTED] wrote: > > > > > > > Hi all > > I have a sample code to implement opc client in Python. i use a > > file .py making by makepy with pythonwin for Com Interface. > > i can get all server in machine, connect to server op

Re: RTF 2 Tiff

2007-08-07 Thread cjankowski
On Aug 6, 4:04 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi all, > > I am trying to convert an RTF file to a Tiff image using Python. This > > process will convert several hundred images daily. Currently I am > > able to get the RTF file into a text format using Rt

Re: Tkinter or wxpython?

2007-08-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: . . . >I should also add: there is also the possibility of running a Python >program with an embedded http server on the same desktop as the >browser

Which GUI toolkit (was: Tkinter or wxpython?)

2007-08-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Bryan Hepworth <[EMAIL PROTECTED]> wrote: . [waaay too much quoted text for my taste] . . >> I'm not trying to claim that there are no benefit

Issues of state (was: Tkinter or wxpython?)

2007-08-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Chris Mellon <[EMAIL PROTECTED]> wrote: . [scores of lines of vigorous debate] . . >Moreover, if you *don't* need global access or zero-deployment >(zero-deploymen

Re: Web based Reporting tool for Python

2007-08-07 Thread vasudevram
Madhu Alagu wrote: > Hi > > > > I am looking template based report tools for python.It has the ability > to deliver rich content onto the screen, to the printer or into PDF, > HTML, XLS, CSV and XML files. > > > > > > Thanks, > > Madhu Alagu I don't know if there's a _single_ tool that can do all

Re: All leading tabs or all leading spaces - why isn't that enforced?

2007-08-07 Thread Omari Norman
> I suppose we Pythonistas are just too permissive for our own good. > Consider the opportunity to use mixed tabs and spaces a piece of rope of > your preferred length ... I thought I remembered reading somewhere that Python 3000 will ban tabs as indentation characters, but now I can't turn up a

Re: Importing * From a Package

2007-08-07 Thread Duncan Booth
"Patrick Doyle" <[EMAIL PROTECTED]> wrote: > Why does Python include the submodules that were explicitly loaded by > previous imports? Does it go out of it's way to do so? If so, why? > What purpose does it serve? Or, is it a natural fallout of the manner > in which imports are processed? If s

Re: is it possible to improve traceback messages ?

2007-08-07 Thread Sion Arrowsmith
Zentrader <[EMAIL PROTECTED]> wrote: >This is the "standard" way AFAIK >.try : >. some_process >.except : >. import trackback, sys >. et, ev, tb = sys.exc_info() >. while tb : >.co = tb.tb_frame.f_code >.print "Filename = " + str(co.co_filename) >.print "Error Line

Re: Tkinter or wxpython?

2007-08-07 Thread Chris Mellon
On 06 Aug 2007 15:25:51 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: > > You repeatedly have used the word "slickness" as a pejorative. I find > > that offensive and it's insulting to users. When I write applications, > > I want the interfac

Re: can't import SimpleXMLRPCDisptacher from SimpleXMLRPCServer

2007-08-07 Thread bhamdeveloper
On Aug 6, 1:01 pm, bhamdeveloper <[EMAIL PROTECTED]> wrote: > from my server I can't import SimpleXMLRPCDispatcher. please > seehttp://intertubewaypoint.com/metaweblog/for the stacktrace/error > message. This onle happens on my server; I am trying to integrate the > metaweblog api into my blog a

Re: get position is scrolled wxScrolledWindow

2007-08-07 Thread kyosohma
On Aug 6, 11:20 pm, Astan Chee <[EMAIL PROTECTED]> wrote: > Hi, > I have a wxScrolledWindow, and some things drawn on it. I've hooked the > left click event to a certain function I've got. Anyway, everytime I do > a event.GetPosition() on the position of the mouse on the > wxScrolledWindow, it retu

Re: step through .py file in a .NET application written in C# in Visual Studio

2007-08-07 Thread Paul McGuire
On Aug 6, 5:22 pm, Bo <[EMAIL PROTECTED]> wrote: > Hello All, > > I am experimenting IronPython in Visual Studio. Here is what I have, > what I did and what I want > > 1. I have installed Visual Studio SDK 4.0 according to this > bloghttp://blogs.msdn.com/aaronmar/archive/2006/02/16/a-bit-more-o

Re: Importing * From a Package

2007-08-07 Thread Patrick Doyle
> There's no reliable way to differentiate between names which you defined > using something other than an import statement, names you defined with an > import statement with the intent of publishing them as part of your external > API, and names you defined with an import statement which you only

Re: ensuring GNU readline isn't used

2007-08-07 Thread Duncan Booth
Josh Paetzel <[EMAIL PROTECTED]> wrote: > Is there a way to ensure that GNU readline isn't used (even though > support may have been compiled in?). I'm experiencing a licensing > problem, I'd like to use the "cmd" module, for example, but my code is > proprietary and hence, if cmd uses readline,

ensuring GNU readline isn't used

2007-08-07 Thread Josh Paetzel
Is there a way to ensure that GNU readline isn't used (even though support may have been compiled in?). I'm experiencing a licensing problem, I'd like to use the "cmd" module, for example, but my code is proprietary and hence, if cmd uses readline, I can't use cmd. Unfortunately, I can't control i

Re: distutils

2007-08-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hello again, > > Is there any patch for python "distutils", for this > from distutils import log,dir_util > ImportError: cannot import name log > What version of Python are you running with? It looks as though there may be something wrong with your installation i

distutils

2007-08-07 Thread vedrandekovic
Hello again, Is there any patch for python "distutils", for this >>> from distutils import log,dir_util ImportError: cannot import name log Regards, Vedran -- http://mail.python.org/mailman/listinfo/python-list

Re: seeking tinter module

2007-08-07 Thread Neil Cerutti
On 2007-08-07, Jean-François Piéronne <[EMAIL PROTECTED]> wrote: > I'm looking for a module name tinter (not tkinter...) > > from http://www.vex.net/parnassus/apyllo.py?i=97497223 > status: Dead and Gone > > Google return no location to download it, only a few > articles mentionned it, for example:

Re: seeking tinter module

2007-08-07 Thread Jean-François Piéronne
Peter Otten wrote: > Jean-François Piéronne wrote: > >> I'm looking for a module name tinter (not tkinter...) >> >> from http://www.vex.net/parnassus/apyllo.py?i=97497223 >> status: Dead and Gone >> >> Google return no location to download it, only a few >> articles mentionned it, for example: >>

Re: How to use C enum in Python CTypes?

2007-08-07 Thread Jim Langston
"rozniy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Aug 7, 2:11 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Tue, 07 Aug 2007 04:57:19 +, rozniy wrote: >> > typedef enum olss_tag >> >{ >> >OLSS_AD, >> >OLSS_DA, >> >OLSS_DIN, >> >OLSS_D

Re: seeking tinter module

2007-08-07 Thread Peter Otten
Jean-François Piéronne wrote: > I'm looking for a module name tinter (not tkinter...) > > from http://www.vex.net/parnassus/apyllo.py?i=97497223 > status: Dead and Gone > > Google return no location to download it, only a few > articles mentionned it, for example: > http://www.ibm.com/developerw

Re: regexp problem in Python

2007-08-07 Thread Ant
On Aug 3, 10:41 pm, Ehsan <[EMAIL PROTECTED]> wrote: ... > what can I do? what's wrong whit this pattern? thanx for your comments Nothing. There's something wrong with the code you are using the regex with. Post it and we may be able to help. Like Lawrence has said, it's likely to be that you are

seeking tinter module

2007-08-07 Thread Jean-François Piéronne
I'm looking for a module name tinter (not tkinter...) from http://www.vex.net/parnassus/apyllo.py?i=97497223 status: Dead and Gone Google return no location to download it, only a few articles mentionned it, for example: http://www.ibm.com/developerworks/linux/library/l-python6.html Does someon

Re: Global package variable, is it possible?

2007-08-07 Thread Bruno Desthuilliers
Chris Allen a écrit : > On Aug 6, 12:41 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Chris Allen a écrit : >> (snip) >> Hi Chris... >> I've read all the thread, and it seems that your problem is mostly to >> share a single dynamic state (the config) between several modules. So I >> do wond

Re: get wikipedia source failed (urrlib2)

2007-08-07 Thread Lawrence Oluyede
<[EMAIL PROTECTED]> wrote: > This source works fine for other site. the problem is in wikipedia. is > someone now any solution for this problem? Wikipedia, AFAIK, bans requests without a User Agent. http://www.voidspace.org.uk/python/articles/urllib2.shtml#headers -- Lawrence, oluyede.org - nero

Re: Redirecting stderr to null and revert

2007-08-07 Thread greg
reubendb wrote: > def nullStderr(): > sys.stderr.flush() > err = open('/dev/null', 'a+', 0) > os.dup2(err.fileno(), sys.stderr.fileno()) > > def revertStderr(): > sys.stderr = sys.__stderr__ You're doing the redirection at one level and trying to revert it at a different level. If this i

Re: get wikipedia source failed (urrlib2)

2007-08-07 Thread shahargs
On 7 , 11:54, [EMAIL PROTECTED] wrote: > Hi, > I'm trying to get wikipedia page source with urllib2: > usock = urllib2.urlopen("http://en.wikipedia.org/wiki/ > Albert_Einstein") > data = usock.read(); > usock.close(); > return data > I got exception because HTTP 403 error. why

Re: How to use C enum in Python CTypes?

2007-08-07 Thread Marc 'BlackJack' Rintsch
On Tue, 07 Aug 2007 02:13:38 -0700, rozniy wrote: > On Aug 7, 2:11 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Tue, 07 Aug 2007 04:57:19 +, rozniy wrote: >> > This site >> >http://python.net/crew/theller/ctypes/tutorial.html#bugs-todo-and-non... >> >> > says that enumeration

Re: How to use C enum in Python CTypes?

2007-08-07 Thread rozniy
On Aug 7, 2:11 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 07 Aug 2007 04:57:19 +, rozniy wrote: > > typedef enum olss_tag > >{ > >OLSS_AD, > >OLSS_DA, > >OLSS_DIN, > >OLSS_DOUT, > >OLSS_SRL, > >OLSS_CT > >} > > OLSS; > > > I managed to fudg

get wikipedia source failed (urrlib2)

2007-08-07 Thread shahargs
Hi, I'm trying to get wikipedia page source with urllib2: usock = urllib2.urlopen("http://en.wikipedia.org/wiki/ Albert_Einstein") data = usock.read(); usock.close(); return data I got exception because HTTP 403 error. why? with my browser i can't access it without any problem? Tha

  1   2   >