Re: searching a list of lists as a two-dimensional array?

2007-02-12 Thread Steven D'Aprano
On Sun, 11 Feb 2007 23:20:11 -0800, John Machin wrote: > Now for the algorithm: all of that testing to see if you are about to > sail off the end of the world is a bit ugly and slow. You can use bit- > bashing, as Paul suggested, even though it's on Steven D'Aprano's list > of 6 deadly sins :-) H

Tkinter and Tile

2007-02-12 Thread Ben Finney
Howdy all, Python programmers looking for a built-in GUI toolkit are told two things: one, Python already comes with a GUI toolkit, and two, it looks equally ugly on all platforms. This is because the Tk widget library, that Tkinter uses, defaults to looking like Motif, which hasn't been the defau

Re: randomly generate n of each of two types

2007-02-12 Thread [EMAIL PROTECTED]
> > This again has the "costs" I referred to: > creating a potentially large sequence, > and shuffling it. I thought I would see if I could do better, so I wrote this: import random def index_types(n, typelist=[True, False]): numtypes = len(typelist) total = float(n*numtypes) counts

sort sort sort

2007-02-12 Thread JStoneGT
I do need sorting a dict via its values. Please help give some reference or code samples. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expressions

2007-02-12 Thread [EMAIL PROTECTED]
HTML: htmllib and HTMLParser (both in the Python library), BeautifulSoup (again GIYF) XML: xml.* in the Python library. ElementTree (recommended) is included in Python 2.5; use xml.etree.cElementTree. The source of HTMLParser and xmllib use regular expressions for parsing out the data. htmllib c

Re: New Pythin user looking foe some good examples to study

2007-02-12 Thread GHUM
Johnny, look no further than your harddrive. The Python Standard Lib is full of code examples of Python programming for various uses. Just find where your packagemanager has installed them; within windows it is usually python24/lib or python25/lib I suspect them to be below usr/lib on linux.

Progress when parsing a large file with SAX

2007-02-12 Thread marc . omorain
Hi there, I have a 28mb XML file which I parse with SAX. I have some processing to do in the startElement / endElement callbacks, which slows the parsing down to about 60 seconds on my machine. My application is unresponsive for this time, so I would like to show a progress bar. I could show a sp

Re: string.replace non-ascii characters

2007-02-12 Thread Duncan Booth
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in triplicate: > If I were paid for the number of lines *written* that would not be a > great deal :) You don't by any chance get paid by the number of posts to c.l.python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter and Tile

2007-02-12 Thread Eric Brunel
On Mon, 12 Feb 2007 09:24:20 +0100, Ben Finney <[EMAIL PROTECTED]> wrote: > Howdy all, > > Python programmers looking for a built-in GUI toolkit are told two > things: one, Python already comes with a GUI toolkit, and two, it > looks equally ugly on all platforms. This is because the Tk widget > li

Re: Regular Expressions

2007-02-12 Thread John Machin
On Feb 12, 9:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > HTML: htmllib and HTMLParser (both in the Python library), > BeautifulSoup (again GIYF) > > XML: xml.* in the Python library. ElementTree (recommended) is > included in Python 2.5; use xml.etree.cElementTree. > > The source of HTM

Re: Progress when parsing a large file with SAX

2007-02-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi there, > > I have a 28mb XML file which I parse with SAX. I have some processing > to do in the startElement / endElement callbacks, which slows the > parsing down to about 60 seconds on my machine. > > My application is unresponsive for this time, so I would like t

Question

2007-02-12 Thread Magdy Sanad
Dear Dr. I'm a Researcher from Cairo, Egypt. I installed the language programmer (Python) on my PC. I executed the following statements to read unformatted fortran data. I have the original program which I translate it to the Python language :

How to use SocketServer with IPv6

2007-02-12 Thread Tomi Hautakoski
Hello, I'm a Python newbie trying to figure out how to use SocketServer with IPv6. I would like to set up a TCPServer working like below but how to tell SocketServer I need to use AF_INET6? import SocketServer import logging as l l.basicConfig(level=l.DEBUG, format='%(asctime

Re: Newbie Question

2007-02-12 Thread [EMAIL PROTECTED]
On 9 fév, 14:06, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> will explain the rest > > > Delphi is a (dying) proprietary, MS-Windows-only[1] software relying > > on a low-level language. > > Well it may be dying, > but for the moment it beats Python with a factor of 10, > when it comes to user (th

Re: randomly generate n of each of two types

2007-02-12 Thread Alan Isaac
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >>> r = [x for x in test.random_types(10)] > >>> r > [False, False, False, False, False, False, False, False, False, False, > True, True, True, True, True, True, True, True, True, True] > > I think it needs a cast to a float: Mea culpa.

Formatting milliseconds to certain String

2007-02-12 Thread Deniz Dogan
Hello. I need help with a small problem I'm having. I want to make a function which takes an integer representing some time in milliseconds and returns the same time but formatted as "hours:minutes:seconds,milliseconds" with leading zeros whenever possible. E.g. I input 185804 to the function a

Re: string.replace non-ascii characters

2007-02-12 Thread Deniz Dogan
Duncan Booth wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in triplicate: > >> If I were paid for the number of lines *written* that would not be a >> great deal :) > > You don't by any chance get paid by the number of posts to c.l.python? I was thinking the same thing. -- http://mail

Re: Progress when parsing a large file with SAX

2007-02-12 Thread Anastasios Hatzis
Diez B. Roggisch wrote: ... I got the same problem with large XML as Marc. So you deserve also my thanks for the example. :-) > class PercentageFile(object): > >def __init__(self, filename): >self.size = os.stat(filename)[6] >self.delivered = 0 >self.f = file(filena

Re: Formatting milliseconds to certain String

2007-02-12 Thread Duncan Booth
Deniz Dogan <[EMAIL PROTECTED]> wrote: > I want to make a function which takes an integer representing some > time in milliseconds and returns the same time but formatted as > "hours:minutes:seconds,milliseconds" with leading zeros whenever > possible. > > E.g. I input 185804 to the function an

Re: Formatting milliseconds to certain String

2007-02-12 Thread Robin Becker
Deniz Dogan wrote: > Hello. > I need help with a small problem I'm having. > > I want to make a function which takes an integer representing some time > in milliseconds and returns the same time but formatted as > "hours:minutes:seconds,milliseconds" with leading zeros whenever possible. > > E.

Re: Formatting milliseconds to certain String

2007-02-12 Thread Laurent Pointal
Deniz Dogan a écrit : > Hello. > I need help with a small problem I'm having. > > I want to make a function which takes an integer representing some time > in milliseconds and returns the same time but formatted as > "hours:minutes:seconds,milliseconds" with leading zeros whenever possible. > > E

Re: Formatting milliseconds to certain String

2007-02-12 Thread John Machin
On Feb 12, 11:32 pm, Deniz Dogan <[EMAIL PROTECTED]> wrote: > Hello. > I need help with a small problem I'm having. > > I want to make a function which takes an integer representing some time > in milliseconds and returns the same time but formatted as > "hours:minutes:seconds,milliseconds" with le

Re: Progress when parsing a large file with SAX

2007-02-12 Thread Diez B. Roggisch
Anastasios Hatzis wrote: > Diez B. Roggisch wrote: > > ... > > I got the same problem with large XML as Marc. > > So you deserve also my thanks for the example. :-) > >> class PercentageFile(object): >> >>def __init__(self, filename): >>self.size = os.stat(filename)[6] >>s

WindowsNT user authentication

2007-02-12 Thread billie
Hi there, I would like to submit a username/password pair to a Windows NT workstation and find out if it's valid. Moreover I would like to get the user's home directory given the username. Does it is possible to do that by using pywin32 extension? Could someone point me in the right direction? B

Re: string.replace non-ascii characters

2007-02-12 Thread John Machin
On Feb 12, 11:44 pm, Deniz Dogan <[EMAIL PROTECTED]> wrote: > Duncan Booth wrote: > > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in triplicate: > > >> If I were paid for the number of lines *written* that would not be a > >> great deal :) > > > You don't by any chance get paid by the number of

Putting wxFrame on the second monitor

2007-02-12 Thread Michael Butscher
Hi, My software is written with wxPython. At some point it pops up a child- frame of the main frame. The child-frame gets a fixed position in constructor (maybe this is the problem). Now I got reports from users with dual monitor systems that this child- frame is always shown on the primary moni

Re: WindowsNT user authentication

2007-02-12 Thread Tim Golden
billie wrote: > Hi there, > I would like to submit a username/password pair to a Windows NT > workstation and find out if it's valid. > Moreover I would like to get the user's home directory given the > username. > Does it is possible to do that by using pywin32 extension? http://timgolden.me.uk/p

Re: Progress when parsing a large file with SAX

2007-02-12 Thread marc . omorain
On Feb 12, 1:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Anastasios Hatzis wrote: > > Diez B. Roggisch wrote: Thanks guys! I'll try it out later today and let you know how I get on. -- http://mail.python.org/mailman/listinfo/python-list

Re: standardized us address

2007-02-12 Thread Chris Mellon
On 2/11/07, mark <[EMAIL PROTECTED]> wrote: > Hi > Is there any python module that will convert address to standard US address > format: > for ex: > > 314 south chauncey avenue > > should be: > 314 s chauncey ave > > > thanks > mark > This isn't standardization, it's normalization. The USPS mainta

Re: Putting wxFrame on the second monitor

2007-02-12 Thread Chris Mellon
On 2/12/07, Michael Butscher <[EMAIL PROTECTED]> wrote: > Hi, > > My software is written with wxPython. At some point it pops up a child- > frame of the main frame. The child-frame gets a fixed position in > constructor (maybe this is the problem). > > Now I got reports from users with dual monitor

Re: favourite editor

2007-02-12 Thread Dick Moores
At 08:41 PM 2/10/2007, azrael wrote: >Since i'm new on this forum, and first time meeting a python comunity, >i wanted to ask you for your python editors. > >Im looking for some good python editor, with integrated run function, >without having to set it up manualy like komodo. >I found the pyscript

Re: interacting with shell - another newbie question

2007-02-12 Thread Hertha Steck
James Stroud schrieb: > > Yes, and finding ways to have employees pointlessly waste time is equal > to simply removing them. Not as long as they are paid for the wasted time. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython libraries never detected

2007-02-12 Thread Chris Mellon
On 10 Feb 2007 07:55:05 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, I recently started coding with Python and I've been trying for the > past hour or so to determine why, every time I "import wx" (or compile > another piece of code that imports wx), Python can never find the > librari

Re: Win98 - exceptions.IOError: (13, 'Permission denied')

2007-02-12 Thread Robert Dollinger
Ok, I have solved the problem. You have to set to something different than "Local System account" under properties of the service. bye Robert Robert Dollinger schrieb: > Hi to everyone, > > I have a Service, that runs on a WinXP machine. The service read a file > on a Win98 machine and write t

Re: Help with Optimization of Python software: real-time audio controller

2007-02-12 Thread Ross Ridge
Paul Rubin wrote: > I think you can't really do that, not just because of Python but also > as a result of using a multitasking OS that's not especially designed > for real time. You have to rely on some buffering in the audio > hardware, so you don't have to be sample-accurate with the timings.

Re: Help with Optimization of Python software: real-time audio controller

2007-02-12 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > As mentioned above, my application deals with music training. I have a > Tkinter GUI, which communicates via pyserial with an external device I > built myself. The code reads in a MIDI file and converts the song to > "output data " for the external device and the GUI,

Re: Help with Optimization of Python software: real-time audio controller

2007-02-12 Thread Jean-Paul Calderone
On 12 Feb 2007 06:21:39 -0800, Ross Ridge <[EMAIL PROTECTED]> wrote: > >Paul Rubin wrote: >> I think you can't really do that, not just because of Python but also >> as a result of using a multitasking OS that's not especially designed >> for real time. You have to rely on some buffering in the au

Re: New Pythin user looking foe some good examples to study

2007-02-12 Thread Matimus
I agree, the standard libraries are a good place to start. I learned a lot by looking at them, plus it has the added bonus that you learn the standard libraries. > I suspect them to be below usr/lib on linux. /usr/lib/python2.4 /usr/lib/python2.5 On Debian/Ubuntu anyway. -- http://mail.python.

Re: How to Speed Up Internet Searches??

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

Re: Newbie Question

2007-02-12 Thread Stef Mientki
[EMAIL PROTECTED] wrote: > On 9 fév, 14:06, Stef Mientki <[EMAIL PROTECTED]> wrote: will explain the rest >>> Delphi is a (dying) proprietary, MS-Windows-only[1] software relying >>> on a low-level language. >> Well it may be dying, >> but for the moment it beats Python with a factor of 10, >>

Re: Regular Expressions

2007-02-12 Thread Neil Cerutti
On 2007-02-10, Geoff Hill <[EMAIL PROTECTED]> wrote: > What's the way to go about learning Python's regular > expressions? I feel like such an idiot - being so strong in a > programming language but knowing nothing about RE. A great way to learn regular expressions is to implement them. -- Neil

Exception

2007-02-12 Thread Navid Parvini
Dear All, Would you please tell me if there is a pysignal or method that called when an exception is occurred? (I don't want to use "try" method) Thank you in advance. Navid - Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & D

Re: Newbie Question

2007-02-12 Thread Ed Leafe
On Feb 12, 2007, at 9:59 AM, Stef Mientki wrote: > but to be honest ... > ... I never even tried to write a GUI in Python, ... > ... just looked at others examples, > ... and still not seen what I can perform in Delphi ;-) You should definitely look at our product: Dabo. Both myself and m

Re: WindowsNT user authentication

2007-02-12 Thread billie
On 12 Feb, 14:45, Tim Golden <[EMAIL PROTECTED]> wrote: > billie wrote: > > Hi there, > > I would like to submit a username/password pair to a Windows NT > > workstation and find out if it's valid. > > Moreover I would like to get the user's home directory given the > > username. > > Does it is pos

Re: searching a list of lists as a two-dimensional array?

2007-02-12 Thread Neil Cerutti
On 2007-02-12, James Stroud <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: >> "agent-s" <[EMAIL PROTECTED]> writes: >>>Basically I'm programming a board game and I have to use a >>>list of lists to represent the board (a list of 8 lists with 8 >>>elements each). I have to search the adjacent cells

multiple inheritance of a dynamic list of classes?

2007-02-12 Thread devicerandom
Hi, I am currently using the Cmd module for a mixed cli+gui application. I am starting to refactor my code and it would be highly desirable if many commands could be built as simple plugins. My idea was: - Load a list of plugin names (i.e. from the config file, or from the plugins directory) - Im

Re: WindowsNT user authentication

2007-02-12 Thread Tim Golden
billie wrote: > Do you got any idea about how getting user's home directory? The answer to that is unfortunately slightly complicated, because Windows has no such thing as a "user's home directory" or, if you prefer, it has several such things. If you want, you can let Python make the decision,

Re: favourite editor

2007-02-12 Thread Larry Bates
azrael wrote: > Since i'm new on this forum, and first time meeting a python comunity, > i wanted to ask you for your python editors. > > Im looking for some good python editor, with integrated run function, > without having to set it up manualy like komodo. > I found the pyscripter, and it has al

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread Larry Bates
krishnakant Mane wrote: > hello all, > I am stuck with a strange requirement. > I need a library that can help me display a pdf file as a report and > also want a way to print the same pdf file in a platform independent > way. > if that's not possible then I at least need the code for useing some >

Re: New Pythin user looking foe some good examples to study

2007-02-12 Thread Larry Bates
Johnny Garcia wrote: > I have just discovered Python and am familiarizing myself with the syntax > but I have always found that code examples where the best way for me to > learn. > > > > Can anyone point me to a site with some good open source functioning python > applications? > > > > I

Re: Hacking in python

2007-02-12 Thread Gasten
On Feb 12, 1:18 am, [EMAIL PROTECTED] wrote: > On Feb 10, 5:25 pm, "Geoff Hill" <[EMAIL PROTECTED]> wrote: > > > The word "hack" can be known as a "smart/quick fix" to a problem. > > Giving the benefit of the doubt here, perhaps Enes Naci saw this > article:http://www.hetland.org/python/instant-hac

Re: multiple inheritance of a dynamic list of classes?

2007-02-12 Thread Peter Otten
[EMAIL PROTECTED] wrote: > I am currently using the Cmd module for a mixed cli+gui application. I > am starting to refactor my code and it would be highly desirable if > many commands could be built as simple plugins. > > My idea was: > - Load a list of plugin names (i.e. from the config file, or

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread Grant Edwards
On 2007-02-12, Larry Bates <[EMAIL PROTECTED]> wrote: >> I at least need the code for useing some library for >> connecting to acrobat reader and giving the print command on >> windows and some thing similar on ubuntu linux. > Just let the registered .PDF viewer do it for you. > > os.start('myfil

SQLObject 0.8.0

2007-02-12 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.8.0 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wi

Re: Regular Expressions

2007-02-12 Thread skip
dbl> The source of HTMLParser and xmllib use regular expressions for dbl> parsing out the data. htmllib calls sgmllib at the begining of it's dbl> code--sgmllib starts off with a bunch of regular expressions used dbl> to parse data. I am almost certain those modules use regular ex

Re: Newbie Question

2007-02-12 Thread Stef Mientki
Ed Leafe wrote: > On Feb 12, 2007, at 9:59 AM, Stef Mientki wrote: > >> but to be honest ... >> ... I never even tried to write a GUI in Python, ... >> ... just looked at others examples, >> ... and still not seen what I can perform in Delphi ;-) > > You should definitely look at our product:

Jython / Java / C / C++ interoperability

2007-02-12 Thread Charity
Hi all, I have a code base primarily written in Java. I would like to use Jython to "use" this code base. Everything is wonderful because Jython calls Java easily. However, there may be a time when I would like to call C/C++ from Jython. I can't do this directly, can I? Would I have to wrap

Re: Regular Expressions

2007-02-12 Thread Gabriel Genellina
En Mon, 12 Feb 2007 07:20:11 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > The source of HTMLParser and xmllib use regular expressions for > parsing out the data. htmllib calls sgmllib at the begining of it's > code--sgmllib starts off with a bunch of regular expressions used to > par

c++ for python programmers

2007-02-12 Thread Thomas Nelson
I realize I'm approaching this backwards from the direction most people go, but does anyone know of a good c/c++ introduction for python programmers? Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread krishnakant Mane
os.start does not work.. attribute error. regards. Krishnakant. -- http://mail.python.org/mailman/listinfo/python-list

Re: Jython / Java / C / C++ interoperability

2007-02-12 Thread Roman Yakovenko
On 12 Feb 2007 09:57:48 -0800, Charity <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a code base primarily written in Java. I would like to use > Jython to "use" this code base. Everything is wonderful because > Jython calls Java easily. > > However, there may be a time when I would like to cal

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread Larry Bates
Grant Edwards wrote: > On 2007-02-12, Larry Bates <[EMAIL PROTECTED]> wrote: > >>> I at least need the code for useing some library for >>> connecting to acrobat reader and giving the print command on >>> windows and some thing similar on ubuntu linux. > >> Just let the registered .PDF viewer do

Re: About getattr()

2007-02-12 Thread Duncan Booth
Leif K-Brooks <[EMAIL PROTECTED]> wrote: >> Why do I still need the getattr() func as below? >> > print getattr(os.path,"isdir").__doc__ >> Test whether a path is a directory > > You don't. Correct > getattr() is only useful when the attribute name is > determined at runtime. > getattr()

Re: c++ for python programmers

2007-02-12 Thread Maël Benjamin Mettler
SAMS "Teach yourself C in 21 days" by Bradley L. Jones and Peter Aitken Learning C++ is not worth is in my opinion, since you can get the OOP power from Python and use C if you need speed... Thomas Nelson schrieb: > I realize I'm approaching this backwards from the direction most > people go, but

Re: string.replace non-ascii characters

2007-02-12 Thread Gabriel Genellina
En Mon, 12 Feb 2007 07:44:14 -0300, Duncan Booth <[EMAIL PROTECTED]> escribió: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in triplicate: > >> If I were paid for the number of lines *written* that would not be a >> great deal :) > > You don't by any chance get paid by the number of posts to

Re: multiple inheritance of a dynamic list of classes?

2007-02-12 Thread devicerandom
> Most of the above should be straight-forward. I used type(cmd.Cmd)(name, > bases, classdict) instead of just type(name, bases, classdict) because > cmd.Cmd is a classic class. It seems it works. It is not so straight-forward to me because I don't know about new-style types and classes very well

Re: Exception

2007-02-12 Thread Gabriel Genellina
En Mon, 12 Feb 2007 10:37:52 -0300, Navid Parvini <[EMAIL PROTECTED]> escribió: > Would you please tell me if there is a pysignal or method that called > when an exception is occurred? No > (I don't want to use "try" method) Why not? -- Gabriel Genellina -- http://mail.python.org/mailm

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread Grant Edwards
On 2007-02-12, Larry Bates <[EMAIL PROTECTED]> wrote: > On 2007-02-12, Larry Bates <[EMAIL PROTECTED]> wrote: >> I at least need the code for useing some library for connecting to acrobat reader and giving the print command on windows and some thing similar on ubuntu linux. >> >>>

Re: Embedding, "import site", PYTHONHOME, and an old, old issue

2007-02-12 Thread Jim Hill
Gabriel Genellina wrote: >En Sat, 10 Feb 2007 03:57:05 -0300, Jim Hill <[EMAIL PROTECTED]> escribió: > >> int routine() { >> Py_Initialize(); >> ... >> } > >(Why routine() and not main()? Unfortunately you can't repeteadly >initialize/finalize the interpreter, you must do that only once.)

Re: standardized us address

2007-02-12 Thread John Nagle
Chris Mellon wrote: > On 2/11/07, mark <[EMAIL PROTECTED]> wrote: > >> Hi >> Is there any python module that will convert address to standard US >> address >> format: >> for ex: >> >> 314 south chauncey avenue >> >> should be: >> 314 s chauncey ave >> >> >> thanks >> mark >> > > This isn't stand

Zope 3 Boot Camp early bird registration deadline near

2007-02-12 Thread Chris Calloway
The early bird registration deadline for Camp 5 and the BBQ Sprint is Wednesday, February 14: http://trizpug.org/boot-camp/camp5/ You can save $50 by registering early. Registration ends Friday March 2. -- Sincerely, Chris Calloway http://www.seacoos.org office: 332 Chapman Hall phone: (919

Re: Newbie Question

2007-02-12 Thread Bjoern Schliessmann
Stef Mientki wrote: > - in Delphi the GUI design itself is done in a graphical > environment, making it much easier and faster RAD possible with Python, too. > - auto-scaling of components on a form is very easy (so if the > user changes form size ..) Just to name one library, wxPython can do

MIME-Version in interpart, Python MIMEMultipart

2007-02-12 Thread berb . web
list - using python's MIMEMultipart() object I've noticed that it interjects a 'MIME-Version' in the interpart header, like so... --some_MIME_Boundry Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit some_test Now, RFC1521, section 3 reads: Note

SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-12 Thread usenet1
I'm a newbie with hopefully an easy question. I'm trying to write some "C" code that will run a python script that can in turn call some "C" functions. However I'm having a problem getting started because although I can run a script from the python ide that imports ctypes, when I execute that 'im

post data using curl

2007-02-12 Thread elrondrules
hi need some help from the experts in this group as to how to do the following i have a http listener (A) that has subscribed to a process (B) and listening on a port.. now based on some command line arguments i need to send a xml file to the process B using curl.. is there a way to do this in p

Re: multiple inheritance of a dynamic list of classes?

2007-02-12 Thread Michele Simionato
On Feb 12, 4:48 pm, [EMAIL PROTECTED] wrote: > - is there a better way than using multiple inheritance to plug-in > dynamically commands in a Cmd command line? I had to solve the same problem recently, and I decided to avoid multiple inheritance by using delegation. My idea was to make the Cmd cla

Re: multiple inheritance of a dynamic list of classes?

2007-02-12 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hi, > > I am currently using the Cmd module for a mixed cli+gui application. I > am starting to refactor my code and it would be highly desirable if > many commands could be built as simple plugins. > > My idea was: > - Load a list of plugin names (i.e. from the config

Re: Generating pdf files in epydoc on Windows

2007-02-12 Thread Don Taylor
Duncan Smith wrote: > As I remember, LaTeX and ghostscript. Thanks. OK, I have these installed now, but apparently epydoc can't find them and I don't know how to teach it to find them. Error: latex failed: [Errno 2] The system cannot find the file specified epydoc does creates so

Re: favourite editor

2007-02-12 Thread azrael
I expirienced some big craches. tra running some aplication vith using Vpython. when you close the vpython window, pyscripter also crashes. sometimes im writing some code and suddenly get about 300 error messages without running anything. I like pyscripter, but sometimes it drives me crazy On Fe

Re: c++ for python programmers

2007-02-12 Thread [EMAIL PROTECTED]
Thomas Nelson wrote: > I realize I'm approaching this backwards from the direction most > people go, but does anyone know of a good c/c++ introduction for > python programmers? I would stick with C unless you need to edit C++ code. (Calling them C/C++ doesn't make much sense as they're separate l

Re: favourite editor

2007-02-12 Thread Gabriel Genellina
En Mon, 12 Feb 2007 16:11:23 -0300, azrael <[EMAIL PROTECTED]> escribió: > I expirienced some big craches. tra running some aplication vith using > Vpython. when you close the vpython window, pyscripter also crashes. > sometimes im writing some code and suddenly get about 300 error > messages wi

Re: c++ for python programmers

2007-02-12 Thread andrew clarke
On Mon, Feb 12, 2007 at 10:00:51AM -0800, Thomas Nelson wrote: > I realize I'm approaching this backwards from the direction most > people go, but does anyone know of a good c/c++ introduction for > python programmers? Thomas, I sent you a message off-list but it bounced due to your mailbox being

Re: favourite editor

2007-02-12 Thread Stef Mientki
azrael wrote: > I expirienced some big craches. tra running some aplication vith using > Vpython. when you close the vpython window, pyscripter also crashes. > sometimes im writing some code and suddenly get about 300 error > messages without running anything. I like pyscripter, but sometimes it >

Re: Newbie Question

2007-02-12 Thread Stef Mientki
Bjoern Schliessmann wrote: > Stef Mientki wrote: > >> - in Delphi the GUI design itself is done in a graphical >> environment, making it much easier and faster > > RAD possible with Python, too. > >> - auto-scaling of components on a form is very easy (so if the >> user changes form size ..) >

Gosper arithmetic in Python

2007-02-12 Thread Marcin Ciura
Hello, I hacked together a module implementing exact real arithmetic via lazily evaluated continued fractions. You can download it from http://www-zo.iinf.polsl.gliwice.pl/~mciura/software/cf.py an use as an almost drop-in replacement for the math module if you don't care too much about performanc

ANN: Pyro 3.6 beta released

2007-02-12 Thread Irmen de Jong
It is with great pleasure that I announce that the release of a beta version of Pyro 3.6-- the greatest Pyro release yet! "What is Pyro?" "Pyro is short for PYthon Remote Objects. It is an advanced and powerful Distributed Object Technology system written entirely in Python, that is designed to be

Re: How to Speed Up Internet Searches??

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

Re: irclib problems

2007-02-12 Thread David Boddie
On Sunday 11 February 2007 09:29, Tina I wrote: > I'm playing around with the 'irclib' library working with the first > example at > http://www.devshed.com/c/a/Python/IRC-on-a-Higher-Level-Concluded/ > > When copying the example verbatim and running it from a console it works > flawlessly. It con

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-12 Thread Klaas
On Feb 10, 5:59 am, Brian Blais <[EMAIL PROTECTED]> wrote: > Klaas wrote: > > I have converted our 100 kloc from 2.4 to 2.5. It was relatively > > painless, and 2.5 has features we couldn't live without. > > Just out of curiosity, what features in 2.5 can you not live without? I just > migrated t

Re: c++ for python programmers

2007-02-12 Thread Thomas Nelson
On Feb 12, 1:35 pm, andrew clarke <[EMAIL PROTECTED]> wrote: > Thomas, I sent you a message off-list but it bounced due to your mailbox > being full. > > Short answer: Subscribe to the c-prog@yahoogroups.com mailing list and > ask your C/C++ questions there. > > Regards > Andrew I have to edit a

Re: Help with Optimization of Python software: real-time audio controller

2007-02-12 Thread Klaas
On Feb 11, 6:40 pm, [EMAIL PROTECTED] wrote: > Currently, I have all of the above "working", although I'm running > into some serious timing issues. When I run the program, I get > irregular timing for my metronome (if it sounds at all), as well as > irregular timing in writing to the external dev

Re: SystemError: _PyImport_FixupExtension: module _types not loaded

2007-02-12 Thread Gabriel Genellina
En Mon, 12 Feb 2007 15:44:36 -0300, <[EMAIL PROTECTED]> escribió: > I'm trying to write some "C" code that will run a python script that > can in turn call some "C" functions. However I'm having a problem > getting started because although I can run a script from the python > ide that imports cty

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread Patricio Olivares
On Feb 12, 3:06 pm, "krishnakant Mane" <[EMAIL PROTECTED]> wrote: > os.start does not work.. attribute error. > regards. > Krishnakant. It's os.system('thefile') or os.system('start thefile') but that's windows only. It seems like there's no platform-independent way to launch a preferred applica

star_new_thread

2007-02-12 Thread worlman385
please take a look at my code (short version) http://chiu424.hypermart.net/code5.py.txt I write a instant messaging app over bluetooth My code will send / receive data from a bluetooth socket (same concept TCP socket) at the same time The code has infinite loop poll for and send data to the sock

'File name' is not recognized as an internal or external command, operable program

2007-02-12 Thread Roger A. Wehage
Here it is-nearly four and a half years since Mike Henley posted 'File name' is not recognized as an internal or external command, operable program-and the problem still persists. Some weeks ago I installed ActiveState 8.3.5.0 on Windows XP and many things stopped working. Like Mike, I struggled to

Re: Vim scripting with python

2007-02-12 Thread J. Clifford Dyer
Stuart D. Gathman wrote: > On Sat, 03 Feb 2007 05:02:54 -0800, Tool69 wrote: > >> Does anyone have any advice, and more genraly how to script Vim with >> Python ? > > :py import sys > :py print sys.version > :help :py > >> I know I can put some python functions inside my vimrc file like >> this

Does anyone have the db_row module compiled for python 2.4 on windows?

2007-02-12 Thread vj
Would really appreciate the binary files for the db_row. Thanks, VJ -- http://mail.python.org/mailman/listinfo/python-list

Re: can't find a way to display and print pdf through python.

2007-02-12 Thread Larry Bates
Grant Edwards wrote: > On 2007-02-12, Larry Bates <[EMAIL PROTECTED]> wrote: >> On 2007-02-12, Larry Bates <[EMAIL PROTECTED]> wrote: > I at least need the code for useing some library for > connecting to acrobat reader and giving the print command on > windows and some thing similar on

Re: Does anyone have the db_row module compiled for python 2.4 on windows?

2007-02-12 Thread Larry Bates
vj wrote: > Would really appreciate the binary files for the db_row. > > Thanks, > > VJ > If you don't get an answer you may want to take a look at replacing with SQLObject: http://sqlobject.org/ -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Vim scripting with python

2007-02-12 Thread Neil Cerutti
On 2007-02-12, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > Stuart D. Gathman wrote: >> On Sat, 03 Feb 2007 05:02:54 -0800, Tool69 wrote: >> Use :py inside your vimrc - don't run python externally. > > Which versions of vim is this valid for? I tried ":py print > 'Hello'", and got "E319: Sorry, t

  1   2   >