For making a literal tuple, parentheses are irrelevant; only the
commas matter:
I don't think I'd go so far as to say that the parentheses around
tuples are *irrelevant*...maybe just relevant in select contexts
>>> def foo(*args):
... for i, arg in enumerate(args):
... prin
Yes, I saw the calendar module, but, as I said, this isn't
homework or something like that. It is an example which I've
setted myself to try to solve to see how it would go. Calendar
just gives me the solution :-(
Part of the answer to a problem is knowing when not to duplicate
effort that's al
Is there a more Pythonic way to instantiate sub-classes and
provide instance-specific implementations without the
overhead of an unused "anonymous" class cluttering my
code/namespace?
I agree with Carl Banks that what you do is already fairly
Pythonic: explicit is better than implicit, and simpl
For making a literal tuple, parentheses are irrelevant; only the
commas matter:
I don't think I'd go so far as to say that the parentheses around tuples
are *irrelevant*...maybe just relevant in select contexts
>>> def foo(*args):
... for i, arg in enumerate(args):
... print
ng a data. How can I do this?
>
> t = "string representing a datum"
> access.Fields("Time").value = t
maybe OP means t = "string representing a date", but I'm just guessing.
--Tim Arnold
--
http://mail.python.org/mailman/listinfo/python-list
ript can then generate
the NEXT page.
The key is that each page stands alone. You don't hold the data in
between. You make a new database query each time a new request comes in.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
I hope this is the right place to ask, but I am trying to come up with
a way to parse each line of a file. Unfortunately, the file is neither
comma, nor tab, nor space delimited. Rather, the character locations
imply what field it is.
For example:
The first ten characters would be the record num
Sandip Bhattacharya wrote:
On Nov 4, 12:43 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
def main(argv=None):
if argv is None: argv = sys.argv[1:]
...
Wouldn't that make optparse miss the first parameter sys.argv[1]
mistaking it to be the name of the current program?
Nope...opt
recno_idx = slice(0,10)
client_idx = slice(10, 11)
volume_idx = slice(11,11+10)
order_type_idx = slice(11+10, 11+10+3)
.
!? That seems to me confusingly far from a working solution,
at least in comparison to
recno_idex = the_line[0:10]
client_idx = the_li
Martin wrote:
I need to extract a frame from a wmv file and save it as a jpg. In fact
I need to extract a frame from each one of a collection of several
thousand wmv files, but that's beside the point.
I've actually written a script that does exactly this using the pyglet
module. But while it
Martin wrote:
I've looked at Pymedia but I have to admit I couldn't work it out.
Commandline might be good, but I'm really hoping someone can point me in
the right direction, as this is not my area of expertise.
Nor mine :) Just so people can help you out, can you
be more precise in your req
or implementation problem, so rather than
recoding it it might be worth looking at various approaches to
requirements capture and specification.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
likely) to find the bridge than find a chorus.. By the way, some of
the papers referenced seem confused between refrains (which form part
of the verses) and choruses (which are separate musical units).
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.write(line)
fd1.close()
The codec is doing its job, but I want to override the codepoint for this
character (plus others) to use the html entity instead (from \227 to
— in this case).
I see hints writing your own codec and updating the decoding_map, but I
could us
[EMAIL PROTECTED] wrote:
Hello people,
I'd like to have the functionality known from "real" executables that
if I drag-drop a file icon on top of the app, the app starts and has
the file's path as command-line argument.
However, this doesn't seem to work with Python scripts because Windows
sees
nts capture methodologies too, so
rapid prototyping is up there with the rest of them.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Martin wrote:
Lawrence D'Oliveiro wrote:
In message <[EMAIL PROTECTED]>, Tim
Golden
wrote:
Alternatively, you might be able to commandline control
mencoder or ffmpeg itself to do this. Not sure, but there
must be *something* among those millions of command-line
options!
Mr.SpOOn wrote:
Hi,
I know there can be only one __init__ method (at least, I think).
Often I need an object to be created in different ways, for example
passing a string as argument, or an integer, or another object. To
achieve this I put the default value of the arguments to None and then
I so
I've placed this file in both public_html and as a test in public_html/
cgi-bin directories in my local user account (I dont have root access
- its a corparate network). The file definitely has read and execute
permission (744) as have the assoicated directories.
My guess would be the permission
Thanks for replying Tim,
Here is the permissions, which I think are definitely right now:
drwxrwxrwx 8 4.0K Nov 6 13:34 public_html/
drwxrwxrwx 2 4.0K Nov 6 13:35 cgi-bin/ [inside public_html]
-rw-r-xr-x 1 117 Nov 6 11:39 test_pl.cgi* [inside cgi-bin]
-rw
Mr.SpOOn wrote:
On Thu, Nov 6, 2008 at 4:59 PM, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]>
wrote:
class A(object):
def __init__(self, a, b, c):
self.a = a
# ...
@classmethod
def from_string(cls, s):
# ...
return cls(a, b, c)
Thanks.
I think it's time to
Here is the permissions, which I think are definitely right now:
drwxrwxrwx 8 4.0K Nov 6 13:34 public_html/
drwxrwxrwx 2 4.0K Nov 6 13:35 cgi-bin/ [inside public_html]
-rw-r-xr-x 1 117 Nov 6 11:39 test_pl.cgi* [inside cgi-bin]
-rw-r-xr-x 1 168
With regard to phpinfo(), its shows the mod_cgi is loaded, but neither
mod_perl or mod_python is loaded (I read on the python.org site that
mod_python can interfere with running python through mod_python).
As for writing some perl, not too sure how to do that, but from the
information in phpinfo I
As for writing some perl, not too sure how to do that, but from the
information in phpinfo I logged onto the webserver machine and did a
"whereis python" - it came back blank! Of course doing a whereis perl
gave a non-blank answer. So this seems to be the route cause of my
trouble.
Indeed! I ma
Alas that cgi script confirmed python is not installed on the server
machine (which I had assumed it was).
Looks like game over with this avenue of trouble shooting?
On Fri, Nov 7, 2008 at 1:03 AM, Tim Chase <[EMAIL PROTECTED]> wrote:
>> As for writing some perl, not too sure how to
Tim O'Toole wrote:
Alas that cgi script confirmed python is not installed on the server
machine (which I had assumed it was).
Did you also try it with the "find" variant in addition to just
the "which" version? This would find Python if it wasn't on the
$PATH
>
> Well, if Python's not installed, the next step is _getting_ it installed --
> whether having your admin install it globally (I mean, who *doesn't* install
> python?! ;-) or you install it locally in your home directory as detailed
> at [1] where you download the source and compile from scratch
Aaron Gray wrote:
"Roy Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
Tim Golden <[EMAIL PROTECTED]> wrote:
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?
http://en.wikipedia.org/wiki/Multiple_inheritance
Thanks,
Aaron
Good grief. You can use Wikipedia but you can't use Google?
http://www.google.co.uk/search?q=python+multiple+inheritance
TJG
--
http://mail.p
David
perhaps you should include the source that you are trying to
compile... unlikely to get advice without some specifics ..
Tim
--
http://mail.python.org/mailman/listinfo/python-list
ormat, this is exactly what you see. On a FAT system, the name
"__init__.py" is stored twice: once in a short-name entry called
"__INIT__.PY", and again in a long-name entry that has the real name.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ectly.
>However, it runs but never stops.
WHAT runs but never stops? The script you attached certainly stops. Post
your exact code, and we'll help you identify your infinite loop.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
After all its "just" maintaining a state and rules for possible transitions.
I've implemented my own web framework (just like every other
Python developer ;-) and I've done my own finite-state-machines
for workflows. Web Frameworks are large, error-prone and have a
lot of nuanced details. W
Is there any Python-based fish simulation project? I've tried
searching google and pypi, but no luck. No burning need, just seems
like it'd be fun.
Without much detail on what you want to simulate...
class Fish:
LITTLE, HUGE = range(2)
def __init__(self, name, size=None):
self.name
I was googling quite some time before finding the answer to my question:
'what are the names for the encodings supported by python?'
I found the answer at http://python.active-venture.com/lib/node127.html
Now my question:
Can I find the same info in the standard python doc or query python with
greg wrote:
Larry Bates wrote:
You should post this on comp.python.windows as Mark and the other
Windows/COM gurus hang around there a lot.
I can't find any such newsgroup -- are you sure
that's what it's called?
I think that's what it's called on gmane (or some other
newsgroup gateway). Fr
care, Steven?
>
>I'm a very caring kind of guy.
That's the best answer to that question that I've seen in a long time. I'll
remember that one.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
You haven't explained why you think that you *need* a list of all
encodings that exist at a point in time. What are you going to do with
the list?
Just because I ran into this recently, the Dilbert.com site
returns a bogus Content-type header with
Content-Type: text/html; charset=utf-8lias
Content-Type: text/html; charset=utf-8lias
For Python to parse this, I had to use Python's list of known encodings
in order to determine whether I could even parse the site (for passing
it to a string's .encode() method).
You haven't said why you think you need a list of known encodings!
cks like a duck then all you
need to know is that
hasattr(foo, "quack")
and (if so)
callable(foo.quack)
If you need to know that it walks like a duck, mates like a duck and
tastes like a duck when roasted, you probably want it to really /be/ a
duck and should go back to inheritance.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Out of curiosity, is there a better way in Python to iterate through
an array, and return the index of each item that contains the bit
somewhere in its value, ie. index() doesn't work because it only
returns if the value only contains the item I'm looking for.
This works:
next = re.compi
longer
compliant with the the factory class (which doesn't support the new
"form_pun_relating_to_avoiding_a_high_hazard()" method) . Fine. If you
checked for all the members of the class that your code uses, it makes
no difference. ABCs give you a way of doing this, but in their absence
it's a long
2008/11/13 Ben Finney <[EMAIL PROTECTED]>:
> That is not duck typing.
Oh, I'm pretty sure it is. It just isn't /using/ the duck typing in
the way you'd like.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
s in advance.
Google is much faster than this newsgroup. Search for "python midi
library" and the first page gives you a number of good hits.
However, there's a lot to manipulating MIDI. What kinds of things are you
hoping to accomplish? MIDI, for example, is not a particularly
Files are fixed format no field delimiters, fields are position and
length records are terminated by newline.
Assuming no COMPUTATIONAL fields, it should be easy enough to split each line
up into fixed-length pieces, e.g. assuming a simple example
01 Sample-Record.
02 Field-1 pic XXX
Darren Mansell wrote:
Hi.
I'm relatively new to python so please be gentle :)
I'm trying to write a £ symbol to an MS SQL server using pymsssql . This
works but when selecting the data back (e.g. using SQL management
studio) the £ symbol is replaced with £ (latin capital letter A with
circumf
It doesn't matter as none of this is valid Python. In Python you have to
write
array[x1] = False
array[x2] = False
Uh...not so much...
>>> a = [1,2,3,4,5]
>>> x1, x2 = 1, 3
>>> a[x1] = a[x2] = False
>>> a
[1, False, 3, False, 5]
Works for me.
To the OP, I think rather than cluttering my
ied procedure could not be
>found.
If you feel like it, could you do a search for "pythoncom25.dll" and tell
us if more than one was found?
>I know Python 2.5 doesn't load DLL's anymore.
Where did you read that? It's not true.
>Gabriel, you mean, install pyt
midi was good for this aim,
>am I wrong?
No, you are correct. I was misled by your talk about "manipulating MIDI
files". What you're talking about is more working with live MIDI. Alia's
links should be very useful for you. Especially, I think, this one:
http://tu
dress.
You know, the well-known, well-tested, and reliable Mailman application can
do this, and it's written in Python.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Magdoll wrote:
I was trying to map various locations in a file to a dictionary. At
first I read through the file using a for-loop, but tell() gave back
weird results, so I switched to while, then it worked.
The for-loop version was something like:
d = {}
for line
I need to try calling a function 5 times. If successful, move on; If
not, print an error message, and exit the program:
success = None
for i in range(5):
#Try to fetch public IP
success = CheckIP()
if success:
break
if not success:
print "Exiting."
nswer: it does not matter. This is premature optimization. First, make
it work. Then, figure out whether it is fast enough. THEN, figure out
what's taking the most time.
I'd be very, very surprised if this was an important part of your run time.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza
It's simple character manipulation. So,
options.compress will NEVER be 1. If you did "myscript.py -c 1", then
options.compress will be "1". That's a string, not a number.
If what you really want is "present" vs "not present", then use this:
Hello i have this ip 1578568204
how socket function i can have the ip dotted-quad string?
i have try socket.inet_aton get no error but only this ^ETB FF
I've got the following program I threw together for one of my
junior developers:
from sys import argv, exit
if len(argv) <> 2:
pr
success = None
for i in range(5):
#Try to fetch public IP
success = CheckIP()
if success:
break
if not success:
print "Exiting."
sys.exit()
Though a bit of an abuse, you can use
if not any(CheckIP() for _ in range(5)):
print "Exiting"
sys.exit()
I don't se
Steven D'Aprano wrote:
On Wed, 19 Nov 2008 18:39:27 -0800, Paul Rubin wrote:
Terry Reedy <[EMAIL PROTECTED]> writes:
Do your tuple destructuring in the first statement in your body and
nothing will break.
Why get rid of a useful feature that unclutters code?
Unfortunately, the people who fi
- What are the dynamic features of Python that you use in your code?
(excluding ones that can can be done with a good static template
system).
introspection & dynamic properties are a big one. Having
functions and classes as higher-order objects that can be passed
around like any other variab
40922003 Life Fitness Products $1 (12-13-08) (CVS)
546500181141 Oust Air Sanitizer, any B1G1F up to $3.49 (1-17-09) .35
each
518000159258 Pillsbury Crescent Dinner Rolls, any .25 (2-14-09)
518000550406 Pillsbury Frozen Grands Biscuits, Cinnamon Rolls, Mini
Cinnamon Rolls, etc. .40 (2-14-09)
i
>>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)]
>>> out = qfields.join(',')
Just a quick note here to prevent the confusion of the OP...this
should be
','.join(qfields)
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
Tim Chase wrote:
>>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)]
>>> out = qfields.join(',')
Just a quick note here to prevent the confusion of the OP...this should be
','.join(qfields)
To be honest,
Joe Strout wrote:
A follow-up question here... is it really necessary to close things like
files in Python? I've been slumming it in the REALbasic community for
the last decade, where you generally don't worry about such things, as
any object that represents something "open" will automatically
Tim Golden wrote:
Tim Chase wrote:
>>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)]
>>> out = qfields.join(',')
Just a quick note here to prevent the confusion of the OP...this should be
','.join(qfields
Tim Chase wrote:
yes, the CSV module has some wonderful stuff in it, and I regularly use
it for *reading* CSV files. But for writing them, it's often just as
fast (for my purposes) to simply code my 1st post's quickie as it is to
scrounge in the docs/docstrings to remember how to l
Barak, Ron wrote:
That's it.
Once I changed my class header to:
$ cat -n metaclass_test01.py
1 #!/usr/bin/env python
2
3 import sys
4 import wx
5 import CopyAndPaste
6
7 class ListControl(wx.Frame, CopyAndPaste.CopyAndPaste):
I'm getting no more Metaclas
On Mon, 2009-02-23 at 09:12 -0800, Phillip B Oldham wrote:
> I've got a python script running as a daemon (using someone else's
> daemon module). It runs fine for a while, but will occasionally balk
> and die. Since its running in the background, I'm getting no error
> from it.
>
> What's the best
I stumbled across this oddity and was hoping folks on the list
might be able to provide a little understanding:
# swap scalars
>>> x,y = 1,2
>>> x,y = y,x
>>> x,y
(2, 1)
# swap lists
>>> a,b = [1,2,3],[4,5,6]
>>> a,b = b,a
>>> a,b
([4, 5, 6], [1, 2, 3])
# swap list contents...not so much...
>>
On Mon, 2009-02-23 at 20:50 +, tav wrote:
> I'm keen to know your experiences even if you don't manage to write to
> the filesystem -- and especially if you do!
>
er sorry, but:
from safelite import FileReader
reload(__builtins__)
f = open("/home/tim/nano.save"
I would like to read a text file of numbers produced by a data
acquisition system into three vectors of doubles. The contents of the
file are:
+0.000e+0 +2.7645134e+1 +2.7745625e+1
+0.4100041e-1 +2.7637787e+1 +2.7731047e+1
+0.0820008e+0 +2.7645134e+1 +2.7750483e+1
...
or
+0.
time_vec, ch1_vec, and_so_on = zip(*(
map(float, line.split())
for line in file('in.txt')))
If this isn't homework, there are some less terse versions which
are a bit easier on the eyes and less like some love-child
between Perl and Python.
haha, no this isn't homework. I'm a mecha
On Mon, 2009-02-23 at 13:20 -0800, Paul McNett wrote:
> tav wrote:
> > I'm keen to know your experiences even if you don't manage to write to
> > the filesystem -- and especially if you do!
>
> Does it count when it breaks some standard libs that aren't even trying to
> write to
> the filesystem
ngs in the interpreter it includes escape
characters, when it is printed though the output is straight to stdout
and isn't escaped.
Hope that helps,
Tim Wintle
--
http://mail.python.org/mailman/listinfo/python-list
; they would get much the same answer for the first question
(immutability is handled differently, I think, but it's there) but a
totally different answer to the second.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
p it simple, the way you have been so far.
4. If you want to be a wise guy, ask your tutor why he/she got you to
convert the whole phrase to upper case, wasting a whole pile of
character conversion operations under the hood, because it's only the
acronym that needs to be converted :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
son will
> ask an enlightening question; but, sometimes they just make
> unhelpfull wisecracks. It's a tough choice.
I used to use a baby, which avoids the embarrassment but can be just
as problematic to order on the internet.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Chris Rebert wrote:
On Wed, Feb 25, 2009 at 1:16 AM, Helmut Jarausch
wrote:
Sorry if this is too simple but I couldn't find.
I vaguely remember there is a means to assign a variable length tuple
and catch the 'rest' like
S="a,b,c,d"
(A,B,) = S.split(',')
In Python 3.0 (IIRC):
A, B, *rest
Thorsten Kampe wrote:
* Gabriel Genellina (Wed, 25 Feb 2009 14:00:16 -0200)
En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
escribió:
* Roy H. Han (Wed, 25 Feb 2009 10:17:22 -0500)
Thanks, RDM, for stating the right approach.
Thanks, Steve, for teaching by example.
I wonder why the email
The Python's regex different from Perl's ,I want know what's the
different?
Easy:
bash$ diff <(lynx -dump http://perldoc.perl.org/perlre.html)
<(lynx -dump http://docs.python.org/library/re.html)
Had you tried the great Google in the sky, you might have found
such pages as:
http://mail
On Thu, 2009-02-26 at 04:55 -0800, [email protected] wrote:
> Hello all,
>I've a strange requirement where I need to run a python
> script just as we run an exe (by double clicking through windows
> explorer or by typing the script name at command prompt).
I don't know how windows
rations and so is
likely to be faster still. I think there are a couple that Python
works well with, but I've never looked into that -- others will no
doubt be along with recommendations now I've raised the subject.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
relational database will be optimised to do these operations and so is
likely to be faster still. I think there are a couple that Python
works well with, but I've never looked into that -- others will no
doubt be along with recommendations now I've raised the subject.
batteries-included support
On Thu, 2009-02-26 at 06:00 -0800, [email protected] wrote:
> Thanks for the reply,
>Being a newbie to python, I am finding it difficult to
> understand the logic even after thorough reading of comments. Is there
> any simpler way where I can just run a python script from the main
Thomas Guettler wrote:
Hi,
this is a bit off topic.
In our company we have several SVN repositories.
According to [1] Trac by default only handles one
repository.
Of course Trac links like changeset [1234] would not work anymore.
You would need [repro/1234] or something like this.
I think ma
ot;, []
> "junkpkg.f1", ['aaa']
> "junkpkg.f1", ['aaa','bbb']
> "junkpkg.f1", ['aaa','bbb','ccc']
> "junkpkg.f1", ['aaa','with,comma']
>
quick and dirty
for s in string_list:
if "(" in s and s[-1] == ")":
parts = s.split("(")
fn, args = s[0],s[1][:-1].split(",")
Tim Wintle
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2009-02-26 at 21:39 +, Tim Wintle wrote:
> On Thu, 2009-02-26 at 21:29 +, [email protected] wrote:
> > "junkpkg.f1", ['aaa','with,comma']
oops - missed this one, ignore my last reply.
--
http://mail.python.org/mailman/listinfo/python-list
Loretta SALINO wrote:
Tim Golden wrote:
Thomas Guettler wrote:
Hi,
this is a bit off topic.
In our company we have several SVN repositories.
According to [1] Trac by default only handles one
repository.
Of course Trac links like changeset [1234] would not work anymore.
You would need
Giampaolo Rodola' wrote:
It seems to work fine on posix but we still got problems on Windows
where it seems that waiting for pid to show up in the system process
list is not enough for considering the process effectively
initialized.
Anyway, I think it's a problem in our code.
Thanks for your hel
ords,
and it won't all fit into memory. So your observation is pertinent.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
How big of a list are we talking about? If the list is so big that the
entire list cannot fit in memory at the same time this approach wont
work e.g. removing duplicate lines from a very large file.
We were told in the original question: more than 15 million records,
and it won't all fit into me
hashes are not collisions but
genuine duplicates you can throw them away as soon as they're checked,
so with some clever buffering you can stop them from clogging up the
buffer. The worst case is if there are a lot of genuine collisions, in
which case it's probably not a very good hash.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
I am interested in writing an application that functions like a Unix
or Linux top in the way it displays data.
It should be command-line based but dynamically refreshing.
You might look at the sourcecode for "iotop"[1] which would make
a good example (it's a "top"-like program written in Python
bryan rasmussen wrote:
Maybe there's a more specific list I should ask this question on but I
don't know what it is. I'm using Tim Golden's wmi stuff, and putting
my output into an XML document.
I have the following bit of code
[.. snip ...]
At the end of that thhe
>list after func. Any further explanation you care to provide will be
>greatly appreciated!
Nope. Under pass-by-value semantics, "func" could dance on the list to its
heart's content, and "foo" would not be changed.
--
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
the shares that the machine
exposes. Second, you STILL have a backslash problem.
If that machine has a network share called "files", you could say
os.walk( '192.168.0.45\\files' )
or
os.walk( r'\\192.168.0.45\files' )
>Thats it is my main problem do i
hon (and probably in Ruby too) is to get
the code working, then if there are any *measured* bottlenecks to
optimise them in C++. That means that in practice there won't be a
perceptible speed difference for the user.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Its just http, I am using pylons. Right now I am doing tht
with extra parameter. But even if I get to know about the
platform of the client machine, I need to use the other
properties of the corresponding machine's os module.
HTTP doesn't require the client browser to send any such
information
I tried this code:
old_dict = {'xyz':['a','b','c'],'baz':['c','d']}
new_dict = {}
for dkey, vallist in old_dict.iteritems():
for val in vallist:
if val in new_dict:
theset = new_dict[val]
theset.add(dkey)
I want to parse a file and do this :
A 74.335 -86.474-129.317 1.00 54.12
then add space between -86.474 and -129.317. I can get the file with
A 74.335 -86.474 -129.317 1.00 54.12
How can I do this? Thanks.
Is there something wrong with the following?
for line in file('in.txt')
efines it)
Exceptions are just classes, so you'll have to import and reference it
like you'd reference any other class you import.
Hope that helps
Tim Wintle
--
http://mail.python.org/mailman/listinfo/python-list
Phoe6 wrote:
This is a windows services question. The following script which is a
windows service was supposed to something ( download wallpaper and set
the desktopwallpaper) at 16:45 my time here. The service is running,
but the supposed action did not take place. Does anyone who is aware
of win
5201 - 5300 of 7682 matches
Mail list logo