On Fri, 14 Mar 2008 11:32:41 -0700, Lie wrote:
No, there is no need for void return type, what I meant is that
everything that's not said in the documentation should be assumed to
be an implementation detail, a method or a function that doesn't say
anything about its return type should be
On Mar 15, 6:44 am, Joshua Kugler [EMAIL PROTECTED] wrote:
James Yu wrote:
Hi folks,
I prepared a python script for dynamically get the absolute paths of the
files in certain folder.
Then I tried to invoke that function from my web server in a .psp file
like this:
1 html
On Fri, 14 Mar 2008 12:19:18 -0700, MRAB wrote:
On Mar 13, 4:25 am, David S [EMAIL PROTECTED] wrote:
Hi,
I have an error occurring at
self.build_root = os.path.abspath(os.path.split(__file__)[0])
The error states 'NameError: global name '__file__' is not defined'
In Python 2.5 I
On Fri, 14 Mar 2008 17:06:00 +, Matt Nordhoff wrote:
Hmm, if Perl's on-disk hash tables are good, maybe someone should port
them to Python, or maybe someone already has.
I don't know Perl's on-disk hash tables but there is a `shelve` module in
the standard library.
Ciao,
Marc
On Mar 15, 12:39 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On 14 Mar 2008 10:38:52 GMT, Antoon Pardon [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
In that case I find it very strange that when this question comes
up, I see so few attempts to explain how the assignment
En Thu, 13 Mar 2008 02:25:12 -0200, David S [EMAIL PROTECTED]
escribi�:
I have an error occurring at
self.build_root = os.path.abspath(os.path.split(__file__)[0])
The error states 'NameError: global name '__file__' is not defined'
In Python 2.5 I ran my script as a module in IDLE gui.
En Thu, 13 Mar 2008 15:18:44 -0200, [EMAIL PROTECTED] escribió:
Well, lets say you have a situation where you're going to be
alternating between sending large and small chunks of data. Is the
solution to create a NetworkBuffer class and only call send when the
buffer is full, always
On Thu, Mar 13, 2008 at 8:36 AM, Hendrik van Rooyen
[EMAIL PROTECTED] wrote:
foo = [1,2,3,4]
x = foo.append(5)
print x
What will be the output (choose one):
1) [1,2,3,4]
2) [1,2,3,4,5]
3) That famous picture of Albert Einstein sticking out his tongue
4) Nothing - no output
On Mar 15, 3:33 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 13 Mar 2008 15:18:44 -0200, [EMAIL PROTECTED] escribió:
Well, lets say you have a situation where you're going to be
alternating between sending large and small chunks of data. Is the
solution to create a NetworkBuffer
En Fri, 14 Mar 2008 17:23:14 -0200, Amit Gupta [EMAIL PROTECTED]
escribi�:
On Feb 20, 8:51 pm, Miki [EMAIL PROTECTED] wrote:
Hello Amit,
python testname.py : the unitests runs as usual and I get the
following results:
Hi All,
I have a simple python script saved to test.py as
import os
import base64
def Testfunction():
print Hello World
return
Testfunction()
I am trying to invoke this from a C program as follows
int main(int argc, char* argv[])
{
Py_Initialize();
PyObject*
En Fri, 14 Mar 2008 17:23:14 -0200, Amit Gupta [EMAIL PROTECTED]
escribi�:
So What do I do, if my testcase if failing because of an uncaught
exception and I want to run it in pdb.
Oh, sorry, my last message doesn't apply because the unittest framework
caughts the exception.
Looks like you
On Mar 15, 2:10 am, kaush [EMAIL PROTECTED] wrote:
Hi All,
I have a simple python script saved to test.py as
import os
import base64
def Testfunction():
print Hello World
return
Testfunction()
I am trying to invoke this from a C program as follows
int main(int argc, char*
On Mar 15, 5:47 am, Tim Roberts [EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Roel Schroeven wrote:
[EMAIL PROTECTED] schreef:
On Mar 14, 1:47 pm, Reedick, Andrew [EMAIL PROTECTED] wrote:
Subject: RIP: Joseph Weizenbaum
Creator of Eliza:
Is there any other edition of Python for Palm OS instead of Pippy?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 15, 5:42 am, Carl Banks [EMAIL PROTECTED] wrote:
On Mar 14, 6:37 pm, Alex [EMAIL PROTECTED] wrote:
On Mar 13, 6:21 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Mar 13, 7:02 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
Alex a écrit :
(sni)
First of all
I couldn't believe it.
Do yourself a favour and at least check it out:
http://www.jdoqocy.com/click-2924912-10359791
Michael
--
http://mail.python.org/mailman/listinfo/python-list
joep wrote:
I had the same problem recently with subprocess.popen, when there is a
space in the executable and a space in an additional argument as in
the acrobat example. I finally found a past thread in this news group
that explained that you have to use two (2) leading double quotes, and
E-Lo,
PalmPython
http://c2.com/cgi/wiki?PalmPython
I have no experience with Python for Palm OS's. This is just a reference
from my personal notes.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
what the? why can this get through?
[EMAIL PROTECTED] wrote:
Send Python-list mailing list submissions to
python-list@python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.org/mailman/listinfo/python-list
or, via email, send a message with
[EMAIL PROTECTED] wrote:
Gabriel Genellina wrote:
No need to reinvent the wheel. socket objects already have a makefile
method returning a file-like object, which behaves like a buffered socket.
That wheel is far from round, and needs some reinvention. Python's
file-like objects do not play
Hi All,
I want to use therads in my application. Going through the docs , I read
about GIL.
Now I am confused whether using threads in python is safe or not.
One thing I know that if I am accessing global variables in two or more
threads I need to synchronize them
using locking or such mechanism
Is there a Python for BlackBerry? Thanks.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of E-Lo
Sent: Saturday, March 15, 2008 6:03 AM
To: python-list@python.org
Subject: Python for Palm OS
Is there any other edition of Python for Palm OS instead of
On Mar 15, 4:56 am, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Mar 15, 5:47 am, Tim Roberts [EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Roel Schroeven wrote:
[EMAIL PROTECTED] schreef:
On Mar 14, 1:47 pm, Reedick, Andrew [EMAIL PROTECTED] wrote:
Subject: RIP:
hi all
i want to check a condition and if true should return a filename
string from a list.if the condition is false i am returning a
(string literal)..
retv=
if somecondition:
retv=mylist[x]
...
return retv
The calling function will check the return value and print the
filename if it
Tips On Buying A Desktop Computer
While the case may not be important to some computer users it is a
consideration to be thought about before purchasing a desktop
computer. ...
Log on : http://www.computer-solution.page.tl
--
http://mail.python.org/mailman/listinfo/python-list
In article [EMAIL PROTECTED],
Tim Roberts [EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Roel Schroeven wrote:
[EMAIL PROTECTED] schreef:
On Mar 14, 1:47 pm, Reedick, Andrew [EMAIL PROTECTED] wrote:
How do you feel about creator of Eliza?
What is Eliza?
Does that question
On 28 Feb, 02:24, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
Python doesn't do call by reference. Nor does it do call by value. Please
pay no attention to anyone who says it does.
Exactly. Python pass variables the same way as Lisp, which is neither
call-by-value (cf. C) nor
I'm still confused about this, even after days of hacking at it. It's time I
asked for help. I understand that each of you knows more about Python,
Javascript, unicode, and programming than me, and I understand that each of
you has a higher SAT score than me. So please try and be gentle with your
On 28 Feb, 02:24, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
Python doesn't do call by reference. Nor does it do call by value. Please
pay no attention to anyone who says it does.
Exactly. Python pass variables the same way as Lisp, which is neither
call-by-value (cf. C) nor
On 13 Mar, 09:22, Antoon Pardon [EMAIL PROTECTED] wrote:
Whatever python has for a calling convention, it is close enough that
naming it call by reference gives people a reasonable idea of what
is going on.
Only to the extent that many mistake passing Java or C# reference
types for
I'm still confused about this, even after days of hacking at it. It's time I
asked for help. I understand that each of you knows more about Python,
Javascript, unicode, and programming than me, and I understand that each of
you has a higher SAT score than me. So please try and be gentle with
On Sat, 15 Mar 2008 12:09:19 -0400, Tom Stambaugh wrote:
I'm still confused about this, even after days of hacking at it. It's time I
asked for help. I understand that each of you knows more about Python,
Javascript, unicode, and programming than me, and I understand that each of
you has a
Somehow I don't get what you are after. The ' doesn't have to be escaped
at all if are used to delimit the string. If ' are used as delimiters
then \' is a correct escaping. What is the problem with that!?
If I delimit the string with double quote, then I have to escape every
double quote
Somehow I don't get what you are after. The ' doesn't have to be escaped
at all if are used to delimit the string. If ' are used as delimiters
then \' is a correct escaping. What is the problem with that!?
If I delimit the string with double quote, then I have to escape every
double quote
Aahz wrote:
In article [EMAIL PROTECTED],
Tim Roberts [EMAIL PROTECTED] wrote:
Jeff Schwab [EMAIL PROTECTED] wrote:
Roel Schroeven wrote:
[EMAIL PROTECTED] schreef:
On Mar 14, 1:47 pm, Reedick, Andrew [EMAIL PROTECTED] wrote:
How do you feel about creator of Eliza?
What is Eliza?
Does
One thing I really liked about Ubuntu was that Nautilus allowed you to
add scripts to a directory which could be accessed via the RMB. It was a
very simple thing to do.
I've recently switched to Leopard, and I'm trying to do the same thing.
I'm fairly experienced with Python, but new to OS X.
On Mar 14, 11:49 am, Robert Rawlins
[EMAIL PROTECTED] wrote:
Geert,
I've not seen this issue myself, however, you might get a little more luck
asking over on theMySQLdbmailing list as this seems to be more an issue
with the db than your python code. It might be worth posting your question
Quoting Bryan Olson [EMAIL PROTECTED]:
Robert Bossy wrote:
Bryan Olson wrote:
Robert Bossy wrote:
Robert Bossy wrote:
Indeed! Maybe the best choice for chunksize would be the file's buffer
size...
That bit strikes me as silly.
The size of the chunk must be as little as possible
In article [EMAIL PROTECTED],
Jeff Schwab [EMAIL PROTECTED] wrote:
Aahz wrote:
In article [EMAIL PROTECTED],
Tim Roberts [EMAIL PROTECTED] wrote:
I am embarrassed to say that this vaguely disrespectful exchange made me
laugh out loud.
Serious: why do you think this is disrespectful?
On 15 Mar, 18:05, Mark Carter [EMAIL PROTECTED] wrote:
The sorts of things I want to do are:
* copy the directory of Finder to the clipboard
* add a new file to Finder's directory.
* find out the size of a directory
* open a file with Aquamacs, regardless of file type,
If you want to control
Tom Stambaugh wrote:
I'm still confused about this, even after days of hacking at it. It's
time I asked for help. I understand that each of you knows more about
Python, Javascript, unicode, and programming than me, and I understand
that each of you has a higher SAT score than me. So please try
On Sat, 2008-03-15 at 12:09 -0400, Tom Stambaugh wrote:
[...]
I use simplejson to serialize html strings that the server is delivering to
a browser. Since the apostrophe is a string terminator in javascript, I need
to escape any apostrophe embedded in the html.
[...]
simplejson escapes
On Sat, 2008-03-15 at 20:03 +0100, Carsten Haese wrote:
On Sat, 2008-03-15 at 12:09 -0400, Tom Stambaugh wrote:
[...]
I use simplejson to serialize html strings that the server is delivering to
a browser. Since the apostrophe is a string terminator in javascript, I
need
to escape any
Tom Stambaugh [EMAIL PROTECTED] wrote:
Somehow I don't get what you are after. The ' doesn't have to be escaped
at all if are used to delimit the string. If ' are used as delimiters
then \' is a correct escaping. What is the problem with that!?
If I delimit the string with double quote,
An Interesting problem,
A man has only 4 bricks of different weights, lies between 1-40KG,
Also, the total weights of Brick A, B, C, D (ie A+B+C+D) is 40KG.
The man uses that brick to calculate every possible weight
from 1 KG to 40 KG in his shop. (only whole numbers 1KG, 2KG etc, not like
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| hi all
| i want to check a condition and if true should return a filename
| string from a list.if the condition is false i am returning a
| (string literal)..
|
| retv=
| if somecondition:
|retv=mylist[x]
| ...
| return retv
|
|
I appreciate the answers the community has provided, I think I need to add
some additional context.
I use a trick to let me pass the information into my browser client
application. The browser requests the server information from a form whose
target is a hidden iframe. The string the server
has wrote:
On 15 Mar, 18:05, Mark Carter [EMAIL PROTECTED] wrote:
The sorts of things I want to do are:
* copy the directory of Finder to the clipboard
* add a new file to Finder's directory.
* find out the size of a directory
* open a file with Aquamacs, regardless of file type,
If you
On Mar 15, 7:31 pm, Mark Carter [EMAIL PROTECTED] wrote:
has wrote:
On 15 Mar, 18:05, Mark Carter [EMAIL PROTECTED] wrote:
The sorts of things I want to do are:
* copy the directory of Finder to the clipboard
* add a new file to Finder's directory.
* find out the size of a directory
*
I installed SOAPpy on my server with Python 2.5.
But now everytime I exit, I get the following error:
Exception exceptions.AttributeError: '_shutdown' in module
'threading' from '/home/mhagen/lib/python2.5/threading.pyc' ignored
Here is the command line output:
[EMAIL PROTECTED]:~$ python
Arnaud Delobelle wrote:
Is there a particular reason you want python from MacPorts? OSX
Leopard comes with python 2.5, that's what I use on my mac.
I heard from somewhere that Apple's version was a bit wonky, and that I
would be better off with a proper build.
--
Hi,
I am looking for Python modules that allow you to manipulate 3D
objects, more specifically Alias Wavefront .OBJ objects.
Also, a module that would allow you to vizualize these models and
rotate them etc..
The goal is not to build a new renderer or something; just a small
program that I need
Hello,
I'm searching a code which allow you to parse each item in the RSS
feed, get the news page of each item, convert it to text and send it
by mail.
Do you know if it exists ?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Mark Carter wrote:
Arnaud Delobelle wrote:
Is there a particular reason you want python from MacPorts? OSX
Leopard comes with python 2.5, that's what I use on my mac.
I heard from somewhere that Apple's version was a bit wonky, and that I
would be better off with a proper build.
Not
HI all,
I am trying to write a while loop that will iterate over generators to
capture all the headers of FFCache directories. However, the
generators embedded within the argument of another generator do not
seem to re-initiate. the example below loops through and initiates the
generator embedded
if you are not satisfied with the native version, why not install the
official version directly from python site
http://www.python.org/download/ (macpython) instead of using that of
macports. It moreover is provided with many utilities
There is a macpython list that you can consult at
Hi,
I've got this code :
cb = open(testfile, r+)
f = cb.readlines()
for line in f:
rx = re.match(r'^\s*(\d+).*', line)
if not rx:
continue
else:
serial = rx.group(1)
now = time.time()
today = time.strftime('%Y%m%d00', time.localtime(now))
On Mar 15, 3:54 pm, Unknown [EMAIL PROTECTED] wrote:
Hi,
I've got this code :
cb = open(testfile, r+)
f = cb.readlines()
for line in f:
rx = re.match(r'^\s*(\d+).*', line)
if not rx:
continue
else:
serial = rx.group(1)
now = time.time()
On 15 Mar, 21:35, mpc [EMAIL PROTECTED] wrote:
generator embedded in the argument only once. Can anyone explain while
the generator will not re-initiate, and suggest a simple fix?
I am not sure what you are trying to do, but it seems a bit confused.
def concat(seq):
for s in seq:
[EMAIL PROTECTED] wrote:
if you are not satisfied with the native version, why not install the
official version directly from python site
http://www.python.org/download/ (macpython) instead of using that of
macports. It moreover is provided with many utilities
There is a macpython list that
http://timgolden.me.uk/python/win32_how_do_i/run-a-command-with-a-spa...
Note: this works for subprocess.call but for subprocess.Popen this
does not work if there are two arguments in the command line with
spaces. Especially, even after trying out many different versions, I
never managed to get
On 2008-03-15, Guido van Brakel [EMAIL PROTECTED] wrote:
Hello
I have this now:
def gem(a):
g = sum(a) / len(a)
g = float(sum(a)) / len(a)
return g
It now gives a int, but i would like to see floats. How can integrate
that into the function?
See above.
Life is like a
On 15 Mar, 22:43, Guido van Brakel [EMAIL PROTECTED] wrote:
def gem(a):
g = sum(a) / len(a)
return g
It now gives a int, but i would like to see floats. How can integrate
that into the function?
You get an int because you are doing integer division. Cast one int to
float.
def
Hello
I have this now:
def gem(a):
g = sum(a) / len(a)
return g
print gem([1,2,3,4])
print gem([1,10,100,1000])
print gem([1,-2,3,-4,5])
It now gives a int, but I would like to see floats. How can I integrate
that into the function?
Regards,
--
Guido van Brakel
Life
On Mar 15, 5:42 pm, joep [EMAIL PROTECTED] wrote:
http://timgolden.me.uk/python/win32_how_do_i/run-a-command-with-a-spa...
Note: this works for subprocess.call but for subprocess.Popen this
does not work if there are two arguments in the command line with
spaces. Especially, even after trying
Thanks, andrei. I'll try that.
Le Sat, 15 Mar 2008 14:25:21 -0700, andrei.avk a écrit :
What you want to do is either 1. load everything up into a string,
replace
text, close file, reopen it with 'w' flag, write string to it. OR if
file is too big, you can read each line, replace, write to a
Grant Edwards wrote:
On 2008-03-15, Guido van Brakel [EMAIL PROTECTED] wrote:
Hello
I have this now:
def gem(a):
g = sum(a) / len(a)
g = float(sum(a)) / len(a)
return g
Hi,
Thank you very much,sometimes it is so amazing simple.
Regards
--
Guido van Brakel
Life is
I am embarrassed to say that this vaguely disrespectful exchange made me
laugh out loud.
Serious: why do you think this is disrespectful?
Not to speak for Tim, but I imagine it could be perceived as
disrespectful because Prof. Weizenbaum has only recently passed away.
In fact, I think
On Mar 15, 7:24 am, Sandipan Gangopadhyay
[EMAIL PROTECTED] wrote:
Is there a Python for BlackBerry? Thanks.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of E-Lo
Sent: Saturday, March 15, 2008 6:03 AM
To: [EMAIL PROTECTED]
Subject: Python for Palm
On Mar 15, 3:09 pm, Eric von Horst [EMAIL PROTECTED] wrote:
Hi,
I am looking for Python modules that allow you to manipulate 3D
objects, more specifically Alias Wavefront .OBJ objects.
Also, a module that would allow you to vizualize these models and
rotate them etc..
The goal is not to
On Mar 15, 8:18 am, Bryan Olson [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Gabriel Genellina wrote:
No need to reinvent the wheel. socket objects already have a makefile
method returning a file-like object, which behaves like a buffered socket.
That wheel is far from round, and
On Mar 15, 3:18 pm, Ulysse [EMAIL PROTECTED] wrote:
Hello,
I'm searching a code which allow you to parse each item in the RSS
feed, get the news page of each item, convert it to text and send it
by mail.
Do you know if it exists ?
Thanks
Try using Google next time. In the meantime,
mpc wrote:
I am trying to write a while loop that will iterate over generators to
capture all the headers of FFCache directories. However, the
generators embedded within the argument of another generator do not
seem to re-initiate. the example below loops through and initiates the
generator
On 15 Mar, 22:43, Guido van Brakel [EMAIL PROTECTED] wrote:
def gem(a):
g = sum(a) / len(a)
return g
print gem([1,2,3,4])
print gem([1,10,100,1000])
print gem([1,-2,3,-4,5])
gem( map(float,[1,2,3,4]) )
gem( float(i) for i in [1,2,3,4] )
--
On Mar 15, 10:27 am, [EMAIL PROTECTED] wrote:
hi all
i want to check a condition and if true should return a filename
string from a list.if the condition is false i am returning a
(string literal)..
retv=
if somecondition:
retv=mylist[x]
...
return retv
The calling function
On Mar 15, 4:43 pm, Guido van Brakel [EMAIL PROTECTED] wrote:
Hello
I have this now:
def gem(a):
g = sum(a) / len(a)
return g
print gem([1,2,3,4])
print gem([1,10,100,1000])
print gem([1,-2,3,-4,5])
It now gives a int, but i would like to see floats. How can integrate
On Mar 15, 4:09 pm, Eric von Horst [EMAIL PROTECTED] wrote:
Hi,
I am looking for Python modules that allow you to manipulate 3D
objects, more specifically Alias Wavefront .OBJ objects.
Also, a module that would allow you to vizualize these models and
rotate them etc..
The goal is not to
On Mar 12, 10:50 pm, Andrew Rekdal [EMAIL PROTECTED] wrote:
Well, I can see how this could get real messy but within defining a GUI
there are many elements and so the block of elements such as a wx.notebook
for instance I would hope I could place all the code for this in another
file and
you can also use standard module fileinput.input with ''inplace''
option which backs up original file automatically.
from python help for fileinput:
Optional in-place filtering: if the keyword argument inplace=1 is
passed to input() or to the FileInput constructor, the file is moved
to a backup
I have a large xml file parsed by pulldom. I did some editing on some
node,change attributes and remove some child node, how do I save it back
to this xml file or write a new xml file? The save method in minidom
does not work for pulldom.
Thanks
--
'join' in the wrong word for the method in class Thread.
The agent-patient semantics of calling functions can get ambiguous.
It is not a problem of native Pythoners alone. Is it due to lazy
programming, an inability of English (do you have it in other
languages?), or not a problem at all?
Hello,
I'm having some problems with os.path.isdir I think it is something
simple that I'm overlooking.
#!/usr/bin/python
import os
my_path = os.path.expanduser(~/pictures/)
print my_path
results = os.listdir(my_path)
for a_result in results:
if os.path.isdir(str(my_path) +
On Mar 15, 2:41 pm, Terry Reedy [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| hi all
| i want to check a condition and if true should return a filename
| string from a list.if the condition is false i am returning a
| (string literal)..
|
| retv=
On Mar 15, 8:12 pm, lampshade [EMAIL PROTECTED] wrote:
Hello,
I'm having some problems with os.path.isdir I think it is something
simple that I'm overlooking.
#!/usr/bin/python
import os
my_path = os.path.expanduser(~/pictures/)
print my_path
results = os.listdir(my_path)
for
lampshade wrote:
Hello,
I'm having some problems with os.path.isdir I think it is something
simple that I'm overlooking.
#!/usr/bin/python
import os
my_path = os.path.expanduser(~/pictures/)
print my_path
results = os.listdir(my_path)
for a_result in results:
if
On Mar 15, 7:29 pm, [EMAIL PROTECTED] wrote:
'join' in the wrong word for the method in class Thread.
The agent-patient semantics of calling functions can get ambiguous.
It is not a problem of native Pythoners alone. Is it due to lazy
programming, an inability of English (do you have it in
On Mar 15, 9:27 pm, Benjamin [EMAIL PROTECTED] wrote:
On Mar 15, 8:12 pm, lampshade [EMAIL PROTECTED] wrote: Hello,
I'm having some problems with os.path.isdir I think it is something
simple that I'm overlooking.
#!/usr/bin/python
import os
my_path = os.path.expanduser(~/pictures/)
On Mar 16, 12:12 pm, lampshade [EMAIL PROTECTED] wrote:
Hello,
I'm having some problems with os.path.isdir I think it is something
simple that I'm overlooking.
#!/usr/bin/python
import os
my_path = os.path.expanduser(~/pictures/)
print my_path
results = os.listdir(my_path)
for
Thanks, Mike.
This one seems to be for Nokia, particularly S60 and Symbian in general.
Does BlackBerry work on Symbian? Let me check.
Thanks.
Sandipan
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Driscoll
Sent: Saturday, March 15, 2008 6:04 PM
To:
Python doesn't have memory leaks.
Yeah, interesting bit of trivia: python is the world's only non-trivial
program that's totally free of bugs. Pretty exciting! But seriously,
python 2.4, at least, does have some pretty trivially exposed memory leaks
when working with strings. A simple example
On Sat, 15 Mar 2008 11:50:17 -0700, Dennis Lee Bieber wrote:
Small integers are cached in Python, so they always have a fixed ID
(address).
Small integers are cached in CPython, making it an implementation-
dependent feature. I don't believe that caching is promised by the
language
Thomas Lee [EMAIL PROTECTED] added the comment:
Updating the patch to apply cleanly against HEAD.
Added file: http://bugs.python.org/file9672/ast-r03.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1810
__
Trent Nelson [EMAIL PROTECTED] added the comment:
Ah, I suspect not. (Unless the 64-bit python*.exe builds end up in
pcbuild/amd64.)
--
versions: -Python 2.5
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2290
New submission from Thomas Wouters [EMAIL PROTECTED]:
The attached patch adds the missing *-unpacking generalizations.
Specifically:
a, b, *c = range(5)
*a, b, c = a, b, *c
a, b, c
([0, 1, 2], 3, 4)
[ *a, b, c ]
[0, 1, 2, 3, 4]
L = [ a, (3, 4), {5}, {6: None}, (i for i in range(7, 10)) ]
Skip Montanaro [EMAIL PROTECTED] added the comment:
Checking this in. All tests pass. Have for quite awhile.
rev 61402.
--
assignee: - skip.montanaro
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1158
__
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
This was discussed years ago and never got enough support:
http://mail.python.org/pipermail/python-dev/2005-October/057177.html
--
nosy: +belopolsky
type: - feature request
__
Tracker [EMAIL
Guido van Rossum [EMAIL PROTECTED] added the comment:
Didn't you say it does sets too? Does this work?
a = [1, 2, 3]
{1, *a, 0, 4} # {0, 1, 2, 3, 4}
How about dicts?
kwds = {'z': 0, 'w': 12}
{'x': 1, 'y': 2, **kwds} # {'x': 1, 'y': 2, 'z': 0, 'w': 12}
Also, now that we support
[*a, b, c]
Thomas Wouters [EMAIL PROTECTED] added the comment:
On Sat, Mar 15, 2008 at 9:12 AM, Guido van Rossum [EMAIL PROTECTED]
wrote:
Guido van Rossum [EMAIL PROTECTED] added the comment:
Didn't you say it does sets too? Does this work?
a = [1, 2, 3]
{1, *a, 0, 4} # {0, 1, 2, 3, 4}
Yes.
Guido van Rossum [EMAIL PROTECTED] added the comment:
Looking at the flatten() example I'm curious -- how come the output of
flatten(L)
is displayed as a list rather than as generator at xx ?
Also, do I understand correctly that
yield *(1, 2, 3)
is equivalent to
yield 1
yield 2
yield
1 - 100 of 120 matches
Mail list logo