On May 13, 7:42 pm, Dave Angel da...@ieee.org wrote:
daved170 wrote:
Hi there,
I'm newbie in pythonCard.
I have an application with 2 buttons : START , STOP
Start execute a while(1) loop that execute my calculations.
Stop suppose to raise a flag that will end that loop.
Whenever I
On Thu, May 14, 2009 at 6:39 AM, ma mabdelka...@gmail.com wrote:
A really great use for try/except/else would be if an object is
implementing its own __getitem__ method, so you would have something
like this:
class SomeObj(object):
def __getitem__(self, key):
try:
En Mon, 11 May 2009 04:23:29 -0300, Christopher Mahan
chris.ma...@gmail.com escribió:
I have a docxmlrpcserver install (kissws.com) that's returning HTTP code
501
when the client makes a HEAD request.
Any idea as to whether that's by design?
Yes. The XMLRPC spec defines only the POST
On Thu, May 14, 2009 at 12:13 AM, Gabriel Genellina
gagsl-...@yahoo.com.arwrote:
En Mon, 11 May 2009 04:23:29 -0300, Christopher Mahan
chris.ma...@gmail.com escribió:
I have a docxmlrpcserver install (kissws.com) that's returning HTTP code
501
when the client makes a HEAD request.
Any
James schrieb:
Hey all, I'm looking for suggestions on how to tackle distributed
locking across several Python programs on several different machines.
- the objects to be locked are uniquely identified by an integer
- I need one at a time semantics for the lock: zero or one read-
writer at any
chedderslam wrote:
IOError: [Errno 13] Permission denied: u'D:/My Music/Ani DiFranco/
Canon/Disc 1\\folder.jpg'
I have removed the read-only attribute on the folder, and added
Everyone with full control for security. Not sure what else to do.
I would really like to get this working so any help
En Mon, 11 May 2009 10:33:03 -0300, Ulrich Eckhardt
eckha...@satorlaser.com escribió:
We have a few tests for some module here. These tests are under
development
and applied to older versions (with less features) of the module, too.
That
means that if I have module version 42, tests A and
[forwarding back to the list]
Please reply to the list: I'm not the only person
who can help, and I might not have the time even
if I can.
Shailja Gulati wrote:
I have installed win32com but still not able to run tht code as its giving
error
File readDocPython.py, line 1, in ?
import
Hello.
Silly question here. I'd like to find out how to create an icon in KDE to
run my Python scripts. Specs are as follows:
KDE version 4.1.3 in OpenSuse 11.1.
Some scripts have output to Konsole window, others use Tkinter.
Thanks in advance,
Grant.
--
[forwarding back to the list]
Please reply to the list: I'm not the only person
who can help, and I might not have the time even
if I can.
Shailja Gulati wrote:
I have installed win32com but still not able to run tht code as its
giving
error
File readDocPython.py, line 1, in ?
On May 13, 4:55 pm, cgoldberg cgoldb...@gmail.com wrote:
Bascally it just grabs a page xy
times and tells me how long it took.
you aren't doing a read(), so technically you are just connecting to
the web server and sending the request but never reading the content
back from the socket. So
Grant Ito wrote:
Hello.
Silly question here. I'd like to find out how to create an icon in KDE to
run my Python scripts. Specs are as follows:
KDE version 4.1.3 in OpenSuse 11.1.
Some scripts have output to Konsole window, others use Tkinter.
Thanks in advance,
Grant.
Try right
Shailja Gulati wrote:
Sorry about mailing u Tim.It just happened by mistake.
Reg win32api , i m still facing the same problem of Import error...Could
anyone pls help?? m stuck
Shailja. Did you download and install the download .exe
from the link below?
Shailja Gulati wrote:
Sorry about mailing u Tim.It just happened by mistake.
Reg win32api , i m still facing the same problem of Import error...Could
anyone pls help?? m stuck
Shailja. Did you download and install the download .exe
from the link below?
yeah..I have installed it from the
One more thing, since I am stuck with 2.4 (and if this is really 2.4
issue), is there some substitution for urllib2?
On May 14, 11:00 am, Tomas Svarovsky svarovsky.to...@gmail.com
wrote:
On May 13, 4:55 pm, cgoldberg cgoldb...@gmail.com wrote:
Bascally it just grabs a page xy
times and
cgoldberg cgoldb...@gmail.com wrote in message
news:9ae58862-1cb2-4981-ae6a-0428c7684...@z5g2000vba.googlegroups.com...
you aren't doing a read(), so technically you are just connecting to
the web server and sending the request but never reading the content
back from the socket.
But that
The Second Pyggy Awards is now open for entries.
http://pyggy.pyweek.org/1008/
Judging will be held in the first two weeks of
August 2009.
Once again, the event is open to games from any
previous PyWeek competition.
You may also submit a game that you were intending
to enter in PyWeek 8 but
On May 14, 11:57 am, Richard Brodie r.bro...@rl.ac.uk wrote:
cgoldberg cgoldb...@gmail.com wrote in message
news:9ae58862-1cb2-4981-ae6a-0428c7684...@z5g2000vba.googlegroups.com...
you aren't doing a read(), so technically you are just connecting to
the web server and sending the request
Hi All,
I am trying to get matplotlib to overlay a couple of graphs, but am
getting nowhere. I originally thought that the following may work:
x = [1,2,3,4,5]
y = [2,4,6,8,10]
y2 = [1,4,9,16,25]
plot(x, y)
plot(x, y2)
Now this works as desired, however, the actual case I have is more
like
In message 787d6072-3381-40bd-
af20-8e1a40405...@h23g2000vbc.googlegroups.com, CinnamonDonkey wrote:
I have a script running which occa[s]ionally fails because it is trying
to delete a file in use by another process. When this happens I want
it to log which process has the lock.
Maybe there
3) Most text files have no header specifying the encoding anyway. How
should the programm/programmer know? And often he does not need to
know anyway.
What? Off COURSE texts have no header stating the encoding! And it is
the programmer's responsibility to know what a text's encoding is. So do
Hello,
I am wondering if it's possible to get the return value of a method
*without* calling it using introspection?
something like this, suppose I want to know the type of the return
value for the method getsomething. Is it possible to get it without
actually calling 'getsomething'?
ex:
import
flam...@gmail.com wrote:
Hello,
I am wondering if it's possible to get the return value of a method
*without* calling it using introspection?
Nope. All that's possible to see if there is a implicit or explicit return
through dis.disassemble - if you find LOAD_CONST None before any
daved170 wrote:
On May 13, 7:42 pm, Dave Angel da...@ieee.org wrote:
daved170 wrote:
Hi there,
I'm newbie in pythonCard.
I have an application with 2 buttons : START , STOP
Start execute a while(1) loop that execute my calculations.
Stop suppose to raise a flag that will end that loop.
flam...@gmail.com:
I am wondering if it's possible to get the return value of a method
*without* calling it using introspection?
Python is dynamically typed, so you can create a function like this:
foo = lambda x: x if x else 1
foo(1)
'x'
foo(0)
1
The return type of foo() changes according
Really weired; Here is my code:
a = [a, 1, 3, 4]
print a:, a
c = copy(a)
c[0] = c
c[1] = 2
print c:, c
print a:,a
output as follows:
a: ['a', 1, 3, 4]
c: ['c' '2' '3' '4']
a: ['a', 1, 3, 4]
Btw, I'm using python 2.5. I'm very curious why the copied list changed
data
Diez B. Roggisch wrote:
flam...@gmail.com wrote:
Hello,
I am wondering if it's possible to get the return value of a method
*without* calling it using introspection?
Nope. All that's possible to see if there is a implicit or explicit return
through dis.disassemble - if you find
Zhenhai Zhang wrote:
Really weired; Here is my code:
a = [a, 1, 3, 4]
print a:, a
c = copy(a)
c[0] = c
c[1] = 2
print c:, c
print a:,a
output as follows:
a: ['a', 1, 3, 4]
c: ['c' '2' '3' '4']
a: ['a', 1, 3, 4]
Btw, I'm using python 2.5. I'm
My only guess is that the code below is not using the copy function from
the copy module, but that some other function is aliasing the copy
function.
I've tried this code with both Python 2.5 and 2.6 and get the correct
behaviour.
Best
Wynand
Op donderdag 14-05-2009 om 09:05 uur [tijdzone
Zhenhai Zhang a écrit :
Really weired; Here is my code:
a = [a, 1, 3, 4]
print a:, a
c = copy(a)
c[0] = c
c[1] = 2
print c:, c
print a:,a
output as follows:
a: ['a', 1, 3, 4]
c: ['c' '2' '3' '4']
a: ['a', 1, 3, 4]
Btw, I'm using python 2.5. I'm very curious why the
flam...@gmail.com a écrit :
Hello,
I am wondering if it's possible to get the return value of a method
*without* calling it
Getting the return *value* without calling the function ? heck, that
would be really helpful - we'd save quiet a lot on function call
overhead and function execution
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is called, a tuple of the next N items is
returned.
--
http://mail.python.org/mailman/listinfo/python-list
Zhenhai Zhang wrote:
Really weired; Here is my code:
a = [a, 1, 3, 4]
print a:, a
c = copy(a)
Where do you get this copy() function?
t...@rubbish:~$ python2.5
Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45)
help(copy)
Traceback (most recent call last):
File
rump...@web.de:
Eventually the rope data structure (that the compiler uses heavily)
will become a proper part of the library:
Ropes are a complex data structure, that it has some downsides too.
Python tries to keep its implementation too simple, this avoids lot of
troubles (and is one of the
On the other hand, generally good programming practice suggests you to
write functions that have a constant return type. And in most programs
most functions are like this. This is why ShedSkin can indeed infer
the return type of functions in good behaved programs. To do this
ShedSkin uses a quite
Neal Becker ha scritto:
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is called, a tuple of the next N items is
returned.
daved170 wrote:
On May 13, 7:42 pm, Dave Angel da...@ieee.org wrote:
daved170 wrote:
Hi there,
I'm newbie in pythonCard.
I have an application with 2 buttons : START , STOP
Start execute a while(1) loop that execute my calculations.
Stop suppose to raise a flag that will end that loop.
The problem is, that CentOS is running on the server and there is only
2.4 available. On wich version did you ran these tests?
I tested with Windows XP and Python 2.5.4. I don't have a 2.4 setup I
can easily test with.
you can try httplib rather than urllib2. httplib is slightly lower
level
It might be, if the local server doesn't scale well enough to handle
100 concurrent requests.
true.. I didn't think of that. I was assuming the client machine
wasn't resource constrained. That would definitely lead to inaccurate
timings if that was the case.
--
Neal Becker ndbeck...@gmail.com wrote:
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is called, a tuple of the next N items is
returned.
This is my best effort... not using
bearophileh...@lycos.com wrote:
rump...@web.de:
Eventually the rope data structure (that the compiler uses heavily)
will become a proper part of the library:
Ropes are a complex data structure, that it has some downsides too.
Python tries to keep its implementation too simple, this avoids lot
Neal Becker wrote:
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is called, a tuple of the next N items is
returned.
Depending on what you want to do with items that don't make a complete
On May 14, 7:41 am, Ant ant...@gmail.com wrote:
Hi All,
I am trying to get matplotlib to overlay a couple of graphs, but am
getting nowhere. I originally thought that the following may work:
x = [1,2,3,4,5]
y = [2,4,6,8,10]
y2 = [1,4,9,16,25]
plot(x, y)
plot(x, y2)
Now this works
norseman wrote:
I did try these.
Doc at once:
outputs two x'0D' and the file. Then it appends x'0D' x'0D' x'0A' x'0D'
x'0A' to end of file even though source file itself has no EOL.
( EOL is EndOfLine aka newline )
That's cr cr There are two blank lines at begining.
cr
In message 787d6072-3381-40bd-
af20-8e1a40405...@h23g2000vbc.googlegroups.com, CinnamonDonkey wrote:
I have a script running which occa[s]ionally fails because it is trying
to delete a file in use by another process. When this happens I want
it to log which process has the lock.
Maybe
On May 14, 2:37 pm, Dave Angel da...@ieee.org wrote:
daved170 wrote:
On May 13, 7:42 pm, Dave Angel da...@ieee.org wrote:
daved170 wrote:
Hi there,
I'm newbie in pythonCard.
I have an application with 2 buttons : START , STOP
Start execute a while(1) loop that execute my
Neal Becker wrote:
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is called, a tuple of the next N items is
returned.
An option, might be better since it handles infinite list correctly:
On May 14, 3:52 pm, Hyuga hyugaricd...@gmail.com wrote:
...
On the other hand, I just took a peek at the matplotlib example
gallery, which is very diverse, and it has an example that I think is
exactly what you're looking
for:http://matplotlib.sourceforge.net/examples/api/two_scales.html
For beginners, this ultra-low-cost Python Boot Camp developed by the
Triangle Zope and Python Users Group makes you productive so you can get
your work done quickly. PyCamp emphasizes the features which make Python
a simpler and more efficient language. Following along by example speeds
your
Why can't I do this?
teams = { SEA: Seattle Mariners }
for team, name in teams.items():
teams[team][roster] = [player1, player2]
I get an error:
Traceback (most recent call last):
File ./gamelogs.py, line 53, in module
teams[team][roster] = [player1, player2]
TypeError: 'str'
In article guh5qc$ls...@ger.gmane.org,
Neal Becker ndbeck...@gmail.com wrote:
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is called, a tuple of the next N items is
returned.
This topic
In mailman.113.1242254593.8015.python-l...@python.org Terry Reedy
tjre...@udel.edu writes:
kj wrote:
Suppose I have the following:
def foo(x=None, y=None, z=None):
d = {x: x, y: y, z: z}
return bar(d)
I.e. foo takes a whole bunch of named arguments and ends up calling
a
Wells wrote:
Why can't I do this?
teams = { SEA: Seattle Mariners }
for team, name in teams.items():
teams[team][roster] = [player1, player2]
I get an error:
Traceback (most recent call last):
File ./gamelogs.py, line 53, in module
teams[team][roster] = [player1,
Thanks a lot everyone! This really cleared it up for me! :)
Adam Gaskins agaskins...@kelleramerica.com wrote in message
news:rxhol.41113$5n7.8...@newsfe09.iad...
I am a bit confused as too when, if ever, it is not appropriate to prepend
'self' to objects in a class. All of the examples of how
I'm trying to get this invocation right, and it is escaping me. How
can I capture the stdout and stderr if I launch a subprocess using
subprocess.check_call()? The twist here is that the call is running
from within a Windows service.
I've tried:
check_call(mycmd.exe, stdout=subprocess.PIPE)
Bruno Desthuilliers wrote:
Oh, you meant the return type ? Nope, no way. It just doesn't make
sense given Python's dynamic typing.
I thought that the OP was writing a tool to document not-very-dynamic code.
Unless he's really trying to write in Nohtyp, the language where value
types are
On Thu, May 14, 2009 at 8:53 AM, Ned Deily n...@acm.org wrote:
In article guh5qc$ls...@ger.gmane.org,
Neal Becker ndbeck...@gmail.com wrote:
Is there any canned iterator adaptor that will
transform:
in = [1,2,3]
into:
out = [(1,2,3,4), (5,6,7,8),...]
That is, each time next() is
On Thu, May 14, 2009 at 8:45 AM, Wells we...@submute.net wrote:
Why can't I do this?
teams = { SEA: Seattle Mariners }
for team, name in teams.items():
teams[team][roster] = [player1, player2]
I get an error:
Traceback (most recent call last):
File ./gamelogs.py, line 53, in
Wells wrote:
Why can't I do this?
teams = { SEA: Seattle Mariners }
for team, name in teams.items():
teams[team][roster] = [player1, player2]
Because,
team will be SEA,
so
teams[team] will be Seattle Mariners
and
Seattle Mariners[roster] makes no sense.
Gary Herron
I
On Thu, May 14, 2009 at 8:57 AM, Chris Curvey ccur...@gmail.com wrote:
I'm trying to get this invocation right, and it is escaping me. How
can I capture the stdout and stderr if I launch a subprocess using
subprocess.check_call()? The twist here is that the call is running
from within a
Ant wrote:
Hi All,
I am trying to get matplotlib to overlay a couple of graphs, but am
getting nowhere. I originally thought that the following may work:
x = [1,2,3,4,5]
y = [2,4,6,8,10]
y2 = [1,4,9,16,25]
plot(x, y)
plot(x, y2)
Now this works as desired, however, the actual case I have
On 2009-05-14, Chris Curvey ccur...@gmail.com wrote:
I'm trying to get this invocation right, and it is escaping me. How
can I capture the stdout and stderr if I launch a subprocess using
subprocess.check_call()? The twist here is that the call is running
from within a Windows service.
Tim Golden wrote:
norseman wrote:
I did try these.
Doc at once:
outputs two x'0D' and the file. Then it appends x'0D' x'0D' x'0A'
x'0D' x'0A' to end of file even though source file itself has no EOL.
( EOL is EndOfLine aka newline )
That's cr cr There are two blank lines at
Tomas Svarovsky svarovsky.to...@gmail.com wrote in message
news:747b0d4f-f9fd-4fa6-bb6d-0a4365f32...@b1g2000vbc.googlegroups.com...
This is a good point, but then it would manifest regardless of the
language used AFAIK. And this is not the case, ruby and php
implementations are working quite
Rhodri James wrote:
On Wed, 13 May 2009 23:08:26 +0100, norseman norse...@hughes.net wrote:
Evan Kroske wrote:
I'm working on a simple file processing utility, and I encountered a
weird error. If I try to get the first element of a list I'm
splitting from a string, I get an error:
key =
Chris Curvey wrote:
I'm trying to get this invocation right, and it is escaping me. How
can I capture the stdout and stderr if I launch a subprocess using
subprocess.check_call()? The twist here is that the call is running
from within a Windows service.
I've tried:
check_call(mycmd.exe,
Thank you Paul for your reply!
I'm looking into pxdom right now and it looks very good and useful!
Thank you again!
Manu
--
http://mail.python.org/mailman/listinfo/python-list
Chris Rebert wrote:
They really should just add grouper() to itertools rather than leaving
it as a recipe. People keep asking for it so often...
I've just added it to the issue tracker: http://bugs.python.org/issue6021
--
http://mail.python.org/mailman/listinfo/python-list
If x is a C variable of type PyObject*, and I happen to know already that
the object is of a numeric type, say int, is there a way to change the
value of x in place to a different number? In the C/API documentation I
found routines to increment or decrement it in place, but I didn't find a
On May 12, 12:26 pm, John Machin sjmac...@lexicon.net wrote:
On May 13, 1:58 am, Jaime Fernandez del Rio jaime.f...@gmail.com
wrote:
On Tue, May 12, 2009 at 5:02 PM, MRAB goo...@mrabarnett.plus.com wrote:
John Machin wrote:
MRAB google at mrabarnett.plus.com writes:
Sort the
noydb wrote:
On May 12, 12:26 pm, John Machin sjmac...@lexicon.net wrote:
On May 13, 1:58 am, Jaime Fernandez del Rio jaime.f...@gmail.com
wrote:
On Tue, May 12, 2009 at 5:02 PM, MRAB goo...@mrabarnett.plus.com
wrote:
John Machin wrote:
MRAB google at mrabarnett.plus.com
OpenOfficeXML document format AKA ODF? ;)
No...Office Open XML, which is used in Microsoft Office 2007 and which
Microsoft rammed through the ISO:
http://en.wikipedia.org/wiki/Office_Open_XML
Even worse, Microsoft Office 2007 doesn't even implement the ISO
standard for Open XML.
--
Stephen Vavasis vavasis at cpu111.math.uwaterloo.ca writes:
If x is a C variable of type PyObject*, and I happen to know already that
the object is of a numeric type, say int, is there a way to change the
value of x in place to a different number? In the C/API documentation I
found
kj wrote:
In mailman.113.1242254593.8015.python-l...@python.org Terry Reedy
tjre...@udel.edu writes:
kj wrote:
Suppose I have the following:
def foo(x=None, y=None, z=None):
d = {x: x, y: y, z: z}
return bar(d)
I.e. foo takes a whole bunch of named arguments and ends up
hello,
I would like to make my programs available under the standard OS's,
like Windows, Linux (,Mac)
One of the problems I encounter, is launching of files through their
file associates (probably a windows only terminology ;-)
Now I can detect the OS, but only the main OS and not e.g. Ubuntu
Marco Mariani a écrit :
Bruno Desthuilliers wrote:
Oh, you meant the return type ? Nope, no way. It just doesn't make
sense given Python's dynamic typing.
I thought that the OP was writing a tool to document not-very-dynamic code.
Unless he's really trying to write in Nohtyp,
You meant
Tim Chase a écrit :
(snip)
try:
self.ser = Serial()
self.ser.baudrate = DEFAULT_BAUD
self.ser.open()
except SomeSpecificException:
print Fail!
Please make it:
try:
self.ser = Serial()
self.ser.baudrate = DEFAULT_BAUD
Suppose that f is an object whose type is 'function'.
Is there a way to find out f's list of formal arguments?
The reason for this is that I'm trying to write a decorator and
I'd like the wrapper to be able to check the number of arguments
passed. Specifically, I'd like the wrapper to look as
In article 4a0c6e42$0$12031$426a7...@news.free.fr,
Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote:
Marco Mariani a écrit :
Bruno Desthuilliers wrote:
Oh, you meant the return type ? Nope, no way. It just doesn't make
sense given Python's dynamic typing.
Unless he's
Peter Otten wrote:
Hm, if ordered_raster_list is guaranteed to contain one string item for
every month the above can be simplified to
months = [
'precip_jan', 'precip_feb', 'precip_mar', 'precip_apr',
'precip_may', 'precip_jun', 'precip_jul', 'precip_aug',
'precip_sep',
In mailman.158.1242328059.8015.python-l...@python.org Dave Angel
da...@ieee.org writes:
kj wrote:
In mailman.113.1242254593.8015.python-l...@python.org Terry Reedy
tjre...@udel.edu writes:
kj wrote:
Suppose I have the following:
def foo(x=None, y=None, z=None):
d = {x:
Stephen Vavasis wrote:
If x is a C variable of type PyObject*, and I happen to know already that
the object is of a numeric type, say int, is there a way to change the
value of x in place to a different number? In the C/API documentation I
found routines to increment or decrement it in place,
I've written a tiny module that I'd like to make available online
from my website. This module is not production-grade code; it
is meant only as an illustration, but still I'd like to make its
download and installation as painless as possible.
I could simply bundle everything into a .tgz
On Thu, 2009-05-14 at 20:15 +, kj wrote:
That problem is easily solved: just make x = locals() the first
statement in the definition of foo.
That doesn't solve the problem. You'd need locals().copy()
Cheers,
Jason.
--
http://mail.python.org/mailman/listinfo/python-list
You can pull it out of f.func_code.co_varnames, but I don't believe
that's a very good approach. I tend to veer away from code objects
myself.
If you know how many arguments are passed into the wrapped function
when it's defined, you can write a function that returns your
decorator. As an
Stef Mientki wrote:
hello,
I would like to make my programs available under the standard OS's,
like Windows, Linux (,Mac)
One of the problems I encounter, is launching of files through their
file associates (probably a windows only terminology ;-)
Now I can detect the OS, but only the main
kj wrote:
Suppose that f is an object whose type is 'function'.
Is there a way to find out f's list of formal arguments?
The reason for this is that I'm trying to write a decorator and
I'd like the wrapper to be able to check the number of arguments
passedbut I'm missing something like the
On Thu, May 14, 2009 at 12:31 PM, kj so...@987jk.com.invalid wrote:
Suppose that f is an object whose type is 'function'.
Is there a way to find out f's list of formal arguments?
The reason for this is that I'm trying to write a decorator and
I'd like the wrapper to be able to check the
vava...@cpu111.math.uwaterloo.ca (Stephen Vavasis) writes:
If x is a C variable of type PyObject*, and I happen to know already
that the object is of a numeric type, say int, is there a way to
change the value of x in place to a different number? In the C/API
documentation I found routines
bearophileh...@lycos.com (b) wrote:
b Nimrod also seems to ignore underscores inside names, seeing them as
b blanks. Some languages ignore underscores inside number literals, but
b I have never seen a language ignoring them into names too.
You may not have seen it, but Fortran and Algol 60
kj wrote:
Suppose that f is an object whose type is 'function'.
Is there a way to find out f's list of formal arguments?
The reason for this is that I'm trying to write a decorator and
I'd like the wrapper to be able to check the number of arguments
passed. Specifically, I'd like the wrapper
Hi all,
I am new. I just want to run a python program.
When I run it, python can not find MV module. The follow is the error
information:
Traceback (most recent call last):
File MakeCouplerRestart.py, line 22, in module
import MV,struct,Numeric,string
ImportError: No module named MV
James rent.lupin.r...@gmail.com (J) wrote:
J Hey all, I'm looking for suggestions on how to tackle distributed
J locking across several Python programs on several different machines.
Have you looked at the multiprocessing package? It has distributed
Locks's with timeouts which might well fit
Hi
I am working on something here and I cannot get the full dictionary
out of a function. I am sure I am missing something here.
Anyways here is a simple code that repeats my problem. Basically I am
just trying to get that values function to return the diky as a
dictionary so that I can query
Presuming there is a reason to want block-local variables,
does this seem like a good way to do something like it?
@contextlib.contextmanager
def blocklocal(**kwargs):
bl = type('', (object,), {})()
for (k, v) in kwargs.items():
bl.__setattr__(k, v)
yield bl
for k in
Scott David Daniels wrote:
kj wrote:
Suppose that f is an object whose type is 'function'.
Is there a way to find out f's list of formal arguments?
The reason for this is that I'm trying to write a decorator and
I'd like the wrapper to be able to check the number of arguments
passedbut
Btw my main problem is that when I assign the function to 'b' variable
I only get the last key from the dictionary. Sorry about that I forgot
to mention the main issue.
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
In article 4a0c6e42$0$12031$426a7...@news.free.fr,
Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote:
Marco Mariani a �crit :
Bruno Desthuilliers wrote:
Oh, you meant the return type ? Nope, no way. It just doesn't make
sense given Python's dynamic typing.
Unless
Piet van Oostrum:
You may not have seen it, but Fortran and Algol 60 belong to that
category.
I see. It seems my ignorance is unbounded, even for the things I like.
I am very sorry.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Zhenhai Zhang wrote:
Really weired; Here is my code:
a = [a, 1, 3, 4]
print a:, a
c = copy(a)
SyntaxError: unexpected indent
If you correct that, you would get a NameError
c[0] = c
c[1] = 2
print c:, c
print a:,a
When posting, copy and paste the complete code that
1 - 100 of 218 matches
Mail list logo