Ramdas wrote:
> I am doing some HTML scrapping for a side project.
>
> I need a method using sgmllib or HTMLParser to parse an HTML file and
> get line nos of all the tags
Try lxml.html, it provides line numbers for each element.
http://codespeak.net/lxml/dev/
Stefan
--
http://mail.python.org/
John Nagle wrote:
> Here's a hostile URL that "urlparse.urlparse" seems to have mis-parsed.
...
Simpler example:
import urlparse
s = 'http://www.example.com.mx?https://www.example.com'
print urlparse.urlparse(s)
produces
('http', 'www.example.com.mx?https:', '//www.example.com', '', '', '')
whic
John Nagle wrote:
> Here's a hostile URL that "urlparse.urlparse" seems to have mis-parsed.
>
> http://[EMAIL
> PROTECTED]&xUDysvTbzZZOaymjQ2oYIx2AvMdJ1WQfjP02wIBBQBb1EVZAqmmGunxrcyGx1AcfegWUUYtaZfRW434O5Qn6InSMUZXgF5e3KzJbCntBGOj7pv31zab&action=login-run&passkey=e84239c9da59dbeb61d4d45db2cc5
Hi There,
I Posted a while ago about a challenge I had in splitting an E-Mail
adress up to use it. Anyways, the same script but different issue.
Some Background:
The script is going to be used to manage a Virtual User Based E-Mail
system. Now the part I'm struggling with is to delete the E-Mail
a
On Dec 14, 3:22 am, Keflavich <[EMAIL PROTECTED]> wrote:
> On Dec 13, 5:52 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
> > > Hey, I have a bit of code that died on a domain error when doing an
> > > arcsin, and appar
Here's a hostile URL that "urlparse.urlparse" seems to have mis-parsed.
http://[EMAIL
PROTECTED]&xUDysvTbzZZOaymjQ2oYIx2AvMdJ1WQfjP02wIBBQBb1EVZAqmmGunxrcyGx1AcfegWUUYtaZfRW434O5Qn6InSMUZXgF5e3KzJbCntBGOj7pv31zab&action=login-run&passkey=e84239c9da59dbeb61d4d45db2cc5840&info_hash=%c9q%be%fe%c
my code is here:
_
def Globing(self, dir, extension, nop, inputDepth):
'It creates a basic glob function that needed in other classes'
self.exop = '*.'
self.opr = '*/'
Bruno Desthuilliers wrote:
> http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273
An interesting quote from that:
> If you combine Simula and Lisp—Lisp didn’t have data structures, it had
> instances of objects—you would have a dynamic type system that would
> give you the range of
On Dec 12, 2:51 pm, <[EMAIL PROTECTED]> wrote:
> I mainly work on OS X, but thought I'd experiment with some Python code on
> XP. The
> problem is I can't seem to get these things to work at all.
>
> First of all, I'd like to use Greek letters in the command prompt window, so
> I was going to
>
On Dec 13, 8:46 pm, Waldemar Osuch <[EMAIL PROTECTED]> wrote:
> On Dec 13, 7:52 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:> I have a another
> question...
>
> > using elementtree, is there a proper way to get at the data
> > '123456789' in this tag?
>
> > ''
>
> > I tried making it an element, bu
On Dec 13, 7:52 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:
> I have a another question...
>
> using elementtree, is there a proper way to get at the data
> '123456789' in this tag?
>
> ''
>
> I tried making it an element, but the only attribute that returns
> anything is the "tag" attribute. Does
Aahz wrote:
>> Unless it's a new style class with __slots__
>
> []
>
> Naw, I'll skip the rant this time. ;-)
Wuss! I was looking forward to it :)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 9:00 pm, Davy <[EMAIL PROTECTED]> wrote:
>
> What's "\1" and the whole re.sub() mean?
>
Read about backreferences here:
http://www.regular-expressions.info/brackets.html
Also see the entry on parentheses here:
http://docs.python.org/lib/re-syntax.html
rick
--
http://mail.python.or
On Dec 13, 7:50 pm, Chris <[EMAIL PROTECTED]> wrote:
> A couple potential optimizations:
>
>
>
> > # create the member variable name.
> > mem_var_name = options.inputfilename
> > mem_var_name = mem_var_name.replace(' ','_')
> > mem_var_name = mem_var_name.replace('.','_')
>
> mem_var_name = options
On Dec 13, 5:52 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
> > Hey, I have a bit of code that died on a domain error when doing an
> > arcsin, and apparently it's because floating point subtraction is having
> > problems.
Hi Breal
> I have a list that looks like the following
> [(10, 100010), (15, 17), (19, 100015)]
>
> I would like to be able to determine which of these overlap each
> other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple
> 2 overlaps with 1. Tuple 3 overlaps with
Hi all,
I have read a re.sub() that confused me.
s = 'P & Q'
s = re.sub(r'([a-zA-Z0-9_.]+)', r'Expr("\1")', s)
What's "\1" and the whole re.sub() mean?
Best regards,
Davy
--
http://mail.python.org/mailman/listinfo/python-list
I have a another question...
using elementtree, is there a proper way to get at the data
'123456789' in this tag?
''
I tried making it an element, but the only attribute that returns
anything is the "tag" attribute. Does that section of a tag have any
proper name that I'm missing? Or is it jus
In article <[EMAIL PROTECTED]>,
Christian Heimes <[EMAIL PROTECTED]> wrote:
>Steven D'Aprano wrote:
>>
>> I'm not quite sure I understand that criticism. How is that different
>> from things which are not properties?
>>
>> foo.baz = 2 # oops, I meant bar
>>
>> will succeed regardless of whether
On Dec 13, 5:49 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:
> Hi group,
>
> I'm wrapping up a command line util that returns xml in Python. The
> util is flaky, and gives me back poorly formed xml with different
> problems in different cases. Anyway I'm making progress. I'm not
> very good at re
Hi group,
I'm wrapping up a command line util that returns xml in Python. The
util is flaky, and gives me back poorly formed xml with different
problems in different cases. Anyway I'm making progress. I'm not
very good at regular expressions though and was wondering if someone
could help with i
En Thu, 13 Dec 2007 19:53:49 -0300, <[EMAIL PROTECTED]> escribió:
> As I understand it, import myFile and include "myFile.py" are not quite
> the same.
>
> --
> for import to work myFile.py must be in the same directory as the code
> that calls it accessible through PYTHONPATH, whereas include
>
On Dec 14, 12:05 pm, Dave Hansen <[EMAIL PROTECTED]> wrote:
> On Dec 13, 5:45 pm, Breal <[EMAIL PROTECTED]> wrote:
>
> > I have a list that looks like the following
> > [(10, 100010), (15, 17), (19, 100015)]
>
> > I would like to be able to determine which of these overlap each
> >
> [EMAIL PROTECTED] wrote:
> > Hello,
>
> > I've been using the Python-based Karrigell web application framework.
> > It has the very handy word "include" that inserts a code file into
> > into the stream of execution. E.g. if myFile.py contains the code:
>
> > print "This is a message from myFile.
On Dec 13, 5:45 pm, Breal <[EMAIL PROTECTED]> wrote:
> I have a list that looks like the following
> [(10, 100010), (15, 17), (19, 100015)]
>
> I would like to be able to determine which of these overlap each
> other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple
>
On Thu, 13 Dec 2007 10:32:23 -0800, sturlamolden wrote:
> On 13 Des, 02:19, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>
>> I have repeatedly argued in the past that we do ourselves a disservice
>> by describing Python as an interpreted language. Python is compiled. It
>> has
On Dec 14, 10:45 am, Breal <[EMAIL PROTECTED]> wrote:
> I have a list that looks like the following
> [(10, 100010), (15, 17), (19, 100015)]
>
> I would like to be able to determine which of these overlap each
> other. So, in this case, tuple 1 overlaps with tuples 2 and 3.
Your d
On Dec 13, 3:45 pm, Breal <[EMAIL PROTECTED]> wrote:
> I have a list that looks like the following
> [(10, 100010), (15, 17), (19, 100015)]
>
> I would like to be able to determine which of these overlap each
> other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple
>
On Thu, 13 Dec 2007 14:30:18 -0800, Keflavich wrote:
> Hey, I have a bit of code that died on a domain error when doing an
> arcsin, and apparently it's because floating point subtraction is having
> problems.
I'm not convinced that your diagnosis is correct. Unless you're using
some weird, unco
Steven D'Aprano wrote:
> I'm not quite sure I understand that criticism. How is that different
> from things which are not properties?
>
> foo.baz = 2 # oops, I meant bar
>
> will succeed regardless of whether foo.bar is an attribute or a property.
Unless it's a new style class with __slots__
On Thu, 13 Dec 2007 13:35:24 -0800, sturlamolden wrote:
> On 13 Des, 19:16, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
>> I don't feel that it's especially inconsistent, and I like decorators.
>> Having to write foo everywhere isn't that nice, but it's only mildly
>> worse than C# to me - I find
You should give a more real data set (maybe 20 various pairs so that all
scenarios can be seen) and the output you want.
Breal wrote:
> I have a list that looks like the following
> [(10, 100010), (15, 17), (19, 100015)]
>
> I would like to be able to determine which of these ove
Duncan Booth wrote:
> Unfortunately as currently implemented, getter setter and deleter just
> update the existing property, so the getter defined in B changes how the
> property works in A as well. I think the intention may have been that they
> should create a new property each time, but this
On Dec 10, 8:03 pm, [EMAIL PROTECTED] wrote:
> PyXML seems to be long gone. Is lxml the way to go if i want to have
> xpath supported?
In our XML Tree Editor XEntrant we use 4Suite XML package, you can try
the
XPath functionality in this tool:
http://www.treestages.com/
--
http://mail.python.org/
I have a list that looks like the following
[(10, 100010), (15, 17), (19, 100015)]
I would like to be able to determine which of these overlap each
other. So, in this case, tuple 1 overlaps with tuples 2 and 3. Tuple
2 overlaps with 1. Tuple 3 overlaps with tuple 1.
In my scena
On Dec 14, 6:32 am, [EMAIL PROTECTED] wrote:
> Thanks to a lot of help, I've got the outer framework for my tokenizer
> down to this:
>
> for line_number, line in enumerate(text):
> output = ''
>
> for char_number, char in enumerate(line):
> output += char
>
>
Solved: used round(number,12) in this case for all of the operands of
my arcsines. Not pretty, but at least VIM made it easy...
Thanks for the help,
Adam
On Dec 13, 4:01 pm, Keflavich <[EMAIL PROTECTED]> wrote:
> The decimal package isn't what I'm looking for - I don't want to have
> to retype
>
> Hmmm...but this means that i am forced to do this for ALL .ui files on
> the project, either changed or not and this can slow things down...
> (pyuic.bat can run for one or for ALL .ui files)
> The goal is to find a way to automatically do this only for the
> changed ones, like eric does...
Wh
The decimal package isn't what I'm looking for - I don't want to have
to retype every variable in my code, and I have arcsines showing up on
about a dozen lines right now. It also seems like a rather
complicated way to deal with the problem; maybe I just need to
implement my own rounding code, but
On Dec 13, 12:38 pm, sberry <[EMAIL PROTECTED]> wrote:
> I have a SOAP server running using SOAPpy. The problem I am having is
> that it only handles a single request at a time. It needs to be able
> to accept as many simultaneous requests as come in.
>
> What is the best way to achieve this? I
On Dec 13, 1:23 pm, Jakub Stolarski <[EMAIL PROTECTED]> wrote:
> If all you need is the result here's simpler and more efficient code:
>
> from random import randrange
> sum = 100 * randrange(128)
> print "Sum is ", sum
>
> And the same in perl:
>
> my $sum = 100 * int(rand(128));
> print "Sum is $
Thanks, I'll have a look at that. I'm not sure the decimal type is
included in numpy, though, which is what I'm using. It doesn't show
up in their documentation, at least.
Adam
On Dec 13, 3:39 pm, [EMAIL PROTECTED] (Aahz) wrote:
> In article <[EMAIL PROTECTED]>,
>
> Keflavich <[EMAIL PROTECTED
<[EMAIL PROTECTED]> wrote:
>Is there *any* way I can get python to access maildirs
>which are not named using this (IMHO stupid) convention?
Well, the mailbox module doesn't support deleting mailboxes, so I'm not
sure why you want to use it. Since you also seem to have a better idea
of what your
Hi Tim,
Thanks for the response.
As I understand it, import myFile and include "myFile.py" are not quite the
same.
--
for import to work myFile.py must be in the same directory as the code
that calls it accessible through PYTHONPATH, whereas include
"../somedirectory/myFile.py" works in Karri
In article <[EMAIL PROTECTED]>,
Keflavich <[EMAIL PROTECTED]> wrote:
>
>Hey, I have a bit of code that died on a domain error when doing an
>arcsin, and apparently it's because floating point subtraction is
>having problems. I know about the impossibility of storing floating
>point numbers precis
Hey, I have a bit of code that died on a domain error when doing an
arcsin, and apparently it's because floating point subtraction is
having problems. I know about the impossibility of storing floating
point numbers precisely, but I was under the impression that the
standard used for that last dig
On Dec 13, 11:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> hi
> i have written some python scripts which take command line arguments
> and do some job. i would like to make it into a .exe using py2exe and
> distribute it with innosetup.. befor that i would like to add some GUI
> support.
On Dec 10, 11:48 am, Adam Funk <[EMAIL PROTECTED]> wrote:
> On 2007-12-08, Dennis Lee Bieber wrote:
>
> > On Fri, 7 Dec 2007 20:12:21 +, Adam Funk <[EMAIL PROTECTED]>
> > declaimed the following in comp.lang.python:
>
> >> I'm using to using Pod::Usage in my Perl programs (a snipped example
> >
Whatever you use, it has to have a Python binding. Spectcl may or may
not as you may be able to use it with the tkinter binding, but that is
doubtful. Most GUI toolkits have an existing app to look for files in
a directory, if that is what you are wanting to do. The following
link is to the GUI
On Dec 13, 11:32 am, [EMAIL PROTECTED] wrote:
> Is there a pythonic design I'm overlooking?
Well, if using something like PLY ( http://www.dabeaz.com/ply/ ) is
considered more Pythonic than writing your own parser and lexer...
Python doesn't have all of life's answers unfortunately.
--
http://m
On 2007-12-10, Nick Craig-Wood wrote:
> That said, python does a good job of turning doc strings and class
> descriptions into man pages even without any special markup, if you
> wrote docstrings everywhere. Try pydoc on any bit of python (without
> the .py) and you'll see what I mean
>
> As for
flyfree a écrit :
def fooA(y):
>
> y = [3,4]
> return y
>
>
def fooB(y):
>
> y[0] = 3
> y[1] = 4
> return y
>
>
x = [1,2]
fooA(x)
>
> [3, 4]
>
x
>
> [1, 2]
>
>
fooB(x)
>
> [3, 4]
>
x
>
> [3, 4]
> ===
>
> From above
>>> def fooA(y):
y = [3,4]
return y
>>> def fooB(y):
y[0] = 3
y[1] = 4
return y
>>> x = [1,2]
>>> fooA(x)
[3, 4]
>>> x
[1, 2]
>>> fooB(x)
[3, 4]
>>> x
[3, 4]
===
>From above, the original argument value of fooA is same as before
[1,2]
but the
On 13 Des, 19:16, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> I don't feel that it's especially inconsistent, and I like decorators.
> Having to write foo everywhere isn't that nice, but it's only mildly
> worse than C# to me - I find the extra block levels really atrocious.
Personally I find pro
On 13 Gru, 19:11, [EMAIL PROTECTED] wrote:
> There's got to be a simpler and more efficient way to do this.
> Can you help?
>
> Thanks,
> igor
If all you need is the result here's simpler and more efficient code:
from random import randrange
sum = 100 * randrange(128)
print "Sum is ", sum
And t
import myFile
would achieve this
TIm
[EMAIL PROTECTED] wrote:
> Hello,
>
> I've been using the Python-based Karrigell web application framework.
> It has the very handy word "include" that inserts a code file into
> into the stream of execution. E.g. if myFile.py contains the code:
>
> print "
Christian Heimes <[EMAIL PROTECTED]> wrote:
> Python 2.6 and 3.0 have a more Pythonic way for the problem:
>
> class A(object):
> @property
> def foo(self):
> return self._foo
>
> @foo.setter
> def foo(self, value)
> self._foo = value
>
> @foo.deletter
>
I have a SOAP server running using SOAPpy. The problem I am having is
that it only handles a single request at a time. It needs to be able
to accept as many simultaneous requests as come in.
What is the best way to achieve this? I really appreciate any help
here.
--
http://mail.python.org/mai
> You can create a builder for calling an external program to do that on
> builds (right-click project -> properties > Builders).
>
> Another option is configuring an external program run --> menu: run >
> external tools > open external tools dialog (and you can bind a
> shortcut to rerun the last
farsheed <[EMAIL PROTECTED]> writes:
> the code for licensing is about 15 lines and is very fast. I needed
> 20 licenses and I wrote a keygen for myself.
Given that you still haven't explained what threat in particular
you're securing against, I wonder whether "very fast" is the only
criterion. I
En Thu, 13 Dec 2007 08:50:09 -0300, grbgooglefan <[EMAIL PROTECTED]>
escribi�:
> I am having a object tuple created at application startup. This tuple
> I pass on to a python function in call to:
> PyObject_CallObject(pcatInfo->pPyEvalFunction,pTuple);
>
> For setting the values in this tuple, I
> In Eclipse, i have the luxury of double-click a .ui file and thus Qt
> Designer opens and then design my forms there, but i cannot fing an
> automatic way to accomplish the thing that eric4 does: e.x.
> automatically compile changed .ui files when i hit F9. And it really a
> loss of time to go to
Hello,
I've been using the
Python-based Karrigell web application framework. It has the very handy
word "include" that inserts a code file into into the stream of
execution. E.g. if myFile.py contains the code:
print "This is a message from myFile.py"
and my script is:
print "Something"
include
Hi, this is actually goes to whoever is using Eclipse and Eric4, the
IDE that comes bundled with PyQt.
I was using Eclipse until i saw Eric4 and i started experiment with
it, very nice work.
Eric4 has a feature that actually reminds us the work of some
expensive IDEs, like Visual Studio, Delphi an
On Dec 13, 6:11 pm, [EMAIL PROTECTED] wrote:
> from random import randrange
> from itertools import imap, repeat
> from operator import getitem, add, getslice
>
> result = 0
> zeros = [0]*100
> for i in xrange (10):
> s = [chr(randrange(128))] * 1024
> starts = repeat(randrange(900), 1
Thanks to a lot of help, I've got the outer framework for my tokenizer
down to this:
for line_number, line in enumerate(text):
output = ''
for char_number, char in enumerate(line):
output += char
print 'At ' + str(line_number) + ', '+ str(char_number) + ':
On Dec 14, 2:29 am, Bruno Desthuilliers While you're at it, add list
comprehensions,
> iterators/generators and itertools to the list (pun intented).
>
'Intented' is a novel word; is it the opposite of 'decamped'?
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 14, 3:48 am, Stephen_B <[EMAIL PROTECTED]> wrote:
> This doesn't seem to work in a dos terminal at the start of a script:
>
> from os import popen
> print popen('clear').read()
>
> Any idea why not? Thanks.
Maybe you are using a different "dos terminal". What is "clear"?
C:\junk>clear
'cle
On Dec 13, 2007 12:11 PM, <[EMAIL PROTECTED]> wrote:
> First, let me admit that the test is pretty dumb (someone else
> suggested it :) but since I am new to Python, I am using it to learn
> how to write efficient code.
>
> my $sum = 0;
> foreach (1..10) {
> my $str = chr(rand(128)) x 1024
This site helped me during the holidays.Check out
http://www.christmasplayland.com
which offers some great resources and tons of deals.I definitely saved
time shopping for deals online at this site.
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 12 Dec 2007 20:12:43 -0300, Object01 <[EMAIL PROTECTED]> escribi�:
> I don't know much about the timing of Python's garbage collection. Is
> it pretty aggressive?
As soon as the reference count reaches zero (at least for current CPython
version). Objects that are part of a reference cy
En Thu, 13 Dec 2007 14:07:10 -0300, Dmitri O.Kondratiev
<[EMAIL PROTECTED]> escribi�:
> While looking for ready to use library I have roughly skteched the
> functions
> that I need:
They look fine to me. Just one thing:
> days = micros / oneDayMicros # whole number of days
It's safer to
On 13 Des, 02:19, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I have repeatedly argued in the past that we do ourselves a disservice by
> describing Python as an interpreted language. Python is compiled. It has
> a compiler. It even has a built-in function "compile".
Python is
On Dec 13, 2007 12:04 PM, Patrick Mullen <[EMAIL PROTECTED]> wrote:
> > > > > Kay Schluehr wrote:
> > > > > Python 2.6 and 3.0 have a more Pythonic way for the problem:
> > > > > class A(object):
> > > > > @property
> > > > > def foo(self):
> > > > > return self._foo
> > > > > @
First, let me admit that the test is pretty dumb (someone else
suggested it :) but since I am new to Python, I am using it to learn
how to write efficient code.
my $sum = 0;
foreach (1..10) {
my $str = chr(rand(128)) x 1024;
foreach (1..100) {
my $substr = substr($str, rand(900
Thank you all. I explain what I did to do it. Very simple but what I
want:
I find the host id of system (using ipconfig) and create a hash code
based on it.(some math, md5 and functions).
the code for licensing is about 15 lines and is very fast. I needed 20
licenses and I wrote a keygen for mysel
> > > > Kay Schluehr wrote:
> > > > Python 2.6 and 3.0 have a more Pythonic way for the problem:
> > > > class A(object):
> > > > @property
> > > > def foo(self):
> > > > return self._foo
> > > > @foo.setter
> > > > def foo(self, value)
> > > > self._foo = value
> >
Using any GUI package you should be able to build your application into EXE
format!
On Dec 13, 2007 6:46 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hi
> i have written some python scripts which take command line arguments
> and do some job. i would like to make it into a .exe using py2exe
hi
i have written some python scripts which take command line arguments
and do some job. i would like to make it into a .exe using py2exe and
distribute it with innosetup.. befor that i would like to add some GUI
support..i mean select some values using a folder explorer etc..which
would be a good
On Dec 13, 11:21 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> It opens "clear" with it's own virtual terminal and clears that
> instead.
Even when I launch the script from a cmd shell with "python
myscript.py"?
> There's an ANSI control code you can use to reset the screen, try printing
> tha
On Dec 13, 2007 10:48 AM, Stephen_B <[EMAIL PROTECTED]> wrote:
> This doesn't seem to work in a dos terminal at the start of a script:
>
> from os import popen
> print popen('clear').read()
>
> Any idea why not? Thanks.
It opens "clear" with it's own virtual terminal and clears that
instead. Ther
On Dec 12, 2007, at 10:57 PM, katie smith wrote:
Traceback (most recent call last):
File "C:\Python25\empire\Empire Strategy.pyw", line 322
Maty = Searched(number)
Look, you're calling Searched right here with Searched(number)
TypeError: 'list' object is not callable
...
Maty
I always recommend the subprocess module for any needs like this.
Read up on it and it should provide everything you need.
On Dec 13, 2007, at 2:41 AM, Caleb Marcus wrote:
> I'm writing something that has to invoke an external program, and
> every time the external program prints something, u
While looking for ready to use library I have roughly skteched the functions
that I need:
import datetime
from datetime import *
def timedelta2Micros(dt):
""" Convert timedelta object to micriseconds"""
days = dt.days
sec = dt.seconds
micros = dt.microseconds
daysSec = 24 * 60
Stef Mientki wrote:
> hello,
>
> I've large program based, with a GUI based on wxPython,
> where the user can add small parts, which I call Bricks.
> A new Brick is created by inheriting from the standard-Brick.
> The user should only override 1 or 2 functions from the standard-Brick.
> The main
This doesn't seem to work in a dos terminal at the start of a script:
from os import popen
print popen('clear').read()
Any idea why not? Thanks.
Stephen
--
http://mail.python.org/mailman/listinfo/python-list
hello,
I've large program based, with a GUI based on wxPython,
where the user can add small parts, which I call Bricks.
A new Brick is created by inheriting from the standard-Brick.
The user should only override 1 or 2 functions from the standard-Brick.
The main properties used in those 2 function
On Dec 13, 10:24 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 13 Dec 2007 06:51:23 -0800, rishiyoor wrote:
> > When you say python automatically allocates memory, what would you do
> > if you don't know the size of the list of, say for example, the
> > nearest pairs between the
I suspected it was a ternary type of operator, but was unable to
confirm it. And I didn't realize it was new to 2.5. Perfectly clear
now. :)
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Laszlo Nagy wrote:
>
> Hi All,
>
> I connected to a FireBird 1.5 database this way:
>
> import kinterbasdb
> kinterbasdb.init(type_conv=200) # See
> http://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mxdatetime_required
>
>
> Then I try to update the database:
>
> sql = "UPDA
On Thu, Dec 13, 2007 at 04:57:04PM +0100, Remco Gerlich wrote regarding Re:
Question from a python newbie:
>
>On Dec 13, 2007 4:39 PM, Russell <[EMAIL PROTECTED]> wrote:
>
> I've been learning Python slowly for a few months, coming from a
> C/C+
> +, C#, Java, PHP background.
Neil Cerutti <[EMAIL PROTECTED]> writes:
> On 2007-12-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> I have repeatedly argued in the past that we do ourselves a
>> disservice by describing Python as an interpreted language.
>>
>> Python is compiled. It has a compiler. It even has a built-in
>>
On Dec 13, 2007 4:39 PM, Russell <[EMAIL PROTECTED]> wrote:
> I've been learning Python slowly for a few months, coming from a C/C+
> +, C#, Java, PHP background. I ran across a code fragment I'm having
> trouble wrapping my brain around. I've searched the Language
> Reference and was not able t
On Dec 13, 9:01 am, Ramdas <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> I am cross posting the same to grab your attention at pyparsing forums
> too. 1000 apologies on the same count!
>
> I am a complete newbie to parsing and totally new to pyparsing.
>
> I have adapted your code to store the line num
Russell <[EMAIL PROTECTED]> wrote:
> I've searched the Language
> Reference and was not able to find any info regarding the structure of
> this code fragment:
>
> int(text) if text.isdigit() else text
http://docs.python.org/whatsnew/pep-308.html
--
http://mail.python.org/mailman/listinfo/pytho
The OP was not talking about a Python program to check the Pascal
program as I read it
> to make application in python
> that would send code (text) to pascal compiler...and it would return
> result and then application would show that result.
So he/she/it would want subprocess to compile the Pas
I've been learning Python slowly for a few months, coming from a C/C+
+, C#, Java, PHP background. I ran across a code fragment I'm having
trouble wrapping my brain around. I've searched the Language
Reference and was not able to find any info regarding the structure of
this code fragment:
int(t
On 2007-12-13, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Neil Cerutti a écrit :
>> On 2007-12-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>> I have repeatedly argued in the past that we do ourselves a
>>> disservice by describing Python as an interpreted language.
>>>
>>> Python is compi
On Dec 11, 3:08 pm, [EMAIL PROTECTED] wrote:
> On 11 Dez, 22:02, [EMAIL PROTECTED] wrote:
>
> > Ok. This is small code.
>
> > The problem is '2' != 2 there is a way of converting 'some number' in
> > number ?
>
> > Thanks.
>
> > # -*- coding: cp1252 -*-
> > import random
> > import csv
> > import s
[EMAIL PROTECTED] a écrit :
> On Dec 12, 11:33 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
(snip)
>
> When you say python automatically allocates memory, what would you do
> if you don't know the size of the list
thelist = []
thelist.append('Ever')
thelist.append('bothered
1 - 100 of 159 matches
Mail list logo