Re: Loading module via full path

2006-08-21 Thread Andre Poenitz
Andre Poenitz <[EMAIL PROTECTED]> wrote: > Hi all. > > Is there a way to load a module given a full path to the module > without extending sys.path first? Ok. imp.find_module() and imp.load_module() seem to do what I need. Andre' -- http://mail.python.org/mailman/listinfo/python-list

Re: How to decode a string

2006-08-21 Thread Lad
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Lad wrote: > > > The text is from Mysql table field that uses utf8_czech_ci collation, > > but when I try > > `RealName`.decode('utf8'),where RealName is that field of MySQL > > > > I will get: > > UnicodeDecodeError: 'ascii' codec can't d

Re: Python for EXIF-info-additions ?

2006-08-21 Thread BrJohan
Bruno Dilly wrote: > I think you can find what do you need into this repository, it's a > creative commons tool: > https://svn.berlios.de/svnroot/repos/cctools/publisher/branches/flickr-storage-branch/ > > take a look in the follow directory: > ccpublisher/jpeg/ > > I'm not sure if it's what you w

Re: how do you get the name of a dictionary?

2006-08-21 Thread Fredrik Lundh
jojoba wrote: > im quite surprised at the arrogance laid out by some of the above > posters: > > However, does it not seem reasonable to ask python: > > Given a dicitionary, Banana = {} > return one or more strings, > where each string is the name(s) of the reference(s) to Banana. > > why is th

Re: sum and strings

2006-08-21 Thread Fredrik Lundh
Steven D'Aprano wrote: >> and what exactly does the fact that Python can do operator-based >> dispatch much faster than it can do method-based dispatch have to >> do with sum's inability to add strings ? > > Sorry, I don't get you here. Are you saying that string addition doesn't > call the oper

Re: idutils and Python

2006-08-21 Thread [EMAIL PROTECTED]
Ramon Diaz-Uriarte wrote: > Dear All, > > Has anybody tried to use ID Utils > (http://www.gnu.org/software/idutils/46) with Python? What exactly are you trying to accomplish? If you want to index function/class names, variables, etc then you should take a look at "exuberant ctags" http://ctags.so

Re: how do you get the name of a dictionary?

2006-08-21 Thread [EMAIL PROTECTED]
jojoba wrote: > However, does it not seem reasonable to ask python: > > Given a dicitionary, Banana = {} > return one or more strings, > where each string is the name(s) of the reference(s) to Banana. No, it doesn't. It'd be like having an open file descriptor in C and then asking what filename(s

Re: exception handling; python program that interacts with postgresql db

2006-08-21 Thread damacy
oh, fixed when i set isolation level to 0. thanks anyway! damacy wrote: > thanks. i started to use psycopg. > > however, i have this error message and i don't quite get what it means. > > it says "DROP DATABASE cannot run inside a transaction block". > > does anyone have a clue? > > Tim Roberts wr

Re: What would be the best way to run python client in the background

2006-08-21 Thread gel
Tim Golden wrote: > | Tim Golden wrote: > | > | > [gel] > | > > | > | I have written a python client server app [...] > | > | I want to run the client end of the app more or less invisibly > | > | (no console) on the XP clients when ever a users logs on. > > [Tim G] > | > The normal way is to run

Re: how do you get the name of a dictionary?

2006-08-21 Thread Steven D'Aprano
On Mon, 21 Aug 2006 20:53:38 -0700, jojoba wrote: > However, regarding your comment about the phone book, I have a > question: > You say: > >> If you know a person's name, you can look up their number in the phone >> book easily. If you know their phone number, it is much, much harder to >> look

Re: Search or compai problem

2006-08-21 Thread Gabriel Genellina
At Saturday 19/8/2006 23:43, [EMAIL PROTECTED] wrote: > >it is really lstusers (it is an L not a # 1), Some of the output from > >print lstUsers has the output of None. I and trying to filter the None > >out of the list. I come from a perl background and this is how I do > >thing in perl > >

Re: how do you get the name of a dictionary?

2006-08-21 Thread Patrick Maupin
jojoba wrote: > hello > > im quite surprised at the arrogance laid out by some of the above > posters: > > However, does it not seem reasonable to ask python: > > Given a dicitionary, Banana = {} > return one or more strings, > where each string is the name(s) of the reference(s) to Banana. > > wh

Re: text editor suggestion?

2006-08-21 Thread Ravi Teja
> I also just started using Scite, and I really like it, except I find its > syntax highlighting to be very inflexible. You aren't able to define > your own groups of words -- you have to use what's given, basically. One > thing I like about UltraEdit is that you simply define as many groups of > k

Re: how do you get the name of a dictionary?

2006-08-21 Thread jojoba
Hello Thanks Steven for laying out some interesting and compelling points. I concede that my use of this would-be dictionary-name-asking is for the most part useless (i am making a dictionary-editor-viewer in python, and i would like to also be able to display the name of the dictionary at the top

Re: how do you get the name of a dictionary?

2006-08-21 Thread BartlebyScrivener
>> im quite surprised at the arrogance laid >> out by some of the above Oh, nobody is being arrogant. They're having fun while answering your question. Most remember having the same question, or at least making the same discovery after careful reading. rd -- http://mail.python.org/mailman/listi

Re: Python Editor with Autocorrection

2006-08-21 Thread Ravi Teja
Laurentiu wrote: > hello! > > > i am searching for a free python editor with > autocorrection capabillities. > > for example:" the wrong setfocus() call to become > SetFocus(), etc." > > > thanks Python is a dynamic language, which means that methods that may not exist in your source code may spr

Re: exception handling; python program that interacts with postgresql db

2006-08-21 Thread damacy
thanks. i started to use psycopg. however, i have this error message and i don't quite get what it means. it says "DROP DATABASE cannot run inside a transaction block". does anyone have a clue? Tim Roberts wrote: > "damacy" <[EMAIL PROTECTED]> wrote: > > >hi, there. i have this question which m

Re: What would be the best way to run python client in the background

2006-08-21 Thread Ravi Teja
> The reason for the a seperate persistant check is because it will be > used to enable software to be installed in whole lab of PCs but only > allow a predifined number to run the software at any time one time. > And then when a user stop using the software a licence will become > available to for

The most powerful computer security tools

2006-08-21 Thread firmly888
DiskNumen: www.FirmlySoft.com DiskNumen, the most powerful computer security tool, will make everything intact after your reboot even if there are Virus, Hacker, Rascal software, error operation or even your purposive breakage. Your computer can be prevented from any attack by DiskNume

Re: how do you get the name of a dictionary?

2006-08-21 Thread Steven D'Aprano
On Mon, 21 Aug 2006 16:59:30 -0700, jojoba wrote: > hello > > im quite surprised at the arrogance laid out by some of the above > posters: > > However, does it not seem reasonable to ask python: > > Given a dicitionary, Banana = {} > return one or more strings, > where each string is the name(s

Re: sum and strings

2006-08-21 Thread Steven D'Aprano
On Mon, 21 Aug 2006 12:55:14 +0200, Fredrik Lundh wrote: > Steven D'Aprano wrote: > >> That's a nonsense argument. There is no shortage of slow algorithms, and >> some of them are built into Python. When did O(n**2) become an error >> condition? And overhead matters: if I'm only doing a few conca

Re: text editor suggestion?

2006-08-21 Thread jussij
John Salerno wrote: > The thing I liked about UltraEdit is that you can define your own > groups of words and put whatever words you want in there, so my > file had a group called '__builtins__' and it listed all the Python > built-in methods, and those would be highlighted. Most editors I > see d

Re: What would be the best way to run python client in the background

2006-08-21 Thread gel
Tim Golden wrote: > | > [gel] > | > > | > | I have written a python client server app [...] > | > | I want to run the client end of the app more or less invisibly > | > | (no console) on the XP clients when ever a users logs on. > > While this isn't answering the question you first > asked, might

Re: Problem of function calls from map()

2006-08-21 Thread Dasn
Thanks for your reply. Well, please drop a glance at my current profile report: # test.py - import os, sys, profile print os.uname() print sys.version # size of 'dict.txt' is about 3.6M, 154563 lines f = open('dict.txt', 'r') print "Reading lines..."

Re: how do you get the name of a dictionary?

2006-08-21 Thread jojoba
addendum: when asking python for the name of a dictionary, it shold return ONE, MANY, or NO strings thanks, jojoba -- http://mail.python.org/mailman/listinfo/python-list

idutils and Python

2006-08-21 Thread Ramon Diaz-Uriarte
Dear All, Has anybody tried to use ID Utils (http://www.gnu.org/software/idutils/46) with Python? I've googled, searched the mailing list, and have found nothing. A silly, simple use of IDUtils with Python code does work, using a language map that says *.py files are text files. But I am wonderi

Re: how do you get the name of a dictionary?

2006-08-21 Thread jojoba
hello im quite surprised at the arrogance laid out by some of the above posters: However, does it not seem reasonable to ask python: Given a dicitionary, Banana = {} return one or more strings, where each string is the name(s) of the reference(s) to Banana. why is this not sane?!?! what am i mi

https on ActiveState Python 2.4?

2006-08-21 Thread Jack
I'm trying to use urllib to retrieve an https page but I am getting an "unknown url type: https" It seems that ActiveState Python doesn't have SSL support. Any advice? -- http://mail.python.org/mailman/listinfo/python-list

Re: Unclear on argument passing to "sendmail'

2006-08-21 Thread Tim Williams
On 21/08/06, Tim Williams <[EMAIL PROTECTED]> wrote: > On 21/08/06, John Draper <[EMAIL PROTECTED]> wrote: Sorry, there's an indentation error here except smtplib.SMTPRecipientsRefused, x : #all recips failed for recip in x.recipients: print recip server.quit() break it

Re: Unclear on argument passing to "sendmail'

2006-08-21 Thread Tim Williams
On 21/08/06, John Draper <[EMAIL PROTECTED]> wrote: > In "smtplib" module, the "sendmail" method of function is to be passed > host, but it is the Domain name > for the SMTP Server as gotten from the "dig" command? IE: dig -tMX > would give me the SMTP > server. In my code I have: > > try:

Re: Py_BuildValue("I", ...) does not work

2006-08-21 Thread Martin Kulas
Nick Craig-Wood wrote: > I tried your examples under linux. > > It fails under python 2.3 in the same fashion as you noted, but works > under 2.4. > > On my system (debian/testing) I have python 2.4.4c0 installed. I was running Python 2.4.2 -- this was the problem! After Installing 2.4.3 Py_BuildV

Re: Add users to directory/folder and set permissions in Windows

2006-08-21 Thread Adam Jones
Gallagher, Tim (NE) wrote: > I was wondering if there was a way to add a user in active directory to > a folder and set the permissions. It should be possible. If you can use VBScript or JScript it will be easier to find resources for those. You will probably need, at the least, the win32 extensi

Re: Regular Expression question

2006-08-21 Thread stevebread
Hi, thanks everyone for the information! Still going through it :) The reason I did not match on tag2 in my original expression (and I apologize because I should have mentioned this before) is that other tags could also have an attribute with the value of "adj__" and the attribute name may not be

Unclear on argument passing to "sendmail'

2006-08-21 Thread John Draper
In "smtplib" module, the "sendmail" method of function is to be passed a host, but it is the Domain name for the SMTP Server as gotten from the "dig" command? IE: dig -tMX would give me the SMTP server. In my code I have: try: print "Sending message to host: %s" % mailHost server=s

Re: What do you want in a new web framework?

2006-08-21 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: > hardemr wrote: > >> I've just read all of the answers. Most of yours said that there are >> many web frameworks ,so it is nonsense to make a new web framework in >> python. > > Hardemr, I like Ajacksu's answer, with a twist. Please concnentrate on > writing a Visual Stu

Re: text editor suggestion?

2006-08-21 Thread cga2000
On Mon, Aug 21, 2006 at 07:59:49AM EDT, Roberto Bonvallet wrote: > John Salerno wrote: > > I'd really like to learn vim, but I spent days just trying to figure out > > how to get the syntax highlighting and indentation working, where these > > settings are and how to edit them, and it still doesn

Re: Problem installing Python 2.4.3 on FreeBSD 5.3-RELEASE-p31

2006-08-21 Thread jamesuh
jamesuh wrote: > Martin v. Löwis wrote: > > [EMAIL PROTECTED] schrieb: > > > I assume this is related to the configure warning... ? Same error with > > > just a standard "./configure" and "make". > > > > > > Any help would be great :) > > > > If you don't need the curses module, go on with the in

Re: The decentralized nature of the Python community is driving me crazy

2006-08-21 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > So, I guess this is my way of letting you know how lost I feel about > this de-centralized community. Dont get me wrong. I'm glad to be part > but I was thinking it would be nice if there were a one-stop-shop for > all my chat and wares needs. But for now, I guess I

Re: Problem installing Python 2.4.3 on FreeBSD 5.3-RELEASE-p31

2006-08-21 Thread jamesuh
Martin v. Löwis wrote: > [EMAIL PROTECTED] schrieb: > > I assume this is related to the configure warning... ? Same error with > > just a standard "./configure" and "make". > > > > Any help would be great :) > > If you don't need the curses module, go on with the installation. > It's a known bug

Re: Mailman - Sendmail problem

2006-08-21 Thread swangdb
Okay, I removed the "DELIVERY_MODULE = 'Sendmail`" line from mm_cfg.py and used the default "DELIVERY_MODULE = 'SMTPDirect'" and it now it worked, I sent a message to the mailing list and received a copy. This was probably right in front of me the whole time. swangdb wrote: > I have a Sun Server

Re: List Splitting

2006-08-21 Thread Neil Cerutti
On 2006-08-21, Steven <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I'm trying to work through a bit of a logic issue I'm having with a > script I'm writing. Essentially, I have a list that's returned to > me from another command that I need to regroup based on some aribitrary > length. > > For

Re: The decentralized nature of the Python community is driving me crazy

2006-08-21 Thread John J. Lee
"Mike Orr" <[EMAIL PROTECTED]> writes: [...] > several attempts to build a Python one or a multilingual one. The > Cheeseshop and easy_install are the most successful attempts. There's > a project aimed at integrating easy_install into Python itself, but > with the technical and compatibility iss

Re: List Splitting

2006-08-21 Thread Brendon Towle
Not the most elegant solution, perhaps, but:>>>t = [ "a", "b", "c", "n", "a", "a", "t", "t", "t" ]>>>outlist = []>>>for x in range(3):...    temp=[]...    for y in range(len(t)/3):...        temp.append(t[3*y+x])...    outlist.append(temp)>>>outlist[['a', 'n', 't'], ['b', 'a', 't'], ['c', 'a', 't']

Re: List splitting

2006-08-21 Thread Steven
Klaus Alexander Seistrup wrote: > >>> t = [ "a", "b", "c", "n", "a", "a", "t", "t", "t" ] > >>> [t[i::3] for i in range(3)] > [['a', 'n', 't'], ['b', 'a', 't'], ['c', 'a', 't']] Klaus, Thanks for the fast reply! Had I taken the time to look at the list-type docs (which I did to understand how yo

Re: Python Editor with Autocorrection

2006-08-21 Thread John J. Lee
Laurentiu <[EMAIL PROTECTED]> writes: > i am searching for a free python editor with > autocorrection capabillities. > > for example:" the wrong setfocus() call to become > SetFocus(), etc." Perhaps not quite what you were looking for, but emacs' dabbrev-expand works well for avoiding mistyped P

Re: List Splitting

2006-08-21 Thread Bill Pursell
Steven wrote: > Hello everyone, > > I'm trying to work through a bit of a logic issue I'm having with a > script I'm writing. Essentially, I have a list that's returned to > me from another command that I need to regroup based on some aribitrary > length. > > For the purposes of this question, the

Re: List Splitting

2006-08-21 Thread Tim Chase
> For the purposes of this question, the list will be: > > t = [ "a", "b", "c", "n", "a", "a", "t", "t", "t" ] > > Now, I know that every 3rd element of the list belongs together: > > Group 1 = 0, 3, 6 > Group 2 = 1, 4, 7 > Group 3 = 2, 5, 8 > > I'm trying to sort this list out so that I get a

Re: Mailman - Sendmail problem

2006-08-21 Thread skip
>> I am trying to get Mailman to work on this server and so far, no luck. ... >> assert 0, 'Use of the Sendmail.py delivery module is highly >> discouraged' >> AssertionError: Use of the Sendmail.py delivery module is highly >> discouraged >> *** At the python leve

Re: List splitting

2006-08-21 Thread Klaus Alexander Seistrup
Steven skrev: > For the purposes of this question, the list will be: > > t = [ "a", "b", "c", "n", "a", "a", "t", "t", "t" ] > > Now, I know that every 3rd element of the list belongs together: > > Group 1 = 0, 3, 6 > Group 2 = 1, 4, 7 > Group 3 = 2, 5, 8 > > I'm trying to sort this list out so th

List Splitting

2006-08-21 Thread Steven
Hello everyone, I'm trying to work through a bit of a logic issue I'm having with a script I'm writing. Essentially, I have a list that's returned to me from another command that I need to regroup based on some aribitrary length. For the purposes of this question, the list will be: t = [ "a", "b

Re: Mailman - Sendmail problem

2006-08-21 Thread Taylor, Grant
swangdb wrote: > I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have > Majordomo and Listproc installed on this server and they work. I have > several production majordomo and listproc mailing lists installed on > this server and they work. Shesh. That's just a few mailing list m

Re: More List Comparison Help

2006-08-21 Thread Bucco
Nevermind. I found my own error. I referenced the input values instead of the class object self. That is what I get for staring at the code too long. Thanks:) SA -- http://mail.python.org/mailman/listinfo/python-list

More List Comparison Help

2006-08-21 Thread Bucco
I have taken into advice what was mentioned earlier, but I have run into a snag in which I am getting the wrong output from my class. > python matchlist.py ./test ./test/list.txt output: ['list.txt', 'test1.txt', 'test2.txt'] set(['test1']) ['', '/', 't', 'e', 's', 't'] The first line of output c

Add users to directory/folder and set permissions in Windows

2006-08-21 Thread Gallagher, Tim (NE)
I was wondering if there was a way to add a user in active directory to a folder and set the permissions. Thanks, Tim Timothy F. Gallagher CSC Systems Engineer -- http://mail.python.org/mailman/listinfo/python-list

Mailman - Sendmail problem

2006-08-21 Thread swangdb
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have Majordomo and Listproc installed on this server and they work. I have several production majordomo and listproc mailing lists installed on this server and they work. I am trying to get Mailman to work on this server and so far, n

Re: sum and strings

2006-08-21 Thread Paddy
Carl Banks wrote: > > and, you know, if you really want to concatenate strings with sum, you > can > > class noopadd(object): > def __add__(self,other): > return other > > sum(["abc","def","ghi"],noopadd()) ;-) - Pad. -- http://mail.python.org/mailman/listinfo/python-list

urllib question

2006-08-21 Thread [EMAIL PROTECTED] Hunter Rojas
how can I retrieve a web page using an authenticated proxy? -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect current virtual desktop

2006-08-21 Thread Maciej Bliziński
On Mon, 21 Aug 2006 12:52:59 +0200, Harald Karner wrote: > Maciej Bliziński wrote: >> How to detect current virtual desktop in GNOME? How to detect a virtual >> desktop change? >> > Take a look at http://wallpapoz.sourceforge.net/ Harald, many thanks. By the way, I have found the line of code I

Re: What do you want in a new web framework?

2006-08-21 Thread UrsusMaximus
hardemr wrote: > I've just read all of the answers. Most of yours said that there are > many web frameworks ,so it is nonsense to make a new web framework in > python. Hardemr, I like Ajacksu's answer, with a twist. Please concnentrate on writing a Visual Studio-like gui designer, and make it pos

Re: a bug in list.remove?

2006-08-21 Thread Dieter Maurer
Astan Chee <[EMAIL PROTECTED]> writes on Sat, 19 Aug 2006 03:34:26 +1000: > >>> for p in ps: > if p in qs: > ps.remove(p) You are modifying an object ("ps") while you iterate over it. This is a receipe for surprises... The standard idiom is to iterate over a copy rather than the obje

Re: text editor suggestion?

2006-08-21 Thread [EMAIL PROTECTED]
John Salerno wrote: > Sybren Stuvel wrote: > > John Salerno enlightened us with: > >> But what about customizing syntax coloring? Is this also in the same > >> file? I've noticed a separate file called python.vim (in Windows, > >> this file exists in a 'syntax' folder, and also another file of the

Re: Disable close button in management window.(KDE- pyQT)

2006-08-21 Thread David Boddie
Gabriel - BR wrote: > HI, > I am talking about the close button "X", that appears when I execute > my application (pyQt), in kde. Initially, I thought this might be possible with PyQt, just by setting the appropriate window flags when you create a widget, or with the setWFlags() method afterwards:

Re: How to decode a string

2006-08-21 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Lad wrote: > The text is from Mysql table field that uses utf8_czech_ci collation, > but when I try > `RealName`.decode('utf8'),where RealName is that field of MySQL > > I will get: > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: > ordinal > not

Re: sum and strings

2006-08-21 Thread Carl Banks
Steven D'Aprano wrote: >But I think it is a shame that sum() does a > special type-check to avoid something which is only sometimes slow. It > doesn't protect against O(n**2) performance; it merely protects against > just one of an infinite number of possible "traps for the unwary". I'm not so sur

Re: What do you want in a new web framework?

2006-08-21 Thread ajaksu
Hello Emrah :) I'd love to have a good framework with focus on static-content. Something simple and useful like rest2web (http://www.voidspace.org.uk/python/rest2web/) that could parse some of the many templates available and output nice (X)HTML+CSS. Bundle a simple GUI and you have something very

Re: Create a Multilanguage PDF in Python

2006-08-21 Thread Diez B. Roggisch
Perseo wrote: > I can't upload in the PYTHONPATH but in a normal folder of our site. > Exist another way to do it? PYTHONPATH is an environment variable. You can set it to arbitrary paths, and python will look for module there, too. Or you modify sys.path before you try the import. Diez -- http

Newbie question for SWIG wrapping

2006-08-21 Thread Gheorghe Postelnicu
Hi, I just discovered Python and I find it much better than Tcl, so I am porting some code in Python. I have a question regarding some data passing from Python to a Cpp module. Sorry, my question must really be trivial. I have a module which I wrap using SWIG, so it gives: %module Laplace %{ ex

Fwd: Re: Cannot remove this program from my computer

2006-08-21 Thread ERNEST SMITH
Note: forwarded message attached.--- Begin Message --- Please send to the correct address: [EMAIL PROTECTED] On 08/14/2006 08:21 AM, ERNEST SMITH wrote: > Everytime I try to remove this Python program from my Add or Remove > Program List, the error comes up saying could not open INSTALL.Log > File

f2py on windows XP - "Unknown Switch"??

2006-08-21 Thread Sile
Hello, I'm trying to get f2py working from the command line on windows XP. I have mingw32 as my C complier (after some advice on a previous thread) and Compaq Visual Fortran 6.5. Changing my C complier reduced my errors but I'm still having trouble. I think I have all the correct paths set but I'm

Re: Problem of function calls from map()

2006-08-21 Thread Paul McGuire
>>tmp is the function that split will call once per list item should be tmp is the function that *map* will call once per list item -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: text editor suggestion?

2006-08-21 Thread John Salerno
Sybren Stuvel wrote: > John Salerno enlightened us with: >> But what about customizing syntax coloring? Is this also in the same >> file? I've noticed a separate file called python.vim (in Windows, >> this file exists in a 'syntax' folder, and also another file of the >> same name in an 'indent' fo

Re: Problem of function calls from map()

2006-08-21 Thread Paul McGuire
"Dasn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi, there. > > 'lines' is a large list of strings each of which is seperated by '\t' > >>> lines = ['bla\tbla\tblah', 'bh\tb\tb', ... ] > > I wanna split each string into a list. For speed, using map() instead > of 'for' loop.

Re: How to decode a string

2006-08-21 Thread Lad
Fredrik Lundh wrote: > Lad wrote: > > > To be able to decode a string successfully, I need to know what coding > > it is in. > > ask whoever provided the string. > > > The string can be coded in utf8 or in windows-1250 or in another > > coding. Is there a method how to find out the string coding.

wxPython getPosition() limit

2006-08-21 Thread mardif
Hi, I've this big problem: I've an wx.ScrolledWindow object, which contains element. These elements have the event OnPaint that draw itself same objects. For drawing, each element call the method GetPosition(), which returns a tuple int. But, if I have the element 5000 that it must be design

wxPython getPosition() limit

2006-08-21 Thread mardif
Hi, I've this big problem: I've an wx.ScrolledWindow object, which contains element. These elements have the event OnPaint that draw itself same objects. For drawing, each element call the method GetPosition(), which returns a tuple int. But, if I have the element 5000 that it must be design

Re: Loading module via full path

2006-08-21 Thread Gary Herron
Andre Poenitz wrote: > Hi all. > > Is there a way to load a module given a full path to the module > without extending sys.path first? > > Andre' > > The standard module named "imp" can help you with this. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Need advice on how to improve this function

2006-08-21 Thread Fredrik Lundh
Matthew Wilson wrote: > I'd like to know ways to make it better (more efficient, able to deal > with enormous-size arguments, etc). How would I write this as a > generator? what makes you think that a generator would be the right tool for this task? what's the use case? (btw, generating "enor

Re: Python Syntax Highlighting Module

2006-08-21 Thread gene tani
[EMAIL PROTECTED] wrote: > Hello, > I have an idea for a project which involves an editor that supports > syntax highlighting. This would be for any language, particularly php, > html, css, etc. I would like to write this program using python. It > would only make sense to base this upon existi

Re: What do you want in a new web framework?

2006-08-21 Thread hardemr
Hello Everyone, I've just read all of the answers. Most of yours said that there are many web frameworks ,so it is nonsense to make a new web framework in python. Now I'm using and testing all of the frameworks in python also asp.net, jsp and java servlet, perl web frameworks and ruby on rails.

Re: uploading files to file system/zipping/downloading problems

2006-08-21 Thread Larry Bates
OriginalBrownster wrote: > I am currently uploading a file from a users computer to the file > system on my server using python, just reading the file and writing the > binaries. > > total_data=' ' > while True: > data = upload_file.file.read(8192) > if not

Re: Python Syntax Highlighting Module

2006-08-21 Thread Brian Quinlan
[EMAIL PROTECTED] wrote: > Hello, > I have an idea for a project which involves an editor that supports > syntax highlighting. This would be for any language, particularly php, > html, css, etc. I would like to write this program using python. It > would only make sense to base this upon existin

Re: Need advice on how to improve this function

2006-08-21 Thread Larry Bates
Matthew Wilson wrote: > I wrote a function that converts a tuple of tuples into html. For > example: > > In [9]: x > Out[9]: > ('html', > ('head', ('title', 'this is the title!')), > ('body', > ('h1', 'this is the header!'), > ('p', 'paragraph one is boring.'), >

Re: Create a Multilanguage PDF in Python

2006-08-21 Thread Perseo
I can't upload in the PYTHONPATH but in a normal folder of our site. Exist another way to do it? Thanks Rob Wolfe wrote: > Perseo wrote: > > Hi again, > > > > WORKS!!! I download all I need as python + reportlab. Only 2 questions: > > > > 1. I need all of this package? because it is 6Mb! > > I'm a

Python Syntax Highlighting Module

2006-08-21 Thread frikker
Hello, I have an idea for a project which involves an editor that supports syntax highlighting. This would be for any language, particularly php, html, css, etc. I would like to write this program using python. It would only make sense to base this upon existing open source code. My question is

Re: Re:

2006-08-21 Thread Perseo
Hi Keith Perkins Yes of course but we are looking for a developer who help us too. Keith Perkins wrote: > wrote: > > Hi guys, > > > > we are looking for a python developer for a European project. This > > project is multilangual and free it is called EuroCv and it need a > > module for exporting d

Re: Dynamic RadioButton creation with Python + Qt

2006-08-21 Thread Wagner Garcia Campagner
Thanks Fredrik, Your suggestion solved my problems! Thanks, Wagner. >From: Fredrik Lundh <[EMAIL PROTECTED]> >To: python-list@python.org >Subject: Re: Dynamic RadioButton creation with Python + Qt >Date: Mon, 21 Aug 2006 16:20:09 +0200 > >Wagner Garcia Campagner wrote: > > > I'm trying

Re: How to decode a string

2006-08-21 Thread Fredrik Lundh
Lad wrote: > To be able to decode a string successfully, I need to know what coding > it is in. ask whoever provided the string. > The string can be coded in utf8 or in windows-1250 or in another > coding. Is there a method how to find out the string coding. in general, no. if you have enough

Re: istep() addition to itertool? (Was: Re: Printing n elements per line in a list)

2006-08-21 Thread Neil Cerutti
On 2006-08-19, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > unexpected wrote: >> If have a list from 1 to 100, what's the easiest, most elegant >> way to print them out, so that there are only n elements per >> line. > > I've run into this problem a few times, and although many > solutions have been

Re: Problem of function calls from map()

2006-08-21 Thread Diez B. Roggisch
Dasn wrote: > > Hi, there. > > 'lines' is a large list of strings each of which is seperated by '\t' lines = ['bla\tbla\tblah', 'bh\tb\tb', ... ] > > I wanna split each string into a list. For speed, using map() instead > of 'for' loop. 'map(str.split, lines)' works fine , but... > when I

Re: Modules... paths... newbie confusion

2006-08-21 Thread Sibylle Koczian
MrBlueSky schrieb: > I wonder if someone could clarify how Python "knows" where modules are > - or at least point to some documentation that might help me? Here's > what I've been trying: > > I've installed Python 2.4 Windows, and have also installed tkinter, > pmw, cx_Oracle, mssql and pytz (phe

Re: Regular Expression question

2006-08-21 Thread Rob Wolfe
[EMAIL PROTECTED] wrote: > got zero results on this one :) Really? >>> s = ''' ''' >>> pat = re.compile('tag1.+?name="(.+?)".*?(?:<)(?=tag2).*?="adj__(.*?)__', >>> re.DOTALL) >>> m = re.findall(pat, s) >>> m [('john', 'tall'), ('joe', 'short')] Regards, Rob -- http://mail.python.org/m

Re: permanent tempfile?

2006-08-21 Thread skip
Colin> I am trying to create a temp file, however the file that is Colin> created is still there after the program has completed. Why is Colin> this so? After you call os.remove(filename) it's still there? My version of your script works for me: import tempfile, os filenam

How to decode a string

2006-08-21 Thread Lad
To be able to decode a string successfully, I need to know what coding it is in. The string can be coded in utf8 or in windows-1250 or in another coding. Is there a method how to find out the string coding. Thank you for help L. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic RadioButton creation with Python + Qt

2006-08-21 Thread Fredrik Lundh
Wagner Garcia Campagner wrote: > I'm trying to create dynamic RadioButton as follows: > > for i in out.keys(): > msg = "radioButton_" + str(i) > msg2 = 20 * x > msg = QRadioButton(self.buttonGroup_interfaces, msg) > msg.setGeometry(QRect(30,msg2,121,23)) > msg.setTect(i) >

Re: write eof without closing

2006-08-21 Thread Grant Edwards
On 2006-08-21, Alex Martelli <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> wrote: >... >> IIRC, ctrl-Z is not used _in_files_ to represent EOF. Only >> when text is being entered at the console. > > Easy to test, if you have Windows: I might, but I won't admit it in public. :

Re: Problem of function calls from map()

2006-08-21 Thread Tim Lesher
Dasn wrote: > So how to put '\t' argument to split() in map() ? How much is the lambda costing you, according to your profiler? Anyway, what you really want is a list comprehension: l = [line.split('\t') for line in lines] -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules... paths... newbie confusion

2006-08-21 Thread Licheng Fang
MrBlueSky wrote: > I wonder if someone could clarify how Python "knows" where modules are > - or at least point to some documentation that might help me? Here's > what I've been trying: > > I've installed Python 2.4 Windows, and have also installed tkinter, > pmw, cx_Oracle, mssql and pytz (phew!

Dynamic RadioButton creation with Python + Qt

2006-08-21 Thread Wagner Garcia Campagner
Hello, I'm trying to create dynamic RadioButton as follows: for i in out.keys(): msg = "radioButton_" + str(i) msg2 = 20 * x msg = QRadioButton(self.buttonGroup_interfaces, msg) msg.setGeometry(QRect(30,msg2,121,23)) msg.setTect(i) x += 1 The problem is that Python is cre

Re: MS SQL Server: NT Authentication. Possible?

2006-08-21 Thread Dirk Hagemann
Very strange. It works when I directly run the script, but when I use this script as a CGI-script on a webserver, I get this error: File "D:\Web\test\adodbapi.py", line 224, in connect raise DatabaseError(e) adodbapi.DatabaseError: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE DB Provider

Problem of function calls from map()

2006-08-21 Thread Dasn
Hi, there. 'lines' is a large list of strings each of which is seperated by '\t' >>> lines = ['bla\tbla\tblah', 'bh\tb\tb', ... ] I wanna split each string into a list. For speed, using map() instead of 'for' loop. 'map(str.split, lines)' works fine , but... when I was trying: >>> l = map(str.

  1   2   >