Re: Decorating methods - where do my arguments go?

2009-05-12 Thread Mikael Olofsson
Peter Otten wrote: I usually use decorator functions, but I think the following should work, too: class deco(object): def __init__(self, func): self._func = func def __call__(self, *args): print "Decorator:", args self._func(*args) def __get__(self, *args):

Re: sqlite single transaction without foreign key or triggers

2009-05-12 Thread Rob Williscroft
Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python: > In article , > Rob Williscroft wrote: >> >>db.execute( ''' >> update "sessions" set "uid" = ? >> where "uid" = ? >> and exists( >> select * from "users" where "uid" = ? >>

Re: Decorating methods - where do my arguments go?

2009-05-12 Thread Michele Simionato
On May 12, 8:54 am, Mikael Olofsson wrote: > Peter Otten wrote: > > I usually use decorator functions, but I think the following should work, > > too: > > > class deco(object): > >     def __init__(self, func): > >         self._func = func > >     def __call__(self, *args): > >         print "Dec

Re: piping input to an external script

2009-05-12 Thread Dave Angel
Tim Arnold wrote: Hi, I have some html files that I want to validate by using an external script 'validate'. The html files need a doctype header attached before validation. The files are in utf8 encoding. My code: --- import os,sys import codecs,subprocess HEADER = '' filename =

Re: how to consume .NET webservice

2009-05-12 Thread Diez B. Roggisch
bav schrieb: question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? Try accessing the .NET-service using a .NET client, and capture the traffic (it speaks volumes that the apache axis project offers

Re: how to consume .NET webservice

2009-05-12 Thread Diez B. Roggisch
namekuseijin schrieb: Diez B. Roggisch wrote: namekuseijin schrieb: bav escreveu: question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? Unless Microsoft extended the standard in any way, then it s

Re: how to consume .NET webservice

2009-05-12 Thread Diez B. Roggisch
namekuseijin schrieb: > Diez B. Roggisch wrote: >> namekuseijin schrieb: >>> bav escreveu: question from a python newbie; how can i consume in python language, a .NET web service, passing a string array as parameter in some easy steps? >>> >>> Unless Microsoft extended the

Re: Complete frustration

2009-05-12 Thread Tim Golden
Dave Angel wrote: [... snip sound advice about file associations etc. ...] One thing to bear in mind is that any settings, however obtained, in the User part of the registry (HKCU\Software\) will override those in the Machine part of the registry (HKLM\Software...). If you think you've set t

Re: Fill Javascript form

2009-05-12 Thread Matteo
On 11 Mag, 23:06, Shawn Milochik wrote: > How is the form "written in JavaScript"? Is it dynamically generated? > > In any case, can you just send a POST request if you know the values required? The problem is indeed that the form is dynamically generated. That's the .js file: if (navigator.appV

Re: Your Favorite Python Book

2009-05-12 Thread Jeremiah Dodds
On Mon, May 11, 2009 at 9:44 PM, Sam Tregar wrote: > Greetings. I'm working on learning Python and I'm looking for good books > to read. I'm almost done with Dive into Python and I liked it a lot. I > found Programming Python a little dry the last time I looked at it, but I'm > more motivated n

Re: What's the use of the else in try/except/else?

2009-05-12 Thread Lawrence D'Oliveiro
In message , kj wrote: > I know about the construct: > > try: > # do something > except ...: > # handle exception > else: > # do something else > > ...but I can't come with an example in which the same couldn't be > accomplished with [no else] I'd agree. If you have to resort to a "

Re: dict would be very slow for big data

2009-05-12 Thread Steven D'Aprano
On Mon, 11 May 2009 20:28:13 -0700, forrest yang wrote: > hi > i am trying to insert a lot of data into a dict, which may be 10,000,000 > level. > after inserting 10 unit, the insert rate become very slow, 50,000/ > s, and the entire time used for this task would be very long,also. would > any

Re: dict would be very slow for big data

2009-05-12 Thread Bruno Desthuilliers
forrest yang a écrit : hi i am trying to insert a lot of data into a dict, which may be 10,000,000 level. after inserting 10 unit, the insert rate become very slow, 50,000/ s, and the entire time used for this task would be very long,also. would anyone know some solution for this case? Hint

Re: Fill Javascript form

2009-05-12 Thread Jeremiah Dodds
On Tue, May 12, 2009 at 9:15 AM, Matteo wrote: > On 11 Mag, 23:06, Shawn Milochik wrote: > > How is the form "written in JavaScript"? Is it dynamically generated? > > > > In any case, can you just send a POST request if you know the values > required? > > The problem is indeed that the form is d

Is there a GUI for informing a user of missing dependencies?

2009-05-12 Thread Jason
I'm writing a small GUI (Python 2.5/6) using wxPython and pySerial. Since these are both 3rd party modules, if a user doesn't have them installed and tries to run the GUI from a file browser, the app will fail silently. I'm hoping to avoid that. Sure, I'll have a readme file, but I was wondering i

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-12 Thread Lawrence D'Oliveiro
In message , Geoff Gardiner wrote: > Lawrence D'Oliveiro wrote: > >> .. I expect an apology. >> Otherwise, it becomes grounds for an abuse complaint to your ISP. >> > Yes, I do apologize profusely and publicly ... Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorating methods - where do my arguments go?

2009-05-12 Thread Duncan Booth
Michele Simionato wrote: > On May 12, 8:54 am, Mikael Olofsson wrote: >> Peter Otten wrote: >> > I usually use decorator functions, but I think the following should >> > wor > k, >> > too: >> >> > class deco(object): >> >     def __init__(self, func): >> >         self._func = func >> >     def

Re: Nimrod programming language

2009-05-12 Thread Martin Vilcans
On Fri, May 8, 2009 at 5:48 PM, Andreas Rumpf wrote: > Dear Python-users, > > I invented a new programming language called "Nimrod" that combines Python's > readability with C's performance. Please check it out: > http://force7.de/nimrod/ > Any feedback is appreciated. Nice with a language with

Re: What's the use of the else in try/except/else?

2009-05-12 Thread Steven D'Aprano
On Tue, 12 May 2009 20:23:25 +1200, Lawrence D'Oliveiro wrote: > In message , kj wrote: > >> I know about the construct: >> >> try: >> # do something >> except ...: >> # handle exception >> else: >> # do something else >> >> ...but I can't come with an example in which the same coul

Re: What's the use of the else in try/except/else?

2009-05-12 Thread Steven D'Aprano
On Tue, 12 May 2009 09:20:36 +, Steven D'Aprano wrote: > On Tue, 12 May 2009 20:23:25 +1200, Lawrence D'Oliveiro wrote: > >> In message , kj wrote: >> >>> I know about the construct: >>> >>> try: >>> # do something >>> except ...: >>> # handle exception >>> else: >>> # do someth

[no subject]

2009-05-12 Thread karlos barlos
hello to all i have been using this script to add users to my active directory structure i wise to make a loop in order for it to run for A large Number of Users can anyone give me some advice on the loop ?? import win32com,win32com.client def add_acct(location,account):       ad_obj=win32

Re: Decorating methods - where do my arguments go?

2009-05-12 Thread Mikael Olofsson
Michele Simionato wrote: > Still it turns something which is a function into an object and > you lose the docstring and the signature. pydoc will not be too > happy with this approach. Duncan Booth wrote: I don't know why Mikael wants to use a class rather than a function but if he wants to save

Re: dict would be very slow for big data

2009-05-12 Thread Tim Chase
i am trying to insert a lot of data into a dict, which may be 10,000,000 level. after inserting 10 unit, the insert rate become very slow, 50,000/ s, and the entire time used for this task would be very long,also. would anyone know some solution for this case? As others have mentioned, you'v

Re: Is there a GUI for informing a user of missing dependencies?

2009-05-12 Thread Javier Collado
Hello, I'm not an expert, but if you use setuptools for your application, then a 'install_requires' argument would do the job. For more information, please take a look at: http://peak.telecommunity.com/DevCenter/setuptools Best regards, Javier 2009/5/12 Jason : > I'm writing a small GUI (Pyt

Re: Wrapping comments

2009-05-12 Thread Lawrence D'Oliveiro
In message , Tobias Weber wrote: > In article <02159679$0$20647$c3e8...@news.astraweb.com>, > Steven D'Aprano wrote: > >> Maybe in another 20 years, nobody will care about low-level details like >> the characters used to write code. Only the tokens really matter. > > You could have that ten y

Re: Wrapping comments

2009-05-12 Thread Lawrence D'Oliveiro
In message , Tobias Weber wrote: > (still not gonna use software that doesn't let me type # because it's > alt+3 on a UK layout; having to re-learn or configure that is just sick) Tried typing compose-plus-plus? -- http://mail.python.org/mailman/listinfo/python-list

Re: Nimrod programming language

2009-05-12 Thread bearophileHUGS
Martin Vilcans: > Nice with a language with a new language designed for high > performance. It seems like a direct competitor with D, i.e. a > high-level language with low-level abilities. > The Python-like syntax is a good idea. There is Delight too: http://delight.sourceforge.net/ But I agree,

Re: Wrapping comments

2009-05-12 Thread Lawrence D'Oliveiro
In message , Nick Craig- Wood wrote: > Rhodri James wrote: > >> Emacs is my editor of choice ... > > You probably haven't used MAC OS X then! I tried using Emacs via SSH from a Mac once. Made me run screaming for the nearest Windows box

Switchover: mail.python.org

2009-05-12 Thread Aahz
On Monday 2009-05-11, mail.python.org will be switched to another machine starting roughly at 14:00 UTC. This should be invisible (expected downtime is less than ten minutes). -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "It is easier to optimize correct code

Re: Pycon Tre, grazie!

2009-05-12 Thread Marco Mariani
daniele wrote: Si è concluso ieri la pycon tre, è stata molto interessante, un bel evento per una bella comunità. Sempre meglio.. anche se mi preoccupa un po' un eventuale cambio di location Ho visto con grande piacere, oltre all'incremento dei partecipanti, anche un sensibile incremento del

ANN: Demo online shop for LFS

2009-05-12 Thread Kai Diefenbach
Hi, I'm pleased to announce that there is new demo shop for LFS: http://demo.getlfs.com LFS is an online shop based on Django and distributed under the BSD- License For more information please visit http://www.getlfs.com, subscribe to our feed http://www.getlfs.com/feeds/news or follow us on Tw

ANNOUNCE: libmsgque 3.1

2009-05-12 Thread Andreas Otto
ANNOUNCE a major feature improvement of libmsgque ... What is LibMsgque = LibMsgque is an OS independent, Programming Language independent and Hardware independent solution to link applications together to act like a single application. Or with other words, LibMsgque is an Applic

Re: creating classes with mix-ins

2009-05-12 Thread samwyse
On May 11, 9:01 pm, Carl Banks wrote: > On May 11, 11:16 am, samwyse wrote: > > > Should I use a class decorator, or a metaclass? > > Here's the thing: unless you have advance knowledge of the methods > defined by self.blog, you can't get the attr_list at class definition > time, which means neit

Sorting a dictionary

2009-05-12 Thread Ronn Ross
I'm attempting to sort for the results of a dictionary. I would like to short by the 'key' in ascending order. I have already made several attempts using: sorted() and .sort(). Here is my loop: for key,value in word_count.items(): print sorted(key), "=", value Thanks -- http://mail.py

Python API Functions equivalent to ruby's rb_big2str() and rb_str2cstr()

2009-05-12 Thread rahul
Is functions equivalent to ruby's rb_big2str() and rb_str2cstr() available in Python. I had search a lot in google but not able to find that. If anybody know than please give me the name of those functions of Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling Python on Windows : how to deal with modules ?

2009-05-12 Thread r2d3
Hi all, after some investigation, I managed to find how to do this "manually". I post it here if it could help others... 1) on windows, mostly all the dynamic libraries (time, socket, ...) are statically linked into python26.dll 2) all the modules are located in lib/ and some .pyd (in fact rename

Re: putting date strings in order

2009-05-12 Thread noydb
On May 11, 11:30 pm, Paul Rubin wrote: > noydb writes: > > Anyone have any good ideas?  I was curious to see what people came up > > with. > > Is this a homework assignment?  Some hints: > > 1) figure out how to compare two month names for chronological order, >    l

EURO NEWS FINALLY LAUNCHED THEIR BLOG

2009-05-12 Thread Aqeel Ahmed Rajpar
TO SUBSCRIBE THE BLOG VIA EMAIL VISIT www.euronewspk.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a dictionary

2009-05-12 Thread Jaime Fernandez del Rio
This one I think I know... Try with: for k in sorted(word_count) : print k,"=",word_count[k] You need to do the sorting before iterating over the keys... Jaime On Tue, May 12, 2009 at 1:54 PM, Ronn Ross wrote: > I'm attempting to sort for the results of a dictionary. I would like to > shor

Re: Python API Functions equivalent to ruby's rb_big2str() and rb_str2cstr()

2009-05-12 Thread Christian Heimes
rahul schrieb: > Is functions equivalent to ruby's rb_big2str() and rb_str2cstr() > available in Python. > I had search a lot in google but not able to find that. > If anybody know than please give me the name of those functions of > Python. Please don't assume that we know what the Ruby function

Re: Sorting a dictionary

2009-05-12 Thread Andre Engels
On Tue, May 12, 2009 at 1:54 PM, Ronn Ross wrote: > I'm attempting to sort for the results of a dictionary. I would like to > short by the 'key' in ascending order. I have already made several attempts > using: sorted() and .sort(). > Here is my loop: >     for key,value in word_count.items(): >  

Re: putting date strings in order

2009-05-12 Thread bearophileHUGS
noydb: > I have not worked with the %. > Can you provide a snippet of your idea in code form? Then it's a very good moment to learn using it: http://en.wikipedia.org/wiki/Modulo_operator >>> 10 % 3 1 >>> 10 % 20 10 >>> -10 % 3 2 >>> -10 % -3 -1 >Something like that< Implement your first v

Re: putting date strings in order

2009-05-12 Thread Jaime Fernandez del Rio
If you simply want to generate an ordered list of months, start with it in order: dates = ["x_jan",...,"x_dec"] and if the desired starting month is start = 6 # i.e. x_jun dates = dates[start - 1:] + dates[:start - 1] If you have to sort the list itself, I would use an intermediate

About progress bar in glade

2009-05-12 Thread shruti surve
hi i am using progress bar in glade and python file. When i clicked on menu item, open office spreadsheet will be opened. but it takes some time to open up, so i want to add progress bar. Now, when i clicked on menu item,dialog with progress bar is coming and progress bar is pulsating but xml_rpc

multithreading in python

2009-05-12 Thread shruti surve
hi, how to do multithreading in python??? Like running dialog box and running xml rpc calls simultaneously??? regards shruti -- http://mail.python.org/mailman/listinfo/python-list

Re: putting date strings in order

2009-05-12 Thread MRAB
noydb wrote: On May 11, 11:30 pm, Paul Rubin wrote: noydb writes: Anyone have any good ideas? I was curious to see what people came up with. Is this a homework assignment? Some hints: 1) figure out how to compare two month names for chronological order, le

Re: Python API Functions equivalent to ruby's rb_big2str() and rb_str2cstr()

2009-05-12 Thread rahul
On May 12, 5:25 pm, Christian Heimes wrote: > rahul schrieb: > > > Is functions equivalent to ruby's  rb_big2str() and rb_str2cstr() > > available in Python. > > I had search a lot in google but not able to find that. > > If anybody know than please give me the name of those functions of > > Pytho

Re: multithreading in python

2009-05-12 Thread Almar Klein
See the standard help on the threading and thread module. Almar 2009/5/12 shruti surve : > hi, >  how to do multithreading in python??? Like running dialog box and running > xml rpc calls simultaneously??? > > > regards > shruti > > -- > http://mail.python.org/mailman/listinfo/python-list > > --

Re: Nimrod programming language

2009-05-12 Thread rumpf_a
> There are two showstoppers for me though: > > 1. Introducing a new programming language where the char type is a > byte is anachronistic. You're saying that programmers don't have to > care about the string encoding and can just treat them as an array of > bytes. That is exactly what causes all t

Re: Is there a GUI for informing a user of missing dependencies?

2009-05-12 Thread Dave Angel
Jason wrote: I'm writing a small GUI (Python 2.5/6) using wxPython and pySerial. Since these are both 3rd party modules, if a user doesn't have them installed and tries to run the GUI from a file browser, the app will fail silently. I'm hoping to avoid that. Sure, I'll have a readme file, but

AssertionError - help me to solve this in a programme with Queue

2009-05-12 Thread gganesh
Hi all, I'm just learning python ,the code below is found in one of the sites ,it produces an error like Traceback (most recent call last): File "queue.py", line 34, in main() File "queue.py", line 28, in main t=MyThread(q) File "/usr/lib/python2.5/threading.py", line 398, in __init_

Re: putting date strings in order

2009-05-12 Thread John Machin
MRAB mrabarnett.plus.com> writes: > > Sort the list, passing a function as the 'key' argument. The function > should return an integer for the month, eg 0 for 'jan', 1 for 'feb'. If > you want to have a different start month then add and if you don't like what that produces, try subtract :-) >

Re: Nimrod programming language

2009-05-12 Thread rumpf_a
> > > The language and library are missing arbitrary precision integer > > > arithmetic, using GMP or something like that. > > > True, but currently not a high priority for me. > > Too bad. That makes Nimrod officially "worthless", i.e., of no > value to me. > Well, you could write a wrapper for GM

Re: how to write loop (was "no subject")

2009-05-12 Thread Dave Angel
karlos barlos wrote: hello to all i have been using this script to add users to my active directory structure i wise to make a loop in order for it to run for A large Number of Users can anyone give me some advice on the loop ?? import win32com,win32com.client def add_acct(location,accou

Re: AssertionError - help me to solve this in a programme with Queue

2009-05-12 Thread MRAB
gganesh wrote: Hi all, I'm just learning python ,the code below is found in one of the sites ,it produces an error like Traceback (most recent call last): File "queue.py", line 34, in main() File "queue.py", line 28, in main t=MyThread(q) File "/usr/lib/python2.5/threading.py", lin

Re: About progress bar in glade

2009-05-12 Thread shruti surve
On Tue, May 12, 2009 at 6:19 PM, shruti surve wrote: > hi > > i am using progress bar in glade and python file. When i clicked on menu > item, open office spreadsheet will be opened. but it takes some time to open > up, so i want to add progress bar. Now, when i clicked on menu item,dialog > with

Re: Nimrod programming language

2009-05-12 Thread rumpf_a
> > That is already the case: The Pascal version is translated to Nimrod > > and than compiles itself. Bootstrapping works. > > I meant why not get rid of the translation step and implement the > compiler in idiomatic Nimrod. > Not until version 1.0 is out. This way the language can evolve more eas

Re: AssertionError - help me to solve this in a programme with Queue

2009-05-12 Thread gganesh
On May 12, 6:34 pm, MRAB wrote: > gganesh wrote: > > Hi all, > > I'm just learning python ,the code below is found in one of the > > sites ,it produces an error like > > Traceback (most recent call last): > >   File "queue.py", line 34, in > >     main() > >   File "queue.py", line 28, in main >

Re: Python API Functions equivalent to ruby's rb_big2str() and rb_str2cstr()

2009-05-12 Thread Hrvoje Niksic
rahul writes: > Hi Christian, > rb_big2str(Big-Integer, base) of ruby returns string representation > of big-Integer. now, i am able to find equivalent python API function > of rb_str2cstr() of ruby. That would be PyLong_FromString, for the sake of later searches. > so , please help me about

Re: AssertionError - help me to solve this in a programme with Queue

2009-05-12 Thread Diez B. Roggisch
gganesh wrote: > On May 12, 6:34 pm, MRAB wrote: >> gganesh wrote: >> > Hi all, >> > I'm just learning python ,the code below is found in one of the >> > sites ,it produces an error like >> > Traceback (most recent call last): >> > File "queue.py", line 34, in >> > main() >> > File "queue.py", l

Re: AssertionError - help me to solve this in a programme with Queue

2009-05-12 Thread maxim
> hi > It did work that way > > File "queue.py", line 15 >     threading.Thread__init__.(self) >                              ^ > SyntaxError: invalid syntax You've wrote right first time "threading.Thread.__init__(slef)", but misprinted in your code "def _int_(self,q)" instead of "def __init__ (

Re: putting date strings in order

2009-05-12 Thread MRAB
John Machin wrote: MRAB mrabarnett.plus.com> writes: Sort the list, passing a function as the 'key' argument. The function should return an integer for the month, eg 0 for 'jan', 1 for 'feb'. If you want to have a different start month then add and if you don't like what that produces, try su

Re: What's the use of the else in try/except/else?

2009-05-12 Thread Peter Pearson
On 12 May 2009 09:35:36 GMT, Steven D'Aprano wrote: [snip] > To really be safe, that should become: > > try: > rsrc = get(resource) > except ResourceError: > log('no more resources available') > raise > else: > try: > do_something_with(rsrc) > finally: > rsrc.clo

Re: putting date strings in order

2009-05-12 Thread Jaime Fernandez del Rio
On Tue, May 12, 2009 at 5:02 PM, MRAB wrote: > John Machin wrote: >> >> MRAB mrabarnett.plus.com> writes: >>> >>> Sort the list, passing a function as the 'key' argument. The function >>> should return an integer for the month, eg 0 for 'jan', 1 for 'feb'. If >>> you want to have a different star

Re: putting date strings in order

2009-05-12 Thread John Machin
On May 13, 1:02 am, MRAB wrote: > John Machin wrote: > > MRAB mrabarnett.plus.com> writes: > >> Sort the list, passing a function as the 'key' argument. The function > >> should return an integer for the month, eg 0 for 'jan', 1 for 'feb'. If > >> you want to have a different start month then add

Call Web Service using proxy and http authentication

2009-05-12 Thread wdveloper
Hi everyone, I am trying to call a webservice which requires an http authentication. To reach the ws, I must pass from a proxy http. So in the whole I need go through two authentications before getting the ws working. I am using SOAPpy and I'm getting quite crazy. I am able to arrange this problem

Re: Python API Functions equivalent to ruby's rb_big2str() and rb_str2cstr()

2009-05-12 Thread John Machin
On May 12, 11:48 pm, Hrvoje Niksic wrote: > rahul writes: > > Hi Christian, > >   rb_big2str(Big-Integer, base) of ruby returns string *base* >representation > > of big-Integer. now, i am able to find equivalent python API function > > of rb_str2cstr() of ruby. > > That would be PyLong_FromStri

Re: putting date strings in order

2009-05-12 Thread MRAB
Jaime Fernandez del Rio wrote: On Tue, May 12, 2009 at 5:02 PM, MRAB wrote: John Machin wrote: MRAB mrabarnett.plus.com> writes: Sort the list, passing a function as the 'key' argument. The function should return an integer for the month, eg 0 for 'jan', 1 for 'feb'. If you want to have a di

Re: putting date strings in order

2009-05-12 Thread John Machin
On May 13, 1:58 am, Jaime Fernandez del Rio wrote: > On Tue, May 12, 2009 at 5:02 PM, MRAB wrote: > > John Machin wrote: > > >> MRAB mrabarnett.plus.com> writes: > > >>> Sort the list, passing a function as the 'key' argument. The function > >>> should return an integer for the month, eg 0 for '

Re: piping input to an external script

2009-05-12 Thread norseman
Steve Howell wrote: On May 11, 11:31 pm, norseman wrote: Steve Howell wrote: On May 11, 10:16 pm, norseman wrote: Tim Arnold wrote: Hi, I have some html files that I want to validate by using an external script 'validate'. The html files need a doctype header attached before validation. The

Re: Nimrod programming language

2009-05-12 Thread Mensanator
On May 12, 8:27 am, rump...@web.de wrote: > > > > The language and library are missing arbitrary precision integer > > > > arithmetic, using GMP or something like that. > > > > True, but currently not a high priority for me. > > > Too bad. That makes Nimrod officially "worthless", i.e., of no > > v

Re:

2009-05-12 Thread norseman
dd name to listTemp for user in list already existing: add user to listTemp for user in list.Temp.index(): copy to ListSorted reset first/last as needed for user in ListSorted: store it someplace (like your data file) I suspect some of the add_.. function will need some mods, but maybe not If 'shay123' is line number, track it in 'copy to ListSorted' section. If the number is user id, assign it in source file. (name id 1 pair per line, adjust read,etc to accommodate) Today is: 20090512 no code this section Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: piping input to an external script

2009-05-12 Thread Steve Howell
See suggested debugging tip inline of your program On May 11, 11:04 am, "Tim Arnold" wrote: > Hi, I have some html files that I want to validate by using an external > script 'validate'. The html files need a doctype header attached before > validation. The files are in utf8 encoding. My code

Re: Nimrod programming language

2009-05-12 Thread George Sakkis
On May 12, 12:49 pm, Mensanator wrote: > On May 12, 8:27 am, rump...@web.de wrote: > > > > > > The language and library are missing arbitrary precision integer > > > > > arithmetic, using GMP or something like that. > > > > > True, but currently not a high priority for me. > > > > Too bad. That ma

Re: how to consume .NET webservice

2009-05-12 Thread namekuseijin
On May 12, 4:12 am, "Diez B. Roggisch" wrote: > namekuseijin schrieb: >  > Diez B. Roggisch wrote: >  >> namekuseijin schrieb: >  >>> bav escreveu: >   question from a python newbie; >   >     how can i consume in python language, a .NET web service, passing >     a string array as

Re: how to consume .NET webservice

2009-05-12 Thread Mike Driscoll
On May 12, 12:54 pm, namekuseijin wrote: > On May 12, 4:12 am, "Diez B. Roggisch" wrote: > > > > > namekuseijin schrieb: > >  > Diez B. Roggisch wrote: > >  >> namekuseijin schrieb: > >  >>> bav escreveu: > >   question from a python newbie; > >   > >     how can i consume in python l

How to abort module evaluation?

2009-05-12 Thread mrstevegross
I have a python script that is pretty simple: when executed, it imports a bunch of stuff and then runs some logic. When *imported*, it defines some variables and exits. Here's what it looks like: === foo.py === if __name__ != '__main__': x = 1 exit_somehow import bar do_some_stuff... === EOF

Re: Call Web Service using proxy and http authentication

2009-05-12 Thread Steve Howell
On May 12, 8:59 am, wdveloper wrote: > Hi everyone, > > I am trying to call a webservice which requires an http > authentication. > To reach the ws, I must pass from a proxy http. So in the whole I need > go through two authentications before getting the ws working. I am > using SOAPpy and I'm get

Re: Nimrod programming language

2009-05-12 Thread namekuseijin
On May 8, 12:48 pm, Andreas Rumpf wrote: > Dear Python-users, > > I invented a new programming language called "Nimrod" that combines Python's > readability with C's performance. Please check it out:http://force7.de/nimrod/ > Any feedback is appreciated. heh, looks more like a streamlined Object

Re: Wrapping comments

2009-05-12 Thread Piet van Oostrum
> Lawrence D'Oliveiro (LD) wrote: >LD> In message , Nick Craig- >LD> Wood wrote: >>> Rhodri James wrote: >>> Emacs is my editor of choice ... >>> >>> You probably haven't used MAC OS X then! >LD> I tried using Emacs via SSH from a Mac once. Made me run screaming for the >LD> neares

Re: confused with subprocess.Popen

2009-05-12 Thread Roy Hyunjin Han
There's a great article by Doug Hellmann on subprocess. http://www.doughellmann.com/PyMOTW/subprocess/ On Sun, May 10, 2009 at 1:37 AM, Soumen banerjee wrote: > Thanks!, i have found that alternately setting shell=True also works > -- > http://mail.python.org/mailman/listinfo/python-list > -- ht

Language detector using N-grams

2009-05-12 Thread Cesar D. Rodas
Hello Pythoners! I just finished my first useful project in Python, It is a language detector using N-grams. I hope this can be useful for someone, http://github.com/crodas/py-languess/tree/master The License of the project is BSD Best regards -- Cesar D. Rodas http://cesar.la/ Phone: +595-96

Re: issue with twisted and reactor. Can't stop reactor

2009-05-12 Thread Nick Craig-Wood
Gabriel wrote: > Jean-Paul Calderone escribió: > > None of the reactors in Twisted are restartable. You can run and > stop them > > once. After you've stopped a reactor, you cannot run it again. This is > > the > > cause of your problem. > > > > Jean-Paul > > I see. > Is it possible to d

Re: How to abort module evaluation?

2009-05-12 Thread Mike Driscoll
On May 12, 1:33 pm, mrstevegross wrote: > I have a python script that is pretty simple: when executed, it > imports a bunch of stuff and then runs some logic. When *imported*, it > defines some variables and exits. Here's what it looks like: > > === foo.py === > if __name__ != '__main__': >   x =

Re: Call Web Service using proxy and http authentication

2009-05-12 Thread wdveloper
On May 12, 8:38 pm, Steve Howell wrote: > On May 12, 8:59 am, wdveloper wrote: > > > Hi everyone, > > > I am trying to call a webservice which requires an http > > authentication. > > To reach the ws, I must pass from a proxy http. So in the whole I need > > go through two authentications before

Re: Fill Javascript form

2009-05-12 Thread Aahz
In article <3f9c74cf-72f4-45e2-8724-3939366d1...@e24g2000vbe.googlegroups.com>, Matteo wrote: > >I have to fill a web form to authenticate and connect to the internet. >I thought it would have been easy to make a script to do that >automatically on startup. > >Unfortunately, it turned out that th

Looking for teacher in New York

2009-05-12 Thread dervonb
I live in brooklyn i'm looking for someone who can help a group of two or three learn how to use python. to create games useful softwares and very high level coding eventually. in other words how to abuse it's talents for our greater good. Please respond if you can meet in the brooklyn, manhattan,

Re: issue with twisted and reactor. Can't stop reactor

2009-05-12 Thread Jean-Paul Calderone
On Tue, 12 May 2009 14:30:04 -0500, Nick Craig-Wood wrote: Gabriel wrote: Jean-Paul Calderone escribió: > None of the reactors in Twisted are restartable. You can run and stop them > once. After you've stopped a reactor, you cannot run it again. This is > the > cause of your problem. > >

Convert UNIX formated text files to DOS formated?

2009-05-12 Thread walterbyrd
I have about 150 unix formated text files that I would like to convert to dos formated. I am guessing that I loop though each file in the directory, read each line and conver the last character, then save to a file with the same name in another directory. I am not really sure what I convert the l

Re: Convert UNIX formated text files to DOS formated?

2009-05-12 Thread Diez B. Roggisch
walterbyrd schrieb: I have about 150 unix formated text files that I would like to convert to dos formated. I am guessing that I loop though each file in the directory, read each line and conver the last character, then save to a file with the same name in another directory. I am not really sur

Re: Convert UNIX formated text files to DOS formated?

2009-05-12 Thread MRAB
walterbyrd wrote: I have about 150 unix formated text files that I would like to convert to dos formated. I am guessing that I loop though each file in the directory, read each line and conver the last character, then save to a file with the same name in another directory. I am not really sure

Re: What's the use of the else in try/except/else?

2009-05-12 Thread Carl Banks
On May 12, 2:35 am, Steven D'Aprano wrote: > On Tue, 12 May 2009 09:20:36 +, Steven D'Aprano wrote: > > On Tue, 12 May 2009 20:23:25 +1200, Lawrence D'Oliveiro wrote: > > >> In message , kj wrote: > > >>> I know about the construct: > > >>> try: > >>>     # do something > >>> except ...: > >>>

Re: Convert UNIX formated text files to DOS formated?

2009-05-12 Thread walterbyrd
On May 12, 2:53 pm, MRAB wrote: > walterbyrd wrote: > > I have about 150 unix formated text files that I would like to convert > > to dos formated. > > > I am guessing that I loop though each file in the directory, read each > > line and conver the last character, then save to a file with the same

Re: Fill Javascript form

2009-05-12 Thread Дамјан Георгиевски
> On 11 Mag, 23:06, Shawn Milochik wrote: >> How is the form "written in JavaScript"? Is it dynamically generated? >> >> In any case, can you just send a POST request if you know the values >> required? > > The problem is indeed that the form is dynamically generated. > That's the .js file: T

Re: How to abort module evaluation?

2009-05-12 Thread Dave Angel
mrstevegross wrote: I have a python script that is pretty simple: when executed, it imports a bunch of stuff and then runs some logic. When *imported*, it defines some variables and exits. Here's what it looks like: === foo.py === if __name__ != '__main__': x = 1 exit_somehow import bar do_

Váš příspěvek do konference Python če ká na schválení moderátorem

2009-05-12 Thread python-bounces
Vaše zpráva pro konferenci 'Python' ve věci RE: SALE 79% 0FF on Pfizer! Nebyla rozeslána. Pro její distribuci je nutný souhlas moderátora. Důvod pozdržení distribuce zprávy je: Příspěvek od nečlena do konference s přispíváním omezeným pouze na členy. Vaše zpráva buď bude rozeslána nebo

Re: Convert UNIX formated text files to DOS formated?

2009-05-12 Thread MRAB
walterbyrd wrote: On May 12, 2:53 pm, MRAB wrote: walterbyrd wrote: I have about 150 unix formated text files that I would like to convert to dos formated. I am guessing that I loop though each file in the directory, read each line and conver the last character, then save to a file with the sa

Re: creating classes with mix-ins

2009-05-12 Thread Carl Banks
On May 12, 4:45 am, samwyse wrote: > Unfortunately, 'boilerplate()' uses the handlers that I provide when > MetaBlog is instantiated. In that case, the handler functions should be attributes of the instance, not of the class. Do something like this: class MetaBlog(object): def __init__(self

Re: Nimrod programming language

2009-05-12 Thread Mensanator
On May 12, 12:54 pm, George Sakkis wrote: > On May 12, 12:49 pm, Mensanator wrote: > > > > > > > On May 12, 8:27 am, rump...@web.de wrote: > > > > > > > The language and library are missing arbitrary precision integer > > > > > > arithmetic, using GMP or something like that. > > > > > > True, but

Re: Fwd: Re: Unable to install Pywin32 for Python 2.6.2

2009-05-12 Thread David Lees
Mark Hammond wrote: Probably some import statement is finding a .pyd module built against Python 2.5 instead of Python 2.6; it might be that PYTHONPATH points somewhere wrong, or the registry for Python 2.6 is setup wrong, or something else entirely... Cheers, Mark On 12/05/2009 3:13 PM, Da

  1   2   >