> A FAQ that discusses good ways to handle Python-like literals and
> expressions would definitely be a useful addition to the FAQ. if nobody
> else does anything about it, I'll get there sooner or later.
Thank you.
> > eval(source, {'builtins': {}}) works enough like an evaluator of
> > liter
Hello folks,
my name is Thomas, and I am new to this newsgroup. So first I want to
say hello. :-)
...done!
Now, I have a problem concerning my new python2.5 install. With
python2.3 and 2.4, Tkinter was no problem.
Now, when I try to import it, the folowing happens:
iPimpG4:~/Python-Dev/example
Does anyone know where i can download acopy of the SAX2 module?
Cheers
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Mike P wrote:
>
> > Does anyone know where i can download acopy of the SAX2 module?
>
> the built-in xml.sax module implements the SAX 2 protocol, if that's
> what you're looking for:
>
> http://docs.python.org/lib/module-xml.sax
I've got a slight problem when running an excel macro from python using
the win32.com.client module, in that it says it can't load the DLL file
(it doesn't say which one)
and gives me the following error message
Traceback (most recent call last):
File "", line 93, in ?
File ">", line 14, in R
Thanks for the quick reply,
the code i am running is the following
import win32com.client
xl = win32com.client.Dispatch("Excel.Application")
ppt = win32com.client.Dispatch("PowerPoint.Application")
ppt.Visible = 1 #open MS Powerpoint
xl.Visible = 1 #open MS Excel
xl.Workbooks.Open('%s/working_out
No Problem,
Thanks for your help so far, i've sent this problem off to SPSS as it
seems it doesn't work on a work colleagues machine either
Thanks for your time though
Mike
--
http://mail.python.org/mailman/listinfo/python-list
ially
supports only PHP, ruby and perl, does IBM have any plans to support
python bindings for DB2?
Thanks
P Adhia
Environment:
Ubuntu : Fiesty Fawn
Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)
DB2 9.1.2
Error: *** glibc detected *** python: free(): invalid pointer:
0xppp ***
A s
ially
supports only PHP, ruby and perl, does IBM have any plans to support
python bindings for DB2?
Thanks
P Adhia
Environment:
Ubuntu : Fiesty Fawn
Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)
DB2 9.1.2
Error: *** glibc detected *** python: free(): invalid pointer:
0xppp ***
A s
Hello,
I am new (very) to Python and have just down loaded the latest version
of Python (2.5) and WXPython (2.8).
For some reason I cannot get the WXPython demo to run at all. I run
windows XP and it can't find a program to run the demo. Any advice?
(apologies if this has been posted before).
--
On May 30, 12:24 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Andrew P wrote:
> > Hello,
>
> > I am new (very) to Python and have just down loaded the latest version
> > of Python (2.5) and WXPython (2.8).
>
> > For some reason I cannot get the WXPython d
How do I vary the byte offset of a field of a ctypes.Structure?
How do I "use the dynamic nature of Python, and (re-)define the data
type after the required size is already known, on a case by case
basis"?
\\\
For example, suppose sometimes I receive the value '\x03hi' + \x04bye'
for the struct:
ctypes.sizeof(a) is still zero, as if ctypes.Structure.__init__
fetches a.__class__._fields_ rather than a._fields_
--
http://mail.python.org/mailman/listinfo/python-list
""" Thomas,
Ouch ouch I must have misunderstood what you meant by "use the dynamic
nature of Python, and (re-)define the data type after the required
size is already known, on a case by case basis".
Do you have an example of what you meant? I searched but did not find.
Are those your words?
Yes,
I see that changing self._fields_ doesn't change ctypes.sizeof(self).
I guess ctypes.Structure.__init__(self) fetches
self.__class__._fields_ not self._fields_.
--
http://mail.python.org/mailman/listinfo/python-list
> Often it helps to ask yourself the question: How would I do this in C? ...
>
> *Not* by using a structure. A structure is fine if the definition is fixed,
> or at most has *one* variable sized field at the very end.
http://docs.python.org/lib/module-pickle.html
might be near where I'll find conc
> > http://docs.python.org/lib/module-pickle.html
> > ... concise Python ways of pickling and unpickling
> > the (0xFF ** N) possible ways of
> > packing N strings of byte lengths of 0..xFE together ...
Aye, looks like an exercise left open for the student to complete:
>>> pickle.dumps("")
"S''\n
Hey, pretty impressive list. I downloaded a few myself.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> Hi Folks,
>
> I'm thinking about writing a script that can be run over a whole site
> and produce a report about broken links etc...
>
> I've been playing with the urllib2 and httplib modules as a starting
> point and have found that with urllib2 it doesn't seem poss
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I only know a little bit of xml and I'm trying to parse a xml document
in order to save its elements in a file (dictionaries inside a list).
When I access a url from python 2.3.3 running in Linux with the
following lines:
resposta = urllib.u
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
this is the xml document:
http://www..";>
~
~ 439
(... others ...)
~
When I do:
print xmldoc.toxml()
it prints:
http://www...";>
~
~439
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I would like to thank everyone for your answers, but I'm not seeing the
light yet!
When I access the url via the Firefox browser and look into the source
code, I also get:
~
~439
~
should
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
~From your experience, do you think that if this wrong XML code could be
meant to be read only by somekind of Microsoft parser, the error will
not occur?
I'll try to explain:
xml producer writes the code in Windows platform and 'thinks' that every
clie
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
~From your experience, do you think that if this wrong XML code could be
meant to be read only by somekind of Microsoft parser, the error will
not occur?
I'll try to explain:
xml producer writes the code in Windows platform and 'thinks' that every
clie
Greetings!!!
I ran the following simple string commands in Linux + Python and the results
are:
[EMAIL PROTECTED] root]# python
Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>
Gianluca Sartori wrote:
> Hi guys,
>
> What web framework do you suggest to develop with? I had a look both
at
> Nevow and Quixote. These seemes to be the most appreciated by the
> community. Anyway, I had no luck looking for a complete and coherent
> documentation.
>
> Thanks for any suggestion,
You should definitely have a look at Zope 3. There is good
documentation available and it can do a lot of good stuff.
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]> Ville Vainio <[EMAIL PROTECTED]> writes:
>> "Bruce" == Bruce Stephens <[EMAIL PROTECTED]> writes:
>Bruce> Nick Craig-Wood <[EMAIL PROTECTED]> writes:
>Bruce> [...]
>>> You could try Mercurial
>>>
>>> http://www.selenic.com/mercurial/
>Bruce> Or
Hi,
do you know if is there any 'Dive into Python' equivalent for the java
language?
DiP is the best I've seen and I would need to learn some basics of Java
and also ways to interact between the two languages. (I'm already aware
of Jpype and Jython)
Luis
--
http://mail.python.org/mailman/lis
Hi,
I have a 1000 line python script that takes many hours to finish. It is
running with six inside 'for' loops.
I've searched the net for ways to speed up the proccess.
Psyco improves performance around 3% in this case which is not good enough.
How can I dramatically improve speed?
I tried
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I have a 1000 line python script that takes many hours to finish. It is
running with six inside 'for' loops.
I've searched the net for ways to speed up the proccess.
Psyco improves performance around 3% in this case which is not good enough.
H
I am looking for a specific "game" that is really a programming
environment for young kids.
I believe it implements PyGame, and presents two windows: one is a grid
with some obstacles, and a character that must traverse the grid;
another is an interactive editor that encourages a learner to wri
Greg Krohn wrote:
> Michael P. Nugent wrote:
>
>> I am looking for a specific "game" that is really a programming
>> environment for young kids.
>>
>> I believe it implements PyGame, and presents two windows: one is a
>> grid with some obstacle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The reason why I'm using six nested for loops is because I need to find
the best output using those six variables as input.
Here's the simplified code:
for per in range():
~for s in range():
~for t in range():
for v in range()
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I appreciate everyone's help!
I got some ideas that I'll try to put into practice.
Regards,
Luis
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCi7QQHn4UHCY8
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I'm just transforming a Python module into Pyrex, and I get the
following error:
File "indicadorPyrex.pyx", line 37, in indicadorPyrex.volatilidade
~h1 = precoMax[barra]
I made no changes to this module except including 'int' for two
variable
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I'm trying to improve speed in a module and substituted the pythonic
'for in range()' for 'for i from min < i < max:'
But, I need to define a step for the i variable. How can I do it?
for example, how do I iterate through 8 to 14 with s
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
| so it's
|
| for i in range(8, 14, 1): ...
|
| http://enigmail.mozdev.org
iD8DBQFClkmlHn4UHCY8rB8RAlUqAKCxSEkEKVIcoshTwmL7GQNK6d/j0wCgoC67
jOhuXQpnDt23SEAM9huKTQA=
=8XO0
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/
Michael Goettsche wrote:
> You're asking "tech geekers" and "morons" to do this job? Isn't that a task
> for somebody more professional like you?
I think he's doing a shot to the position of open-source leader, judging
on the replies he has got till so far, that shot was not really
effective.
Jeroen Wenting wrote:
>
> Without Microsoft 90% of us would never have seen a computer more powerful
> than a ZX-81 and 90% of the rest of us would never have used only dumb
> mainframe terminals.
At the time you "PC" guys where hacking around monochrome green and a
bit lighter green screens
John Bokma wrote:
> You mean like the lamp that keeps burning forever, like Philips has?
>
No more like all the hydrogen technologies that shell has in their
possession for the last decades and only recently has begun to restart
those projects.
>> Although Commodore where never serious compet
Hi all,
I noticed that the "dead keys"* mechanism (XPSP2 NL, keyboard map US,
input language Dutch) doesn't work when running the pyHooks (python 241)
example.
Instead of ö ("o) I immediately get ""o.
If I close the pyHooks example the expected behavior returns.
Is there a way how I can get bot
Not Bill Gates wrote:
> [EMAIL PROTECTED] wrote...
>> On Tue, 25 Oct 2005 15:35:47 +, Not Bill Gates wrote:
>>
>>> Heck, I dunno. Like you, I don't even really care all that much.
>> You don't care that innovation in desktop software has been crippled by
>> the actions of the monopoly player
David Schwartz wrote:
> It's easy to point to things you think are mistakes and claim that if
> you had been in charge of the world, those mistakes would not have been
> made. If you are trying to balance completely different possible paths the
> universe might have taken, you need to make
simply make one via
references in a class?
class MyNode(object):
next = None
Should do it, no?
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I m not a python Expert or anythin
> i need help, i m losin my motivation to continue with python
> can anyone inspire me again.???
Ooh that is easy, start learning other programming languages, you'll go
back continuing with python very soon after that! ;-)
--
mph
--
[EMAIL PROTECTED] wrote:
> Martin P. Hellwig wrote:
>> [EMAIL PROTECTED] wrote:
>>> I m not a python Expert or anythin
>>> i need help, i m losin my motivation to continue with python
>>> can anyone inspire me again.???
>> Ooh that is easy, start learn
Util, and by calling DataUtil(), you're
trying to call the module, hence the error. I think you want
db = DataUtil.DataUtil()
Or,
from DataUtil import DataUtil
And then your code will work.
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/python-list
rvers and web frameworks is that it's
natively multi-processing vs. multi-threading.
[1] http://www.skunkweb.org/
[2] http://wiki.skunkweb.org/sw/ExampleOfMonitoringLongRunningProcess
--
charl p. botha - http://cpbotha.net/
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> I'm FREE to use the software, FREE to redistribute it, FREE to give it
> away, FREE to make derivative works, FREE to transfer the licence, *and*
> I got it FREE of cost as well, but that doesn't make it free.
>
Indeed, when I explain GPL to non-techies and what their (
Mike Meyer wrote:
> "Martin P. Hellwig" <[EMAIL PROTECTED]> writes:
>> If the non-techie is still interested, I'll rave on about that I
>> understand why GPL is a good way to ensure availability of IP
>> especially if the software is a collaborated
Mike Meyer wrote:
>
> Is that software really unavailable, or just unavailable for free? If
> the latter, then it's not unavailabe. If the former, the it didn't
> become unavailable, as it was never available in the first place.
> In the latter case, you could also use those examples to similarly
Mike Meyer wrote:
>
> Well, they chose to make it available to others for reuse. But
> software "unavailable to those who can't afford it" is better than "no
> software at all"
That I do not agree with, I think it depends on which your side of the
fence you are.
For instance I have a specific
Steven D'Aprano wrote:
> On Thu, 24 Nov 2005 23:26:38 +0100, Martin P. Hellwig wrote:
>
>> BSD/MIT style license is a
>> good substitute of no license at all.
>
> But that's not true: "no licence at all" means that nobody has the right
> to u
Steven D'Aprano wrote:
> On Thu, 24 Nov 2005 17:43:22 +0100, Martin P. Hellwig wrote:
>
>> if I owned a company
>> making profit on software sales (sale =! support) you sign a death wish
>> for using GPL
>
> Apart from Microsoft, and possibly Quark (makers o
Steven D'Aprano wrote:
>
>
> I think you are over-estimating both the numbers and profitability of such
> niche software distributors, and misunderstanding the business models of
> them.
Coincidently, I worked at a software company making a "standard"
administration software for primary school
Steven D'Aprano wrote:
> On Sat, 26 Nov 2005 21:39:13 +0100, Martin P. Hellwig wrote:
>
>> The software was sold in 3 separates modules requiring a yearly renewal,
>
> The software is hardly sold if you have to renew that "sale" every year.
> That's mo
this part of my code:
f = file(work_dir + filename,'r')
n = int(totalSize/recordLenth)
i = 0
while i < n:
buf = f.read(recordLenth);
sometime (when find something like \0A\00\00 in data) returm less bytes then
file have.
Q: how-to read all data from bi
Problem solved.
"Sergey P. Vazulia" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:[EMAIL PROTECTED]
> this part of my code:
>
> f = file(work_dir + filename,'rb')
^
>
Mike Meyer wrote:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>> Michal wrote:
>>> is there any way how to detect string encoding in Python?
>>> I need to proccess several files. Each of them could be encoded in
>>> different charset (iso-8859-2, cp1250, etc). I want to detect it,
>>> and enco
Xah Lee wrote:
Nice rant, btw in most EU countries the software creator can not
withdraw the responsibility of his/her/it creation, regardless of what
the disclaimer says. The law is the leading authority and not some
Disclaimer/EULA, that's why most US EULA's are unauthoritative in the EU.
--
Ulrich Hobelmann wrote:
>
> The piece that a European programmer can never withdraw responsibility
> could be a big problem to open-source software, though. I'm not sure
> I'd want to freely publish anything that could result in liability for me.
>
Not that big of a problem, in EU a user is s
Hi there,
I have a string in which I want to calculate how often the character ';'
occurs. If the character does not occur 42 times, the ";" should be added so
the 42 are reached.
My solution is slow and wrong:
for Position in range (0, len(Zeile)):
if Zeile[Position]==';': AnzahlS
rbt wrote:
> Alex Martelli wrote:
>> I don't think there was any official announcement, but it's true -- he
>> sits about 15 meters away from me;-).
>
> For Americans: 15 meters is roughly 50 feet.
Well they could have used google for that ;-)
http://www.google.com/search?hl=en&q=15+meter+in+feet
Ilias Lazaridis wrote:
So I guess you volunteer http://www.python.org/psf/volunteer.html ?
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Ilias Lazaridis wrote:
> Martin P. Hellwig wrote:
>> Ilias Lazaridis wrote:
>>
>> So I guess you volunteer http://www.python.org/psf/volunteer.html ?
>
> I volunteer and contribute already (with a general validity and python
> specific analysis)
>
> A medi
Ilias Lazaridis wrote:
>> The only thing that holds "you" theoretically back is "acknowledged
>> authority by the participating group _and_ yourself" and of course the
>> resource for "restricted" information.
>
> what do you mean by "resource for "restricted" information"?
>
Well, I mean that
Ilias Lazaridis wrote:
I'm suspecting that we have different definitions (or at least the
implications of that) of used terms.
I think it's important to first define these definition in a form
acceptable to both of us.
In the link you gave, the title was "Efficiency Management".
Now I believe t
Ilias Lazaridis wrote:
> Martin P. Hellwig wrote:
>> Ilias Lazaridis wrote:
>>
>> I'm suspecting that we have different definitions (or at least the
>> implications of that) of used terms.
>> I think it's important to first define these definition in a
Mike Meyer wrote:
> [EMAIL PROTECTED] writes:
>> I have looked at the options for developing the client for these
>> "electronic job sheets" and have decided upon Microsoft Pocket PC and
>> the .net compact framework. It seems the easiest environment for
>> developing and the PDA's can be obtained
Anton Vredegoor wrote:
>
> Most people can survive (without damaging their souls so to speak) when
> working for corruption themselves in this way, but sooner or later one
> is asked to corrupt others (defending one's title during a promotion,
> leading a community and so on). This is the crucial
Question
please:
In the post, "How to
operate the excel by python," where did you find the codes for
HorizontalAlignment and VerticalAlignment (Center = -4108 and Bottom =
-4107)? I need the code for HorizontalAlignment = xlRight. Is there
a table somewhere that shows these codes?
Tha
nit__
super(RemGuiFrame, self).__init__(*args, **kwds)
TypeError: super() argument 1 must be type, not classobj
Why the difference? Is Python portability overrated? Is this a bug?
I'm confused.
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>
http://www.digitaltorque.ca
http://opag
the 2.3 cruft seems to have fixed
something.
Thanks,
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'
Jabber: [EMAIL PROTECTED]
pgpoH6WnRonmw.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
self.partitions = doc.children
elif doc.type == 'siloShowMaxFree':
self.free = doc.scalar
else:
raise AssertionError, "Unknown document type: %s" % doc.type
--
Michael P. Soulier <[EMAIL PROTECTED]>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'
Jabber: [EMAIL PROTECTED]
pgpscuURQeKCo.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On 23/06/05 Tim Golden said:
> This is only half an answer, but I personally find faffing
> about with the double-quote / double-backslash stuff between
> Python and Windows a pain in the neck, so where I can I avoid it.
Indeed. I believe this is why Python has os.sep.
Mike
--
; assert(False)
None
Pretty sure this worked in 1.5.2. Am I doing something wrong here?
I want format_exe especially, since I don't want to print to stdout, I
want to provide the traceback in a popup dialog.
Thanks,
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>
http://www.digi
Hi,
I don't know anything about PHP and I'm initiating right now with
PostgreSQL.
Could someone tell me the pros and cons of assessing the PostgreSQL
databases with Python vs. PHP?
I will need to build a database that has to be assessed by a dozen clients
via a web page in an intranet (possibly
gene tani wrote:
> To be honest, this is a pretty open-ended question. Are there specific
> issues (SQL injection/security, minimizing db connections, simplest
> code, etc, your'e concerned with?)
Simplest code with be an important factor, since the db will be used far
from max capabilities. Eas
gene tani wrote:
> ok, to make this less open-ended, you should mention what O/S and web
> server you have in mind, whether the web and DB servers will be under
> your admin (big diff betw python and PHP, as far as finding shared
> server accounts at web hosts), what kinds of queries, concurrent
>
EnderLocke wrote:
> I have a friend who wants to learn python programming. I learned off
> the internet and have never used a book to learn it. What books do you
> recommend?
>
> Any suggestions would be appreciated.
>
I recommend "Learning Python 2nd Edition" by Mark Lutz & David Ascher
(O'Rei
Hello,
Is there an FAQ available specific to this NG as I'm sure some of the
list slicing questions I have have been asked before.
Thanks,
KPB
--
http://mail.python.org/mailman/listinfo/python-list
Michael Hoffman wrote:
> Keith P. Boruff wrote:
>
>> Is there an FAQ available specific to this NG as I'm sure some of the
>> list slicing questions I have have been asked before.
>
>
> Try Google for .
I tried and didn't find one. That's why I aske
gene tani wrote:
> Here's my trove of FAQ/Gotcha lists
>
> http://www.ferg.org/projects/python_gotchas.html
> http://zephyrfalcon.org/labs/python_pitfalls.html
> http://zephyrfalcon.org/labs/beginners_mistakes.html
>
>
> http://www.onlamp.com/pub/a/python/2004/02/05/learn_python.html
> http://ww
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I would like to thank all of you.
For what I've read, I'll be using python instead of Php.
Luis
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC5RQ5Hn4UHCY8r
d get all of
the versions right. Java does this better.
Mike
--
Michael P. Soulier <[EMAIL PROTECTED]>
"Those who would give up esential liberty for temporary safety deserve
neither liberty nor safety." --Benjamin Franklin
pgph4uE4YTLTz.pgp
Description: PGP signature
--
http://
[EMAIL PROTECTED] wrote:
> I need to write a .cgi that will take the content of an https GET or
> POST and send it securely as email to an Outlook client.
>
> I think that OpenSSL is somewhere in this, but I'm not even sure how to
> create the right certificate, how to use it to encrypt mail and
Mage wrote:
>>
> Thank you, I will check this out. My company will switch to a jsp site.
Well I don't know your company and how many developers there are but I
know this; a manager telling me what tools to use to do my job is a bad
manager by definition because he should realize that the peopl
Michael Ströder wrote:
> Martin P. Hellwig wrote:
>
>>I think you want this more common approach for mail encryption:
>>
>>server:
>>https CGI form --> mail wrapper --> PGP encryption/signing --> send
>>
>>client:
>>recieve mail --> pgp
Lad wrote:
> I have a list
> L={}
> Now I can assign the value
> L['a']=1
> and I have
> L={'a': 1}
>
> but I would like to have a dictionary like this
> L={'a': {'b':2}}
>
> so I would expect I can do
> L['a']['b']=2
>
> but it does not work. Why?
>
> Thank you for reply
> Rg,
> L.
>
Hi,
Pe
[EMAIL PROTECTED] wrote:
> Does anybody know how to get the:
>
> Free hard disk space
> Amount of CPU load
> and Amount of RAM used
>
> on windows? I am making an artificial intelligence program that has
> "moods" based on how much stress the system is under, based on these
> param
[EMAIL PROTECTED] wrote:
> thank you!
>
> from what I can see from the second website you listed, there is a way
> to get harddisk space information, but is there any way to get CPU load
> and RAM usage?
>
Have a look at the snippet:
#>>> import wmi
#>>> t = wmi.WMI()
#>>> for i in t.Win32_Perf
I'm just learning Python, so bear with.
I was messing around with the webbrowser module and decided it was
pretty cool to have the browser open a URL from within a python script,
so I wrote a short script to open a local file the same way, using the
script file as an example target:
# browser-tes
Oh, uh, Python version 2.4.2, in case you're wondering.
--Blair
--
http://mail.python.org/mailman/listinfo/python-list
I'm going to try it out on a remote server later today.
I did use this script to fetch remote HTML
(url='http://www.python.org') before I tired the remote file, and it
opened the webpage in Firefox.
I may also try to poke around in webbrowser.py, if possible, to see if
I can see whether it's sele
Grant Edwards wrote:
> Try something like this at the beginning of your program and
> see if it does what you want:
>
> print os.path.abspath(sys.argv[0])
Wanna see something freaky?
In IDLE, I type the following:
>>> import sys
>>> import os.path
>>> os.path.abspath(sys.argv[0])
Sorry...should read:
"I did use the script to fetch remote HTML
(url='http://www.python.org') before I tried the local file, and it
opened the webpage in Firefox."
Too many chars, too few fingers.
--Blair
--
http://mail.python.org/mailman/listinfo/python-list
>Would it be sufficient in your case merely to allow only .html files to
>be loaded? Or URLs without .extensions? Or even just permit only the
>http: protocol?
Personally, I'm just noodling around with this right now.
So "my case" is the abstract case. I think the solution if
one was needed wou
Peter Hansen wrote:
> It appears the correct approach might be something along the lines of
> reading the registry to find what application is configured for the
> "HTTP" protocol (HKCR->HTTP->shell->open->command) and run that, passing
> it the URL. I think that would do what most people expect,
Blair P. Houghton wrote:
> Which makes it no security hole at
> all, it would seem...
Well, no, that's a little strong. No *new* security hole, maybe. It
would be on the order of having ./ in the PATH for root, and getting
trapped by a hacker who named his rootkit "ls" or
101 - 200 of 347 matches
Mail list logo