Cesar G. Miguel wrote:
> I've been studying python for 2 weeks now and got stucked in the
> following problem:
>
> for j in range(10):
> print j
> if(True):
>j=j+2
>print 'interno',j
>
> What happens is that "j=j+2" inside IF does not change the loop
> counter ("j") as it would
t; title="Send an Email to selected
... employee">'''
>>> print s
'D132258','',
'status=no,location=no,width=630,height=550,left=200,top=100')"
target="_blank" class="dvLink" title="Send an Email to selected
employee">
>>> s.find('\\')
-1
So the question now becomes: Where do you really want to split it? If
at the comma then one of these will work for you:
>>> print s.split(',')[0]
'D132258'
>>> i = s.index(',')
>>> print s[:i]
'D132258'
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi,
> Suppose i have a list v which collects some numbers,how do i
> remove the common elements from it ,without using the set() opeartor.
> Thanks
>
>
Several ways, but probably not as efficient as using a set
an event when the
keyboard is used. )
Yes, every GUI I've ever used from Python (Tk/Tcl, wxPython, Gtk++,
Win32 API, ...) has a way to catch keyboard events. But you're going to
have to tell us which OS and which GUI you're interested in before you
get a more detailed a
everal better options:
For instance:
for arg in moreargs: # Loop through each arg
or
for i in range(len(moreargs)):
# Extract ith arg
or
argslist = list(moreargs)
while argslist:
firstarg = argslist.pop(0) # Extract first arg
Gary Herron
> Second, is there any good r
AttributeError = SyntaxError
Then your code will be will produce a real AttributeError, but miss it
because (despite the spelling) it checks for a SyntaxError,
Question... I don't know what contract.py is, but could it be doing
something that *bad*?
You could check py printing Attribut
4407369744.000
>>> print '%12.5e' % x
1.84467e+19
>>> print '%12.5g' % x
1.8447e+19
See http://docs.python.org/lib/typesseq-strings.html for all he details.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
import module_a
from module_a import change_value
but that's probably confusing and generally considered a bad idea.
Ideas:
1 If you want module_a to manage such a global variable, you could
include functions for getting, and setting it, as well as your function
for changing it's value.
2. You could also dispense with use of global values -- various OOP
techniques could help there.
Gary Herron
> Thanks!
>
> Cheers,
> Valia
>
>
--
http://mail.python.org/mailman/listinfo/python-list
it probably has some special meaning.
>
> thanks,
> Stef Mientki
>
The $ is not used in any Python syntax. Neither in variable names nor
any syntactical construct.
Of course, like any character, it can be used in strings. (And some
packages, like re, will make special use of a $ i
t;f=open(fileBeginning+".tmp", 'w')
>f.write("Hello")
>f.close
f.close()
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
ou. It fails to across the internet (sometimes) and
when (at least some) wireless cards are involved.
You may be better off using a package that knows all this and handles it
properly. Modules asyncore and asynchat are one possibility.
Gary Herron
>
> the sample code is as follows
>
may also want to checkout the dictionary method setdefault which has
the functionality of get PLUS if the key is not found, it adds the
key,value pair to the dictionary.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
rt 8080 with url's that
look like this:
http://localhost:8080/what/ever/..., or
http://machine-name:8080/what/ever/...,
Gary Herron
>
>
> import os, sys
>
> from BaseHTTPServer import HTTPServer
>
> from CGIHTTPServer import CGIHTTPRequestHandler
p:121
>--END ERROR-
>
>Thanks,
>Sarah
Just a guess, but try com.JPypeTest.main(["arg"]).
Gary Duzan
Motorola HNM
>On Aug 14, 8:03 am, Laurent Pointal <[EMAIL PROTECTED]&g
#x27;)
If you want to turn a string representation of an object back into an
object, you must eval the string.
Moreover, if the tuple contains things other than simple integers (float
of strings of whatever) the string represtnataion of the object may not
be able to recover the original object accu
Oğuz Yarımtepe wrote:
> On Thursday 16 August 2007 11:20:38 Gary Herron wrote:
>
>> If you really want to send any Python object through a socket, look up
>> the Pickle and cPickle modules. These will marshal (as it's called) any
>> Python object of any type and
ays date?
>
> Thank You
>
> Dominic
>
>
>
Here's how I'd do it:
>>> import time
>>> secondsPerDay = 24*60*60
>>> today = time.time()
>>> yesterday = today - secondsPerDay
>>> print time.strftime("%d%m%Y",time.lo
CANNOT sort a (standard Python) dictionary. You CAN find some
alternative implements of dictionaries on the web that allow ordering,
and you CAN extract the key,value pairs from a dictionary into a list,
and sort that list (by any criteria you want).
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
"self.%s = '%s'" % (item, plist[item])
>
Yuck! Not at all necessary. Use setattr instead:
setattr(self, item, plist[item])
That's much cleaner then an exec or eval. You may also find getattr and
hasattr useful.
Gary Herron
> A more simple example for setting a variable outside of a class...
>
> exec '%s = '%s'" % ('variableName', 'variable value')
>
> Cheers!
> Mike
>
>
--
http://mail.python.org/mailman/listinfo/python-list
imple (nice,
very small, well featured and consistent) widget toolkit with OpenGL
support. Once the window is open, PyOpenGL (versions 2xx or 3xx) work
perfectly on the window.
See http://www.fltk.org/
Gary Herron
>> However, it doesn't (easily) work with common GUIs like GTK and Wx.
27;/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/PIL',
'/usr/lib/python2.5/site-packages/gtk-2.0']
>>> import sys
>>> sys.path
['', 'C:\\WINDOWS\\system32\\python24.zip', 'C:\\cygwin\\home\\Gary',
ot Python. It never even sees those quotes. Whatever system you are
using for entering the text is stripping them. Is it the command prompt
(cmd.exe)? If so then you can escape the quote by preceding it with a
backslash. (This is true of the DOS prompt and all the unix shells, and
their window
darren kirby wrote:
> Hi all,
>
> I have a strange error here and I am unsure how to further investigate it:
>
> Python 2.4.4 (#1, Aug 23 2007, 10:51:29)
> [GCC 4.1.2 (Gentoo 4.1.2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
import time
n empty string. And that would seem to mean you have an empty line in
your input.
So... Either remove the empty lines, or test my_line before calling
float on it.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
Ginger wrote:
> like format function in Visual Basic,
> format("##.##%",0.3456) ==>> 34.56%
>
"%5.2f%%" % (0.3456*100)
'34.56%'
See this section of the manual:
http://docs.python.org/lib/typesseq-strings.html
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ere since thisfunc() stores the references on the stack rather than the
heap. But I'm not sure. Obviously, it would be easy to add a try/finally with
appropriate del's, but I don't want to do it if it's not necessary.
I welcome feedback of any type.
Thanks,
Gary
--
Gary Ro
() returns the current working directory. Call this before you
change things with os.chdir().
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
you
saying you *CAN'T* call getcwd and save the value before you call chdir,
and that you *MUST* recover the original working directory *AFTER* you
change it. I don't believe it... and won't waste my time trying to
solve such a silly problem until you demonstrate that you ca
isn't one of them, I just used that as a quick example of using
thisfunc().
I've just never liked the fact that you have to name the function when
accessing those attributes from within the function. And I thought there might
be other uses for something like thisfunc().
--
G
tonyr1988 wrote:
> I'm a complete python n00b writing my first program (or attempting to,
> anyway). I'm trying to make the transition from Java, so if you could
> help me, it would be greatly appreciated. Here's the code I'm stuck on
> (It's very basic):
>
> class DemoClass:
> def __init__(s
actly what you want Real Soon Now.
http://groups.google.com/groups/search?q=group%3Acomp.lang.python+squisher&qt_s=Search
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
ot;
to execute it, with no need for anything but the base Python to be
installed on the remote site, and just one file to copy.
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
t; a different
> "set"
>
Of course. Try this:
class document:
def __init__(self, string):
self.titre = string
self.haveWords = set()
Each instance creation will call __init__ with the instance
accessible through self, and that code will create two instance
specific attribute
procedure go is defined in a.py, the global blah it refers to
is global to that module.
So import a (instead of importing * from a) and try this:
>>> import a
>>> a.blah
>>> a.go()
>>> a.blah
5
>>>
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
behaviour isn't desired; if
the RE <.*> is matched against |'title'|, it will match the
entire string, and not just |''|. Adding "?" after the qualifier
makes it perform the match in /non-greedy/ or /minimal/ fashion; as
/few/ characters as possi
ther's be reported as the errors they are:
try:
myList[index]
except IndexError:
...whatever...
Gary Herron
> Is it ok to use try...except for the test or is it bad coding style? Or
> is there another, more elegant method than these two?
>
> Regards,
> Rehceb
>
--
http://mail.python.org/mailman/listinfo/python-list
those same two programs can't
read the DPI as set by them. Is there a workaround for this?
Other than this one issue, I have found the PIL to be a BLAST! :)
Thanks!
Gary Bloom--
http://mail.python.org/mailman/listinfo/python-list
h
these header files present, but they still don't get put in the
tarball.
What's the key to getting headers or other [non-python] files included
in a bdist?
Thanks,
Gary
--
http://mail.python.org/mailman/listinfo/python-list
you can live with package data), use
> "data_files":
>
> http://docs.python.org/dist/node13.html
I also tried using data_files to get the headers included, but can't
seem to get that to work either. No errors are reported for either
method.
Thanks,
Gary
--
http://mail.python.org/mailman/listinfo/python-list
John J. Lee wrote:
> Eclipse must be able to do this.
Not by default... but I am certain there are plugins that provide python
integration. (And jython integration)
Peace,
Gary
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 20, 12:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote:
> Gary Jefferson wrote:
> > On Sep 20, 1:22 am, Robert Kern <[EMAIL PROTECTED]> wrote:
> >> Use the "headers" keyword to setup() to list theheaderfiles you want
> >> installed.
>
>
to have done './
configure' first, as it untars and tries to build the extension there.
Is there a hook for bdist_rpm (and friends) that will allow me to
insert a './configure' in the build process, sometime before it tries
to build the extension?
Thanks,
Gary
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 20, 10:43 pm, Gary Jefferson <[EMAIL PROTECTED]>
wrote:
> I've got a python extension that comes with its own standard autoconf/
> automake system, and I can "python setup.py build" just fine with it
> as long as I have previously done "./configure"
Richard Thomas wrote:
> On 27/09/2007, Casey <[EMAIL PROTECTED]> wrote:
>
>> On Sep 27, 12:48 pm, "Simon Brunning" <[EMAIL PROTECTED]>
>> wrote:
>>
>>> On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>>
>>>
I tried writing a true and false If statement and didn't get
>
t the module uses. Version 0 is the
historical format, version 1 (added in Python 2.4) shares interned
strings and version 2 (added in Python 2.5) uses a binary format for
floating point numbers. The current version is 2
Gary Herron.
--
http://mail.python.org/mailman/listinfo/python-list
lit()
>>> print f
['1', '1', '10:55:14', '2', '65', '8.5']
>>> ','.join(f)
'1,1,10:55:14,2,65,8.5'
or
>>> ', '.join(f)
'1, 1, 10:55:14, 2, 65, 8.5'
>>>
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ly ask for an element in the list.
--
Gary CoulbourneSoftware Developer
C/C++, Java, Perl, Python
--
http://mail.python.org/mailman/listinfo/python-list
sed copy of either a string or a
list
Your recursion stops when xs == [], but when you're stripping characters
off a string, like 'abc', the remaining portion will be 'bc', then 'c',
than '', but never [] so you 'll never stop.
Try:
if xs == []:
return []
elif xs == '':
return ''
else:
...
Gary Herron
>
> Thanks,
> Dima
--
http://mail.python.org/mailman/listinfo/python-list
Dmitri O.Kondratiev wrote:
> Gary, thanks for lots of info!
> Python strings are not lists! I got it now. That's a pity, I need two
> different functions: one to reverse a list and one to reverse a string:
True, they are not both lists, but they *are* both sequences, with some
th
of Python while executing fn_outer, the
def of fn_inner looks just like an assignment with fn_inner as the
variable name and a code object as the value.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
perator named in:
>>> bigstring="python anaconda boa cobra"
>>> smallone="boa"
>>> smallone in bigstring
True
Often used in if statements like this:
>>> if smallone in bigstring:
... print 'contained'
... else:
... print '
tation of that object. Use str for a human friendlier
representation, and repr for a more explicit representation.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
and both its input and output.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
off if you can use Python's list data structure rather than try to emulate an
outdated concept in a modern language.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t seem to figure out how to get the basic
> components of the traceback message into strings. Here's what I want
> to do:
>
The traceback module provides a wealth of ways to get at the exception
information, formated and usable in various ways.
See: http://docs
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B',
and each module has its own logger, created with:
module1logger = logging.getLogger('project.A')
and
module2logger = logging.getLogger('project.A.a')
and
module3logger = logging.getLogger('project.B')
And I want to select
component, by providing, for example, a command line switch or
environment variable. Otherwise, the poor programmer is forced to go
and edit every module in the source tree to selectively turn on/off
their respecitve loggers. Or am I missing something really obvious
about how this is done with the
oximate squelching of everything but that which I
explicitly setLevel (which does inherit properly).
In other words, the addFilter/removeFilter part of the API seems rather
impotent if it can't be inherited in the logging namespaces. In fact,
I can't really figure out a use case where I could possibly want to use
it without it inheriting. Obviously I'm missing something. I'm sure
I've consumed more attention that I deserve already in this thread,
but, do you have any pointers which can enlighten me as to how to
effectively use addFilter/removeFilter?
many thanks,
Gary
--
http://mail.python.org/mailman/listinfo/python-list
dictionary of all objects in the module, from which you
can access and iterate through the names (keys) and values.
If you want more capabilities, you should also look at the inspect module.
Gary Herron
--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Tech
s)? Or... maybe I don't need this,
either, as MatchFilter (log_test18.py) seems to do what I was thinking
I need the list of logger names for... most excellent.
Thanks,
Gary
BTW, the python logging module is one of the best readily available
loggers I've come across in any language.
--
ht
plete Web Services
> http://www.datafly.net
>
>
Like this:
info_I_need = 'name'
print getattr(person, info_I_need)
Related to getattr are setattr and hasattr.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ibutes
that can be used like function level static variables.
However, I usually use module level attributes for such things.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ibutes
that can be used like function level static variables.
However, I usually use module level attributes for such things.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
se doctest does something with logging. Is there any way to
make these work together?
Gary
--
http://mail.python.org/mailman/listinfo/python-list
exactly what I want. Other times, I want only smtp DEBUG msgs,
and the hierarchy won't help me get that (unless I break it for just
getting client or server msgs), etc. So I would really like to figure
out how to do 'a.*.c'.
Any ideas?
Thanks again,
Gary
On Jan 23, 3:01 am, "
Peter Otten wrote:
> Peter Otten wrote:
>
> > Gary Jefferson wrote:
> >
> >> I've written a logging.filter and would like to use doctest on it
> >> (using a StreamHandler for stdout), but this doesn't seem possible.
> >> Output from the
Gary Jefferson wrote:
> So maybe I don't have all this figured out quite as well as I thought.
> What I really want to do is set an environment variable, MYDEBUG, which
> contains a list of wildcarded logger names, such as "a.*.c a.d" (which
> becomes ['a.*.c'
returns a new string which you must assign to
something:
new_data = r.sub(ur"", data)
Then do something with the new string.
Also I fear your regular expression is incorrect.
Cheers,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
to be able to be used in Python Win. Is there a ZIP utilty
> already stored with a basic PYTHON download?
>
> Thanks all.
>
>
The module you want is called zipfile, and its part of the standard library.
See: http://docs.python.org/lib/module-zipfile.html for documentation.
Gary Her
vithi wrote:
> Hi
> Any one tell me where I can get (or download) python modules win32com
> or win32com.client because I have to use "Dispatch" thanks
>
>
You want the "python for windows" extension, available from
http://sourceforge.net/proje
's got far more feature than you're likely to get into any Python
scripts in the near future. (Plus it's scritable from Python so you can
automate some tasks if you wish.
Gary Herron
> Thank you very much for every hint.
>
> Andrea.
>
> "Imagination Is T
tring sub is found,
4 such that sub is contained within s[start,end]. Optional
5 arguments start and end are interpreted as in slice notation.
6
7 Return -1 on failure.
So put your find in a loop, starting the search one past the previously
found occurrence.
i = string.find(mystring, i+1)
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
parsing user input.
>
> Regards,
> Deniz Dogan
>
Not only *can* it be done, but it *has* been done and well: See IPython at:
http://ipython.scipy.org/moin/
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
tabs for the indentation, so that the code
Python sees is not as we see it printed? (Don't ever do that.)
Do you have several copies of sampdict.py (or even sampdict.pyc) so that
the copy being imported is not the one you printed? (Run Python with a
-v switch to test for this possibility.)
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
h.split(path0)[0] # Up one
path2 = os.path.split(path1)[0] # Up two
sys.append(path2)
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
is highly optimized and
probably not noticeable. The number of methods/functions may slow things
up, but it will affect either name space equally.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
colorIndex
colorIndex=123 # changes the value of the global
Better yet, restructure your code to not rely on the global statement. Do
something like this if you can:
def test():
return 123
colorIndex = test()
Gary Herron
> My question is why do I have to explicit declari
ever, if you tell us how you would disable a card from outside
of Python, we'll see if we can find a way to do it from within Python.
Things you might want to tell us:
What OS.
What device(s)
Exactly what "disable" means for each.
How the OS allows you to enable/disable each.
Anythi
s have pointed out, circular imports are
often a sign that your software design is not very well thought out.
It's usually better to have your thought process, your design and your
imports organized in a hierarchal fashion.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
e reason enough for some to want to keep it out.) But this is an all
volunteer community. Your feature is not in the language because no one
has cared enough to implement it. Or if some one has implemented it, no
one has found it useful enough to lobby it into the language.
Are
[EMAIL PROTECTED] wrote:
> Hello everybody,
>
> I've banged my ahead around for a while trying to figure out why
> multiple instances of a class share the same instance variable. I've
> stripped down my code to the following, which reproduces my problem.
>
This is a *feature* of Python tha
Russ P. wrote:
> On Dec 3, 8:22 am, [EMAIL PROTECTED] wrote:
>
>> The only reason to change the name would be because of some serious
>> bad PR that came onto Python, thus causing its branding name to be
>> catagorized as something bad.
>>
>> However this is not the case, presently, and the bran
If you *really* wanted two class members *AND* two instance members
with the same names, (WHY???) then example 1 will do so, but you'll have
to access the instance members as self.member1 and the class members as
Foo.member1.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
e time, when making such an announcement, to tell
us *what* it is you are releasing. Just a sentence or two and a URL
would be only common courtesy.
Thanks,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ans "save"? What is "randomletters"?
The error you are getting is usually gotten by code that tries to treat
a variable containing a list as a function. Example:
someList = [1,2,3]
someList(99)
Traceback (most recent call last):
File "", line 1, in
TypeError:
h
values from each iterator respectively, and loop on that:
>>> for i,j in zip(range(10),range(10,20)):
... print i,j
...
0 10
1 11
2 12
3 13
4 14
5 15
6 16
7 17
8 18
9 19
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
and use join on a
space to the the space delimited string.
>>> theList = ['./whatever', 'a', 'b', 'c']
>>> print ' '.join([repr(i) for i in theList])
'./whatever' 'a' 'b' 'c'
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
nks,
> igor
>
But it *does* exist, and its named list.append, and it works as you wanted.
>>> list.append
>>> a = [[],[]]
>>> map(list.append, a, (1,2))
[None, None]
>>> a
[[1], [2]]
>>> map(list.append, a, (3,4))
[None, None]
>>&
[EMAIL PROTECTED] wrote:
> Hi folks,
>
> Thanks, for all the help. I tried running the various options, and
> here is what I found:
>
>
> from array import array
> from time import time
>
> def f1(recs, cols):
> for r in recs:
> for i,v in enumerate(r):
> cols[i].append(v)
>
ot;activate.tmpl", "rb")
template = "\r\n" + f.read()
f.close()
for fname in glob.glob('*.frm'):
inf = open(fname, "rb")
content = inf.read()
inf.close()
if 'Form_Activate' not in content:
print "Not in", fname
outf = open(fname, 'wb')
outf.write(content)
outf.write(template)
outf.close()
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
look* like a
declaration, but in fact it may be executed anywhere. The import
statements does, however, hard code its module's name. For a plugin
system, you'll probably want to import a module given a string
containing its name. The "imp" module provides this as w
quot;a53bc_([0-9]*).txt")
>>>
>>> s = "a53bc_531.txt"
>>> match = pattern.match(s)
>>> if match:
... print int(match.group(1))
... else:
... print "No match"
...
531
>>>
Hope that helps,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
Dear python users
I am just wondering if python is the language to use to build a custom
charting package which is live updated from live data stream coming
through a socket. as well as dynamically execute data analysis code
on the data being fed. I have been looking at SpecTix.
thank you
--
ht
t.
open can be used to open a file
The open file has several methods to read bytes from the file:
read() gets the whole file at once
readline() return a line at a time
other possibilities exist
You can test to see if a string s is in another string t with
if s in t: ...
Hope that
Hi python users
I am using emacs and python-mode.el under dabian testing.
is there a way to debug python code where I can step over each line
and watch the value of all the variables and be able to change
any during debugging. say you have a loop structure and want to see
what the values of your v
Gary Wessle <[EMAIL PROTECTED]> writes:
> Hi python users
>
> I am using emacs and python-mode.el under dabian testing.
> is there a way to debug python code where I can step over each line
> and watch the value of all the variables and be able to change
> any during d
nd ' + ComputerName + ' "' + Message + '"')
where the +'s build the command string up from pieces.
You might try invoking Python interactively and try typing some of these
expressions by hand to see that happens:
python
>>> ComputerName = 'Fred'
>>> Message = 'HI'
>>> print 'net send ComputerName "Message"'
net send ComputerName "Message"
>>> print 'net send %s "%s"' % (ComputerName, Message)
net send Fred "HI"
>>>
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I am going through some tutorials, how do I find out about running a
script from the python prompt?
is there a online ref and how to access it?
thank you
--
http://mail.python.org/mailman/listinfo/python-list
don't),
then you have to find a different way to create three separate objects.
The copy module helps with this in some cases, but for your simple
example, you just want to create the three inner objects by evaluating
the expression [0]*3 three times. Here's several ways:
a = []
for i in range(3):
a.append([0]*3)
or
a = [ [0]*3 for i in range(3)]
Clear?
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
the output of this code below is not what one would expect, it outputs
all kind of numbers and it never stops, I want to ask the user for a
number and then print out the multiplication table up to that number.
thanks
import math
401 - 500 of 1014 matches
Mail list logo