[EMAIL PROTECTED] a écrit :
> I tried writing a true and false If statement and didn't get
> anything? I read some previous posts, but I must be missing
> something. I just tried something easy:
>
> a = ["a", "b", "c", "d", "e", "f"]
>
> if "c" in a == True:
> Print "Yes"
>
> When I run t
Hi guys i need to make a table to store a certain data using
Tkinter..I have searched on the group but i have not been able to find
a solution that would work for me..The thing is that i want my table
to be scrollable both horizontally and vertically and i also want to
transmit the data from the ta
Neil Cerutti a écrit :
(snip)
>
> Vim has Python integration if you want to control it with Python
> scripts. Cool! Of course, Vim needs such a capability more than
> Emacs, which has the very cool elisp scripting language.
FWIW, emacs is programmable in Python too IIRC.
--
http://mail.python.or
Fredrik Lundh wrote:
> Shawn Minisall wrote:
>
>
>> Sorry, it looks like it's on the fourth line with the 3 values on line
>> 4...its reading line 3 fine
>>
>> Traceback (most recent call last):
>> File "", line 1, in
>> main()
>> File "I:\COMPUTER PROGRAMMING CLASS\PROJECT #1\project1
On Sep 27, 10:46 am, Alexandre Badez <[EMAIL PROTECTED]>
wrote:
> On Sep 27, 4:20 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > I got it to work using subprocess.Popen
>
> > Not sure why it doesn't work with os.system though.
>
> > Mike
>
> Thanks Mike and Mauro,
>
> Mauro, your solution do not seems to w
On Sep 27, 1:34 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
...
> >>> args
>
> ['-123']
>
> Without the "--" arg you will get an error:
>
> >>> parser.parse_args(["-123"])
>
> Usage: [options]
>
> : error: no such option: -1
> $
>
> Peter
Passing -a-123 works
>>> options, args = parser.parse_args(
I have a pretty simple XMLRPCServer, something along the lines of the
example:
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_function(pow)
server.register_function(lambda x,y: x+y, 'add')
server.serve_forever()
Now what I want to do is catch any errors that happen on requests,
On Sep 26, 11:50 pm, [EMAIL PROTECTED] wrote:
> On Sep 26, 4:49 pm, Svenn Are Bjerkem <[EMAIL PROTECTED]>
> wrote:
>
> > I have downloaded this package and installed it and found that the
> > text-extraction is more or less useless. Looking into the code and
> > comparing with the PDF spec show a v
[EMAIL PROTECTED] a écrit :
> I have a pretty simple XMLRPCServer, something along the lines of the
> example:
>
> server = SimpleXMLRPCServer(("localhost", 8000))
> server.register_function(pow)
> server.register_function(lambda x,y: x+y, 'add')
> server.serve_forever()
>
> Now what I want to do
Shawn Minisall a écrit :
> Fredrik Lundh wrote:
>
>> Shawn Minisall wrote:
>>
>>
>>
>>> Sorry, it looks like it's on the fourth line with the 3 values on
>>> line 4...its reading line 3 fine
>>>
>>> Traceback (most recent call last):
>>> File "", line 1, in
>>> main()
>>> File "I:\COMP
On Sep 27, 12:46 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote:
> I am trying to read a few lines of a file with multiple values, the rest
> are single and are reading in fine.
>
> With the multiple value lines, python says this "ValueError: too many
> values to unpack"
>
> I've googled it and it sa
Instead of register_function, use register_instance and provide a
_dispatch method in that instance that handles your exception logging.
Pseudo:
class MyCalls(object):
def _dispatch(self, method, args):
try:
self.getattr(self, method)(*args)
except:
han
On Thu, Sep 27, 2007 at 09:50:26PM +0200, Bruno Desthuilliers wrote regarding
Re: ValueError: too many values to unpack,>>>:
>
> Shawn Minisall a ?crit :
> > Fredrik Lundh wrote:
> >
> >> Shawn Minisall wrote:
> >>
> >>
> >>
> >>> Sorry, it looks like it's on the fourth line with the 3 values
Joel <[EMAIL PROTECTED]> writes:
>> Note that, unlike the original alarm code, it doesn't really interrupt
>> the timed-out method, it just returns the control back to the caller,
>> using an exception to mark that a timeout occurred. The "timed out"
>> code is still merrily running in the backgr
getattr, not self.getattr.
On 9/27/07, Jeff McNeil <[EMAIL PROTECTED]> wrote:
> Instead of register_function, use register_instance and provide a
> _dispatch method in that instance that handles your exception logging.
>
> Pseudo:
>
> class MyCalls(object):
> def _dispatch(self, method, args):
Shawn Minisall wrote:
> Fredrik Lundh wrote:
>> Shawn Minisall wrote:
>>
>>
>>> Sorry, it looks like it's on the fourth line with the 3 values on line
>>> 4...its reading line 3 fine
>>>
>>> Traceback (most recent call last):
>>> File "", line 1, in
>>> main()
>>> File "I:\COMPUTER PRO
On 9/27/07, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Joel <[EMAIL PROTECTED]> writes:
>
> >> Note that, unlike the original alarm code, it doesn't really interrupt
> >> the timed-out method, it just returns the control back to the caller,
> >> using an exception to mark that a timeout occurred.
On Sep 27, 3:55 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> Instead of register_function, use register_instance and provide a
> _dispatch method in that instance that handles your exception logging.
>
> Pseudo:
>
> class MyCalls(object):
> def _dispatch(self, method, args):
> try:
>
Yeah, that code was out of memory and I didn't test it, my apologies.
Need to actually return a value from _dispatch.
class MyCalls(object):
def _dispatch(self, method, args):
try:
return getattr(self, method)(*args)
except:
handle_logging()
server = SimpleX
Ankit,
Have you tried the HList (or one of the descendant widgets) in Tix? The Tix
library includes quite a few additional widgets and it's part of the
standard python distribution.
Ron
- Original Message -
From: "Ankit" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Thur
[EMAIL PROTECTED] wrote:
>Makes perfect sense to me! Think about it:
>
>method 1: looks up the method directly from the object (fastest)
>method 2: looks up __class__, then looks up __dict__, then gets the
>element from __dict__
>method 3: looks up caller, looks up __class__, looks up __dict__, ge
"Chris Mellon" <[EMAIL PROTECTED]> writes:
> You can use ctypes and the Python API to raise a Python exception in
> the thread.
How, by changing the thread's exception state?
--
http://mail.python.org/mailman/listinfo/python-list
I'm stymied by what should be a simple Python task: accessing the value of
a variable assigned in one module from within a second module. I wonder if
someone here can help clarify my thinking. I've re-read Chapter 16 (Module
Basics) in Lutz and Ascher's "Learning Python" but it's not working for
On Sep 27, 2:21 pm, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote:
> If you can access the argument list manually, you could scan it for a
> negative integer,
> and then insert a '--' argument before that, if needed, before passing it to
> getopt/optparse.
> Then you wouldn't have to worry about i
[EMAIL PROTECTED] wrote:
> I'm stymied by what should be a simple Python task: accessing the value of
> a variable assigned in one module from within a second module. I wonder if
> someone here can help clarify my thinking. I've re-read Chapter 16 (Module
> Basics) in Lutz and Ascher's "Learning
Hello,
I am trying to create a cgi which downloads a pdf/tiff file from an
ftpserver using ftplib.
Everything works until this point.
But, once the file has been retrieved, I want to be able to stream the file
to the browser so that the user gets an option to save it, or open it with
the necessary
hi!
i was buiding an application using python...a program
this was my first one...now that i got it working perfectly
how can i put the bunch of files into one package?
the user of the appliation will not know where to start? that is which
file to click on in oder to start the program?
thanks a lot
On Sep 27, 2:21 pm, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote:
> If you can access the argument list manually, you could scan it for a
> negative integer, and then insert a '--' argument before that,
> if needed, before passing it to getopt/optparse. Then you wouldn't have to
> worry about it
En Thu, 27 Sep 2007 13:52:39 -0300, Piyush Jain <[EMAIL PROTECTED]>
escribi�:
>> I am new(almost) to python. I wish to making a server in which I can
>> make changes at run time. For example , add a method to a
>> class/attribute to object etc. by sending it messages.
To add a new attribute wit
Casey wrote:
> Is there an easy way to use getopt and still allow negative numbers as
> args?
[snip]
> Alternatively, does optparse handle this?
Peter Otten wrote:
> optparse can handle options with a negative int value; "--" can be used to
> signal that no more options will follow:
>
import
I wondered if a straw poll could get some idea of readers' thoughts
about when they will be migrating to 3.0 on, so I used the new widget on
Blogger to add a poll for that.
I'd appreciate if if you would go to
http://holdenweb.blogspot.com/
and register your vote on your intended migration
Cool.. glad it works. Just be careful not to expose methods you may not
want to; use decorators, attributes, or perhaps a custom method naming
scheme to flag methods as exposed if you do it this way.
On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> On Sep 27, 5:08 pm, "Jeff McNeil" <[
Steve Holden wrote:
> I wondered if a straw poll could get some idea of readers' thoughts
> about when they will be migrating to 3.0 on, so I used the new widget on
> Blogger to add a poll for that.
>
> I'd appreciate if if you would go to
>
> http://holdenweb.blogspot.com/
>
> and register
Two existing solutions are TableList + TableListWrapper (Google for
it), and MultiListBox
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266 In both
cases you send the program the titles and data and the program takes
care of all of the details. BTW, you can attach a scrollbar to any
Steve Holden wrote:
> I wondered if a straw poll could get some idea of readers' thoughts
> about when they will be migrating to 3.0 on, so I used the new widget on
> Blogger to add a poll for that.
>
> I'd appreciate if if you would go to
>
>http://holdenweb.blogspot.com/
>
> and register y
Steve Holden <[EMAIL PROTECTED]> writes:
> So what we need is a poll on what the questions should be. I *love* c.l.py.
One of the offered answers to the current question should be "never".
That is, I'm hoping to skip 3.0 and switch directly to PyPy.
--
http://mail.python.org/mailman/listinfo/pyth
On Sep 27, 7:57 pm, Neal Becker <[EMAIL PROTECTED]> wrote:
> One person's "brilliant" is another's "kludge".
Well, it is a hack and certainly not as clean as having getopt or
optparse handle this natively (which I believe they should). But I
think it is a simple and clever hack and still allows ge
It seems that Python 3 is more significant for what it removes than
what it adds.
What are the additions that people find the most compelling?
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard <[EMAIL PROTECTED]> writes:
> In most cases, argparse (http://argparse.python-hosting.com/)
> supports negative numbers right out of the box, with no need to use
> '--':
>
> >>> import argparse
> >>> parser = argparse.ArgumentParser()
> >>> parser.add_argument('-a', typ
Zentrader wrote:
> On Sep 27, 9:46 am, Shawn Minisall <[EMAIL PROTECTED]> wrote:
>
>> line 3 - 19.1829.1578.75212.10
>> line 4 - 10020410.29
>> And this is the code I'm using:
>>
>>#read withdrawls from file on line3
>>line = infile.readline()
>> #split withdrawl
James Stroud wrote:
> Steve Holden wrote:
>> I wondered if a straw poll could get some idea of readers' thoughts
>> about when they will be migrating to 3.0 on, so I used the new widget on
>> Blogger to add a poll for that.
>>
>> I'd appreciate if if you would go to
>>
>> http://holdenweb.blogs
On Sep 27, 9:46 am, Shawn Minisall <[EMAIL PROTECTED]> wrote:
> I am trying to read a few lines of a file with multiple values, the rest
> are single and are reading in fine.
>
> With the multiple value lines, python says this "ValueError: too many
> values to unpack"
>
> I've googled it and it say
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
>
>I wondered if a straw poll could get some idea of readers' thoughts
>about when they will be migrating to 3.0 on, so I used the new widget on
>Blogger to add a poll for that.
>
>I'd appreciate if if you would go to
>
>
On 2007-09-27, Steve Holden <[EMAIL PROTECTED]> wrote:
> Self-evidently you are *not* creating the variables you think you are in
> the variablePage module. Have you tried an interactive test? Try this at
> the interpreter prompt:
>
> >>> import variablePage
> >>> dir(variablePage)
>
> and you wil
Yes, use PythonInputFilter directive to specify an input filter.
http://www.modpython.org/live/current/doc-html/dir-filter-if.html
Input filters which modify the length of the data may be an issue
though when doing proxying however.
If you cant work it out, possibly more appropriate to take yo
Casey wrote:
> On Sep 27, 2:21 pm, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote:
>> If you can access the argument list manually, you could scan it for a
>> negative integer, and then insert a '--' argument before that,
>> if needed, before passing it to getopt/optparse. Then you wouldn't have
>>
On Sep 27, 5:08 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> Yeah, that code was out of memory and I didn't test it, my apologies.
> Need to actually return a value from _dispatch.
>
> class MyCalls(object):
>def _dispatch(self, method, args):
>try:
>return getattr(self, m
[EMAIL PROTECTED] wrote:
> On 2007-09-27, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>> Self-evidently you are *not* creating the variables you think you are in
>> the variablePage module. Have you tried an interactive test? Try this at
>> the interpreter prompt:
>>
> import variablePage
>
On Sep 28, 10:06 am, yadin <[EMAIL PROTECTED]> wrote:
> hi!
> i was buiding an application using python...a program
> this was my first one...now that i got it working perfectly
> how can i put the bunch of files into one package?
> the user of the appliation will not know where to start? that is w
class FakeQueue(list):
put = list.append
get = lambda self: self.pop(0)
;]
--
http://mail.python.org/mailman/listinfo/python-list
>
> - Abstract Base Classes
> http://www.python.org/dev/peps/pep-3119/>
>
I like how someone here characterized decorators - those silly @
things. They remind me of Perl. Not adding keywords for abstract and
static is like Perl not adding a keyword for class. But I know all
such additions a
[EMAIL PROTECTED] wrote:
> World's most popular traveling destinations
>
> http://...
"Nobody goes there any more; it's too crowded." -- LPB
--
Eric Sosman
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> It seems that Python 3 is more significant for what it removes than
> what it adds.
That's certainly the focus of an explicitly backward-incompatible
upgrade, yes.
> What are the additions that people find the most compelling?
Most of the addition
On Sep 27, 5:06 pm, yadin <[EMAIL PROTECTED]> wrote:
> hi!
> i was buiding an application using python...a program
> this was my first one...now that i got it working perfectly
> how can i put the bunch of files into one package?
> the user of the appliation will not know where to start? that is wh
Casey <[EMAIL PROTECTED]> writes:
> Well, it is a hack and certainly not as clean as having getopt or
> optparse handle this natively (which I believe they should).
I believe they shouldn't because the established interface is that a
hyphen always introduced an option unless (for those programs t
Simon Forman <[EMAIL PROTECTED]> writes:
> class FakeQueue(list):
> put = list.append
> get = lambda self: self.pop(0)
from collections import deque
class FakeQueue(deque):
put = deque.append
get = deque.popleft
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>> So what we need is a poll on what the questions should be. I *love* c.l.py.
>
> One of the offered answers to the current question should be "never".
> That is, I'm hoping to skip 3.0 and switch directly to PyPy.
Well, "No current pl
On 9/27/07, TheFlyingDutchman <[EMAIL PROTECTED]> wrote:
> It seems that Python 3 is more significant for what it removes than
> what it adds.
>
> What are the additions that people find the most compelling?
- dict.items(), .values() and .keys() returns "dict views", and the
.iter*() removal
h
>
> That't not the reason. A Queue is built around a container, and it happens
> to be a deque in the default implementation. But the important thing is
> that a Queue is a synchronized object - it performs the necesary
> synchronization to ensure proper operation even from multiple threads
> attem
[EMAIL PROTECTED] wrote:
> http://free-guitars.blogspot.com/
And the chicks for free !
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 27 Sep 2007 10:37:05 -0300, Mark Bratcher
<[EMAIL PROTECTED]> escribi�:
> The Quick Screenshots Script (Python + PIL) is a "dream come true", and
> yet
> so simple to use reliably. Does anyone have a suggestion or know how to
> include in the script, the ability to email the attachmen
En Thu, 27 Sep 2007 07:44:08 -0300, Shriphani <[EMAIL PROTECTED]>
escribi�:
> def listAllbackups(filename):
> list_of_backups = glob(home+'/Desktop/backupdir/*%s*'%filename)
> for element in list_of_back:
> if element.find(file) != -1:
> date_compo
On Sep 26, 11:23 pm, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote:
> A while back, I seem to remember coming across a small program that could
> view and edit python data structures via a nice expanding tree view. I'm
> now in need of something like that (to verify data is imported correctly
> int
Ben Finney wrote:
> Steven Bethard <[EMAIL PROTECTED]> writes:
>
>> In most cases, argparse (http://argparse.python-hosting.com/)
>> supports negative numbers right out of the box, with no need to use
>> '--':
>>
>> >>> import argparse
>> >>> parser = argparse.ArgumentParser()
>> >>> p
When I am compiling some code, I am getting the following the above
mentioned error. So how can i go about solving this issue.
Should I recompile python using -enable-unicode=UCS4 option. Is there no
other way to solve this issue.
Amal.
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 28 Sep 2007 00:52:57 -0300, wink <[EMAIL PROTECTED]> escribi�:
> Interesting, from the documentation for deque says;
> "Deques support thread-safe, ..." which would seem to
> imply a mutex of some sort would be used. But in
> looking at collectionsmodule.c for 2.5.1 I don't see
> any mutex
Announcing
--
The 2.8.6.0 release of wxPython is now available for download at
http://wxpython.org/download.php. This release is mostly about fixing
a number of bugs and inconsistencies in wxWidgets and wxPython.
Source code is available, as well as binaries for Python 2.3, 2.4 and
2.5,
TheFlyingDutchman wrote:
> It seems that Python 3 is more significant for what it removes than
> what it adds.
>
> What are the additions that people find the most compelling?
I'd rather see Python 2.5 finished, so it just works.
All the major third-party libraries working and available with
I need to use Python with SSL comunication betweeen servers.
(I use hhtplib but I think urllib2 can also be used )
I think I need to use SSL root certificate and tell a program to
trust this certificate.
But how can I tell my Python program to trust my SSL certificate?
When I tried before I rece
I have been chasing a problem in my code since hours and it bolis down
to this
import marshal
marshal.dumps(str(123)) != marshal.dumps(str("123"))
Can someone please tell me why?
when
str(123) == str("123")
or are they different?
it also means that
if s = str(123)
marshal.dumps(s) != marshal.dum
On 9/27/07, Joshua J. Kugler <[EMAIL PROTECTED]> wrote:
> A while back, I seem to remember coming across a small program that could
> view and edit python data structures via a nice expanding tree view. I'm
> now in need of something like that (to verify data is imported correctly
> into a shelve
101 - 171 of 171 matches
Mail list logo