How could I format the float number like this: (keep 2 digit
precision)
1.002 => 1
1.12 => 1.12
1.00 => 1
1.567 => 1.57
2324.012 => 2324.01
I can not find any Formatting Operations is able to meet my
requirement.
Any suggestion will be appreciated.
--
http://mail.python.org/mailman/listinfo/p
Hi, I need add to a listbox a list of items extracted from a database.
This is that I've do:
class tasques(wx.Frame):
def __init__(self, *args, **kwds):
self.list_box_1_copy = wx.ListBox(self, -1, choices=[],
style=wx.LB_SINGLE|wx.LB_ALWAYS_SB)
...
How I add the list to choices?
On Jun 12, 10:10 am, <[EMAIL PROTECTED]> wrote:
> How could I format the float number like this: (keep 2 digit
> precision)
> 1.002 => 1
> 1.12 => 1.12
> 1.00 => 1
> 1.567 => 1.57
> 2324.012 => 2324.01
>
> I can not find any Formatting Operations is able to meet my
> requirement.
For those who write books and articles, I've established a wiki page just as
we already have a page for those who offer training services for Python. If
you would like to be reachable by those needing writing services of various
kinds, please add yourself to the list, along with some indication of
Twisted schrieb:
> On Jun 11, 5:36 pm, Tim Bradshaw <[EMAIL PROTECTED]> wrote:
>> I think it's just obvious that this is the case. What would *stop*
>> you writing maintainable Perl?
>
> For starters, the fact that there are about six zillion obscure
> operators represented by punctuation marks,
"Beorn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Consider this example:
|
| >>> def funcs(x):
| ... for i in range(5):
| ... def g(): return x + i
| ... yield g
|
| I would expect the value of x used in g to be that at the function
| declaration time,
>From python command, I call C extension method
>>> import PyRPC
>>> PyRPC.addBool(False)
In C extension, I know parse integer value like this:
PyArg_ParseTuple(args, "i", &nValue);
But, how can I parse the False value?
Regards,
Allen Chen
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 11, 11:36 pm, Tim Bradshaw <[EMAIL PROTECTED]> wrote:
> On Jun 11, 8:02 am, Twisted <[EMAIL PROTECTED]> wrote:
>
> > On Jun 11, 2:42 am, Joachim Durchholz <[EMAIL PROTECTED]> wrote:
>
> > > It is possible to write maintainable Perl.
>
> > Interesting (spoken in the tone of someone hearing ab
Waldemar Osuch schreef:
>
> I have also build it on XP SP2.
>
> I have wrapped the files from "setup.py build" and all required .dll
> using Inno Setup.
> Maybe Vista does not like the executable produced by Inno.
>
> If you still want to try then unzip the following:
> http://www.osuch.org/pyt
On 2007-06-11, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>| On 2007-06-09, Terry Reedy <[EMAIL PROTECTED]> wrote:
>| > For him to imply that Python is anti-flexibility is wrong. Very
> wrong..
>| > He should look in a
On Jun 12, 9:36 am, "Papalagi Pakeha" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> How can I turn on autocompletion when I push in python 2.5.1
> interactive mode? E.g. to give me a list of all methods and attributes
> of a given object.
>
> It works great on my Linux / Ubuntu 7.04 installation but do
On 6 12 , 3 16 , ici <[EMAIL PROTECTED]> wrote:
> On Jun 12, 10:10 am, <[EMAIL PROTECTED]> wrote:
>
>
>
> > How could I format the float number like this: (keep 2 digit
> > precision)
> > 1.002 => 1
> > 1.12 => 1.12
> > 1.00 => 1
> > 1.567 => 1.57
> > 2324.012 => 2324.01
>
> > I
In proejct i need a program having two thread. One is server thread
will listen on a port. and aniother one is to controll some opertion
in the system.. The server therad will get the comment and the and the
another thread will do some opertion based on the commend..
How to implemten it.. I have
James Stroud wrote:
> Beorn wrote:
>> Consider this example:
>>
>> >>> def funcs(x):
>> ... for i in range(5):
>> ... def g(): return x + i
>> ... yield g
>>
>> I would expect the value of x used in g to be that at the function
>> declaration time, as if you've pass g
"James Stroud" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Beorn wrote:
| > Consider this example:
| >
| > >>> def funcs(x):
| > ... for i in range(5):
| > ... def g(): return x + i
| > ... yield g
| >
| > >>> [ fun() for fun in list(funcs(1)) ]
| >
Beorn wrote:
> Consider this example:
>
> >>> def funcs(x):
> ... for i in range(5):
> ... def g(): return x + i
> ... yield g
>
> I would expect the value of x used in g to be that at the function
You mean i here, don't you?
> declaration time, as if you've pass g a
self.list_box_1_copy.Append( your_item )
In the wxWidgets help:
http://www.wxwidgets.org/manuals/2.8.0/wx_wxcontrolwithitems.html#wxcontrolwithitems
And in the wxPython help:
http://www.wxpython.org/docs/api/wx.ItemContainer-class.html
Regards,
- Jorgen
On 6/12/07, Marcpp <[EMAIL PROTECTED]>
Hi Friends,
Let's Stop AIDS, it's increasing like a forest fire...
See the page below and learn more about it.
www.chulbul.com/aids.htm
Let's Know more about stopping AIDS today !!
---
Join the Revolution !!
http://www.orkut.com/Community.aspx?cmm=27495757
--
http
En Tue, 12 Jun 2007 05:07:13 -0300, Allen <[EMAIL PROTECTED]>
escribió:
>> From python command, I call C extension method
import PyRPC
PyRPC.addBool(False)
>
> In C extension, I know parse integer value like this:
> PyArg_ParseTuple(args, "i", &nValue);
>
> But, how can I parse the Fal
On Mon, 11 Jun 2007 14:23:48 +0200, exhuma.twn <[EMAIL PROTECTED]> wrote:
> As many might know, windows allows to copy an image into the clipboard
> by pressing the "Print Screen" button on the keyboard. Is it possible
> to paste such an image from the clipboard into a "Text" widget in
> Tkinter? H
Hello!
I'm writing this message over Google web access. I'm trying to access
to the comp.lang.python newsgroup trough the Thunderbird, but I just
can't configure it properly. What is the news server for this
newsgroup. If I ping comp.lang.python it is not resolved. For instance
I had no problem co
On Jun 12, 5:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 12 Jun 2007 00:02:37 -0300, Josh Gilbert
> <[EMAIL PROTECTED]> escribió:
>
> > I don't expect multiline lambdas to be added to Python. I'm not so sure
> > that
> > that's a bad thing. Regardless, isn't it possible to write
En Tue, 12 Jun 2007 05:46:25 -0300, <[EMAIL PROTECTED]> escribió:
> On 6 12 , 3 16 , ici <[EMAIL PROTECTED]> wrote:
>> On Jun 12, 10:10 am, <[EMAIL PROTECTED]> wrote:
>>
>> > How could I format the float number like this: (keep 2 digit
>> > precision)
>> > 1.002 => 1
>> > 1.12 =
On Jun 12, 6:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> [...]
>
> for number in range(10,100):
> is_prime = True
> for divisor in range(2,number):
> if number % divisor == 0:
> is_prime = False
> break
> if is_prime:
> print nu
Hi there.
I'm working with the Python Tutorial "Byte of Python" at swaroopch.info.
I have created the attached file, but when I execute:
% objvar.py
I get the error message:
(Initializing Calamity Jane)
Traceback (most recent call last):
File "/home/jef/bin/objvar.py", line 49, in
Perso
On Jun 12, 11:24 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Jun 2007 14:23:48 +0200,exhuma.twn <[EMAIL PROTECTED]> wrote:
> > As many might know, windows allows to copy an image into the clipboard
> > by pressing the "Print Screen" button on the keyboard. Is it possible
> > to paste
On 6 12 , 5 21 , "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 12 Jun 2007 05:07:13 -0300, Allen <[EMAIL PROTECTED]>
> escribió:
>
> >> From python command, I call C extension method
> import PyRPC
> PyRPC.addBool(False)
>
> > In C extension, I know parse integer value like t
Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Tue, 12 Jun 2007 05:46:25 -0300, <[EMAIL PROTECTED]> escribió:
>
>> On 6 12 , 3 16 , ici <[EMAIL PROTECTED]> wrote:
>>> On Jun 12, 10:10 am, <[EMAIL PROTECTED]> wrote:
>>>
>>> > How could I format the float number like this: (keep
Hi there.
I'm working with the Python Tutorial "Byte of Python" at swaroopch.info.
I have created the following file:
#!/usr/bin/env python
# Filename: objvar.py
class Person:
"""Represents a person."""
population
My C extension works wrong, and debug it, found that sizeof (INT64) =
4, not 8.
I compile on Windows XP platform.
Please tell me how to fix it to support INT64?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 12, 10:58 am, [EMAIL PROTECTED] wrote:
> I'm using pyExcelerator to take a folder of CSV files and create Excel
> workbooks for all of them, then generate an Excel workbook with the
> data from all of them.
>
> Everything up until here works great; next, I make a second worksheet
> on the la
Jeff Rollin <[EMAIL PROTECTED]> wrote:
> I'm working with the Python Tutorial "Byte of Python" at swaroopch.info.
>
> I have created the attached file, but when I execute:
>
> % objvar.py
>
> I get the error message:
>
> (Initializing Calamity Jane)
> Traceback (most recent call last):
> File
Hi.
You may have just seen that I posted a more-or-less identical message to the
group. This was because the message w/ the attached file didn't show up for
me - but I also just got a reply which references the message with the
attached file.
Why do I not see my messages with attached files in th
In the last episode, on Tuesday 26 Sivan 5767 11:09, Marc Christiansen
wrote:
>
> The indentation of __del__, say_hi and how_many is wrong. You define
> them inside __init__. Move them to the same indentation level as
> __init__ and all should work.
Thanks very much.
Jeff
--
http://mail.pytho
exhuma.twn skrev:
>> for number in range(10,100):
>> for divisor in range(2,number):
>> if number % divisor == 0:
>> break
>> else:
>> print number,
>>
>
> Oh my. Would it not be an idea to rename this "else" into a "finally"?
> As Gabriel points out, the
In <[EMAIL PROTECTED]>, Jeff Rollin wrote:
> Why do I not see my messages with attached files in the newsgroup, and is
> there any way to configure this?
No, most news servers strip attachments from postings in non-binary
groups. It's a plain text medium.
Ciao,
Marc 'BlackJack' Rintsch
In the last episode, on Tuesday 26 Sivan 5767 11:21, Marc 'BlackJack'
Rintsch wrote:
> In <[EMAIL PROTECTED]>, Jeff Rollin wrote:
>
>> Why do I not see my messages with attached files in the newsgroup, and is
>> there any way to configure this?
>
> No, most news servers strip attachments from po
Rostfrei skrev:
> Hello!
>
> I'm writing this message over Google web access. I'm trying to access
> to the comp.lang.python newsgroup trough the Thunderbird, but I just
> can't configure it properly. What is the news server for this
> newsgroup. If I ping comp.lang.python it is not resolved. For
In <[EMAIL PROTECTED]>, Jeff Rollin wrote:
> (Initializing Calamity Jane)
> Traceback (most recent call last):
> File "/home/jef/bin/objvar.py", line 49, in
> Person.how_many()
> AttributeError: class Person has no attribute 'how_many'
>
> Where am I going wrong?
Looking at the indention
In <[EMAIL PROTECTED]>, Terry Reedy
wrote:
> | Should I import this to see how
> | many principles this behavior violates?
>
> ???
>
> If you meant 'report' (on SF), please do not.
I think he meant ``import this`` at the Python interpreter.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mai
Marc Christiansen wrote:
> Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> En Tue, 12 Jun 2007 05:46:25 -0300, <[EMAIL PROTECTED]> escribió:
>>
>>> On 6 12 , 3 16 , ici <[EMAIL PROTECTED]> wrote:
On Jun 12, 10:10 am, <[EMAIL PROTECTED]> wrote:
> How could I format
On Jun 12, 8:04 pm, Marc Christiansen <[EMAIL PROTECTED]> wrote:
> Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> > En Tue, 12 Jun 2007 05:46:25 -0300, <[EMAIL PROTECTED]> escribió:
>
> >> On 6 12 , 3 16 , ici <[EMAIL PROTECTED]> wrote:
> >>> On Jun 12, 10:10 am, <[EMAIL PROTECTED
On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Jun 12, 9:36 am, "Papalagi Pakeha" wrote:
> > Hi all,
> >
> > How can I turn on autocompletion when I push in python 2.5.1
> > interactive mode? E.g. to give me a list of all methods and attributes
> > of a given object.
>
> http://docs
On Mon, 11 Jun 2007 22:35:46 -0700, Frank Millman wrote:
> On Jun 12, 1:46 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>>
>> >> You haven't told us what the 'compute' method is.
>>
>> >> Or if you have, I missed it.
>>
>> > Sorry - I made it more explicit above. It is the method that sets up
On 2007-06-12, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-06-11, Terry Reedy <[EMAIL PROTECTED]> wrote:
>> More so than supporters of most other languages, in particular
>> Scheme?
>
> Well to my knowledge (which could be vastly improved), scheme
> doesn't have some Zen-rules that include s
Peter Otten <[EMAIL PROTECTED]> wrote:
> Marc Christiansen wrote:
>
>> Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>>> En Tue, 12 Jun 2007 05:46:25 -0300, <[EMAIL PROTECTED]> escribió:
>>>
On 6 12 , 3 16 , ici <[EMAIL PROTECTED]> wrote:
> On Jun 12, 10:10 am, <[EMAIL P
On 6/12/07, Nis Jørgensen <[EMAIL PROTECTED]> wrote:
> exhuma.twn skrev:
>
> >> for number in range(10,100):
> >> for divisor in range(2,number):
> >> if number % divisor == 0:
> >> break
> >> else:
> >> print number,
> >>
> >
> > Oh my. Would it not be an i
On 6 12 , 6 03 , Allen <[EMAIL PROTECTED]> wrote:
> My C extension works wrong, and debug it, found that sizeof (INT64) =
> 4, not 8.
> I compile on Windows XP platform.
> Please tell me how to fix it to support INT64?
> Thanks.
I find it is strange. In an exe win32 console project, sizeof(INT64
En Tue, 12 Jun 2007 06:34:49 -0300, exhuma.twn <[EMAIL PROTECTED]> escribió:
> On Jun 12, 6:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> for number in range(10,100):
>> for divisor in range(2,number):
>> if number % divisor == 0:
>> break
>> else:
>>
On Tue, 12 Jun 2007 02:29:31 -0700, exhuma.twn wrote
> lambdas are to be removed in Py3k IIRC.
No. From http://www.python.org/dev/peps/pep-3099/, "At one point lambda was
slated for removal in Python 3000. Unfortunately no one was able to come up
with a better way of providing anonymous functions.
En Tue, 12 Jun 2007 08:18:40 -0300, Steven D'Aprano
<[EMAIL PROTECTED]> escribió:
> On Mon, 11 Jun 2007 22:35:46 -0700, Frank Millman wrote:
>
>> Because, as I have tried to explain elsewhere (probably not very
>> clearly), not all the information required to perform compute() is
>> available at
On Jun 8, 12:17 am, "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]>
wrote:
> Terry Reedy wrote:
> > "Dan Bishop" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> >> If you don't need the list to be sorted until you're done building
> >> it, you can just use:
>
> >> lst = sorted(set(lst
En Tue, 12 Jun 2007 08:39:43 -0300, Allen <[EMAIL PROTECTED]>
escribió:
> PyObject* method(PyObject* self, PyObject *args)
> {
>INT64 nValue; /* LINE_HERE */
>INT32 nRet;
>nRet = DoSomeCOperations(nValue);
>return PyBuildValue("i", nRet);
> }
>
> If I changed INT64 nValue to be s
Steve Howell wrote:
> Hi, I'm offering a challenge to extend the following
> page by one good example:
>
> http://wiki.python.org/moin/SimplePrograms
What about simple HTML parsing? As a matter of fact this is not
language concept, but shows the power of Python standard library.
Besides, that's v
hi all,
i'm using this tutorial example
import httplib
h = httplib.HTTP("www.python.org")
h.putrequest('GET','/index.html')
h.putheader('User-Agent','Lame Tutorial Code')
h.putheader('Accept','text/html')
h.endheaders()
errcode,errmsg, headers = h.getreply()
f = h.getfile() # Get file object fo
I need to run a network program and return output in a variable name
without use temporany file.
So i tought to use popen (i'm using python 2.3, i can't upgrade).
RESULT = os.popen('command'+HOST, 'r')
I have a problem about it:
i need to kill the child if the program take more than 300 ms, but i
n
I've been trying to build pyOpenSSL on Windows with Visual Studio
2003. I've hit the message below:
building 'OpenSSL.SSL' extension
creating build\temp.win32-2.5\Release\src\ssl
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c
/nologo /Ox /MD /W3 /GX /DNDEBUG -Ic:\OpenSSL\incl
John Nagle wrote:
> Diez B. Roggisch wrote:
>> Regardless of the possibility of speeding it up - why should one want
>> this? Coding speed is more important than speed of coding in 90%+ of all
>> cases.
>
> When you have to start buying more servers for the server farm,
> it's a real pain.
On Jun 12, 2:09 pm, rhXX <[EMAIL PROTECTED]> wrote:
> hi all,
>
> i'm using this tutorial example
>
> import httplib
>
> h = httplib.HTTP("www.python.org")
> h.putrequest('GET','/index.html')
> h.putheader('User-Agent','Lame Tutorial Code')
> h.putheader('Accept','text/html')
> h.endheaders()
>
> e
> i need to kill the child if the program take more than 300 ms, but i
> need also to wait this 300 ms to have the reply.
I reply by myself:
from popen2 import Popen3
cmd = Popen3('command','r')
waiting=0
while (cmd.poll()==-1):
time.sleep(0.1)
waiting+=1
if (waiting>3): os.k
Josh Gilbert wrote:
> I don't expect multiline lambdas to be added to Python. I'm not so sure that
> that's a bad thing. Regardless, isn't it possible to write your own
Yes, it is a bad thing.
Why? Because it would another way to do something you can do in other
way.
The *only* big value of lam
I'm in need of a module that will let me create Excel workbooks from within
Python. Something like PyExcelerator, but it needs to work with Python 2.3.
(A third-party limitation that I have no control over.) Can anyone point me
to what I need? All my searches keep leading back to PyExcelerator.
On 6 12 , 8 08 , "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 12 Jun 2007 08:39:43 -0300, Allen <[EMAIL PROTECTED]>
> escribió:
>
> > PyObject* method(PyObject* self, PyObject *args)
> > {
> >INT64 nValue; /* LINE_HERE */
> >INT32 nRet;
> >nRet = DoSomeCOperations(nValue);
On Jun 12, 11:01 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
> I'm in need of a module that will let me create Excel workbooks from within
> Python. Something like PyExcelerator, but it needs to work with Python 2.3.
> (A third-party limitation that I have no control over.) Can anyone poi
On Jun 11, 7:47 am, pradeep nair <[EMAIL PROTECTED]> wrote:
> I would like to know how to pass keyboard input for a python script
> which is ran by another script.
>
> for eg:
>
> hello1.py:
>
> import os
>
> if __name__=='__main__':
>
> print "I will call this other program called hello.py"
>
On Jun 12, 5:04 am, Jeff Rollin <[EMAIL PROTECTED]> wrote:
> Where am I going wrong?
>
> Many TIA for any help.
Look at your code, then look at swaroop's
http://tinyurl.com/2v5zze
Line up all your defs at the same indent and they should work.
--
http://mail.python.org/mailman/listinfo/python-
On Jun 12, 8:01 am, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
> I'm in need of a module that will let me create Excel workbooks from within
> Python. Something like PyExcelerator, but it needs to work with Python 2.3.
> (A third-party limitation that I have no control over.) Can anyone poin
On Jun 12, 8:38 am, [EMAIL PROTECTED] wrote:
> On Jun 12, 8:01 am, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
>
> > I'm in need of a module that will let me create Excel workbooks from within
> > Python. Something like PyExcelerator, but it needs to work with Python 2.3.
> > (A third-party li
On 6/12/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Tue, 12 Jun 2007 06:34:49 -0300, exhuma.twn <[EMAIL PROTECTED]> escribió:
>
> > On Jun 12, 6:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
> >> for number in range(10,100):
> >> for divisor in range(2,number):
> >>
Hi,
How is the default path chosen in this instance:
myFile = file('test.txt','w')
Here I'm opening/creating a file but I have not specified the exact path, so
how does Python determine where to 'put' this file? More to the point, how
do I change what the default path is? Right now it's a ne
On Jun 12, 8:42 am, "T. Crane" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How is the default path chosen in this instance:
>
> myFile = file('test.txt','w')
>
> Here I'm opening/creating a file but I have not specified the exact path, so
> how does Python determine where to 'put' this file? More to the
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Jun 12, 8:42 am, "T. Crane" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> How is the default path chosen in this instance:
>>
>> myFile = file('test.txt','w')
>>
>> Here I'm opening/creating a file but I have not specified the exact path,
Rostfrei <[EMAIL PROTECTED]> writes:
> What is the news server for this
> newsgroup.
Usenet newsgroups are redistributed over many servers worldwide.
http://en.wikipedia.org/wiki/Usenet>
> If I ping comp.lang.python it is not resolved.
That's right. It's the name of a Usenet newsgroup, not
"T. Crane" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> As an aside, I forgot to mention above that I'm using Windows XP. Any other
> ideas or
> possible reasons that it would not choose my script location as the default
> location to
> save something?
If you open a DOS wi
On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote:
> Remember that the *only* difference between the two functions is that
> one is anonymous, and for other you have to came up with a name (name
> that if is well thought, actually adds readibility to your code).
The difference is that
>> As an aside, I forgot to mention above that I'm using Windows XP. Any
>> other ideas or possible reasons that it would not choose my script
>> location as the default location to save something?
>
> If you open a DOS window and run Python from there, it will write the
> files
> in whatever d
Leo 4.4.3 beta 2 is available at:
http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106
Leo is a text editor, data organizer, project manager and much more. See:
http://webpages.charter.net/edreamleo/intro.html
The highlights of Leo 4.4.3:
- Adde
T. Crane wrote:
> myFile = file('test.txt','w')
>
> Here I'm opening/creating a file but I have not specified the exact path, so
> how does Python determine where to 'put' this file? More to the point, how
> do I change what the default path is? Right now it's a networked drive that
> should
Hello,
I am a complete newbie to Python and am accustomed to coding in PHP/
Perl/Shell. I am trying to do the following:
I have a string:
cpuSpeed = 'Speed: 10'
What I would like to do is extract the '10' from the string,
and divide that by 1000 twice to get the speed of a proc
On Jun 12, 9:32 am, tereglow <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am a complete newbie to Python and am accustomed to coding in PHP/
> Perl/Shell. I am trying to do the following:
>
> I have a string:
>
> cpuSpeed = 'Speed: 10'
>
> What I would like to do is extract the '10' f
On 12 Jun., 16:32, tereglow <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am a complete newbie to Python and am accustomed to coding in PHP/
> Perl/Shell. I am trying to do the following:
>
> I have a string:
>
> cpuSpeed = 'Speed: 10'
>
> What I would like to do is extract the '10' fr
On Jun 12, 9:09 am, "Richard Brodie" <[EMAIL PROTECTED]> wrote:
> "T. Crane" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> > As an aside, I forgot to mention above that I'm using Windows XP. Any
> > other ideas or
> > possible reasons that it would not choose my script locat
On Jun 12, 10:12 am, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote:
>
> > Remember that the *only* difference between the two functions is that
> > one is anonymous, and for other you have to came up with a name (name
> > that if is well thou
Hi all,
What frameworks are there available for doing pattern classification?
I'm generally interested in the problem of mapping some sort of input
to one or more categories. For example, I want to be able to solve
problems like taking text and applying one or more tags to it like
"romance", "horr
On Jun 12, 10:46 am, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 12 Jun., 16:32, tereglow <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I am a complete newbie to Python and am accustomed to coding in PHP/
> > Perl/Shell. I am trying to do the following:
>
> > I have a string:
>
> > cpuSpeed = 'Sp
I've mod_php installed with Apache 2.2. In one of my folders, I'm
using the cgihandler as the PythonHandler as my target host runs
python only as CGI. Here cgi.FieldStorage() doesn't seem to work. I
can see the form data in sys.stdin but cgi.FieldStorage() returns an
empty dictionary. Here's the co
On 6/12/07, tereglow <[EMAIL PROTECTED]> wrote:
> Basically, I want to come out with 1000 for the above string. Any
> help would be appreciated.
> Tom
There are any number of techniques you can use to parse out the
integer part of the string -- the most generic is to use the re module
to match re
Evan Klitzke wrote:
> Hi all,
>
> What frameworks are there available for doing pattern classification?
> I'm generally interested in the problem of mapping some sort of input
> to one or more categories. For example, I want to be able to solve
> problems like taking text and applying one or more
On 12 Jun., 16:54, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jun 12, 10:12 am, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>
> > On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote:
>
> > > Remember that the *only* difference between the two functions is that
> > > one is anonymous, and fo
i have a python source code test.py
# -*- coding: UTF-8 -*-
# s is a unicode string, include chinese
s = u'张三'
then i run
$ python test.py
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
invalid data
by in python interactive, it is right
>>> s = u'张三'
why?
--
http://ma
On Jun 12, 1:18 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Mon, 11 Jun 2007 22:35:46 -0700, Frank Millman wrote:
> > On Jun 12, 1:46 am, Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
>
> >> >> You haven't told us what the 'compute' method is.
>
> >> >> Or if you have, I missed it.
>
> >>
Hi Fellows,
I have a problem with process termination. I have a python code that
apache runs through a django interface.
The code is very simple, first, it creates a process with the
subprocess.Popen call, and afterwards, (using a web request) the
python code uses the PID of the previously created
In <[EMAIL PROTECTED]>, hzqij wrote:
> i have a python source code test.py
>
> # -*- coding: UTF-8 -*-
>
> # s is a unicode string, include chinese
> s = u'张三'
>
> then i run
>
> $ python test.py
> UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
> invalid data
>
> by in p
I imported a set of functions from a file I wrote to interpreter
shell:
from myFile import *
Now if I change functions in this file how can I make python forget it
so I can force a fresh import?
thanx,
jh
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 9:46 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> miah_gbg wrote:
> > Hi there!
>
> > Just wanted to let people know in this group that I have recently
> > (April 24th) published an introductory article on wxPython and Mac OS
> > X. It is available here:http://www.macdevcenter.com/
>
> >
hzqij schrieb:
> i have a python source code test.py
>
> # -*- coding: UTF-8 -*-
>
> # s is a unicode string, include chinese
> s = u'张三'
>
> then i run
>
> $ python test.py
> UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
> invalid data
>
> by in python interactive, it i
HMS Surprise wrote:
> I imported a set of functions from a file I wrote to interpreter
> shell:
>
> from myFile import *
>
> Now if I change functions in this file how can I make python forget it
> so I can force a fresh import?
>
> thanx,
>
> jh
>
While there may be ways of doing this, I have
Richard Rossel wrote:
> Hi Fellows,
> I have a problem with process termination. I have a python code that
> apache runs through a django interface.
> The code is very simple, first, it creates a process with the
> subprocess.Popen call, and afterwards, (using a web request) the
> python code uses
On 6/12/07, Richard Rossel <[EMAIL PROTECTED]> wrote:
> But when the python code is called to kill the created process, the
> process is left in a zombie state.
If the process is left in a zombie state, it's because the parent
process isn't calling wait(2). If the parent process is your own
python
HMS Surprise schrieb:
> I imported a set of functions from a file I wrote to interpreter
> shell:
>
> from myFile import *
>
> Now if I change functions in this file how can I make python forget it
> so I can force a fresh import?
I think you are looking for reload(). But don't forget to check i
1 - 100 of 203 matches
Mail list logo