[EMAIL PROTECTED] wrote:
I want to interate over two arrays in parallel, something like this:
a=[1,2,3]
b=[4,5,6]
for i,j in a,b:
print i,j
where i,j would be 1,4,2,5, 3,6 etc.
Is this possible?
How to fish for yourself:
search 'Python loop two arrays parallel'
On Aug 29, 12:29 am, W. eWatson [EMAIL PROTECTED] wrote:
castironpi wrote:
This gets you your list. What do you mean by 'missing member of
(a.dat, a.txt) is a pair. (None, a.txt) has a.dat missing. I just need to
issue a msg to the user that one member of a file pair is missing. Both
Hi,
try defaultdict:
In [1]: from collections import defaultdict
In [2]: d=defaultdict(list)
In [3]: d[1].append(7)
In [4]: d[1].append(8)
In [5]: d
Out[5]: defaultdict(type 'list', {1: [7, 8]})
In [6]: d[1]
Out[6]: [7, 8]
Regards,
wr
Am Donnerstag 28 August 2008 19:02:55 schrieb Ron
On Aug 29, 3:45 pm, W. eWatson [EMAIL PROTECTED] wrote:
Something to do on your weekends. [non-related link clipped]
Another thing to do with your weekends would be to -not spam-.
--
http://mail.python.org/mailman/listinfo/python-list
W. eWatson [EMAIL PROTECTED] writes:
[a.dat, c.dat, g.dat, k.dat, p.dat]
[a.txt, b.txt, g.txt, k.txt r.txt, w.txt]
What I need is to pair up items with the same prefix and use None,
or some marker, to indicate the absence of the opposite item.
This is functionally influenced but should be
Hi Edmond and any interested reader,
I've successfully patched _socket extension of python 2.5.1 to build
on OSF1 V4.0 with gcc 4.1.2.
The following construct is put right after #include Python.h and
#include structmember.h:
#define _POSIX_PII_SOCKET
#define _LIBC_POLLUTION_H_
Ivosh Raisr
--
hello every body in the group
--
http://mail.python.org/mailman/listinfo/python-list
Dear group,
Thanx for your idea to use dictionary instead of a list. Your code is
more or less, OK, some problems are there, I'll debug them. Well, I
feel the insert problem is coming because of the Hindi thing.
And Python2.5 is supporting Hindi quite fluently.
I am writing in Python2.5.1.
Best
On 2008-08-29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hello every body in the group
Hello Dr Nick :-)
--
http://www.andrews-corner.org
--
http://mail.python.org/mailman/listinfo/python-list
http://www.onlineincomess.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
Mohamed Yousef wrote:
let's say , I'm moving large files through network between devices
what is the fastest way to do this ?
what i came up with :-
Use your OS's network copy command. On unix, that was once uucp. On
Windows, I drag-and-drop to/from a Network
I can't seem to access the pydoc sever from my web browser. I start the
server from the command prompt and everything seems to be working fine,
then I got to http://localhost:/ and it doesn't work. I also tried
starting the graphical mode with the -g parameter but I still cannot use
PyDoc.
I can't seem to get Pydoc up and running in windows Vista. I can search
for modules manually by using the pydoc module_name command but if i
try to set up an http server, it says the server is up and running but I
can't access it in FF or IE. Any help is appreciated.
--
Timothy Grant a écrit :
On Thu, Aug 28, 2008 at 1:40 AM, Alexis Boutillier
[EMAIL PROTECTED] wrote:
Timothy Grant a écrit :
On Wed, Aug 27, 2008 at 2:49 AM, Alexis Boutillier
[EMAIL PROTECTED] wrote:
Hi,
I have a strange behaviour of python with pdb and import statement.
Here is the example
On Aug 28, 10:20 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Do you mean the following is deprecated ?
http://docs.python.org/lib/module-stat.html
From the documentation -
S_ISLNK( mode)
Return non-zero if the mode is from a symbolic link.
As that page
Gabriel Rossetti wrote:
Hello,
I'm using tempfile.mkdtemp() in a multithreading program and I've been
having problems with it. Sometimes it tells me the file I'm trying to
access (in the directory created with tempfile.mkdtemp()) doesn't
exist. I suspect that tempfile.mkdtemp() returns the
HI,
i would like to know if there is a way to create a python script for
automate mstsc.exe username and pwd credential, i mean i would create
a script that first open mstsc.exe and in the same time is able to
fill [computer+username+pwd].
Regards
thanks a lot in advance
--
On Thu, 28 Aug 2008 19:58:10 GMT, Matthew Woodcraft [EMAIL PROTECTED]
wrote:
Mike B writes:
I'm trying to get Subversion 'hook scripts' working on an Ubuntu box and the
following fails.
from svn import fs, repos, core, delta
[...]
'svn' appears to be a SWIG wrapper and could be what I'm
On Aug 29, 12:17 am, BiDi [EMAIL PROTECTED] wrote:
I have been trying to subclass complex, but I am not able to get the
right-hand arithmetic operators working.
As shown below, if an object of my subclass 'xcomplex' is added on the
right of a 'comlex' object, the type returned is 'complex',
hi all,
i am a newbie in python. i was trying to work with dictionaries. i
wanted to input values through command line and store the values in a
dictionary. i mean for the same key , multiple values. can any1
suggest me how can i do it.thank you
i tried this, but the old value is
[EMAIL PROTECTED] wrote:
x=[1,2,3]
and
x=[1,2,3,]
are exactly the same, right?
I'm generating some python data, and it's less error prone
to not treat the last element specially, but I want to be
sure I'm generating an equivalent data structure.
Many TIA!
Mark
x=[1,2,3,]
repr(x)
[1,2,3]
lee a écrit :
hi all,
i am a newbie in python. i was trying to work with dictionaries. i
wanted to input values through command line and store the values in a
dictionary. i mean for the same key , multiple values. can any1
suggest me how can i do it.thank you
i tried this, but the
BiDi wrote:
I have been trying to subclass complex, but I am not able to get the
right-hand arithmetic operators working.
As shown below, if an object of my subclass 'xcomplex' is added on the
right of a 'comlex' object, the type returned is 'complex', not
'xcomplex'.
I've tried
Hi,
I'm facing problem with the execv command:
my command is :
os.execv(' C:\Program Files\Subversion\bin\svn ', ( 'list', ' \
http://subversion.stv.abc.com/svn/Eng \ ' ) )
The error I'm getting is :
OSError: [Errno 22] Invalid argument
I tried using a variable for http path but still I'm
On Fri, Aug 29, 2008 at 5:02 AM, lee wrote:
i wanted to input values through command line and store the values in a
dictionary. i mean for the same key , multiple values.
http://mail.python.org/pipermail/python-list/2008-August/505509.html
hi
i have seen some class definitions like
class MyClass(object):
def __init__(self):
what does the object keyword inside the braces in MyClass() mean?
Has it got any significance?
thanks in advance
harry
--
http://mail.python.org/mailman/listinfo/python-list
harryos wrote:
hi
i have seen some class definitions like
class MyClass(object):
def __init__(self):
what does the object keyword inside the braces in MyClass() mean?
Has it got any significance?
It indicates a so-called new-style-class. The new style classes have been
[EMAIL PROTECTED] wrote:
HI,
i would like to know if there is a way to create a python script for
automate mstsc.exe username and pwd credential, i mean i would create
a script that first open mstsc.exe and in the same time is able to
fill [computer+username+pwd].
Haven't tried it, but in
[EMAIL PROTECTED] wrote:
Hi,
I'm facing problem with the execv command:
my command is :
os.execv(' C:\Program Files\Subversion\bin\svn ', ( 'list', ' \
http://subversion.stv.abc.com/svn/Eng \ ' ) )
The error I'm getting is :
OSError: [Errno 22] Invalid argument
I tried using a
On Fri, 29 Aug 2008 02:50:57 -0700 (PDT), harryos wrote:
class MyClass(object):
def __init__(self):
what does the object keyword inside the braces in MyClass() mean?
Has it got any significance?
It's inheritance. MyClass class inherits from object class.
Check out point 9.5
En Thu, 28 Aug 2008 11:22:50 -0300, [EMAIL PROTECTED]
[EMAIL PROTECTED] escribi�:
I have an embedded Python shell and everything works fine, however, in
my stdout catcher (in C to grab tracebacks) for some reason when I do
a :
PyImport_ImportModule( sys )
It deadlocks the process, is there
Hi there,
just trying to figure out how to iterate over two array without
computing the len of the array:
A = [1,2,3]
B = [4,5,6]
for a,b in A,B: # does not work !
print a,b
It should print:
1,4
2,5
3,6
Thanks !
--
http://mail.python.org/mailman/listinfo/python-list
Am Fri, 29 Aug 2008 03:35:51 -0700 schrieb mathieu:
A = [1,2,3]
B = [4,5,6]
for a,b in A,B: # does not work !
print a,b
It should print:
1,4
2,5
3,6
Hey,
zip is your friend:
for a,b in zip(A,B):
print a,b
does what you want. If you deal with big lists, you
hi,
thank you, ur code was helpful :)
On Aug 29, 2:18 pm, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
lee a écrit :
hi all,
i am a newbie in python. i was trying to work with dictionaries. i
wanted to input values through command line and store the values in a
mathieu a écrit :
Hi there,
just trying to figure out how to iterate over two array without
computing the len of the array:
A = [1,2,3]
B = [4,5,6]
for a,b in A,B: # does not work !
print a,b
It should print:
1,4
2,5
3,6
for a, b in zip(A, B):
print a, b
or, using
On Aug 29, 12:46 pm, Matthias Bläsing [EMAIL PROTECTED]
aachen.de wrote:
Am Fri, 29 Aug 2008 03:35:51 -0700 schrieb mathieu:
A = [1,2,3]
B = [4,5,6]
for a,b in A,B: # does not work !
print a,b
It should print:
1,4
2,5
3,6
Hey,
zip is your friend:
for a,b
hi,
I'm getting problem with the code below which after displaying graph
plotted in external window, doesnot closes itself, even after closing
the window of plotting the main python window shows processing.
code goes like this...
plot(col1, col2, linewidth=1.0)
xlabel('col1')
ylabel('col2')
harryos wrote:
hi
i have seen some class definitions like
class MyClass(object):
def __init__(self):
what does the object keyword inside the braces in MyClass() mean?
Has it got any significance?
thanks in advance
harry
It is a syntax used for 'new type' classes, not so new
harryos a écrit :
hi
i have seen some class definitions like
class MyClass(object):
def __init__(self):
what does the object keyword
It's not a keyword.
inside the braces in MyClass() mean?
Answer is here:
On Aug 29, 6:01 am, Anish Chapagain [EMAIL PROTECTED] wrote:
hi,
I'm getting problem with the code below which after displaying graph
plotted in external window, doesnot closes itself, even after closing
the window of plotting the main python window shows processing.
code goes like this...
mathieu a écrit :
(snip solution)
Thanks all !
FWIW, this has been discussed here *very* recently (a couple hours ago).
Look for a thread named iterating over two arrays in parallel?, and
pay special attention to Terry Reedy's answer.
--
http://mail.python.org/mailman/listinfo/python-list
hello,
in my application I am using
hSem = win32event.CreateSemaphore (None, 1,
1,stringincludinginterfaceandport)
rt=win32event.WaitForSingleObject (hSem, 0)
if rt != win32event.WAIT_TIMEOUT:
really_do_start_my_app()
else:
print application allready running
to make sure that only ONE
GHUM wrote:
hello,
in my application I am using
hSem = win32event.CreateSemaphore (None, 1,
1,stringincludinginterfaceandport)
rt=win32event.WaitForSingleObject (hSem, 0)
if rt != win32event.WAIT_TIMEOUT:
really_do_start_my_app()
else:
print application allready running
to
On Aug 29, 12:24 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
On Aug 29, 6:01 am, Anish Chapagain [EMAIL PROTECTED] wrote:
hi,
I'm getting problem with the code below which after displaying graph
plotted in external window, doesnot closes itself, even after closing
the window of
Hi,
Can anybody tell me why and how this is working:
','.join(str(a) for a in range(0,10))
'0,1,2,3,4,5,6,7,8,9'
I find this a little weird because join takes a sequence as argument;
so, it means that somehow, from the str(a) ... expression, a
sequence can be generated.
If I write this:
In article [EMAIL PROTECTED],
Fredrik Lundh [EMAIL PROTECTED] wrote:
Cameron Laird wrote:
No. No, to an almost libelous extent.
No matter what you write about, there's always a certain subcategory of
potential readers who insist that collection, editing, filtering,
structuring,
On Aug 29, 1:44 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
Insightful. Well, I find it insightful; perhaps it's
a personal blindness on my part. I expect programmers
to understand, for example, that two lines of code can
be a good day's production, in some circumstances
My best days are
On 29 Ago, 13:28, GHUM [EMAIL PROTECTED] wrote:
hello,
in my application I am using
hSem = win32event.CreateSemaphore (None, 1,
1,stringincludinginterfaceandport)
rt=win32event.WaitForSingleObject (hSem, 0)
if rt != win32event.WAIT_TIMEOUT:
really_do_start_my_app()
else:
print
On Jul 14, 4:11 pm, Kay Schluehr [EMAIL PROTECTED] wrote:
On 14 Jul., 06:03, moijes12 [EMAIL PROTECTED] wrote:
hi
there is a .pyd file present in the same folder as the script abc.py
by the name foo.pyd .I don't have foo.py .In the script abc.py I try
import foo
Error i get is
GHUM wrote:
hSem = win32event.CreateSemaphore (None, 1,
1,stringincludinginterfaceandport)
rt=win32event.WaitForSingleObject (hSem, 0)
if rt != win32event.WAIT_TIMEOUT:
really_do_start_my_app()
else:
print application allready running
to make sure that only ONE instance of the application
On Aug 28, 7:57 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
So long story short: if I am expecting a dictionary of strings, I
should make a parser that only accepts a dictionary of strings then.
There is no safe way to use an existing construct.
That is what I was afraid of. I know I will
Tim,
... why use a Semaphore rather than a Mutex?
as much as I understood the documentation at MSDN
http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx
a mutex seems to be nothing else than a special case of a semaphore?
Macygasp wrote:
Hi,
Can anybody tell me why and how this is working:
','.join(str(a) for a in range(0,10))
'0,1,2,3,4,5,6,7,8,9'
I find this a little weird because join takes a sequence as argument;
so, it means that somehow, from the str(a) ... expression, a
sequence can be
GHUM wrote:
Tim,
... why use a Semaphore rather than a Mutex?
as much as I understood the documentation at MSDN
http://msdn.microsoft.com/en-us/library/ms686927(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms686946(VS.85).aspx
a mutex seems to be nothing else than a special case of
D,T=[dict((x.split('.')[0],x) for x in X) for X in (dat,txt)]
for k in sorted(set(D).union(T)) :
for S in D,T :
print '%-8s' % S.get(k,'None'),
print
HTH
W. eWatson wrote:
Maybe there's some function like zip or map that does this. If not, it's
probably fairly easy to do with
On Aug 29, 7:42 am, Fett [EMAIL PROTECTED] wrote:
On Aug 28, 7:57 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
So long story short: if I am expecting a dictionary of strings, I
should make a parser that only accepts a dictionary of strings then.
There is no safe way to use an existing
Thanks all ,
but there is still something i forget to state -sorry - all
communication will be via Http with a server
so data is received via Http
so local network solutions won't work
the problem really starts after receiving data in storing them without
much of a CPU/Memory usage and with a good
Emile van Sebille [EMAIL PROTECTED] wrote:
data = zip(*[xx.split() for xx in open('data.txt').read().split(\n)])
Files are iterable:
data = zip(*[xx.rstrip().split() for xx in open('data.txt')])
saves you creating the extra intermediate list resulting from split(\n).
--
\S -- [EMAIL
I want to interate over two arrays in parallel,
something like this:
a=[1,2,3]
b=[4,5,6]
for i,j in a,b:
print i,j
where i,j would be 1,4,2,5, 3,6 etc.
Is this possible?
Many TIA!
Mark
list_1 = range( 1 , 4 )
list_2 = range( 4 , 7 )
list12 = zip(
Good afternoon all.
I have an application/script which is launched by crontab on a regular basis. I
need an effective and accurate way to ensure that only one instance of the
script is running at any one time.
After a short look around the internet I found a couple of examples, such as
this
SOP is to write the actual PID of the running process into the pidfile, then
check to a) that the pidfile exists, and b) that the process referenced in
the pidfile exists. if the pidfile exists, but the process does not, take
over the pidfile and carry on.
On Fri, Aug 29, 2008 at 9:51 AM, Heston
On Aug 28, 5:45 pm, Tyler Shopshire [EMAIL PROTECTED] wrote:
I can't seem to access the pydoc sever from my web browser. I start the
server from the command prompt and everything seems to be working fine,
then I got tohttp://localhost:/and it doesn't work. I also tried
starting the
Terry Reedy [EMAIL PROTECTED] wrote:
Yes, so you can write something like either your second example or
l = [
kjasldfjs,
kjsalfj,
ksjdflasj,
]
and insert items without worrying about leaving out the comma (less of a
problem with 'horizontal' list), or delete the last line and
On Jul 14, 9:11 pm, Kay Schluehr [EMAIL PROTECTED] wrote:
On 14 Jul., 06:03, moijes12 [EMAIL PROTECTED] wrote:
[snip]
Error i get is
ImportError: DLL load failed: The specified module could not be found.
Notice that the message clearly indicates that Python found the module
but failed to
Fett a écrit :
On Aug 28, 7:57 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
So long story short: if I am expecting a dictionary of strings, I
should make a parser that only accepts a dictionary of strings then.
or use an existing parser for an existing and documented format, as many
On 27 Aug 2008 15:50:14 GMT, Steven D'Aprano [EMAIL PROTECTED] wrote:
On Tue, 26 Aug 2008 17:04:19 -0700, tdmj wrote:
On Aug 26, 5:49 pm, [EMAIL PROTECTED] wrote:
I have a list that starts with zeros, has sporadic data, and then has
good data. I define the point at which the data turns good
On 2008-08-29, Roy Smith [EMAIL PROTECTED] wrote:
Exactly. This is one of those little pieces of syntactic
sugar which makes python so nice to work with. The
alternative is (in C, for example) abominations like this:
const char* l[] = {foo
, bar
, baz
On Fri, 29 Aug 2008 05:42:46 -0700, Fett wrote:
On Aug 28, 7:57 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
So long story short: if I am expecting a dictionary of strings, I should
make a parser that only accepts a dictionary of strings then. There is
no safe way to use an existing
To learn python, I've been trying to write a simple graphics program
which displays a 1D cellular automaton's evolution. The last time I
wrote this program, it was in C for a CGA adaptor (!) in which the
display was mapped to two interlaced blocks of memory, and scrolling
up two lines of pixels
Hy folks
A friend of mine told me something about Guido and google developing
an Ubuntu distribution based and totaly oriented for the Python
appliction development. I googled for it with no results. Is it
possible that My Buddy is trying to foole me or is it possible that
someone knows something
On Thu, 28 Aug 2008 16:28:03 -0700, Paul McNett wrote:
[EMAIL PROTECTED] wrote:
x=[1,2,3]
and
x=[1,2,3,]
are exactly the same, right?
When confronted with this type of question, I ask the interpreter:
{{{
mac:~ pmcnett$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC
In article [EMAIL PROTECTED],
Grant Edwards [EMAIL PROTECTED] wrote:
On 2008-08-29, Roy Smith [EMAIL PROTECTED] wrote:
Exactly. This is one of those little pieces of syntactic
sugar which makes python so nice to work with. The
alternative is (in C, for example) abominations like this:
Hi.
I'm using mechanize to parse a page/site that uses the meta http-equiv tag
in order to perform a refresh/redirect of the page. I've tried a number of
settings, and read different posts on various threads, but seem to be
missing something.
the test.html page is the page that the url returns,
Hi.
I'm using mechanize to parse a page/site that uses the meta http-equiv tag
in order to perform a refresh/redirect of the page. I've tried a number of
settings, and read different posts on various threads, but seem to be
missing something.
the test.html page is the page that the url returns,
On the python-dev mailing list, a question has be raised about a change
to module.__file__ in Python 3.
http://www.gossamer-threads.com/lists/python/dev/674923#674923
In Python 2.x, m.__file__ is the name of the file that the module was
imported from. That file might end with .py, .pyc, .pyo,
On 29 Aug, 16:57, Raymond Luxury-Yacht [EMAIL PROTECTED] wrote:
The code below works, and uses pygame for the graphics. But the scrolling is
quite flickery when using large windows. I'm sure that the code
contains various neophyte python errors, and I'd appreciate any
comments on that, but
azrael wrote:
A friend of mine told me something about Guido and google developing
an Ubuntu distribution based and totaly oriented for the Python
appliction development.
not sure about a version tuned for python, but wikipedia claims that
there's a custom packaging used internally:
On 29 Aug 2008 15:21:53 GMT, Steven D'Aprano [EMAIL PROTECTED] wrote:
On the python-dev mailing list, a question has be raised about a change
to module.__file__ in Python 3.
http://www.gossamer-threads.com/lists/python/dev/674923#674923
In Python 2.x, m.__file__ is the name of the file that
On Thu, Aug 28, 2008 at 3:54 PM, Guilherme Polo [EMAIL PROTECTED] wrote:
On Thu, Aug 28, 2008 at 10:29 AM, [EMAIL PROTECTED] wrote:
Hi,
I'm working on Windows Platform
I'm facing some problem with the tkMessageBox. My code is as below:
import tkMessageBox
import Tix
from Tkinter import *
Hi,
How to check if something is a list or a dictionary or just a string?
Eg:
for item in self.__libVerDict.itervalues():
self.cbAnalysisLibVersion(END, item)
where __libVerDict is a dictionary that holds values as strings or
lists. So now, when I iterate this dictionary I want to
On Aug 29, 8:14 pm, Fett [EMAIL PROTECTED] wrote:
On Aug 29, 7:42 am, Fett [EMAIL PROTECTED] wrote:
On Aug 28, 7:57 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
So long story short: if I am expecting a dictionary of strings, I
should make a parser that only accepts a dictionary of
alex23 wrote:
On Aug 29, 3:45 pm, W. eWatson [EMAIL PROTECTED] wrote:
Something to do on your weekends. [non-related link clipped]
Another thing to do with your weekends would be to -not spam-.
Sorry, misdirected.
--
W. Watson
(121.015 Deg.
I just tried the following code, and got an unexpected result.
from pyfdate import *
t = Time()
ts = Time(2008, 8, 29,15,20,7)
tnew = ts.plus(months=6)
print new date: , tnew
Result:
new date: 2009-02-28 15:20:07
I believe that should be April 1, 2009. If I use months = 1 and day =31, I
get
castironpi wrote:
...
I don't think that's guaranteed by anything. I realized that
'dat.sort()' and 'txt.sort()' weren't necessary, since their contents
are moved to a dictionary, which isn't sorted.
Actually, I'm getting the file names from listdir, and they appear to be
sorted low to high.
On Aug 28, 3:23 pm, gordyt [EMAIL PROTECTED] wrote:
Peter here is an example. I just tried it and it works fine.
from smtplib import SMTP
HOST = smtp.gmail.com
PORT = 587
ACCOUNT = # put your gmail email account name here
PASSWORD = # put your gmail email account password here
def
On Aug 29, 9:43 am, Jorgen Grahn [EMAIL PROTECTED] wrote:
On 27 Aug 2008 15:50:14 GMT, Steven D'Aprano [EMAIL PROTECTED] wrote:
On Tue, 26 Aug 2008 17:04:19 -0700, tdmj wrote:
On Aug 26, 5:49 pm, [EMAIL PROTECTED] wrote:
I have a list that starts with zeros, has sporadic data, and then
On Aug 29, 9:16 am, [EMAIL PROTECTED] wrote:
Hi,
How to check if something is a list or a dictionary or just a string?
Eg:
for item in self.__libVerDict.itervalues():
self.cbAnalysisLibVersion(END, item)
where __libVerDict is a dictionary that holds values as strings or
Raymond Luxury-Yacht wrote:
To learn python, I've been trying to write a simple graphics program
which displays a 1D cellular automaton's evolution. The last time I
wrote this program, it was in C for a CGA adaptor (!) in which the
display was mapped to two interlaced blocks of memory, and
On Aug 28, 2:28 am, Marco Bizzarri [EMAIL PROTECTED] wrote:
On Wed, Aug 27, 2008 at 6:44 PM, Daniel [EMAIL PROTECTED] wrote:
Hello,
I'm writing some unit tests for my python software which uses
packages. Here is the basic structure:
mypackage
__init__.py
module1
__init__.py
That will mean that there will be no (easy?) way to determine after the
import whether the module was imported from a source file or a compiled
file. I've suggested that the original justification for the patch no
longer applies, and that the secondary purpose of the patch is better
solved by
On Fri, 29 Aug 2008 17:20:37 +0100, London wrote:
I am new to python.
I did find a page which listed some code - IE chdir type code but can
not find it again.
Can you supply an address?
http://www.google.com is a good address to use.
Seriously, did you think we've hacked your computer and
On Aug 29, 1:29 am, W. eWatson [EMAIL PROTECTED] wrote:
It looks like I have a few new features to learn about in Python. In
particular,
dictionaries.
In Python it's hard to think of many non-trivial problems that you
*don't* have to know about dictionaries.
George
--
On Aug 29, 4:45 am, Russell E. Owen [EMAIL PROTECTED] wrote:
your Controller object should not create root nor should
it call mainloop to start the event loop.
guys
thanks for the helpful replies..I rewrote the code as you advised. It
creates a controller object and a gui object from main
If I get zero division error it is obv a poor solution to do try and
except since it can be solved with an if-clause.
However if a program runs out of memory I should just let it crash
right? Because if not then I'd have to write exceptions everywhere to
prevent that right?
So when would I
On Aug 29, 12:16 pm, [EMAIL PROTECTED] wrote:
Hi,
How to check if something is a list or a dictionary or just a string?
Eg:
for item in self.__libVerDict.itervalues():
self.cbAnalysisLibVersion(END, item)
where __libVerDict is a dictionary that holds values as strings or
# I posted a few days ago about a memory leak that I think i'm having with my
first Tkinter program.
# I've had trouble pinpointing what is wrong so i thought i would submit the
code and see if anyone would
# like to critique it.
# I have one more problem that i can't figure out either.
hello,
I am trying to find the amount of values there are pertaining to one key.
For example:
- To find the average of the values pertaining to the key.
- Use the amount of values to calculate a histogram
Also, how do reference a specific value for a key in a multipart?
Thanks,
Ron
--
On Aug 29, 11:23 am, cnb [EMAIL PROTECTED] wrote:
If I get zero division error it is obv a poor solution to do try and
except since it can be solved with an if-clause.
However if a program runs out of memory I should just let it crash
right? Because if not then I'd have to write exceptions
On Aug 29, 1:23 pm, cnb [EMAIL PROTECTED] wrote:
If I get zero division error it is obv a poor solution to do try and
except since it can be solved with an if-clause.
However if a program runs out of memory I should just let it crash
right? Because if not then I'd have to write exceptions
In article
[EMAIL PROTECTED],
gordon [EMAIL PROTECTED] wrote:
On Aug 29, 4:45 am, Russell E. Owen [EMAIL PROTECTED] wrote:
your Controller object should not create root nor should
it call mainloop to start the event loop.
guys
thanks for the helpful replies..I rewrote the code as you
1 - 100 of 254 matches
Mail list logo