ribute "Smart" is not
>available
>Error MEssage:
>AttributeError: 'instance at 0x30216960>' object has no attribute 'Smart'
Smart is part of IITUserPlaylist, not IITPlaylist. You need to call
curPlaylist.QueryInterface to get the IITUserPlaylist, but that
ike os.listdir do?
Martin gave you the real answer, but you should realize that your analysis
of the behavior is faulty. In EACH case, glob.glob has returned all of the
names that exactly match your pattern. It's not about absolute or
relative. For example, if you do
glob.glob( '.
pt last in 1998. The current installer is
as painless as most open source installers are.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
h have our own favorite brand, and
nothing you say will convince me to change mine. Editor, that is. I do
occasionally change my underwear.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Bjorn Borud <[EMAIL PROTECTED]> wrote:
>
>bah, UNIX is not user hostile; it is just selective about its
>friends.
Right. My favorite Unix quote is from the same source (Dennis Ritchie):
Unix is the answer. You just have to phrase the
question very carefully.
--
Tim
e with the Win32 API and MFC, pywin32 includes a
relatively thin wrapper around MFC. It's quite possible to write GUI apps
using it, and there are several good examples.
I'm not sure that I'd prefer it to wxPython, however.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
i2c_fd = i2c_open()
if i2c_fd < 0:
print "i2c open error"
return 1
But, of course, that's not enough either; i2c_fd is a local variable in
THIS function as well. You should change ALL of the functions so that they
accept an fd as the first parameter, and then pass i2c_fd into the
functions here.
Alternatively, you could create a wrapper class to hold the fd and make the
function methods on that class.
>while "azz":
>i2c_start ()
I'm curious. What do you think "while" statement is doing? The answer is
that it is an infinite loop; the string "azz" will always be true, so the
while statement will always loop. I can't guess what you really wanted
here.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ringFromGUID to make it
printable.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
n would be to reduce the
priority of your archiving process. Your operating system is far better
equipped to share the CPU than you are.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
7;, 'tb','pb', 'eb', 'zb', 'yb']
>[int(log)]
>)
I have a couple of picky comments. The abbreviation for "bytes" should be
"B"; small "b" is bits by convention. All of the prefixes above "k"
Captain Paralytic <[EMAIL PROTECTED]> wrote:
>On 11 Jun, 07:37, Tim Roberts <[EMAIL PROTECTED]> wrote:
>| Not in standard SQL. MySQL supports a REPLACE extension that does
>| an UPDATE if the key already exists, and an INSERT if it does not.
>| There is also an extens
stance.
>If I do: serialport.read(4)
>I would get 8 bytes,
No. You would get 4 bytes. Do you see documentation to the contrary?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
UPDATE xxx" that might do what you want.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
R.
Seriously, what on earth did you expect this to do? Its whole purpose is
send sounds to the sound driver. If there is no sound driver, what was it
supposed to do with the audio data?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
y make the parser more complicated, because it
could no longer be context-insensitive. For example, if I had identifiers
called "mine" and "not mine", how would it parse this:
if not mine:
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Frank Swarbrick <[EMAIL PROTECTED]> wrote:
>
>Then you'd really love COBOL!
>
>:-)
>
>Frank
>COBOL programmer for 10+ years
Hey, did you hear about the object-oriented version of COBOL? They call it
"ADD ONE TO COBOL".
--
Tim Roberts, [EMAIL PROTECTE
a false value in a Boolean context, but they are not
all the same.
As a general rule, I've found code like "if x == False" to be a bad idea in
ANY language.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
RAM +1gb virtual store n hangs
>cant think of an effective way to implement tree in memory(i can
>compact it on disk by writing just the index no..along with the record
>from which tree in memory can be reconstructed, but i have to
>implement tree as previous to implement random a
Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
>I use tuples simply because of their mellifluous appellation.
+1 QOTW.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
nicode: need string or buffer, file found
>Any solutions.
I don't see how the error could possibly make it any clearer. "open"
expects a file name. "output_file" is not a file NAME. It is a file
OBJECT. If you want to reopen that file, then p
IronPython
will give me the opportunity to really dig into WPF without having to drink
the C# kool-aid.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
, the timer interrupt would have
to fire every 10us. The overhead of handling the timer interrupt and
rescheduling that often is quite significant.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ievable but true. Although we were all smart enough to handle the
transition from \windows\system in Win16 to \windows\system32 in Win32,
Microsoft apparently believes programmers have all grown too stupid to
handle the transition to Win64 on our own.
Some registry references are also silen
For me, templating (Cheetah is my favorite,
www.cheetahtemplate.org) makes more sense than building the page bit by bit
in Python code, and the separation of function and presentation makes
things easier to maintain.
In my opinion, of course. ;)
--
Tim Roberts, [EMAIL PROTECTED]
Providenza &a
ich is that case won't be hard.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
g the
>> previous drive letter, if there was one) are thrown away...
>
>Yes, but that still doesn't answer my question as to why os.path.join
>works that way. I understand that that is how it is written, but why?
It's behavior is exactly the same as if you did a series of
f sequence.sort became much, much worse when a key
function was supplied.
I've tended to favor the "Schwarzian transform" (decorate-sort-undecorate)
because of that.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
e several very good Unix-derived shells available for Windows.
UnxUtils includes a bash and a zsh.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
the
resources.
Except for specific needs in some drivers, the use of CPU and thread
affinity is virtually never a good idea.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
but if you had used
"testdata" as the filename, it would have failed.
You should use one of these alternatives:
conn = sqlite3.connect('.\\optiondata')
conn = sqlite3.connect(r'.\optiondata')
conn = sqlite3.connect('./optiondata')
conn = sqlite3.connect(
as long as the textarea input has no spaces.
>
>it doest work because the "space" character isnt interpreted
>correctly, you need to change the space characters too
What??? Did you even read the problem description?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
download files to the client browser, but the user will have
to be involved to tell the browser where to store the incoming file.
Doing anything else would be a security hole.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
he
device to send before you can talk to it.
On the other hand, as someone else pointed out, many types of USB devices
fall into standard device classes, and the operating system supplies
drivers for those classes. If your GPS device is in the communication
class, you might be able to pretend
duced in FORTRAN 77.
FORTRAN 66 didn't do this.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ommands fetch the headers.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
I
>"cast" the string into an interger?
When I see a typo once, I figure it's a typo, but when I see it three
times, I figure it is a misunderstanding. The word is "integer", not
"interger".
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
avac) is very different from
the use of "compiled" in the context of running gcc. Once upon a time,
Basic enthusiasts would have used the word "tokenized" to describe .pyc
files.
A .pyc file is, in fact, interpreted by an intermediate language
interpreter. I don't u
"drochom" <[EMAIL PROTECTED]> wrote:
>
>how would u improve this code?
I would add at least one comment...
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
payload = p.chassis_id_tlv
> ether = scapy.Ether(dst="01:02:03:04:05:06")
> fullpayload = ether + payload
> sendp(fullpayload)
Now, at the end, add:
if __name__=="__main__":
main()
That should do it.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ot;, "credits" or "license" for more information.
>>> import os
>>> os.environ['PATH']
'C:\\WINDOWS\\system32;c:\\WINDOWS;c:\\WINDOWS\\System32\\Wbem;c:\\bin;e:\\bin'
>>>
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
guage has identifiers
>such as __device__, __global__, __shared__, etc. Is it a coincidence?
>Probably it is. :)
Well, identifiers starting with an underline are reserved for
implementation use in ISO standard C++, so the chicken and egg question is
an interesting one..
--
Tim Roberts,
s Driver (*.mdb)};DBQ=x.mdb" )
cmd = win32com.client.Dispatch('ADODB.Command')
cmd.ActiveConnection = conn
cmd.CommandText = "SELECT firstname,lastname FROM users;"
rs = cmd.Execute()[0]
while not rs.EOF:
# Use elements of rs
rs.MoveNext()
There are samples on
ating different GUIDs every time you register the thing. If
so, you need to unregister the old version before you register a new one.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
>Here is a prove:-
>>>> import win32com
>
>Traceback (most recent call last):
> File "", line 1, in
>import win32com
>ImportError: No module named win32com
>>>>
>
>you try in your computer
It works just fine in my computer, because I
>
>http://docs.python.org/ref/Booleans.html
>
>In 'expression' rule - what does 'if', 'else' mean? I guess 'if' and
>'else' must be keywords, not non-terminals.
Yes, those refer to literal keywords.
I'd judge both of those as erro
27;] = 'hello'
>py> os.popen('echo $asdfasdf').read()
>'hello\n'
For completeness, let us anticipate the followup question and point out
that "permanent" here means "for this process and any processes that it
spawns". Once the Python session ends, the "asdfasdf" will be lost.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
"Lad" <[EMAIL PROTECTED]> wrote:
>
>What is a good way to read binary data from HUGE file and write it
>to another file?
How huge? I regularly process 100-megabyte MPEG files in Python, both by
reading the whole thing in as a string, and by using "mmap" t
ice. You either need to switch to a one of the web
frameworks (like CherryPy or Django or WebWare or one of the hundreds of
others), or move to PHP.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
peed of light actually was in
furlongs per fortnight.
Now I need to figure out how to work that into a cocktail party
conversation. "Hey, the deficit isn't the only thing that is approaching
1.8 trillion..."
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
utation twice, once to
compute the minimum, once to compute the maximum. When you're done, you
can be confident that the true answer lies within the interval.
For people just getting into it, it can be shocking to realize just how
wide the interval can become after some computations.
--
Tim R
ngs\User\My Documents\My Python files\wxDemos'. And AnalogClock.py
>does work when residing in that directory.
wxDemos contains the demos. The "wx" module lives in
site-packages\wx-2.8-msw-ansi. Did you leave that in?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
n by "used during a lot of trials and errors"? sys.path is
recreated from scratch every time Python starts. It doesn't accumulate
over time, other than from new packages that you install.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
rocessing needs, that might be sufficient.
>
>I don't think it quite fits what the OP is asking for. SVG defines some non-XML
>structure for some of its contents. For example:
>
>
Why is that non-XML?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
he size and speed using WMI (assuming you
are using Windows). For more detailed, you will have to call into a C
routine, and maybe even resort to looking up the cpuid info.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
that is setuid root that calls your script for
you.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
= unicode(content,"gbk")
>print content
>content.close()
Once you fix the lambda, as Felipe described, there's another issue here.
You are telling the unicode function that the string you're passing it is
an 8-bit string encoded as gbk. How do you know that? In your s
results.
Is it a USB printer? Remember that "prn" and "lpt1" refer to the first
parallel port, not necessarily the first printer.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
n" will not go anywhere.
Typing to "prn" is a dreadful way to do printing on Windows.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
icality, I try never to use them, because they might not be
available in my next database.
After all, you should have a pretty good idea at any given time whether
your database and table already exist.
I do occasionally allow myself a "DROP TABLE IF NOT EXISTS", which then
allows th
"Ben" <[EMAIL PROTECTED]> wrote:
>
>Great - that worked.Thanks!
>Is that a general method in linux you can always use to redirect
>standard output to a file?
Works in Windows, too.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.py
erPassword:
print "Server warning: No password has been set"
pwd1 = getpass("New Password: ")
pwd2 = getpass("Confirm Password: ")
while pwd1 != pwd2:
print "Passwords did not match"
pwd1 = getpass("New Password: ")
pwd2 = getpass("Confirm Password: ")
open(FN, 'w').write(pwd2+'\n')
serverPassword = open(FN, 'r').readline()
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
will be suboptimal.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
a Windows system, using stat,
the definition is "has an extension that is in PATHEXT". Nothing more,
nothing less. In both cases, the contents of the file are irrelevant.
Now, when you, as a human being, try answer the question "is this file
executable", you would use more s
tarted
>with, there are a few gotchas. You're above snippet should be:
>
>class HelloWorld(object):
> def index(self):
> return "Hello World"
> index.exposed = True
Many people find it more readable to write that as:
class HelloWorld(object):
@
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>It seems that an array acts like an list very much, except it doesn't
>have a method sort.
What do you mean by "array"? There is no such beast in the Python
language. Do you mean the library module &q
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>On 16 dic, 04:47, Tim Roberts <[EMAIL PROTECTED]> wrote:
>> > os.stat(selected)[ST_MODE] & (S_IXUSR|S_IXGRP|S_IXOTH
>
>>This will tell you that "x.exe" is executable, even if "x.exe&qu
because this is a sort
>of fluid thing in Windows (as you point out).
This will tell you that "x.exe" is executable, even if "x.exe" contains
nothing but zeros.
On the other hand, I'm not convinced that any other solution is better.
--
Tim Roberts, [EMAIL PROTECTED]
Provi
choices=C_CHOICES)
> homezip = Q_Zip("Your zip code?", "homezip", required=True, )
> happy = Q_Bool("Are you happy?", "happy", default=False)
> birthday = Q_Date("Your Birthday:", "birthda
Soni Bergraj <[EMAIL PROTECTED]> wrote:
>
>I was just wondering if there is a more convenient way of doing a Http
>HEAD requests then the socket module?
>
>Any ideas?
The standard "httplib" module can do that in a half-dozen lines of code.
--
Tim Robert
but it also gives
you some great real-world examples of virtually every function.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
font depending on your operating system and locale. 74
(0x4A) indicates a vector TrueType font of the "script" family, which is
bizarre.
May I suggest that you set your own default font before beginning?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
sure, but I doubt that it is
CaptureMouse doing it, and I know the SetCapture API (which it eventually
calls) does not. Is it possible that your clicking caused some part of the
app to become unhidden, or caused some button to change state?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boek
ust passes it to sendmail.
Ummm, I'm rather confused as to why you don't just have sendmail do this.
After all, that is its primary function: to run as a daemon, listening on
port 25, and delivering incoming messages to local mailboxes.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & B
age. Then you can use your Python web site
to create the appropriate HTML.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
as part of a web site. Google is your friend.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
something that
will do most of the job, probably in PHP. Is your website already using
Python?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
nd the world, and much longer before
people actually download the message to their local reader, then an equal
amount of time for replies to get back to you.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
s like a compiled
program. py2exe is one example.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
irth Defects; Toxic ChemicalsAntibiotics,
>AnimalsAgricultural Subsidies, Global TradeAgricultural
>SubsidiesBiodiversityCitizen ActivismCommunity...
What do you want out of this? It looks like there are several levels
crammed together here. At first blush, it looks like topics separat
?
It has been my experience that virtually every use of the "is" operator
(except "is None") is wrong.
Now, I fully understand that there are perfectly valid uses for "is", and
the standard library contains a few, but for the non-guru casual Python
programmer, I
ur at one time instant
Well, as long as we're being pedantic, surely that should read "only one
thing can occur at any time instant..."
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ere is a standard "print" dialog for Windows that shows you the
familiar dialog, with the list of printers and all of the options. In
wxPython, I believe it is called wx.PrintDialog.
In Pywin32, win32print.EnumPrinters can give you the list of available
printers.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
or is it that I will have to use the wxpython library asuming that
>there is a print dialog which can open up the list of printers?
Even if you got the list of printers, what would you do with it?
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ngled newsreader". I
was evaluating it in 1999 as an alternative to Agent, and it was not new
even then.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
OT the only way of using Python to create a
web site. CGI by itself is quite practical, unless you are anticipating
100s of hits per minute. Even if it isn't, something like CherryPy used
through a proxy gives you the benefit of a long-running process with the
convenience of Apache.
--
Ti
;
>How do I force urllib2 to use HTTP v1.1?
Are you passing httplib.HTTPConnection as the connection handler? If you
use httplib.HTTP instead, it should create a 1.0 request.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ward slashes or back, and have done
so clear back to Windows 3.0. However, the Windows command shells do not.
That's what you're seeing here.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
t is rather unlikely that your low-order bit
changes will survive the compression process.
There is lots and lots of research on this subject. It's called
"steganography" and "digital watermarking". Google is your friend.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza &
t wouldn't be rocket science to extend Python's mmap to allow
that.
>There are in any case room for improving Python's mmap object.
Here we agree.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Sun, 22 Oct 2006 01:55:53 GMT, Tim Roberts <[EMAIL PROTECTED]> declaimed
>the following in comp.lang.python:
>
>> Having learned that lesson the hard way, I now keep a directory with zips
>> and tarballs for all of
line,
Are you running this on Unix or on DOS?
On Unix, you can do:
for line in open(options.filename).readlines():
print line.rstrip()
Perhaps quicker is:
sys.stdout.write( open(options.filename).read().replace('\r\n','\n') )
--
Tim Roberts, [EMAIL PROTECTED]
Pro
hat will install all of them. This also makes it
trivially easy to install my environment on a different computer.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ks for pointing me to the path module, was
>interesting.
Umm, may I point out that you don't NEED the "os.path.exists" call, because
you are already being HANDED a list of all the filenames in that directory?
You could "dirtest" with this much faster routinee:
def di
"hiroc" <[EMAIL PROTECTED]> wrote:
>s.send("abc") # send test string
>
>I need to send hex:"10 06 00 0f 02 bc d1" instead of "abc"
>
>hoW?
One ugly way is
s.send( "\x10\x06\x00\x0f\x02\xbc\xd1" )
--
- Tim Roberts, [EMAIL
rrored on a web site somewhere, this is a Usenet
newsgroup. It is impossible to "close" a thread. The concept simply does
not exist.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
lt
>found, you can get one.
The OP should be aware, however, that a regular expression which matches
the complete specification in RFC-822 and RFC-2822 is approximately 7,000
characters long.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
;very important thing" in this script is the "im.resize", which
smoothly stretches the image so that it has 2.5 times as many pixels as
before. It is that stretching which allows you to change the DPI in the
header, and yet still have it print at the same size.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
ntel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a='hello'
>>> locals()[a] = 1234
>>> hello
1234
>>>
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
to continue to print as 3" x 3",
but to have three times as many pixels in each direction? That means you
have to increase the number of pixels to 900x900. That's exactly what the
code above is doing. The image file will be 9 times larger.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
;> use it with care)
>>
>Hello Fredrik,
>Thank you for your reply.
>How can be HTTP_X_FORWARDED_FOR easily spoofed? I thought that IP
>address is not possible change.
No, but HTTP headers are just text. A client can put whatever it wants in
them.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
601 - 700 of 968 matches
Mail list logo