Matteo wrote:
> I am trying to get Python to extract attributes in full dotted form
> from compiled expression. For instance, if I have the following:
>
> param = compile('a.x + a.y','','single')
>
> then I would like to retrieve the list consisting of ['a.x','a.y'].
> I have tried using inspect
"Steve Holden" wrote:
> It's difficult to establish, and then correctly implement, almost any
> security protocol without leaving cracks that attackers can lever open
> and use to inject code into your process's memory space.
I can accept this - its difficult enough to write a receiver that sync
[EMAIL PROTECTED] wrote:
> On Jul 23, 4:46 pm, "Richard Brodie" <[EMAIL PROTECTED]> wrote:
>> <[EMAIL PROTECTED]> wrote in message
>>
>> news:[EMAIL PROTECTED]
>>
>>> so what's the difference? how comes parsing is fine
>>> in the first case but erroneous in the second case?
>> You may have guessed
On Tue, 24 Jul 2007 03:19:05 +, james_027 wrote:
> python's staticmethod is the equivalent of java staticmethod right?
Correct. `staticmethod` is essentially just a function moved into a class
and accessible at the class object and instances of that class.
As Python opposed to Java has func
james_027 a écrit :
> hi,
>
> python's staticmethod is the equivalent of java staticmethod right?
IIRC, yes. A 'staticmethod' is in fact nothing more than a function
attached to a class, and which can be called on the class or an instance
of. Note that since Python supports modules and function
Hi there,
What was the solution you found?
Could you please post it? I'm having the same problem... ;o(
Thanks!
Harel
On Jul 16, 2:53 pm, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> Hallöchen!
>
> Ingrid Bronger writes:
> > [...]
>
> > The Content-Transfer-Encoding is wrong. Okay (well, not okay
On Tue, 24 Jul 2007 05:57:26 +, oren.tsur wrote:
> but the thing is that the parser parses it all right from the web (the
> amazon response) but fails to parse the locally saved file.
I've just used wget to fetch that URL and `ElementTree` parses that local
file without problems.
Maybe you s
> If you have a good programming background in other languages, you
> should easily be able to pick up Python by reading the manual.
>
Dear all, thank you for your info. I forgot to mention that I already
know how to program in Python (basic), my knowledge derives from a
very good level of C (Uni
G <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> --=_Part_187401_13883248.1185238999144
> Hi,
>
> I am trying to subclass int to allow a constructor to accept None.
> I am
> trying the following
>
> class INT(int):
> def __init__(self, x):
> if x is None:
>
NicolasG a écrit :
> Hi,
>
> I want to be a professional python programmer,
While there are (more and more) professional programmers using Python,
either as their main language or not, there's no such thing as a
"professional Python programmer", because being a proofessional
programmer requir
Sandra-24 <[EMAIL PROTECTED]> wrote:
> So thinking myself clever with python I thought I could change
> S3ResponseError to have a __new__ method which returns one of the 30
> new exceptions. That way none of the raise S3ResponseError code needs
> changing. No problem. The trouble comes with those
NicolasG <[EMAIL PROTECTED]> writes:
> The problem is that I would like to work as a Python programmer but
> all the job vacancies I can find requires a couple of years of
> professional experience ... that I don't have. How a wanna be
> programmer can start working as a programmer if there is no c
Paul Rubin napisał(a):
>> The problem is that I would like to work as a Python programmer but
>> all the job vacancies I can find requires a couple of years of
>> professional experience ... that I don't have. How a wanna be
>> programmer can start working as a programmer if there is no chance to
Can someone tell me why python doesn't crash when I do the following:
>>> a=[]
>>> a.append(a)
>>> print a
[[...]]
>>> print a[0][0][0][0][0][0][0]
[[...]]
How does python handle this internally? Will it crash or use up lot's
of memory in similar but more complicated cases?
--
http://mail.pytho
Sorry, I know this is not the most appropriate place to talk about
wxPython.
But I can't have access to wxPython mail list page(because I don't pay
enough).
I downloaded python2.5 and wxPython 2.8.4.0 from pythonmac.org and
installed them into one of my friends' Mac 10.4.8(intel)
and I found wx.li
I want to apply a method (replaceFieldsAndIndices) in my class to a
number of attributes of a data structure.
Specifically, to give some context, in the variable j below, I want to
replace wildcards with values.
I wanted to avoid cluttering the code with multiple calls to the
method replaceFields
Hello,
I am running OS X 10.4, on an Intel Mac, Python 2.5 not installed by
source (I used the binary install from the website). When I do the
following, I get an error:
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "co
Hi,
I'm trying to display image through my cgi script in HTML page
via
Can you give me an example, please?
What should be in the cgi script to display it?
Here is what I have in image.cgi but it is incorrect and i'm not able to
find it on the web.
#!/usr/bin/python
print "Content-Type: image/p
On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote:
> Here is what I have in image.cgi but it is incorrect and i'm not able to
> find it on the web.
>
> #!/usr/bin/python
> print "Content-Type: image/png\n"
> print 'image.png'
You have to print the image, not the name. Read the binary fi
On Tue, 24 Jul 2007 02:26:15 -0700, NetHead wrote:
> The code below is WRONG, but hopefully illustrates what I am trying to
> achieve.
>
> Any suggestions how to code this is an efficient and maintainable (and
> correct) manner?
>
> […]
> for i in wildcards:
> for j in i:
>
[EMAIL PROTECTED] wrote:
> Can someone tell me why python doesn't crash when I do the following:
>
a=[]
a.append(a)
print a
> [[...]]
print a[0][0][0][0][0][0][0]
> [[...]]
>
> How does python handle this internally? Will it crash or use up lot's
> of memory in similar but mo
There are various things I like about the D language that I think
Python too may enjoy. Here are few bits (mostly syntactical ones):
1) (we have discussed part of this in the past) You can put
underscores inside number literals, like 1_000_000, the compiler
doesn't enforce the position of such und
Duncan Booth a écrit :
(snip)
> I think what you want for Bar is something more along the lines:
(snip)
> class Bar(Foo):
> def __new__(cls, a, b, c, *args):
> print 'Bar.__new__', len(args)
> target = cls
You don't use 'target' anywhere...
> if not args:
>
hi,
> The 'real' use is (are) the one(s) you'll find. FWIW, I use
> staticmethods for helper functions that don't need access to the class
> or instance but are too specific to a class to be of any use as plain
> functions. Which is not a very frequent case. Classmethods are more
> usefull - mostl
Marc 'BlackJack' Rintsch wrote:
> On Tue, 24 Jul 2007 05:57:26 +, oren.tsur wrote:
>
>> but the thing is that the parser parses it all right from the web (the
>> amazon response) but fails to parse the locally saved file.
>
> I've just used wget to fetch that URL and `ElementTree` parses that
james_027 a écrit :
> hi,
>
>> The 'real' use is (are) the one(s) you'll find. FWIW, I use
>> staticmethods for helper functions that don't need access to the class
>> or instance but are too specific to a class to be of any use as plain
>> functions. Which is not a very frequent case. Classmethod
> Why would you want to become a programmer? Programmers smell bad,
> they have no social life, they get treated like crap by everyone.
> They can get paid pretty well but then they spend all the money on
> useless electronic junk so they still live like bums.
I wouldn't call this person program
Hi,
Could someone help on how to use python to output the next month string like
this?
"AUG07", suppose now is July 2007.
I think also need to consider Dec 07 case, it is supposed to output as
below:
"JAN07".
datetime module seems not supporting the arithmatic operations, any hints?
Thanks in
My bad, for Dec 07, it shall output as JAN08.
"Yinghe Chen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> Could someone help on how to use python to output the next month string
> like this?
>
> "AUG07", suppose now is July 2007.
>
> I think also need to consider Dec 07 cas
ahlongxp wrote:
> Sorry, I know this is not the most appropriate place to talk about
> wxPython.
> But I can't have access to wxPython mail list page(because I don't pay
> enough).
>
> I downloaded python2.5 and wxPython 2.8.4.0 from pythonmac.org and
> installed them into one of my friends' Mac 1
Marc 'BlackJack' Rintsch wrote:
> On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote:
>
>> Here is what I have in image.cgi but it is incorrect and i'm not able to
>> find it on the web.
>>
>> #!/usr/bin/python
>> print "Content-Type: image/png\n"
>> print 'image.png'
>
> You have to print
Thanks for quick reply.
Yes, that's the hint I needed.
Lada
Marc 'BlackJack' Rintsch wrote:
> On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote:
>
>
>> Here is what I have in image.cgi but it is incorrect and i'm not able to
>> find it on the web.
>>
>> #!/usr/bin/python
>> print "Cont
On Jul 24, 6:57 am, NicolasG <[EMAIL PROTECTED]> wrote:
> > Why would you want to become a programmer? Programmers smell bad,
> > they have no social life, they get treated like crap by everyone.
> > They can get paid pretty well but then they spend all the money on
> > useless electronic junk so
On Jul 24, 5:31 am, "Yinghe Chen" <[EMAIL PROTECTED]> wrote:
> Hi,
> Could someone help on how to use python to output the next month string like
> this?
>
> "AUG07", suppose now is July 2007.
>
I usually find time and date answers somewhere in here:
http://pleac.sourceforge.net/pleac_python/date
On 2007-07-24, Paul Rubin wrote:
> I think Python is not used in university programs very much.
> Look for one that uses SICP (Scheme) or CTM (Mozart/Oz) or a
> functional language like Haskell, in preference to the ones
> that use Java (the Cobol of the 1990's). With some reasonable
> experience
On Jul 24, 8:31 pm, "Yinghe Chen" <[EMAIL PROTECTED]> wrote:
> Hi,
> Could someone help on how to use python to output the next month string like
> this?
>
> "AUG07", suppose now is July 2007.
>
> I think also need to consider Dec 07 case, it is supposed to output as
> below:
> "JAN07".
>
> datetim
On Jul 23, 11:29 am, [EMAIL PROTECTED] wrote:
> (this question was also posted in the devshed python
> forum:http://forums.devshed.com/python-programming-11/parsing-xml-with-elem...
> ).
> -
>
> (it's a bit longish but I hope I give all the information)
>
> 1. here is m
Hi, this query is regarding automating page insertions in Microsoft
Document Imaging.
I have two sets of MDIs generated fortnightly: Invoices and their
corresponding Broadcast Certificates; about 150 of each.
My billing application can generate one big MDI with all 150 invoices
and another with a
Why Emacs's Keyboard Shortcuts Are Painful
Xah Lee, 2007-07
A important aspect in designing keyboard shortcuts is to have keyboard
shortcuts for those most frequently used commands, and, the most
frequently used commands should have most easily-pressed keystrokes.
For example, they should be on t
On Jul 24, 1:31 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I know this may have a very simple answer, nonetheless. I am wishing
> to find the cleanest and most pythonic way of implementing the
> following:
>
> I am creating a internationalized application in wxPython and have
> sorted th
On Tue, 2007-07-24 at 05:15 -0700, John Machin wrote:
> On Jul 24, 8:31 pm, "Yinghe Chen" <[EMAIL PROTECTED]> wrote:
> > Hi,
> > Could someone help on how to use python to output the next month string like
> > this?
> >
> > "AUG07", suppose now is July 2007.
> >
> > I think also need to consider De
On Jul 24, 6:14 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> ahlongxp wrote:
> > Sorry, I know this is not the most appropriate place to talk about
> > wxPython.
> > But I can't have access to wxPython mail list page(because I don't pay
> > enough).
>
> > I downloaded python2.5 and wxPython 2.8.4.
I am working on a program that needs to stat files (gif, swf, xml, dirs,
etc) from the web. I know how to stat a local file...
import os
tplStat = os.stat(path)
but I can't figure out how to stat a file that resides on a web server.
I am not sure if it makes a difference, but most (maybe all)
Brian Blais wrote:
> Hello,
>
> I am running OS X 10.4, on an Intel Mac, Python 2.5 not installed by
> source (I used the binary install from the website). When I do the
> following, I get an error:
>
> Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
> [GCC 4.0.1 (Apple Computer, Inc. build
On Tue, 2007-07-24 at 09:07 -0400, DB Daniel Brown wrote:
> I am working on a program that needs to stat files (gif, swf, xml,
> dirs, etc) from the web. I know how to stat a local file…
>
>
> import os
> tplStat = os.stat(path)
>
>
>
> but I can’t figure out how to stat a file that resides o
I use the idiom "for line in file('filename'): do_something(line)" quite a
lot.
Does it close the opened file at the end of the loop, or do I have to
explicitly save the file object and close it afterward?
Yoav
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote:
> There are various things I like about the D language that I think Python
> too may enjoy. Here are few bits (mostly syntactical ones):
>
> 1) (we have discussed part of this in the past) You can put underscores
> inside number literals,
On Tue, 24 Jul 2007 02:14:38 -0700, mizrandir wrote:
> Can someone tell me why python doesn't crash when I do the following:
>
a=[]
a.append(a)
print a
> [[...]]
print a[0][0][0][0][0][0][0]
> [[...]]
>
> How does python handle this internally? Will it crash or use up lot's o
Yoav Goldberg wrote:
>
> I use the idiom "for line in file('filename'): do_something(line)" quite
> a lot.
>
> Does it close the opened file at the end of the loop, or do I have to
> explicitly save the file object and close it afterward?
>
The file will *normally* be closed in most Python imp
On Jul 23, 1:27 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
> Autodidacticism is an alternative; feel free to regard
> http://wiki.python.org/moin/PythonTraining> as a member of
> that class.
>
> If you, for example, were to teach yourself Python, then
> volunteer with prominent extensions or
Jay Loden wrote:
> Brian Blais wrote:
>> Hello,
>>
>> I am running OS X 10.4, on an Intel Mac, Python 2.5 not installed by
>> source (I used the binary install from the website). When I do the
>> following, I get an error:
>>
>> Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
>> [GCC 4.0.1 (Ap
> How about trying
> root = ElementTree.parse(urlopen(query), encoding ='utf-8')
>
this specific thing is not working, however, parsing the url is not
problematic. the problem is that after parsing the xml at the url I
save some of the fields to a local file and the local file is not
being parsed
Does anyone know a way to use closures or blocks in python like those
used in Ruby? Particularly those used in the { } braces.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2007-07-24 at 14:58 +, treble54 wrote:
> Does anyone know a way to use closures or blocks in python like those
> used in Ruby? Particularly those used in the { } braces.
Please describe the problem you're trying to solve. Even if Python had a
direct equivalent of "Ruby closures or bloc
[EMAIL PROTECTED] wrote:
>> How about trying
>> root = ElementTree.parse(urlopen(query), encoding ='utf-8')
That doesn't work.
> this specific thing is not working, however, parsing the url is not
> problematic.
So you tried parsing the complete XML file and it works? Then it's the way you
stri
"Evan Klitzke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I was playing around with the inspect module tonight, and I have a
| question about "code components". Can an object have more than one
| code component?
As produced by CPython, a function object has one code attribute,
On 2007-07-24, treble54 <[EMAIL PROTECTED]> wrote:
> Does anyone know a way to use closures or blocks in python like
> those used in Ruby? Particularly those used in the { } braces.
Python's nameless functions are week. So it supports iterators
and generators using protocols, comprehensions and a
On Jul 24, 8:58 am, treble54 <[EMAIL PROTECTED]> wrote:
> Does anyone know a way to use closures or blocks in python like those
> used in Ruby? Particularly those used in the { } braces.
Python isn't Ruby. Python has a lambda function for creating
anonymous functions, but many of the common use c
treble54 a écrit :
> Does anyone know a way to use closures or blocks in python like those
> used in Ruby? Particularly those used in the { } braces.
>
Instead of looking for what you think is the solution, you'd be better
explaining your concrete problem.
--
http://mail.python.org/mailman/listi
Hi,
I have 3 columns in my list control, each with a different "type" of
data (for example, one column has names, the other has dates, etc).
Can anyone reference a tutorial for solving this issue? I've done my
share of googling to no avail. I need the user to be able to click any
of the column hea
On 2007-07-24, Alex Popescu <[EMAIL PROTECTED]> wrote:
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote
> in news:[EMAIL PROTECTED]:
>
>
>>
>> [snip...]
>>
>>
>> Not necessarily - you can access class attributes from within an
>> instance method (but obviously a classmethod cannot access instance
Hi,
I have a string in the following format:
"00:00:25.886411"
I would like to pass this string into the datetime.time() class and
have it parse the string and use the values. However, the __init__()
method only takes integers (which means I'd be forced to parse the
string myself). Does anyone k
Any python module for navigating and selecting, parsing HTML files?
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 24, 2007, at Jul 24:10:28 AM, Kevin Walzer wrote:
You need an up-to-date installation of the base Tix package on your
system, in the same path as your Tcl/Tk libraries. I downloaded and
built the most recent version of Tix from http://tix.sf.net (dated
November 2006) and the Python
On 24 srp, 05:20, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Mon, 23 Jul 2007 16:53:01 -0300, ...:::JA:::...
> <[EMAIL PROTECTED]> escribió:
>
>
>
> >> If you are using the tokenize module as suggested some time ago, try to
> >> analyze the token sequence you get using { } (or perhaps begi
Brian Blais wrote:
> So I tried to build Tix, and it complains about a tcl header file
> (tclPort.h). My Tcl stuff is in
> /System/Library/Frameworks/Tcl.framework/Versions/8.4/, but the header
> file doesn't exist. I assume I need to download the source for Tcl and
> build that, or is it en
Does anybody know how to pass parameters to 'exec
somefunction.func_code'?
def f1():
print 'this is f1'
def f2(p):
print 'this is f2, p =', str(p)
exec f1.func_code
THIS RESULTS IN: "this is nf1" WHICH IS NICE
exec f2.func_code
THIS RESULTS IN: TypeError: f2() takes exactly 1 ar
Hey all,
I'm running some data analysis scripts that, due to the input file
size, tend to be quite memory intensive. I've been reading up on
Python's memory allocation (I'm using 2.4 and am locked into it, so I
don't have the new fixes in 2.5) but because of the nature of its
looping I don't thin
On 7/24/07, Robert Dailey wrote:
> Hi,
>
> I have a string in the following format:
>
> "00:00:25.886411"
>
> I would like to pass this string into the datetime.time() class and
> have it parse the string and use the values. However, the __init__()
> method only takes integers (which means I'd be f
Hi,
I have a directory that contains a bunch of email messages and I would like
to parse them using the email and mailbox packages. The emails were exported
from Apple Mail. From what I gather, I need to use MHMailbox, but I can't
get it to do anything useful and I cannot find any examples of how
On Tue, 2007-07-24 at 13:24 -0400, Prepscius, Colin (IT) wrote:
> Does anybody know how to pass parameters to 'exec
> somefunction.func_code'?
>
> def f1():
> print 'this is f1'
>
> def f2(p):
> print 'this is f2, p =', str(p)
>
> exec f1.func_code
> THIS RESULTS IN: "this is nf1"
On Jul 24, 11:21 am, Robert Dailey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have 3 columns in my list control, each with a different "type" of
> data (for example, one column has names, the other has dates, etc).
> Can anyone reference a tutorial for solving this issue? I've done my
> share of googli
On Jul 24, 10:12 pm, johnny <[EMAIL PROTECTED]> wrote:
> Any python module for navigating and selecting, parsing HTML files?
try beautyfulshop
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible to close the socket connection immediately in
Python.. Because i am getting error even though i close it after
all the transfer I read from one article it is possible in C
socket Whether is it possible in Python?
--
http://mail.python.org/mailman/listinfo/python-list
Actually, thx to Gabrielle Genellina, who wrote earlier:
Instead of using exec, rebuild a new function from the unmarshalled
code:
import new
f3 = new.function(f2.func_code, globals())
f3(parameter)
I haven't tried it yet, but will today...
-Original Message-
From: [EMAIL PROTECTED]
[m
On Tue, 2007-07-24 at 17:36 +, Clement wrote:
> On Jul 24, 10:12 pm, johnny <[EMAIL PROTECTED]> wrote:
> > Any python module for navigating and selecting, parsing HTML files?
>
> try beautyfulshop
Failing that, try BeautifulSoup.
--
Carsten Haese
http://informixdb.sourceforge.net
--
http
On Jul 24, 5:20 am, Bruno Desthuilliers wrote:
> IIRC, __new__ is supposed to return the newly created object - which you
> are not doing here.
>
> class Bar(Foo):
> def __new__(cls, a, b, c, *args):
> print 'Bar.__new__', len(args)
> if not args:
> cls = Zoo
>
On Jul 24, 10:21 am, Robert Dailey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have 3 columns in my list control, each with a different "type" of
> data (for example, one column has names, the other has dates, etc).
> Can anyone reference a tutorial for solving this issue? I've done my
> share of googli
I think he meant "Beautiful Soup".
On 7/24/07, Clement <[EMAIL PROTECTED]> wrote:
> On Jul 24, 10:12 pm, johnny <[EMAIL PROTECTED]> wrote:
> > Any python module for navigating and selecting, parsing HTML files?
>
> try beautyfulshop
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Stargaming wrote:
> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote:
>> While in a syntax like:
>> for i in xrange(1_000_000):
>> my eyes help me group them at once.
>
> Sounds like a good thing to be but the arbitrary positioning
> doesnt make any sense.
Checking underscore positions
[EMAIL PROTECTED] wrote:
> On 24 srp, 05:20, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> En Mon, 23 Jul 2007 16:53:01 -0300, ...:::JA:::...
>> <[EMAIL PROTECTED]> escribió:
>>
>>
>>
If you are using the tokenize module as suggested some time ago, try to
analyze the token sequence yo
Clement schrieb:
> Is it possible to close the socket connection immediately in
> Python.. Because i am getting error even though i close it after
> all the transfer I read from one article it is possible in C
> socket Whether is it possible in Python?
>
Which error? And usually the p
Bruno Desthuilliers wrote:
>s/some/great/g
>Both Ruby and Python are known for this.
Thanks for the info. (I don't know much about metaprogramming etc. in
either languages - just started exploring those topics recently.)
>I'd say that - wrt/ "advanced" programming tricks - *most* of what you
On 2007-07-24, Clement <[EMAIL PROTECTED]> wrote:
> Is it possible to close the socket connection immediately in
> Python..
Sure. Just call the socket's close() method.
[You really ought to get that sticky '.' key fixed.]
> Because i am getting error even though i close it after
> all the
Paul McGuire <[EMAIL PROTECTED]> writes:
>On Jul 23, 12:43 pm, [EMAIL PROTECTED] (Eddie Corns) wrote:
>> Paul McGuire <[EMAIL PROTECTED]> writes:
>> >On Jul 23, 5:53 am, [EMAIL PROTECTED] (Eddie Corns) wrote:
>> >> Wolfgang Strobl <[EMAIL PROTECTED]> writes:
>> >> >few of James Gimple's snippets f
johnny wrote:
> Any python module for navigating and selecting, parsing HTML files?
Since you didn't name any specific requirements, consider taking the best one.
"lxml.html" provides loads of goodies like Python iterators, XPath or CSS
selection for navigation, or a clean() function for removing
On 7/16/07, vasudevram <[EMAIL PROTECTED]> wrote:
>
> [ Though the OP posted his message to comp.lang.ruby, I'm cross-
> posting it to comp.lang.python, since he mentions Python as a possible
> alternative he's looking at, and also because I've recommended Python
> for his stated needs. Also, inter
On 2007-07-24, Robert Dailey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a string in the following format:
>
> "00:00:25.886411"
>
> I would like to pass this string into the datetime.time() class
> and have it parse the string and use the values. However, the
> __init__() method only takes integer
On Jul 24, 12:12 pm, johnny <[EMAIL PROTECTED]> wrote:
> Any python module for navigating and selecting, parsing HTML files?
htmlparse
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 24, 11:21 am, Robert Dailey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have 3 columns in my list control, each with a different "type" of
> data (for example, one column has names, the other has dates, etc).
> Can anyone reference a tutorial for solving this issue? I've done my
> share of googli
Bruno Desthuilliers <[EMAIL PROTECTED]>
wrote:
> Duncan Booth a écrit :
> (snip)
>> I think what you want for Bar is something more along the lines:
>
> (snip)
>
>> class Bar(Foo):
>> def __new__(cls, a, b, c, *args):
>> print 'Bar.__new__', len(args)
>> target = cls
> You d
I have searched the board and noticed that there isn't really any sort
of good implementation of a string tokenizer that will tokenize based
on a custom set of tokens and return both the tokens and the parts
between the tokens.
For example, if I have the string:
"Hello, World! How are you?"
And
JamesHoward wrote:
> I have searched the board and noticed that there isn't really any sort
> of good implementation of a string tokenizer that will tokenize based
> on a custom set of tokens and return both the tokens and the parts
> between the tokens.
>
> For example, if I have the string:
>
>
JamesHoward <[EMAIL PROTECTED]> wrote:
> I have searched the board
what board? I don't see any boards here.
>
> And my splitting points are comma, and exclamation point then I would
> expect to get back.
>
> ["Hello", ",", " World", "!", " How are you?"]
>
> Does anyone know of a tokenizer th
On 7/24/07, Sandra-24 <[EMAIL PROTECTED]> wrote:
> On Jul 24, 5:20 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
> > IIRC, __new__ is supposed to return the newly created object - which you
> > are not doing here.
> >
> > class Bar(Foo):
> > def __new__(cls, a, b, c, *args):
> >
Hello all,
I dashed off the following function to clean a string in a little
program I wrote:
def cleanup(astr, changes):
for f,t in changes:
atr = astr.replace(f, t)
return astr
where changes would be a tuple, for example:
changes = (
('%', '\%'),
('$',
In article <[EMAIL PROTECTED]>,
NicolasG <[EMAIL PROTECTED]> wrote:
.
.
.
>Yes true , I'm already a programmer.. doing technical support for my
>company products in a call center. I hate my job, I hate the moment I
>have to wa
James Stroud wrote:
> I dashed off the following function to clean a string in a little
> program I wrote:
>
> def cleanup(astr, changes):
>for f,t in changes:
> atr = astr.replace(f, t)
>return astr
>
> where changes would be a tuple, for example:
>
> changes = (
> (
Hi there,
I'm pleased to announce the immediate availability of PyKota v1.26
PyKota is a centralized and extensible print accounting and print quotas
enforcement solution for CUPS, distributed under the terms of the GNU
General Public License v2 or, at your option, any higher version.
PyKota can
Can anyone tell me why I can print out the individual variables in the
following code, but when I print them out combined into a single
string, I get an error?
symbol = u'ibm'
price = u'4 \xbd' # 4 1/2
print "%s" % symbol
print "%s" % price.encode("utf-8")
print "%s %s" % (symbol, price.encode("
1 - 100 of 130 matches
Mail list logo