Re: python xauth

2011-07-10 Thread Cousin Stanley
kracekumar ramaraju wrote: > I am looking to use xauth in python ? > > It is for my command line process, > I would like to have few examples > and resources. A simple example >>> import subprocess as SP >>> >>> proc = [ 'xauth' , 'list' , ':0' ] >>> >>> pipe = SP.Popen( proc , stdo

OK, I lied, I do have another question...

2011-07-10 Thread Anthony Papillion
Hi Everyone, So I've used Glade to build a simple UI and I'm loading it with gtkBuilder. The UI loads fine but, for some reason, none of my signals are being connected. For example, in Glade, I said when the button called btnExit was clicked, execute the btnExit_clicked method. Then, in my App() c

python xauth

2011-07-10 Thread kracekumar ramaraju
I am looking to use xauth in python?It is for my command line process,I would like to have few examples and resources. -- http://mail.python.org/mailman/listinfo/python-list

[RELEASED] Python 3.2.1

2011-07-10 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I am pleased to announce the final release of Python 3.2.1. Python 3.2.1 is the first bugfix release for Python 3.2, fixing over 120 bugs and regressions in Python 3.2. For an extensive list of changes and fe

south actress hot photos and videos

2011-07-10 Thread SHILPA
v FOR GOOD JOBS SITES TO YOU http://goodjobssites.blogspot.com/ FOR HOT PHOTO&VIDEOS TAMANNA HOT SEXY PHOTOS & VIDEOS http://southactresstou.blogspot.com/2011/07/tamanna-wallpapers.html KAJ

Re: ctypes: point to buffer in structure

2011-07-10 Thread Tim Roberts
Jesse R wrote: > >Hey I've been trying to convert this to run through ctypes and i'm >having a hard time > >typedef struct _SYSTEM_PROCESS_ID_INFORMATION >{ >HANDLE ProcessId; >UNICODE_STRING ImageName; >} SYSTEM_PROCESS_IMAGE_NAME_INFORMATION, >*PSYSTEM_PROCESS_IMAGE_NAME_INFORMATION; > >

Re: How to get or set the text of a textfield?

2011-07-10 Thread Waldek M.
Dnia Sun, 10 Jul 2011 21:14:10 -0500, Anthony Papillion napisał(a): > > So I've built a UI with Glade and have loaded it using the standard > Python code. In my UI, I have a textfield called txtUsername. How do I > get and set the text in this field from my Python code? http://developer.gnome.org

Re: Virtual functions are virtually invisible!

2011-07-10 Thread Michael Hrivnak
I can't believe you're saying that you will create a sub-class without taking the time to understand the base class. Seriously? That right there is why you are seeing method overrides that aren't documented. How can you document something you don't understand? Furthermore, how can you have any c

Re: Function docstring as a local variable

2011-07-10 Thread alex23
On Jul 11, 9:06 am, Corey Richardson wrote: > Excerpts from Carl Banks's message of Sun Jul 10 18:59:02 -0400 2011: > > > print __doc__ > > Python 2.7.1 (r271:86832, Jul  8 2011, 22:48:46) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information.>>> def > fo

Re: Function docstring as a local variable

2011-07-10 Thread alex23
On Jul 11, 9:00 am, Corey Richardson wrote: > def qux(): >     'And even me! Quote type don't matter (besides style)' Well, style and the presence of the string literal notation in the quoted text :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get or set the text of a textfield? - SOLVED

2011-07-10 Thread Anthony Papillion
> I don't know anything about Glade, so I can't answer your question > definitively. However, as a general rule, you can use the dir() builtin > function to see what methods are defined by an object. Hi John, Thanks for the input and it looks like it's pretty simple. Basically, I can access the

Re: How to get or set the text of a textfield?

2011-07-10 Thread John Gordon
In Anthony Papillion writes: > So I've built a UI with Glade and have loaded it using the standard > Python code. In my UI, I have a textfield called txtUsername. How do I > get and set the text in this field from my Python code? I don't know anything about Glade, so I can't answer your questi

paypal wholesale all brand(UGGBOOTS, SHOES, CLOTHES, HANDBAG, WATCH, JEANS, JERSEY, T-SHIRT, SHIRTS, HOODY, EYEGLASS, CAP, SHAWL, WALLT) and so on.

2011-07-10 Thread amy
paypal payment wholesale all brand shoes(NIKE,ADIDAS,LV,GUCCI,CHANEL,PRADA,POLO,UGG BOOTS,D&G,DIOR )and so on. paypal payment wholesale all brand clothing(T- SHIRT,JEANS,JERSEY,HOODIES,JACKETS,HARDY,SWEATER,SHIRTS )and so on . http://www.24hour-buy.com paypal payment all brand watch(ROLEX,OMEGA,CHA

Re: Virtual functions are virtually invisible!

2011-07-10 Thread rantingrick
On Jul 10, 7:31 pm, Michael Hrivnak wrote: > It sounds to me like you need a better IDE, better documentation, > and/or better code to work on and use. Yes the last two points are relevant here. However whilst IDE choice belongs to the user, documentation and code are in the hands of the develope

Re: TypeError: unbound method DefaultTracer() must be called with MyClass instance as first argument (got str instance instead)

2011-07-10 Thread Kannan Varadhan
Thanks folks, Tried all of these, and went with staticmethod(). Was cleanest solution, > After skimming over Steven's post: use staticmethod. > No idea why I didn't think of that myself. Kannan -- http://mail.python.org/mailman/listinfo/python-list

How to get or set the text of a textfield?

2011-07-10 Thread Anthony Papillion
Hi Everyone, So I've built a UI with Glade and have loaded it using the standard Python code. In my UI, I have a textfield called txtUsername. How do I get and set the text in this field from my Python code? Thanks! Anthony -- Anthony Papillion Advanced Data Concepts Get real about your softwar

Re: parsing packets

2011-07-10 Thread Aman Nijhawan
Are you sending binary data if so you can use the struct module to pack, unpack and interpret binary data http://docs.python.org/library/struct.html , You will have to design the header scheme yourself you can either embed length in the packets or try to use a carefully selected delimiter charact

Backshift mailing list create - opensource, deduplicating, compressing backups in Python

2011-07-10 Thread Dan Stromberg
I've created a google mailing list for the discussion of the backup program I've been working on, "backshift". You can find it at: backsh...@googlegroups.com And I'd be pleased if you were to choose to join, if you're interested in the subject of Python and Backups. -- http://mail.python.org/ma

Re: Function docstring as a local variable

2011-07-10 Thread Steven D'Aprano
On Mon, 11 Jul 2011 09:00 am Corey Richardson wrote: > Excerpts from Colin J. Williams's message of Sun Jul 10 18:28:15 -0400 > 2011: >> Try: >> >> def f(): >> ds= """docstring""" >> print ds > > That doesn't actually make a docstring, though. It makes a string object > and points th

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Anthony Papillion
As someone who was a Visual Studio user for many years, I felt much the same way you do when I made the jump to Python on Linux last year. But then I discovered Glade and am quite satisfied. Glades UI design paradigm is a little different than that of VS but it's not so hard that you couldn't lear

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Adam Tauno Williams
>Because RAD tools are for GUI toolkits, not for languages. If you're >using GTK, Glade works fine. Same with QT and QTDesigner. If you're >using WPF with IronPython, t These [Glade, etc...] are *NOT* RAD tools. They are GUI designers. A RAD tool provides a GUI designer that can be bound to a b

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Adam Tauno Williams
On Sun, 2011-07-10 at 15:50 -0700, Ivan Kljaic wrote: > Ok Guys. I know that most of us have been expiriencing the need for a > nice Gui builder tool for RAD and most of us have been googling for it > a lot of times. But seriously. Why is the not even one single RAD tool > for Python. I mean what h

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Benjamin Kaplan
On Sun, Jul 10, 2011 at 3:50 PM, Ivan Kljaic wrote: > Ok Guys. I know that most of us have been expiriencing the need for a > nice Gui builder tool for RAD and most of us have been googling for it > a lot of times. But seriously. Why is the not even one single RAD tool > for Python. I mean what h

Re: Virtual functions are virtually invisible!

2011-07-10 Thread Michael Hrivnak
It sounds to me like you need a better IDE, better documentation, and/or better code to work on and use. I don't understand why it's difficult to look at a derived class as see what methods are overridden. If you are working on the code, it is quite obvious what methods exist in the base class.

Re: Function docstring as a local variable

2011-07-10 Thread Corey Richardson
Excerpts from Chris Rebert's message of Sun Jul 10 20:16:23 -0400 2011: > The question Carl's code was in answer to was, slightly paraphrased: > "Is it possible to get a *module*'s docstring from within the module > itself?" > The question had nothing to do with *function* docstrings. > Ah. My ba

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* Chris Rebert [110710 16:14]: > > > >  Where is general documentation on the subject of variables > >  beginning with 2 underscores? > > I've never heard that phrase used to describe __doc__ or its friends. :) That why I wasn't satified with my search results. > Look in the "underscore" sectio

Re: Function docstring as a local variable

2011-07-10 Thread Chris Rebert
On Sun, Jul 10, 2011 at 4:06 PM, Corey Richardson wrote: > Excerpts from Carl Banks's message of Sun Jul 10 18:59:02 -0400 2011: >> print __doc__ >> > > Python 2.7.1 (r271:86832, Jul  8 2011, 22:48:46) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information.

Re: Function docstring as a local variable

2011-07-10 Thread Chris Rebert
On Sun, Jul 10, 2011 at 5:00 PM, Tim Johnson wrote: > * Carl Banks [110710 15:18]: >> On Sunday, July 10, 2011 3:50:18 PM UTC-7, Tim Johnson wrote: >> >  ## Is it possible to get the module docstring >> >  ## from the module itself? >> >> print __doc__ >  Thanks Carl. > >  Where is general docum

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* Carl Banks [110710 15:18]: > On Sunday, July 10, 2011 3:50:18 PM UTC-7, Tim Johnson wrote: > > Here's a related question: > > I can get the docstring for an imported module: > > >>> import tmpl as foo > > >>> print(foo.__doc__) > > Python templating features > > > >Author - tim at

Re: Function docstring as a local variable

2011-07-10 Thread Ben Finney
"Colin J. Williams" writes: > On 10-Jul-11 13:44 PM, rantingrick wrote: > > On Jul 10, 12:41 pm, Tim Johnson wrote: > >> It possible for a function to print it's own docstring? > > > > def f(): > > """docstring""" > > print "docstring" > > Try: > > def f(): > ds= """docstring""" >

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread CM
On Jul 10, 6:50 pm, Ivan Kljaic wrote: > Ok Guys. I know that most of us have been expiriencing the need for a > nice Gui builder tool for RAD and most of us have been googling for it > a lot of times. But seriously. Why is the not even one single RAD tool > for Python. I mean what happened to boa

Re: parsing packets

2011-07-10 Thread Michael Hrivnak
In order to find the end of the packet, include a field that is the packet length. This is what IP packets do to find the end of their header. http://en.wikipedia.org/wiki/IPv4#Header And the TCP header (see "data offset") does the same: http://en.wikipedia.org/wiki/Transmission_Control_Protoco

Re: Function docstring as a local variable

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 06:06 PM, Corey Richardson wrote: > Python 2.7.1 (r271:86832, Jul 8 2011, 22:48:46) [GCC 4.4.5] on > linux2 Type "help", "copyright", "credits" or "license" for more > information. def foo(): > ... "Docstring" ... print

Re: String concatenation vs. string formatting

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 09:33 AM, Roy Smith wrote: > The canonical way to do that would be something like > > fields = [demux_filter, field_filter, fpsin_filter, i2pfilter, > dn_filter, fpsout_filter, trim_filter, info_filter] > avs.write(''.join(fields)

Re: Function docstring as a local variable

2011-07-10 Thread Tim Chase
On 07/10/2011 05:50 PM, Tim Johnson wrote: * pyt...@bdurham.com [110710 14:17]: def test(): """This is my doc string""" print test.__doc__ test() Works for me. Works for the application I'm after. thanks Here's a related question: ## Is it possible to get the module docstrin

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Corey Richardson
Excerpts from Ivan Kljaic's message of Sun Jul 10 18:50:31 -0400 2011: > Ok Guys. I know that most of us have been expiriencing the need for a > nice Gui builder tool for RAD and most of us have been googling for it > a lot of times. But seriously. Why is the not even one single RAD tool > for Pyth

Re: Function docstring as a local variable

2011-07-10 Thread Corey Richardson
Excerpts from Carl Banks's message of Sun Jul 10 18:59:02 -0400 2011: > print __doc__ > Python 2.7.1 (r271:86832, Jul 8 2011, 22:48:46) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def foo(): ... "Docstring" ... print __doc__ ... >>>

Re: Function docstring as a local variable

2011-07-10 Thread Corey Richardson
Excerpts from Colin J. Williams's message of Sun Jul 10 18:28:15 -0400 2011: > Try: > > def f(): > ds= """docstring""" > print ds That doesn't actually make a docstring, though. It makes a string object and points the name ds at it. Do you know what a docstring is? def foo(): """

Re: Function docstring as a local variable

2011-07-10 Thread Carl Banks
On Sunday, July 10, 2011 3:50:18 PM UTC-7, Tim Johnson wrote: > Here's a related question: > I can get the docstring for an imported module: > >>> import tmpl as foo > >>> print(foo.__doc__) > Python templating features > >Author - tim at akwebsoft dot com > > ## Is it possible to

Wgy isn't there a good RAD Gui tool fo python

2011-07-10 Thread Ivan Kljaic
Ok Guys. I know that most of us have been expiriencing the need for a nice Gui builder tool for RAD and most of us have been googling for it a lot of times. But seriously. Why is the not even one single RAD tool for Python. I mean what happened to boa constructor that it stopped developing. I simpl

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* pyt...@bdurham.com [110710 14:17]: > I'm not sure how a function can get a generic handle to itself, but if > you're willing to hardcode the function name, then this technique works: > > def test(): > """This is my doc string""" > print test.__doc__ > > test() Works for me. Works for

Re: String concatenation vs. string formatting

2011-07-10 Thread Steven D'Aprano
Roy Smith wrote: > The canonical way to do that would be something like > > fields = [demux_filter, > field_filter, > fpsin_filter, > i2pfilter, > dn_filter, > fpsout_filter, > trim_filter, > info_filter] > avs.write(''.join(fi

Re: Function docstring as a local variable

2011-07-10 Thread Roy Smith
In article , pyt...@bdurham.com wrote: > I'm not sure how a function can get a generic handle to itself, but if > you're willing to hardcode the function name, then this technique works: > > def test(): > """This is my doc string""" > print test.__doc__ > > test() > > Outputs: > > Thi

Re: A beginning programmer

2011-07-10 Thread Thomas Jollans
On 07/11/2011 12:22 AM, Thomas Jollans wrote: > On 07/11/2011 12:06 AM, Eric wrote: >> My problem is this though... I don't know what to do with this new >> found knowledge of these languages. I'm a linux user so availability >> of development tools is haaardly a problem. But I just don't know

Re: Function docstring as a local variable

2011-07-10 Thread Colin J. Williams
On 10-Jul-11 13:44 PM, rantingrick wrote: On Jul 10, 12:41 pm, Tim Johnson wrote: It possible for a function to print it's own docstring? def f(): """docstring""" print "docstring" any questions? Try: def f(): ds= """docstring""" print ds > Colin W. -- http://mail.pyth

Re: A beginning programmer

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 05:06 PM, Eric wrote: > But I just don't know what to do with it You and I are quite different. I don't enjoy programming much, but Python is a great tool to accomplish a few goals that I have. > I don't have any problems that need

Re: A beginning programmer

2011-07-10 Thread Thomas Jollans
On 07/11/2011 12:06 AM, Eric wrote: > My problem is this though... I don't know what to do with this new > found knowledge of these languages. I'm a linux user so availability > of development tools is haaardly a problem. But I just don't know > what to do with it, I don't have any problems tha

Re: Function docstring as a local variable

2011-07-10 Thread python
I'm not sure how a function can get a generic handle to itself, but if you're willing to hardcode the function name, then this technique works: def test(): """This is my doc string""" print test.__doc__ test() Outputs: This is my doc string Malcolm -- http://mail.python.org/mailman/li

A beginning programmer

2011-07-10 Thread Eric
Greetings everyone; Fresh High School graduate here with a passion for problem solving. My last 2 years of HS I took programming courses (actually fairly good ones; yay for good tech departments) that showed me QuickBasic VisualBasic C++ Java (in that order) A friend of mine often talked about

Re: Morelia for BDD in Python

2011-07-10 Thread Ben Finney
rusi writes: > Just curious: Do you manage to stay within debian packages and have > all the python packages you want/need at the versions that are most > convenient? When that's not the case, I consider it not a status quo to live with, but a problem to be addressed. -- \ “I cannot conce

Re: Newbie help - Programming the Semantic Web with Python

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 02:28 PM, Bruce Whealton wrote: > If you know of any good resources for finding python applications on > the web, this might be a good way to learn. I don't know if I > should look for Python applications, or if I'll have more luck

Re: parsing packets

2011-07-10 Thread geremy condra
On Sun, Jul 10, 2011 at 4:59 PM, Littlefield, Tyler wrote: > Hello all: > I'm working on a server that will need to parse packets sent from a client, > and construct it's own packets. > The setup is something like this: the first two bytes is the type of the > packet. > So, lets say we have a pack

Re: Function docstring as a local variable

2011-07-10 Thread Richard Thomas
> >>> def findself(): > >         """Find myself. Ooh look, there I am!""" >         import sys >         try: >                 1/0 >         except: >                 traceback=sys.exc_info()[2] >         # Now I'm not sure what to do with traceback. >         # traceback.tb_frame.f_code.co_name

parsing packets

2011-07-10 Thread Littlefield, Tyler
Hello all: I'm working on a server that will need to parse packets sent from a client, and construct it's own packets. The setup is something like this: the first two bytes is the type of the packet. So, lets say we have a packet set to connect. There are two types of connect packet: a auth pac

Re: Function docstring as a local variable

2011-07-10 Thread Tim Johnson
* Andrew Berg [110710 09:59]: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > On 2011.07.10 12:41 PM, Tim Johnson wrote: > > It possible for a function to print it's own docstring? > >>> def test(): > ... """Hi there.""" > ... print(test.__doc__) Holy Moly. Of course! thank

Re: Newbie help - Programming the Semantic Web with Python

2011-07-10 Thread Bruce Whealton
Thanks for the tips. I actually had done some studies with Python, mainly Python 3, back about 6 months ago and over a period of a few months. I didn't write a great deal of programs though, at the time. I got away from it in a while and I didn't want to go back to step one of being like a tot

Re: Function docstring as a local variable

2011-07-10 Thread Chris Angelico
On Mon, Jul 11, 2011 at 3:47 AM, Andrew Berg wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > On 2011.07.10 12:41 PM, Tim Johnson wrote: >> It possible for a function to print it's own docstring? def test(): > ...     """Hi there.""" > ...     print(test.__doc__) That's assu

Re: Morelia for BDD in Python

2011-07-10 Thread rusi
On Jul 10, 10:21 am, Ben Finney wrote: > Phlip writes: > > 'sudo pip install morelia' just worked for me, on Ubuntu. > > The problem with ‘pip’ is that it's a parallel package installation that > ignores the available package management system on the OS. > > That's not a fault of ‘pip’ or Setupto

Re: Function docstring as a local variable

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 12:41 PM, Tim Johnson wrote: > It possible for a function to print it's own docstring? >>> def test(): ... """Hi there.""" ... print(test.__doc__) ... >>> test() Hi there. - -- CPython 3.2 | Windows NT 6.1.7601.17592 | Thun

Re: Function docstring as a local variable

2011-07-10 Thread rantingrick
On Jul 10, 12:41 pm, Tim Johnson wrote: > It possible for a function to print it's own docstring? def f(): """docstring""" print "docstring" any questions? -- http://mail.python.org/mailman/listinfo/python-list

Function docstring as a local variable

2011-07-10 Thread Tim Johnson
Consider the following: ## code def test(): """This is my docstring""" print(??) ## can I print the docstring above? ## /code It possible for a function to print it's own docstring? thanks (pointers to docs could be sufficient) -- Tim tim at johnsons-web dot com or akwebsoft dot com htt

Re: Virtual functions are virtually invisible!

2011-07-10 Thread Chris Angelico
On Mon, Jul 11, 2011 at 3:15 AM, rantingrick wrote: >  I suggest we solve this dilemma by forcing a syntax "tag" when > declaring clobbering virtual functions. Python has other dilemmas, too. I suggest we adopt the same solution. For instance, every statement should begin with a marker, so that w

Re: Virtual functions are virtually invisible!

2011-07-10 Thread rantingrick
On Jul 4, 3:43 am, Gregory Ewing wrote: > rantingrick wrote: > > what concerns me is the fact that virtual methods in derived > > classes just blend in to the crowd. > > I think we really need some > > sort of visual cue in the form of forced syntactical notation (just > > like the special method

Re: Morelia for BDD in Python

2011-07-10 Thread Phlip
Two of my feature requests for Morelia: - integrate with the test runner (nose etc.) to provide one dot . per passing step - insert a long multi-line abstract string (typically XML) with inside [[CDATA-style escaping tags - the ability to stub a step as - the ability to pass a | de

Re: anonymous function with multiple statements

2011-07-10 Thread Terry Reedy
On 7/10/2011 7:21 AM, Yingjie Lan wrote: I wonder if Python provides a way to define anonymous functions containing multiple statements? No, intentionally not. Forget this idea. Multiple functions named '' are inferior for representation purposes, like in error tracebacks, to those with indi

Re: Morelia for BDD in Python

2011-07-10 Thread Phlip
> I think it would add great value, since without it I'm unlikely to > bother using Morelia in any project. The maintenance burden is too high > to keep adding dependencies that come from a distinct dependency system > outside my OS. pip freeze! Specifically, we already added pip freeze and virtua

Re: why the following python program does not face any concurrency problems without synchronize mechanism?

2011-07-10 Thread TheSaint
smith jack wrote: > have run this program for many times,and the result is always 5050 You might not need to make it in a multiprocess environment Try it in the python (3) shell >>> tot= 0 >>> for k in range(1,100): ... tot += k ... print(tot) ... And watch the risults. -- goto /dev/nul

Re: String concatenation vs. string formatting

2011-07-10 Thread Roy Smith
In article , Andrew Berg wrote: > How should I go about switching from concatenation to string formatting > for this? > > avs.write(demux_filter + field_filter + fpsin_filter + i2pfilter + > dn_filter + fpsout_filter + trim_filter + info_filter) > > I can think of a few ways, but none of them

anonymous function with multiple statements

2011-07-10 Thread Yingjie Lan
Hi all, I wonder if Python provides a way to define anonymous functions containing multiple statements? With lambda form, we can only define a function of a single expression. In Javascript, it is possible to define a full-fledged anonymous functions, which suggests it is useful to have it. I

Re: String concatenation vs. string formatting

2011-07-10 Thread Steven D'Aprano
Andrew Berg wrote: > How should I go about switching from concatenation to string formatting > for this? > > avs.write(demux_filter + field_filter + fpsin_filter + i2pfilter + > dn_filter + fpsout_filter + trim_filter + info_filter) > > I can think of a few ways, but none of them are pretty. fi

Re: Finding duplicated photo

2011-07-10 Thread Kevin Zhang
On Fri, Jul 8, 2011 at 8:37 PM, Billy Mays wrote: > > > I recently wrote a program after reading an article ( > http://www.hackerfactor.com/**blog/index.php?/archives/432-** > Looks-Like-It.html) > using the DCT method h

Re: How can I make a program automatically run once per day?

2011-07-10 Thread Paul Rudin
John Salerno writes: > I have a script that does some stuff that I want to run every day for > maybe a week, or a month. So far I've been good about running it every > night, but is there some way (using Python, of course) that I can make > it automatically run at a set time each night? Well - y

Re: String concatenation vs. string formatting

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 04:47 AM, Vinay Sajip wrote: > You don't need logutils, just the BraceMessage class - which is > shown in the blog post (around 10 lines). Feel free to use it with > copy and paste :-) I didn't realize that was the actual class when

Re: String concatenation vs. string formatting

2011-07-10 Thread Vinay Sajip
Andrew Berg gmail.com> writes: > On 2011.07.10 02:23 AM, Vinay Sajip wrote: > > There are examples in the blog post I linked to earlier: > It seems that would require logutils. I'm trying to keep dependencies to > a minimum in my project, but I'll take a look at logutils and see if > there's anyt

Re: How can I make a program automatically run once per day?

2011-07-10 Thread Rafael Durán Castañeda
On 10/07/11 04:01, John Salerno wrote: Thanks everyone! I probably should have said something like "Python, if possible and efficient, otherwise any other method" ! :) I'll look into the Task Scheduler. Thanks again! You may use Celery http://docs.celeryproject.org/en/latest/userguide/periodic-

Re: String concatenation vs. string formatting

2011-07-10 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.10 02:23 AM, Vinay Sajip wrote: > There are examples in the blog post I linked to earlier: It seems that would require logutils. I'm trying to keep dependencies to a minimum in my project, but I'll take a look at logutils and see if the

Re: String concatenation vs. string formatting

2011-07-10 Thread Vinay Sajip
Andrew Berg gmail.com> writes: > How would I do that with the newer formatting? I've tried: There are examples in the blog post I linked to earlier: http://plumberjack.blogspot.com/2010/10/supporting-alternative-formatting.html Regards, Vinay Sajip -- http://mail.python.org/mailman/listinf

Re: What makes functions special?

2011-07-10 Thread Terry Reedy
On 7/9/2011 6:34 PM, Steven D'Aprano wrote: Suppose instead an implementation of Python did not pre-compile the function. Each time you called spam(n), the implementatio n would have to locate the source code and interpret it on the spot. Would that be allowed?" If that's your question, then I