On Jan 9, 2:14 pm, Marc 'BlackJack' Rintsch wrote:
> On Fri, 09 Jan 2009 15:34:17 +, MRAB wrote:
> > Marc 'BlackJack' Rintsch wrote:
>
> >> def iter_max_values(blocks, block_count):
> >> for i, block in enumerate(blocks):
> >> histogram = defaultdict(int)
> >> for byte in b
En Fri, 09 Jan 2009 03:04:58 -0200, akineko escribió:
(2) test program with multiprocessing
Both processes receives SIGINT.
OS apparently distributes the SIGINT event to processes associated
with the terminal.
Yes, to avoid that, the child process has to detach itself from the
terminal. I'd
Hi!
I downloaded W7 two days ago, directly on MSDN (Microsoft), and not on a
bizarre, unknown site, and doubtful.
Python 2.6 run OK.
But the problem (well known) with Python 2.6.1 is always present.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 10, 4:21 am, Silfheed wrote:
> So I'm in the current testing situation:
>
> sender.py:
> -
> def sendEmails():
> return "I send emails"
>
> alerter.py:
> -
> from sender import *
> def DoStuffAndSendEmails():
> doStuff()
> sendEmails()
>
> I'm trying to write
On Sat, 10 Jan 2009 03:06:03 -, Andrew Robert
wrote:
The usual scenario is that a user will leave a PDF open and then go home
for the evening. They are simply viewing and not modifying the file.
When the XCOPY executes, it signals a failure and subsequent scheduler
job abend.
What
On Jan 10, 2:55 pm, Benjamin wrote:
> On Jan 8, 11:35 pm, John Machin wrote:
> > > Actually, don't bother now; I've fixed it up in the trunk.
>
> > Would you mind giving a pointer to where or what your fix is? The
> > reason for asking is that Thorsten's suggestion is ambiguous: warn
> > about s
On Jan 8, 11:35 pm, John Machin wrote:
> On Jan 9, 1:56 pm, Benjamin wrote:
>
> > On Jan 8, 4:21 pm, Thorsten Kampe wrote:
>
> > > * Terry Reedy (Thu, 08 Jan 2009 17:04:04 -0500)
> > > > Since you are, I believe, at least the second person to report being bit
> > > > by this confusion, please op
Silfheed wrote in news:c73b304b-f601-4bb5-89c1-3ee667eeb7d9
@l37g2000vba.googlegroups.com in comp.lang.python:
> So I'm in the current testing situation:
>
> sender.py:
> -
> def sendEmails():
>return "I send emails"
>
> alerter.py:
> -
> from sender import *
> def Do
On Jan 9, 6:39 pm, Ryan Stutsman wrote:
> I've added a field to all PyObjects in the interpreter which is of type
> PyObject*. Most of the time this pointer is NULL but occassionally I
> want to track some information in there. The problem I'm running into
> is that I can add a reference to a Py
Silfheed wrote:
So I'm in the current testing situation:
sender.py:
-
def sendEmails():
return "I send emails"
alerter.py:
-
from sender import *
def DoStuffAndSendEmails():
doStuff()
sendEmails()
I'm trying to write a test fn that will test DoStuffAndSendEmails(
So I'm in the current testing situation:
sender.py:
-
def sendEmails():
return "I send emails"
alerter.py:
-
from sender import *
def DoStuffAndSendEmails():
doStuff()
sendEmails()
I'm trying to write a test fn that will test DoStuffAndSendEmails()
(as well as it's
Rhodri James wrote:
> On Sat, 10 Jan 2009 00:21:27 -, wrote:
>> IIRC, Someone posted here that his experience was
>> that 12-year old kids (presumably without programming
>> experience) had no problem with Python and references
>> when described as "names given to an object". (From
>> memory,
On Fri, Jan 9, 2009 at 3:37 PM, Frank Wierzbicki wrote:
> On behalf of the Jython development team, I'm pleased to announce that
> Jython 2.5b1 is available for download:
> http://downloads.sourceforge.net/jython/jython_installer-2.5b1.jar.
> See the installation instructions here:
> http://www.jy
MRAB wrote:
Andrew Robert wrote:
Hi Everyone,
We have a process that does a copy of a share from one location to
another.
This usually works fine but can occasionally bomb if a file is opened
by a user somewhere.
Is there a way to code detection of open files and force a close?
The files in
Andrew Robert wrote:
Hi Everyone,
We have a process that does a copy of a share from one location to
another.
This usually works fine but can occasionally bomb if a file is opened
by a user somewhere.
Is there a way to code detection of open files and force a close?
The files in question are
Mark Wooding wrote:
> ru...@yahoo.com wrote:
>
>> If one accepts that there are a "lot" of people who post in here that
>> clearly are surprised by Python's assignment semantics,
>
> But one should not accept that. One might accept that there are many
> who post who claim that they are surprised
Steven D'Aprano wrote:
> Er, perhaps you missed that I was replying to Joe Strout.
Yes, evidently. My apologies for the mix up!
-- [mdw], who obviously should put the keyboard down now.
--
http://mail.python.org/mailman/listinfo/python-list
Joe Strout wrote:
> No, actually, that was me. rurpy's list was something like C, FORTRAN,
> Perl, and VBA.
My mistake -- I failed to read the quoting properly. Apologies to all.
We still dealt with C.
Fortran (to give it its modern spelling) has a similar data model to C,
but passes argume
On Sat, 10 Jan 2009 00:21:27 -, wrote:
Joe Strout wrote:
ru...@yahoo.com wrote:
[snip]
Pointers are passed and assigned by value, just as
other types (disputedly except arrays) are.
One can then use that pointer to manually effect
pass-(the-value-pointed-to)-by-reference, or sharing,
e
Hi Everyone,
We have a process that does a copy of a share from one location to another.
This usually works fine but can occasionally bomb if a file is opened by
a user somewhere.
Is there a way to code detection of open files and force a close?
The files in question are typically PDF files
p. wrote:
i'm using urllib2 in python 2.4
wondering how people typically deal with the case in which a download
is too slow. setting the socket timeout only covers those cases where
there is no response in the socket for whatever the timeout period is.
what if, however, i'm getting bits back but
En Sat, 10 Jan 2009 00:07:15 -0200, p. escribió:
i'm using urllib2 in python 2.4
wondering how people typically deal with the case in which a download
is too slow. setting the socket timeout only covers those cases where
there is no response in the socket for whatever the timeout period is.
wh
i'm using urllib2 in python 2.4
wondering how people typically deal with the case in which a download
is too slow. setting the socket timeout only covers those cases where
there is no response in the socket for whatever the timeout period is.
what if, however, i'm getting bits back but want simply
Hi! :)
>Sorry, there were a few line wrap-arounds in the diff file due to long
>lines but the changes for the four significant lines should be easy to
>do manually.
Hadn't done that before but I found a ressource how to read that
syntax.
x86_64 would be enough. i test that again. Thank you. :)
-
In article
,
googler.1.webmas...@spamgourmet.com wrote:
> May the diff file is wrong? on my system it doesn't work.
> Well, set the -enable-universalsdk= path occurs that error.
Sorry, there were a few line wrap-arounds in the diff file due to long
lines but the changes for the four significant
On Jan 9, 9:56 pm, mk wrote:
> The factor of 30 indeed does not seem right -- I have done somewhat
> similar stuff (calculating Levenshtein distance [edit distance] on words
> read from very large files), coded the same algorithm in pure Python and
> C++ (using linked lists in C++) and Python ver
On 2009-01-10, Joe Strout wrote:
> Mark Wooding wrote:
>
>> As an aside, I don't notice anywhere near as much confusion in Lisp and
>> Scheme groups, which might be surprising since Lisp and Scheme have
>> precisely the same data model, argument passing convention, and
>> assignment semantics, as
On Fri, 09 Jan 2009 21:03:39 +, Mark Wooding wrote:
> Steven D'Aprano wrote:
>
>> Python doesn't do the same thing as C. It actually passes the same
>> value to the function, without copying it.
>>
>> Why oh why do you keep insisting that Python is no different from C?
>
> I'm beginning to
Does anyone know a way to remove the 'FFFD' character with python?
You can see the browser output I'm dealing with here:
http://webcomm.webfactional.com/htdocs/fffd.JPG
I deleted a big chunk out of the middle of that JPG to protect
sensitive data.
I don't know what the character encoding of this
hi, thanks for your help.
May the diff file is wrong? on my system it doesn't work.
Well, set the -enable-universalsdk= path occurs that error.
Hmm. that is really a disaster, isn't it :( hm.
--
http://mail.python.org/mailman/listinfo/python-list
I've added a field to all PyObjects in the interpreter which is of type
PyObject*. Most of the time this pointer is NULL but occassionally I
want to track some information in there. The problem I'm running into
is that I can add a reference to a PyObject inside any of my PyObjects,
but it seems
On Jan 10, 9:52 am, webcomm wrote:
> On Jan 9, 5:21 pm, John Machin wrote:
>
> > Thanks. Would you mind spending a few minutes more on this so that we
> > can see if it's a problem that can be fixed easily, like the one that
> > Chris Mellon reported?
>
> Don't mind at all. I'm now working with
bruce wrote:
> toying with an idea.. trying to figure out a good/best way to spawn
> multiple python scripts from a parent python app. i'm trying to figure
> out how to determine when all child apps have completed, or to
> possibly determine if any of the child processes have died/halted..
You d
On Fri, Jan 9, 2009 at 7:11 PM, Joe Strout wrote:
> Mark Wooding wrote:
>
>
> .NET isn't a language at all:
>> rather, it's a virtual machine, runtime system, class library and family
>> of languages each of which may have idiosyncratic semantics.
>>
>
> But they don't, AFAIK -- they all have th
Joe Strout wrote:
> ru...@yahoo.com wrote:
>
>>> I never claimed that you *couldn't* have copy semantics in C; you can do
>>> almost anything you want in C (or C++). But the *normal* usage of an
>>> array is via a pointer, in which case the semantics are exactly the same
>>> as in Python, Java, RE
Mark Wooding wrote:
As an aside, I don't notice anywhere near as much confusion in Lisp and
Scheme groups, which might be surprising since Lisp and Scheme have
precisely the same data model, argument passing convention, and
assignment semantics, as Python has.
Nor is there anywhere near as muc
On Jan 9, 4:07 pm, "bruce" wrote:
> thanks jason
>
> or i could also, simply iterate through a loop of the names of the "child
> processes" i want to spawn, using the names in the subprocess.popen, and
> then proceeding with the rest of your example..
>
> question though... if i have a child a
On Jan 10, 6:58 am, Carl Banks wrote:
> On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote:
>
>
>
>
>
> > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote:
> > > Aivar Annamaa wrote:
> > > >> As was recently pointed out in a nearly identical thread, the -3
> > > >> switch only points out problems tha
thanks jason
or i could also, simply iterate through a loop of the names of the "child
processes" i want to spawn, using the names in the subprocess.popen, and
then proceeding with the rest of your example..
question though... if i have a child app that's hanging.. how do i kill it.
or is th
> It's almost like shared libraries are disallowed from the module
> library Zip format.
Correct. That's a limitation of the Windows operating system, which can
load DLLs only from plain, regular files. Python can load .py files from
zip files because it implements the loading itself. For DLL load
On Jan 9, 3:43 pm, "bruce" wrote:
> hi jason
>
> forgive me... but in your sample:
> my_popenobjects = [subprocess.Popen("foo.py", "--filename=file
> %i.txt"%x) for x in xrange(10)]
> are you spawning 'foo.py' 10 times? that can't be right!
> so just what is "foo.py" used for?
I'm using Python 2.5.1, and I'm trying to use the module library as a Zip file
(for example, with python25_d.dll, the module library file would be called
python25_d.zip). This works for the basic modules that come with Python (os,
sys, site, etc.), and it even seems to work when I place my own Pyt
On Fri, Jan 9, 2009 at 3:43 PM, bruce wrote:
> hi jason
>
> forgive me... but in your sample:
>my_popenobjects = [subprocess.Popen("foo.py", "--filename=file
>%i.txt"%x) for x in xrange(10)]
> are you spawning 'foo.py' 10 times? that can't be right!
Indeed, it probably ought t
MRAB wrote:
webcomm wrote:
On Jan 8, 8:39 pm, "James Mills" wrote:
Send us a sample of this file in question...
Here's a sample with some dummy data from the web service:
http://webcomm.webfactional.com/htdocs/data.zip
That's the zip created in this line of my code...
f = open('data.zip', '
In article
<07832575-9b98-4a03-a181-4470a5a00...@35g2000pry.googlegroups.com>,
googler.1.webmas...@spamgourmet.com wrote:
> hm... any ideas?
Have you tried specifying one of the universal SDKs, i.e.
/Developer/SDKs/MacOSX10.n.sdk? That's what the "official" python.org
builds do. The build s
ru...@yahoo.com wrote:
> If one accepts that there are a "lot" of people who post in here that
> clearly are surprised by Python's assignment semantics,
But one should not accept that. One might accept that there are many
who post who claim that they are surprised by Python's assignment
semant
hi jason
forgive me... but in your sample:
my_popenobjects = [subprocess.Popen("foo.py", "--filename=file
%i.txt"%x) for x in xrange(10)]
are you spawning 'foo.py' 10 times? that can't be right!
so just what is "foo.py" used for? what am i missing...
it looks like the my_popen
On Jan 9, 2:47 pm, "bruce" wrote:
> hi...
>
> toying with an idea.. trying to figure out a good/best way to spawn multiple
> python scripts from a parent python app. i'm trying to figure out how to
> determine when all child apps have completed, or to possibly determine if
> any of the child proce
On Jan 9, 3:42 pm, Robert Kern wrote:
> Christian Heimes wrote:
> > rh0dium schrieb:
> >> Hi All,
>
> >> Can someone tell me how to redirect stderr back to the console once
> >> you've moved it?
>
> > sys.stderr = sys.__stderr__
>
> > or better:
>
> > orig_stderr = sys.stderr
> > try:
> > sys.
En Wed, 07 Jan 2009 23:05:53 -0200, James Mills
escribió:
Does anybody know any tutorial for python 2.6 multiprocessing? Or bunch
of
good example for it? I am trying to break a loop to run it over multiple
core in a system. And I need to return an integer value as the result
of the
proce
On Jan 9, 3:52 pm, Christian Heimes wrote:
> Robert Kern schrieb:
>
>
>
> > Christian Heimes wrote:
> >> rh0dium schrieb:
> >>> Hi All,
>
> >>> Can someone tell me how to redirect stderr back to the console once
> >>> you've moved it?
>
> >> sys.stderr = sys.__stderr__
>
> >> or better:
>
> >> ori
webcomm wrote:
On Jan 8, 8:39 pm, "James Mills" wrote:
Send us a sample of this file in question...
Here's a sample with some dummy data from the web service:
http://webcomm.webfactional.com/htdocs/data.zip
That's the zip created in this line of my code...
f = open('data.zip', 'wb')
If I op
On Fri, Jan 9, 2009 at 2:47 PM, bruce wrote:
> hi...
>
> toying with an idea.. trying to figure out a good/best way to spawn multiple
> python scripts from a parent python app. i'm trying to figure out how to
> determine when all child apps have completed, or to possibly determine if
> any of the
On Jan 10, 8:56 am, webcomm wrote:
> On Jan 9, 4:12 pm, "Chris Mellon" wrote:
>
> > It would really help if you could post a sample file somewhere.
>
> Here's a sample with some dummy data from the web
> service:http://webcomm.webfactional.com/htdocs/data.zip
>
> That's the zip created in this l
On Jan 9, 5:21 pm, John Machin wrote:
> Thanks. Would you mind spending a few minutes more on this so that we
> can see if it's a problem that can be fixed easily, like the one that
> Chris Mellon reported?
>
Don't mind at all. I'm now working with a zip file with some dummy
data I downloaded fr
Robert Kern schrieb:
> Christian Heimes wrote:
>> rh0dium schrieb:
>>> Hi All,
>>>
>>> Can someone tell me how to redirect stderr back to the console once
>>> you've moved it?
>>
>> sys.stderr = sys.__stderr__
>>
>> or better:
>>
>> orig_stderr = sys.stderr
>> try:
>> sys.stderr = open(...)
>>
hi...
toying with an idea.. trying to figure out a good/best way to spawn multiple
python scripts from a parent python app. i'm trying to figure out how to
determine when all child apps have completed, or to possibly determine if
any of the child processes have died/halted..
parent app
spawn chi
Christian Heimes wrote:
rh0dium schrieb:
Hi All,
Can someone tell me how to redirect stderr back to the console once
you've moved it?
sys.stderr = sys.__stderr__
or better:
orig_stderr = sys.stderr
try:
sys.stderr = open(...)
...
finally:
sys.stderr = orig_stderr
He's not reas
rh0dium schrieb:
> Hi All,
>
> Can someone tell me how to redirect stderr back to the console once
> you've moved it?
sys.stderr = sys.__stderr__
or better:
orig_stderr = sys.stderr
try:
sys.stderr = open(...)
...
finally:
sys.stderr = orig_stderr
Christian
--
http://mail.python.o
Hi All,
Can someone tell me how to redirect stderr back to the console once
you've moved it?
import os,sys
se = os.open("/tmp/mod.log", os.O_WRONLY|os.O_APPEND|os.O_CREAT)
sys.stderr.write("Foobar\n")
Foobar
os.dup2(se, 2)
cmds = os.popen("ls alaksjdf")
sys.stderr.write("Foobar\n")
Foobar
An
Hi All,
Can someone tell me how to redirect stderr back to the console once
you've moved it?
import os,sys
se = os.open("/tmp/mod.log", os.O_WRONLY|os.O_APPEND|os.O_CREAT)
sys.stderr.write("Foobar\n")
Foobar
os.dup2(se, 2)
cmds = os.popen("ls alaksjdf")
sys.stderr.write("Foobar\n")
Foobar
An
On 2009-01-09, Marc 'BlackJack' Rintsch wrote:
> On Fri, 09 Jan 2009 15:34:17 +, MRAB wrote:
>
>> Marc 'BlackJack' Rintsch wrote:
>>
>>> def iter_max_values(blocks, block_count):
>>> for i, block in enumerate(blocks):
>>> histogram = defaultdict(int)
>>> for byte in block:
On Jan 10, 2:22 am, webcomm wrote:
> On Jan 9, 5:42 am, John Machin wrote:
>
> > And here's a little gadget that might help the diagnostic effort; it
> > shows the archive size and the position of all the "magic" PKnn
> > markers. In a "normal" uncommented archive, EndArchive_pos + 22 ==
> > arch
On Jan 9, 5:00 pm, webcomm wrote:
> If I unzip it like this...
> popen("unzip data.zip")
> ...then the bad characters are 'FFFD' characters as described and
> pictured
> here...http://groups.google.com/group/comp.lang.python/browse_thread/thread/...
>
trying again to post the link re: FFFD chara
On Jan 8, 8:39 pm, "James Mills" wrote:
> Send us a sample of this file in question...
Here's a sample with some dummy data from the web service:
http://webcomm.webfactional.com/htdocs/data.zip
That's the zip created in this line of my code...
f = open('data.zip', 'wb')
If I open the file it co
On Jan 9, 4:12 pm, "Chris Mellon" wrote:
> It would really help if you could post a sample file somewhere.
Here's a sample with some dummy data from the web service:
http://webcomm.webfactional.com/htdocs/data.zip
That's the zip created in this line of my code...
f = open('data.zip', 'wb')
If I
James Stroud wrote:
> Tim Arnold wrote:
>> Hi, I don't even know what to google for on this one. I need to drive
>> a commercial desktop app (on windows xp) since the app doesn't have a
>> batch interface. It's intended to analyze one file at a time and
>> display a report.
>>
>> I can get the thi
Tim Arnold wrote:
just a datapoint, but I used lulu.com to print the latex sources (525 pages)
hardbound for a cost of $25 US.
Did they handle the LaTeX fonts well? The last time I looked at Lulu, they
claimed that there were some font issues with PDFs made by LaTeX.
--
Robert Kern
"I have
Steven D'Aprano wrote:
> Python doesn't do the same thing as C. It actually passes the same value
> to the function, without copying it.
>
> Why oh why do you keep insisting that Python is no different from C?
I'm beginning to think that you're not bothing to read what I'm writing,
but I'll as
On Fri, 09 Jan 2009 15:34:17 +, MRAB wrote:
> Marc 'BlackJack' Rintsch wrote:
>
>> def iter_max_values(blocks, block_count):
>> for i, block in enumerate(blocks):
>> histogram = defaultdict(int)
>> for byte in block:
>> histogram[byte] += 1
>>
>>
On Fri, Jan 9, 2009 at 3:08 PM, Chris Mellon wrote:
> On Fri, Jan 9, 2009 at 2:32 PM, webcomm wrote:
>> On Jan 9, 3:15 pm, Steve Holden wrote:
>>> webcomm wrote:
>>> > Hi,
>>> > In python, is there a distinction between unzipping bytes and
>>> > unzipping a binary file to which those bytes have
On Jan 9, 12:57 pm, "Jerry Hill" wrote:
> On Fri, Jan 9, 2009 at 3:39 PM, Benjamin Kaplan
>
> > This looks like a CSV file to me. If that is the case, it is easier to use
> > the built-in csv module than to try to write your own parser.
>
> It should be as easy as this:
>
> import csv
>
> testfile
On Fri, Jan 9, 2009 at 2:32 PM, webcomm wrote:
> On Jan 9, 3:15 pm, Steve Holden wrote:
>> webcomm wrote:
>> > Hi,
>> > In python, is there a distinction between unzipping bytes and
>> > unzipping a binary file to which those bytes have been written?
>>
>> > The following code is, I think, an exa
On Fri, 09 Jan 2009 12:37:38 -0800, Roger wrote:
> If that's the case where's the point of diminishing returns on using
> psyco? Why would it not be useful in a general setting?
There is some overhead involved with the runtime analysis and compiling.
Functions that are only called once usually
Aaron Brady wrote:
> Possible compromise. You can think of functions as mutation-only.
> You pass the object, and it gets a new (additional) name. The old
> name doesn't go in.
Huh? That doesn't explain circular data structures at all, unless your
idea of `name' is unrelated to the identifi
Bruno Desthuilliers wrote:
To be more exact: there's no "default __nonzero__".
In Py3, '__nonzero__' has been renamed to __bool__.
All objects are instances of class object,
which indeed has no __bool__ method to be a default
(it does have default __hash__ and __eq__, etc).
> The boolean val
On Fri, Jan 9, 2009 at 3:39 PM, Benjamin Kaplan
> This looks like a CSV file to me. If that is the case, it is easier to use
> the built-in csv module than to try to write your own parser.
It should be as easy as this:
import csv
testfile = open('testfile.csv', 'w')
testdata = """100-01001-001,"
On Fri, 09 Jan 2009 12:39:22 -0800, Leland wrote:
> It seems work this way, but is there more elegant way to do this?
Yes, the `csv` module in the standard library.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 10, 5:32 am, Scott David Daniels wrote:
> webcomm wrote:
> > I tried Scott's getzip() function yesterday... I
> > stumbled upon it in my searches. It didn't seem to help in my case,
> > though it did produce a different error: ValueError, substring not
> > found. Not sure what that
On Fri, Jan 9, 2009 at 3:26 PM, Leland wrote:
> Hi,
>
> I have some formatted strings that I'd like to split and get the
> meaningful data, here is the example of the string format. The big
> difference of these two line are the second double quote set at the
> second line
> 100-01001-001,"Diode,
Hi,
I have some formatted strings that I'd like to split and get the
meaningful data, here is the example of the string format. The big
difference of these two line are the second double quote set at the
second line
100-01001-001,"Diode,Small Signal,SOT-23",1,D46,
100-01004-001,"Diode,High Voltage
On Jan 9, 2:21 pm, "Chris Rebert" wrote:
> On Fri, Jan 9, 2009 at 10:41 AM, Vicent wrote:
> > Hello. This is my first message to the list.
>
> > In this article written in 2002
>
> >http://www.ibm.com/developerworks/library/l-psyco.html
>
> > they talk about Psyco as a module that makes it possib
Hi,
I have some formatted strings that I'd like to split and get the
meaningful data, here is the example of the string format. The big
difference of these two line are the second double quote set at the
second line
100-01001-001,"Diode,Small Signal,SOT-23",1,D46,
100-01004-001,"Diode,High Voltage
On Wed, 07 Jan 2009 10:07:18 -0500, Philip Semanchuk wrote:
> On Jan 7, 2009, at 7:27 AM, marco kuhn wrote:
>
>> hi,
>>
>> I would like to use a specific python environment in a script . The
>> script is load as a plugin by a program which offer a python api . The
>> python environment is build i
On Jan 9, 3:15 pm, Steve Holden wrote:
> webcomm wrote:
> > Hi,
> > In python, is there a distinction between unzipping bytes and
> > unzipping a binary file to which those bytes have been written?
>
> > The following code is, I think, an example of writing bytes to a file
> > and then unzipping..
[Sigh. I must apologize for the length of this article. I can't, alas,
see a satisfactory way of trimming it. The doubly-quoted stuff later on
was by me.]
Steven D'Aprano wrote:
> I'm pretty sure that no other pure-Python coder has manipulated
> references either. They've manipulated objects
Mod_python works, but if you are doing anything significant look into
one of the many frameworks like turbogears or django. More structure to
learn but less code when all is said and done.
> -Original Message-
> From: python-list-bounces+frsells=adventistcare@python.org
> [mailto:pyth
ru...@yahoo.com wrote:
I never claimed that you *couldn't* have copy semantics in C; you can do
almost anything you want in C (or C++). But the *normal* usage of an
array is via a pointer, in which case the semantics are exactly the same
as in Python, Java, REALbasic, .NET, etc.
Arrays are th
Hi,
I have some formatted strings that I'd like to split and get the
meaningful data, here is the example of the string format. The big
difference of these two line are the second double quote set at the
second line
100-01001-001,"Diode,Small Signal,SOT-23",1,D46,
100-01004-001,"Diode,High Voltage
On Jan 9, 1:32 pm, Scott David Daniels wrote:
> I'd certainly try to figure out if the archive was mis-handled
> somewhere along the way.
Quite possible that I'm mishandling something, or the service provider
is mishandling something. Probably the former. Please see this more
recent thread...
webcomm wrote:
Hi,
In python, is there a distinction between unzipping bytes and
unzipping a binary file to which those bytes have been written?
Python's zipfile module can only read and write zip files; it can't
compress or decompress data as a bytestring.
The following code is, I think, an
webcomm wrote:
> Hi,
> In python, is there a distinction between unzipping bytes and
> unzipping a binary file to which those bytes have been written?
>
> The following code is, I think, an example of writing bytes to a file
> and then unzipping...
>
> decoded = base64.b64decode(datum)
> #datum i
Joe Strout wrote:
> ru...@yahoo.com wrote:
>
a = array (1,2,3)
b = a
a[1] = 4
print b
C, C++, VBA, Fortran, Perl: 1, 2, 3
Python: 1, 4, 3
>>> You are mistaken
>>
>> I don't think so.
>> See http://groups.google.com/group/comp.lang.python/msg/f99d5a0d8f86
On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote:
> On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote:
> > Aivar Annamaa wrote:
> > >> As was recently pointed out in a nearly identical thread, the -3
> > >> switch only points out problems that the 2to3 converter tool can't
> > >> automatically fix. C
On Jan 9, 2:49 pm, webcomm wrote:
> decoded = base64.b64decode(datum)
> #datum is a base64 encoded string of data downloaded from a web
> service
> f = open('data.zip', 'wb')
> f.write(decoded)
> f.close()
> x = zipfile.ZipFile('data.zip', 'r')
Sorry, that code is not what I mean to paste. This
Hi,
In python, is there a distinction between unzipping bytes and
unzipping a binary file to which those bytes have been written?
The following code is, I think, an example of writing bytes to a file
and then unzipping...
decoded = base64.b64decode(datum)
#datum is a base64 encoded string of data
On 2009-01-09, Dennis Lee Bieber wrote:
> On Thu, 08 Jan 2009 09:46:26 -0600, Grant Edwards
> declaimed the following in comp.lang.python:
>
>
>> Heathkit Z80 stuff used octal notation too.
>
> Octal worked well for the old 8080 and derivative processors as
> there were only 7 registers and
On 2009-01-09, Sion Arrowsmith wrote:
> Grant Edwards wrote:
>>On 2009-01-09, Johannes Bauer wrote:
>>> I've come from C/C++ and am now trying to code some Python because I
>>> absolutely love the language. However I still have trouble getting
>>> Python code to run efficiently. Right now I hav
On Fri, Jan 9, 2009 at 10:41 AM, Vicent wrote:
> Hello. This is my first message to the list.
>
> In this article written in 2002
>
> http://www.ibm.com/developerworks/library/l-psyco.html
>
> they talk about Psyco as a module that makes it possible to accelerate
> Python.
>
> Is it still a state-
You should try the paramiko package for that (http://www.lag.net/paramiko/)
A google search on that package & SFTP got me this example:
http://commandline.org.uk/python/sftp-python/
Cheers
Jorge
On Fri, Jan 9, 2009 at 1:20 PM, loial wrote:
> On 8 Jan, 18:49, Mike Hjorleifsson wrote:
> > On Ja
1 - 100 of 207 matches
Mail list logo