On Mar 8, 6:32 pm, Muddy Coder wrote:
> Hi Folks,
>
> I just downloaded and installed pysqlite, and I can import sqlite3
> smoothly. Then, I need to connect sqlite by syntax:
>
> >>>conn = sqlite3.connect('adirectory/db')
>
> I wish the data will be stored into directory ---> adirectory, with a
>
"Grant Edwards" wrote:
>There you go: a 30-second psychological diagnosis by an
>electrical engineer based entirely on Usenet postings. It
>doesn't get much more worthless than that...
Oh it is not entirely worthless - as a working hypothesis,
it seems to cover and explain the observed facts
> Regarding minidom, you might be happier with the xml.etree package that
> comes with Python2.5 and later (it's also avalable for older versions).
> It's a lot easier to use, more memory friendly and also much faster.
OTOH, choice of XML library is completely irrelevant for the issue at
hand. If
On Mar 6, 6:52 pm, Mike Driscoll wrote:
> ...
> Can you post a sample application so we can try to figure out what's
> wrong? You might also cross-post this to thewxPythonmailing list.
> They might know.
>
> Mike- Hide quoted text -
>
> - Show quoted text -
Hi, thanks for your reply
Here is a s
per wrote:
> i have a program that essentially loops through a textfile file thats
> about 800 MB in size containing tab separated data... my program
> parses this file and stores its fields in a dictionary of lists.
>
> for line in file:
> split_values = line.strip().split('\t')
> # do stuff
On Mar 7, 9:56 pm, "bruce" wrote:
>
>
> and this solution will somehow allow a user to create a web parsing/scraping
> app for parising links, and javascript from a web page?
not just parsing the links and the "static" javascript, but:
* actually executing the javascript, giving the quot
Martin v. Löwis wrote:
>> Regarding minidom, you might be happier with the xml.etree package that
>> comes with Python2.5 and later (it's also avalable for older versions).
>> It's a lot easier to use, more memory friendly and also much faster.
>
> OTOH, choice of XML library is completely irrelev
Xah Lee writes:
> Of interest:
>
> ⢠Why Can't You Be Normal?
> http://xahlee.org/Netiquette_dir/why_cant_you_be_normal.html
>
> ⢠Ban Xah Lee
> http://xahlee.org/Netiquette_dir/ban_Xah_Lee.html
>
> I consider this post relevant because i've been perennially gossiped
> about in comp.lang.
Hi,
I've got a program here that prints out a percentage of it's
completion. Currently with my implimentation it prints like this:
0%
1%
2%
3%
4%
etc taking up lots and lots of lines of output... So, how can I make it
write the percentage on the same line eg.
while working:
print percent
every
> For the described problem, maybe. But certainly not for the application.
> The background was parsing the XML dump of an entire web site, which I
> would expect to be larger than what minidom is designed to handle
> gracefully. Switching to cElementTree before major code gets written is
> almost
On Sun, Mar 8, 2009 at 1:37 AM, Daniel Dalton wrote:
> Hi,
>
> I've got a program here that prints out a percentage of it's
> completion. Currently with my implimentation it prints like this:
> 0%
> 1%
> 2%
> 3%
> 4%
>
> etc taking up lots and lots of lines of output... So, how can I make it
> wri
Martin v. Löwis wrote:
>> The background was parsing the XML dump of an entire web site, which I
>> would expect to be larger than what minidom is designed to handle
>> gracefully. Switching to cElementTree before major code gets written is
>> almost certainly a good idea here.
>
> I think minidom
On Mar 7, 3:06 pm, per wrote:
> hi all,
>
> i have a program that essentially loops through a textfile file thats
> about 800 MB in size containing tab separated data... my program
> parses this file and stores its fields in a dictionary of lists.
When building a very large structure like you're
On Mar 8, 1:52 am, iu2 wrote:
> On Mar 6, 6:52 pm, Mike Driscoll wrote:
>
> > ...
> > Can you post a sample application so we can try to figure out what's
> > wrong? You might also cross-post this to thewxPythonmailing list.
> > They might know.
>
> > Mike- Hide quoted text -
>
> > - Show quoted
odeits wrote:
> On Mar 7, 1:07 pm, Scott David Daniels wrote:
>> odeits wrote:
>> > I am looking to clean up this code... any help is much appreciated.
>> > Note: It works just fine, I just think it could be done cleaner.
>>
>> > The result is a stack of dictionaries. the query returns up to
>> >
andrew cooke wrote:
> odeits wrote:
>> On Mar 7, 1:07 pm, Scott David Daniels wrote:
>>> odeits wrote:
>>> > I am looking to clean up this code... any help is much appreciated.
>>> > Note: It works just fine, I just think it could be done cleaner.
>>>
>>> > The result is a stack of dictionaries. t
>
> If that's the problem, the solution is: get more memory.
>
Or maybe think about algorithm, which needs less memory... My
experience tells me, that each time when you want to store a lot of
data into dict (or other structure) to analyze it then, you can find a
way not to store so much amount of
Mel wrote:
wrote:
Steven D'Aprano writes:
It is never
correct to avoid using "is" when you need to compare for identity.
When is it ever necessary to compare for identity?
Ho-hum. MUDD game.
def broadcast (sender, message):
for p in all_players:
if p is not sender:
Robert Kern wrote:
On 2009-03-07 08:14, Christian Heimes wrote:
Steven D'Aprano wrote:
Yes. Floating point NANs are required to compare unequal to all floats,
including themselves. It's part of the IEEE standard.
As far as I remember that's not correct. It's just the way C has
interpreted the
On Sun, 8 Mar 2009 01:59:03 -0800
Chris Rebert wrote:
> > etc taking up lots and lots of lines of output... So, how can I make it
> > write the percentage on the same line eg.
> Use the carriage return character to overwrite the line (you'll need
> to forego `print`):
Why do you say that?
> from
"Daniel Dalton" wrote:
> I've got a program here that prints out a percentage of it's
> completion. Currently with my implimentation it prints like this:
> 0%
> 1%
> 2%
> 3%
> 4%
>
> etc taking up lots and lots of lines of output... So, how can I make it
> write the percentage on the same line e
Chris Rebert wrote:
On Sun, Mar 8, 2009 at 1:37 AM, Daniel Dalton wrote:
Hi,
I've got a program here that prints out a percentage of it's
completion. Currently with my implimentation it prints like this:
0%
1%
2%
3%
4%
etc taking up lots and lots of lines of output... So, how can I make it
wr
On Sun, 08 Mar 2009 18:38:24 +0900
Byung-Hee HWANG wrote:
> Xah Lee writes:
[snip]
> Don't worry, Xah. At least, my minds is running on your rails. Please do
> not stop. BTW, what do you think about using Gnus instead of G2/1.0?
So you are going to repeat his postings in their entirety so that t
Steven D'Aprano wrote:
per wrote:
currently, this is very slow in python, even if all i do is break up
each line using split()
**
and store its values in a dictionary,
**
indexing by one of the tab separated values in the file.
If that's the problem, the sol
> def move_panel(self, evt):
> def gen():
> for x in range(200):
> yield x
> for x in range(200, 0, -1):
> yield x
> for x in gen():
> self.square.SetPosition((x, 30))
> time.sleep(0.005)
>
I can'
On Mar 8, 3:52 am, iu2 wrote:
> On Mar 6, 6:52 pm, Mike Driscoll wrote:
>
> > ...
> > Can you post a sample application so we can try to figure out what's
> > wrong? You might also cross-post this to thewxPythonmailing list.
> > They might know.
>
> > Mike- Hide quoted text -
>
> > - Show quoted
Hi,
I am going to develop a c library binding with ctypes. That c library
will call callback from worker threads it created. Here comes the
problem : Will the GIL be acquired before it goes into Python
function?
I got a little try..
DSPPROC = WINFUNCTYPE(None, DWORD, DWORD, c_void_p, DWORD, c_vo
En Sat, 07 Mar 2009 21:18:22 -0200, BigHand escribió:
On 3月7日, 下午11时21分, "Gabriel Genellina"
wrote:
En Sat, 07 Mar 2009 11:46:08 -0200, BigHand
escribió:
> I want the exception printted like this:
> File "", line 2, in "a()"
> File "", line 2, in a "b()"
> File "", line 2,
Victor Lin schrieb:
Hi,
I am going to develop a c library binding with ctypes. That c library
will call callback from worker threads it created. Here comes the
problem : Will the GIL be acquired before it goes into Python
function?
I got a little try..
DSPPROC = WINFUNCTYPE(None, DWORD, DWORD,
Benjamin Peterson wrote:
On behalf of the Python development team and the Python community, I'm
happy to announce the first alpha release of Python 3.1.
Python 3.1 focuses on the stabilization and optimization of features and changes
Python 3.0 introduced. The new I/O system has been rewritten
Victor Lin wrote:
> Hi,
>
> I am going to develop a c library binding with ctypes. That c library
> will call callback from worker threads it created. Here comes the
> problem : Will the GIL be acquired before it goes into Python
> function?
>
> I got a little try..
>
> DSPPROC = WINFUNCTYPE(Non
On Mar 8, 2:16 pm, farsi...@gmail.com wrote:
> >>> 4 / 5.0
>
> 0.84>>> 0.8 * 5
>
> 4.0
>
> python 2.6.1 on mac. What the hell is going on here?
Pure curiosity prompted me to try the following:
>>> 40 / 5.0
8.0
Strange...
--
http://mail.python.org/mailman/listinfo/python-list
On 3月8日, 下午9時56分, "Diez B. Roggisch" wrote:
> Victor Lin schrieb:
>
>
>
> > Hi,
>
> > I am going to develop a c library binding with ctypes. That c library
> > will call callback from worker threads it created. Here comes the
> > problem : Will the GIL be acquired before it goes into Python
> > fu
On 3月8日, 下午10時20分, Christian Heimes wrote:
> Victor Lin wrote:
> > Hi,
>
> > I am going to develop a c library binding with ctypes. That c library
> > will call callback from worker threads it created. Here comes the
> > problem : Will the GIL be acquired before it goes into Python
> > function?
>
En Sun, 08 Mar 2009 12:22:50 -0200, escribió:
On Mar 8, 2:16 pm, farsi...@gmail.com wrote:
>>> 4 / 5.0
0.84
>>> 0.8 * 5
4.0
python 2.6.1 on mac. What the hell is going on here?
Pure curiosity prompted me to try the following:
40 / 5.0
8.0
Strange...
See http://docs.py
Victor Lin wrote
> I know I have to call PyEval_InitThreads if my module create threads
> that will contact python stuff, for example, call a python callback
> function from threads. But however, it is ctypes. I have no idea
> should I do that for the imported dll? If it is, how?
You have to initi
farsi...@gmail.com wrote:
On Mar 8, 2:16 pm, farsi...@gmail.com wrote:
4 / 5.0
0.84
This one is a common FAQ. Basically floating point is never to be
trusted. This issue is quite language agnostic, however some language
decided to "hide" the issue, python does not. For more
Victor Lin wrote:
On 3月8日, 下午9時56分, "Diez B. Roggisch" wrote:
Victor Lin schrieb:
Hi,
I am going to develop a c library binding with ctypes. That c library
will call callback from worker threads it created. Here comes the
problem : Will the GIL be acquired before it goes into Python
functio
On Mar 8, 7:22 pm, farsi...@gmail.com wrote:
> On Mar 8, 2:16 pm, farsi...@gmail.com wrote:
>
> > >>> 4 / 5.0
>
> > 0.84>>> 0.8 * 5
>
> > 4.0
>
> > python 2.6.1 on mac. What the hell is going on here?
>
> Pure curiosity prompted me to try the following:>>> 40 / 5.0
>
> 8.0
>
> Stran
Scott David Daniels wrote:
Lie Ryan wrote:
Fencer wrote:
The literal translation of that would be:
if n is not None and n != []:
b = True
else:
b = False
it is a bit verbose, so one might want to find something shorter
b = True if n is not None and n != [] else False
I always feel if and
Thanks all, that's very helpful, sorry to waste your time with a
common question. I have tried the decimal module and will definitely
keep using it if I need to do this kind of calculation again.
I have 1 more question that the floating point article that was linked
didn't really answer:
>>> x =
RT wrote:
Can you recommend any books or articles that you have found offer
useful advice on program structure, design and use of classes or any
other features or best practices that you feel are important for
professional Python development.
In my opinion, 'professional development' has sur
farsi...@gmail.com wrote:
> Thanks all, that's very helpful, sorry to waste your time with a
> common question. I have tried the decimal module and will definitely
> keep using it if I need to do this kind of calculation again.
Try to remember though that the decimal module simply replaces one so
Thanks duncan, thats very helpful. I'll be more careful with floating
point numbers in future.
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
For those of you imperative programers who kept on hearing about lisp
and is tempted to learn, then, ...
You:
* consider yourself unfairly treated by various communities
* post a long drivel about various Lisp flavors to newsgroups
that are not in any way Lisp related
?
There
Colin J. Williams ncf.ca> writes:
> Do you have any schedule for a Windows
> binary release?
They should materialize on Monday.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 8, 7:50Â am, "D'Arcy J.M. Cain" wrote:
> So you are going to repeat his postings in their entirety so that those
> that block him will see them anyway, right? Â Wrong. Â We'll just block
> your posts too.
>
> *plonk*
This is to all usenet readers who think they own c.l.py!
On Mar 7, 5:52Â pm, Xah Lee wrote:
> HARASSMENT BY JOHN BOKMA
>
> I was harassed by a newsgroup poster John Bokma (a regular of
> comp.lang.perl.misc) to have my web hosting service provider kick me
> off. This happened in 2006.
I know the feeling. I have this super geek with nothing but time on
On Mar 7, 2:14 pm, Christian Heimes wrote:
> Steven D'Aprano wrote:
> > Yes. Floating point NANs are required to compare unequal to all floats,
> > including themselves. It's part of the IEEE standard.
>
> As far as I remember that's not correct. It's just the way C has
> interpreted the standard
Gabriel Genellina wrote:
En Fri, 06 Mar 2009 06:52:00 -0200, escribió:
I have succeeded in building Python 2.6.1 from source under Windows XP
by running Visual C++ 2008 Express on the PCbuild/pcbuild.sln file
both from the Visual C++ application as well as from the commandline
[...]
I would li
Could you help me ?
How could I "take" an elemment from a set or a frozenset .-) ?
From a string (unicode? Python<3), or from a tuple,or
from a list: Element by index or slice.
From a dict: by key.
But what concerning a set o
On Mar 7, 6:59 pm, Carl Banks wrote:
>
> I see that Brett Canon's importlib has finally made it into Python
> standard library. Congrats there (if you still read this list), I am
> struggling with Python's arcane import semantics (for something
> ridiculously silly) now and I feel your pain.
>
H
On Mar 8, 4:48 am, "andrew cooke" wrote:
> odeits wrote:
> > On Mar 7, 1:07 pm, Scott David Daniels wrote:
> >> odeits wrote:
> >> > I am looking to clean up this code... any help is much appreciated.
> >> > Note: It works just fine, I just think it could be done cleaner.
>
> >> > The result is a
Hans Larsen schrieb:
Could you help me ?
How could I "take" an elemment from a set or a frozenset .-) ?
From a string (unicode? Python<3), or from a tuple,or
from a list: Element by index or slice.
From a dict: by key.
But
BigHand wrote:
> I know that there is no PyString_AsString in Python3.0,
> could you guys give me instruction about how can I do with the
> following ?
>
> PyObject *exc_type = NULL, *exc_value = NULL, *exc_tb = NULL;
> PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
>
> how do I transfer the exc_ty
BigHand wrote:
> Finally I got the results now. This did take me 10 hours to solve
> this. the docs of 3.0..
You will have to get used to Unicode. The code you used against the C-API
mimics almost exactly the steps you'd use at the Python level.
Stefan
--
http://mail.python.org/mailman/listin
r wrote:
> This is to all usenet readers who think they own c.l.py!
[snip abusive, anti-social rant]
Well, after kill-filing this kiddie for a few months, I thought I'd give him
a chance. By pure luck I chose this post to read.
Good news "r", you've earned yourself a permanent kill-filing. I'll
Diez B. Roggisch wrote:
Hans Larsen schrieb:
Could you help me ?
How could I "take" an elemment from a set or a frozenset
.-) ?
From a string (unicode? Python<3), or from a
tuple,or from a list: Element by index or slice.
From a dict: by k
Tim Golden wrote:
Diez B. Roggisch wrote:
Hans Larsen schrieb:
Could you help me ?
How could I "take" an elemment from a set or a frozenset
.-) ?
From a string (unicode? Python<3), or from a
tuple,or from a list: Element by index or slice.
I have been using the 'threading' library and decided to try swapping it
out for 'processing'... while it's awesome that processing so closely
mirrors the threading interface, I've been having trouble getting my
processes to share an object in a similar way.
Using the 'with' keyword didn't work, a
ET wrote:
Using the 'with' keyword didn't work...
Just an aside here for any multiprocessing maintainers
watching ;) . I expect that the "didn't work" here
refers to this bug:
http://bugs.python.org/issue5261
Altho' if the OP cares to clarify, it might be something
else.
TJG
--
http://mail.
On Mar 8, 1:36 pm, ET wrote:
> I have been using the 'threading' library and decided to try swapping it
> out for 'processing'... while it's awesome that processing so closely
> mirrors the threading interface, I've been having trouble getting my
> processes to share an object in a similar way.
>
On Sat, 2009-03-07 at 22:05 +, Ville M. Vainio wrote:
> Alan G Isaac wrote:
>
> > 3. Chandler is not really an email client. So specifically,
> > which of its functionalities is it slow, and what evidence
> > if any is there that Python is causing this?
>
> I remember reading "somewhere" tha
On Mar 8, 1:42 pm, Carl Banks wrote:
> On Mar 8, 1:52 am, iu2 wrote:
>
>
>
> > On Mar 6, 6:52 pm, Mike Driscoll wrote:
>
> > > ...
> > > Can you post a sample application so we can try to figure out what's
> > > wrong? You might also cross-post this to thewxPythonmailing list.
> > > They might k
Ville M. Vainio wrote:
> Alan G Isaac wrote:
>
>> 3. Chandler is not really an email client. So specifically,
>> which of its functionalities is it slow, and what evidence
>> if any is there that Python is causing this?
>
> I remember reading "somewhere" that the cause of slowness is/was
> arch
Tim Golden wrote:
... Anyhow, at the end I have a working Python 2.7a0 running
under Windows.
Do you mean 3.1a0? As far as I know, 2.7a0 requires the use
of the time machine, as it is expected to be 3 months out.
If you do get an installer built, even having a semi-official copy
around for th
> In addition, the CVS version of pywin32 which I built in
> order to run the msi.py script has a small bug in genpy
> which prevents it from generating COM support in the way
> in which msi.py does it.
I'm using Python 2.4 to run msi.py; that has always worked
fine for me.
Regards,
Martin
P.S.
> Do you mean 3.1a0? As far as I know, 2.7a0 requires the use
> of the time machine, as it is expected to be 3 months out.
The current trunk calls itself 2.7a0. I think you might be referring
to 3.0a1.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
In addition, the CVS version of pywin32 which I built in
order to run the msi.py script has a small bug in genpy
which prevents it from generating COM support in the way
in which msi.py does it.
I'm using Python 2.4 to run msi.py; that has always worked
fine for me.
Int
Scott David Daniels wrote:
Tim Golden wrote:
... Anyhow, at the end I have a working Python 2.7a0 running
under Windows.
Do you mean 3.1a0? As far as I know, 2.7a0 requires the use
of the time machine, as it is expected to be 3 months out.
No; 2.7a0 is the version number of the svn HEAD.
> Thanks. I noticed that when I was on my windows box at work and I
> would check it and click apply then ok and when I go back to those
> prefs and it isn't checked. I did that a few times. I will try it on
> my Linux box tomorrow at home and see if I have the same results.
If it doesn't work fo
> What does the merge do? I can't find mention of it
> in the docs.
It merges the msvcrt merge module into the installer (and then
monkey patches it, to revert the msm decision of setting
ALLUSERS). I tried to integrate it originally as a step
after creating the msi. Unfortunately, the merge objec
On Mar 8, 1:24Â pm, Steven D'Aprano wrote:
> r wrote:
> > This is to all usenet readers who think they own c.l.py!
>
> [snip abusive, anti-social rant]
>
> Well, after kill-filing this kiddie for a few months, I thought I'd give him
> a chance. By pure luck I chose this post to read.
>
> Good news
Martin v. Löwis wrote:
What does the merge do? I can't find mention of it
in the docs.
It merges the msvcrt merge module into the installer (and then
monkey patches it, to revert the msm decision of setting
ALLUSERS). I tried to integrate it originally as a step
after creating the msi. Unfortun
En Sun, 08 Mar 2009 18:08:50 -0200, Martin v. Löwis
escribió:
What does the merge do? I can't find mention of it
in the docs.
It merges the msvcrt merge module into the installer (and then
monkey patches it, to revert the msm decision of setting
ALLUSERS). I tried to integrate it originally
Python Nutter wrote:
Looks like we finally get tkinter GUI based programs according to
Issue# 2983 in Python 3.1a so our programs don't look like something
out of early 1980's
Please don't confuse History gratuitously. Make that mid 90's.
Cheers, BB
--
http://mail.python.org/mailman/listinfo/
hello all, Sorry for the frustrated mail.
This is my last attempt to search for a nice python library for creating
open document spreadsheet.
I tryed python-ooolib but did not find a few features like merging cells
(may be I am missing out some thing stupid ).
I have asked for some help before
seconded.
--
http://mail.python.org/mailman/listinfo/python-list
> merge.py attempts to import config.py but I can't find it...
Just create an empty one.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> First, it relies on config.py whose existence msi.py
> optionally ignores.
Feel free to create a patch for that.
> File "", line 2, in OpenDatabase
> pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None,
> None, None, 0, -2147024786), None)
This is 0x8007006e; 0x6E, in turn, mi
On Mar 8, 12:42 am, Stefan Behnel wrote:
> rpar...@gmail.com wrote:
> > I am trying to process an xml file that contains unicode characters
> > (seehttp://vyakarnam.wordpress.com/). Wordpress allows exporting the
> > entire content of the website into an xml file. Using
> > xml.dom.minidom, I wro
Krishnakant wrote:
> This is my last attempt to search for a nice python library for creating
> open document spreadsheet.
>
> I tryed python-ooolib but did not find a few features like merging cells
> (may be I am missing out some thing stupid ).
You could add that feature to python-ooolib.
> I
Hello,
I am creating a container. I have some types which are built to be
members of the container. The members need to know which container
they are in, as they call methods on it, such as finding other
members. I want help with the syntax to create the members.
Currently, the container has to
Martin v. Löwis wrote:
merge.py attempts to import config.py but I can't find it...
Just create an empty one.
Won't quite work: merge tries to find full_current_version
which is determined (if None) in msi.py from the rather
involved current version stuff.
I'm going to give up on this for to
I'm at a loss to figure out how to extract some text from a string.
Here is a string:
setTimeout("location.href='http://youtube.example.com/login.aspx'",
5000);
and I want to only retrieve the URL from above i.e I only want this
http://youtube.example.com/login.aspx from the above string. Any ide
On Sun, Mar 8, 2009 at 2:18 PM, Oltmans wrote:
> I'm at a loss to figure out how to extract some text from a string.
> Here is a string:
>
> setTimeout("location.href='http://youtube.example.com/login.aspx'",
> 5000);
>
> and I want to only retrieve the URL from above i.e I only want this
> http:/
>> Just create an empty one.
>
> Won't quite work: merge tries to find full_current_version
> which is determined (if None) in msi.py from the rather
> involved current version stuff.
Only if you don't pass an msi file on the command line. So
I recommend that you do that.
> I'm going to give up
On Sun, Mar 8, 2009 at 5:18 PM, Oltmans wrote:
> I'm at a loss to figure out how to extract some text from a string.
> Here is a string:
>
> setTimeout("location.href='http://youtube.example.com/login.aspx'",
> 5000);
>
> and I want to only retrieve the URL from above i.e I only want this
> http:/
iu2 wrote:
Here is the timer version. It works even more slowly, even with
PyScripter active: ...
I actually tried this one first. Due to the slow speed I changed to
looping inside the event.
I don't understand why it takes so long to move that square with
wx.Timer set to 1 ms interval. Perhaps
Aaron Brady wrote:
> Hello,
>
> I am creating a container. I have some types which are built to be
> members of the container. The members need to know which container
> they are in, as they call methods on it, such as finding other
> members. I want help with the syntax to create the members.
>
andrew cooke wrote:
> above is with 3.0. for some odd reason i thing the order of teh args to
> MethodType may have changed recently, so be careful.
sorry, no, had 2.6 running there... andrew
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 9, 3:37 am, Chris Rebert wrote:
> Learn about the methods of the string class
> (str):http://docs.python.org/library/stdtypes.html#id4
>
> You'll probably be most interested in .split()
OK, thanks I got it. I was trying to use Regex but .split() just
worked like a charm. Thank you ;)
>
>
I just tried python first time.
2/3
the result is zero
I want the result to be .333...
How do I get this?
Thanks a lot
L
--
http://mail.python.org/mailman/listinfo/python-list
Lo schrieb:
I just tried python first time.
2/3
the result is zero
I want the result to be .333...
Well, that's not going to happen - 2/3 is .666 if not done with integers...
How do I get this?
Use floating points.
>>> 2.0 / 3.0
0.3
Diez
--
http://mail.python.org/mailma
On 2009-03-08, Lo wrote:
> I just tried python first time.
>
> 2/3
>
> the result is zero
>
> I want the result to be .333...
How odd.
> How do I get this?
1./3
--
Grant
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Mar 8, 2009 at 3:08 PM, Lo wrote:
> I just tried python first time.
>
> 2/3
>
> the result is zero
>
> I want the result to be .333...
>
> How do I get this?
Add the following to the top of your program:
from __future__ import division
That tells Python to use the proper kind of divisio
Lo pisze:
I just tried python first time.
2/3
the result is zero
Float type must be specified explicitly:
2/3.0 or 2.0/3
In Python 3.x operators behave differently and '2/3' would give float
number as a result.
I want the result to be .333...
Than try: 1/3.0 because 2/3.0 will never
Lo wrote:
I just tried python first time.
2/3
the result is zero
I want the result to be .333...
How do I get this?
That's integer division (integer divided by integer is integer).
If you want the result to be floating point then make one of them
floating point:
2.0 / 3
or do this
RT wrote:
I have been doing Python development at work for several years. I
started with the official documentation and tutorial, by
necessity, the examples tend to be rather simple and none of them
really explain the process of developing complete, industrial
strength Python applications.
On Sat, 07 Mar 2009 05:03:08 -, Grant Edwards wrote:
On 2009-03-07, Rhodri James wrote:
On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards
wrote:
On 2009-03-06, Fencer wrote:
Hi, I need a boolean b to be true if the variable n is not
None and not an empty list, otherwise b should b
1 - 100 of 132 matches
Mail list logo