John Salerno wrote:
> Laurent Pointal wrote:
>
>> With Python:
>> * pygame + build your drag'n drop features
>> * if you like 3D, vpython.
>>
>>
>> http://www.pygame.org/
>> http://www.vpython.org/
>
> Wow, vpython looks pretty n
ou may write long computing code
into a separate C module or library (may see ctypes and pyrex).
Another point, if you build Python multithreading code in same process, the
Global Lock may lead to unefficient use of your computing capacities.
Note. You may take a look at OSC (Open Sound Control
[EMAIL PROTECTED] wrote:
> On Mar 30, 5:56 pm, Laurent Pointal <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] a écrit :
>>
>> > How can I parse a remote XML file with Python?
>> > And what will I be able to do with this XML file in Python?
>>
>>
Duncan Smith wrote:
> Hello,
> I am currently implementing (mainly in Python) 'models' that come
> to me as Excel spreadsheets, with little additional information. I am
> expected to use these models in a web application. Some contain many
> worksheets and various macros.
>
> What I'd like
[EMAIL PROTECTED] wrote:
> Hi,
>
> I work on a project that is built entirely using python and Tkinter.
> We are at the point where we would like to give access to our
> functionality to others via some sort of API. People who would use
> our API develop in all kinds of languages from C/C++ to P
e it!
To complete hg reply, Python compile your tiny function which contains a
foo assignment. As foo is not defined "global", it is considered to be
local. So the error when you tries to iterate throught foo before
assigning it. And so the solution to add "global foo" before using it.
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
Bjoern Schliessmann wrote:
> Laurent Pointal wrote:
>
>> And so the solution to add "global foo" before using it.
>
> Didn't you read his final question?
Yes, and i replies: "which contains a foo assignment. As foo is not
defined "global", it is
Ivan Voras a écrit :
> I know it can be almost always done by using a temporary variable:
>
> tmp = some.big.structure.or.nested.objects.element
> tmp.member1 = something
> tmp.member2 = something
>
> but this looks ugly to me.)
The ugly part is the 'tmp' name, try to choose a name with a prope
dpi)
> raster_image.write(out_file)
>
> Thanks for any pointers you might have.
Another link to complement other replies:
Maybe witgh Cairo:
Library:
http://cairographics.org/
SVG support:
http://cairographics.org/manual/cairo-SVG-Surfaces.html
Python binding:
http://cairographics.or
Ivan Voras a écrit :
> Laurent Pointal wrote:
>
>> The ugly part is the 'tmp' name, try to choose a name with a proper
>> meaning about what it is really, and it become clean and readable:
>>
>> filerefs = some.big.structure.or.nested.object.with.file.
Stodge a écrit :
> I'm trying to do the following. I have a Python application that is
> run:
>
> python app1.py --location=c:\test1
>
> What I want to do is save the location parameter, so I can then do (in
> the same window):
>
> python app2.py
>
> And have app2.py automatically have access t
Summercool a écrit :
>
>
> The meaning of a = b in object oriented languages.
>
Oups, reading the subject I thought it was a Xah Lee post.
;-)
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> If I have a file name: AVC1030708.14. How do I strip out certain
> characters from the file name? I am so used to using MID, LEFT, and
> RIGHT functions, that I have no idea how to do this in python? I have
> had trouble as well with most newbies on finding the help.
[EMAIL PROTECTED] a écrit :
> On Sep 18, 1:56 am, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> I am attempting to extract some XML from an HTML document that I get
>>> returned from a form based web page. For some reason, I cannot figure
>>> out how to do this.
>>> Here'
I can no longer get codespeak's lxml page at http://codespeak.net/lxml/
(get an empty HTML document )...
Am-I alone in this case ?
Any codespeaker reading ?
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
Laurent Pointal a écrit :
> I can no longer get codespeak's lxml page at http://codespeak.net/lxml/
> (get an empty HTML document Transitional//EN">)...
>
>
> Am-I alone in this case ?
> Any codespeaker reading ?
It magically come-back
--
http://mail.pyt
cross-reference by example), is there a
way to get the source-file and line/column of an element ?
[note: these informations are available when lxml parse the source, but are
they kept anywhere in the document tree ?]
Thanks.
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> Here's how I'm doing this right now, It's a bit slow. I've just got
> the code working. I was wondering if there is a more efficient way of
> doing this... simple example from interactive Python:
>
word = ''
hexs = ['42', '72', '61', '64']
for h in hexs
Andres Riofrio a écrit :
> Well, then I have
> a question: Is there a way to make 5/2 return something other than an
> integer?
>>> from __future__ import division
>>> 5/2
2.5
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> I am happy to announce the first release of magnitude, a
> library for computing with physical quantities. It is
> released under the Apache v. 2 license.
>
> A physical quantity is a number with a unit, like 10
> km/h. Units can be any of the SI units, plus a bunch o
s may share the module, but not connections.
2 Threads may share the module and connections.
3 Threads may share the module, connections and
cursors.
"""
http://www.python.org/dev/peps/pep-0249/
--
Laurent POINTAL - [EM
tion via its gui.
http://sourceforge.net/projects/pywinauto
--
Laurent POINTAL - [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> Hi,
>
> The following code works -
>
> one = 1
> if one == 1:
> ok = 1
> print ok
>
> but this does not, without exception -
>
> one = 2
> if one == 1:
> ok = 1
> print ok
>
> How do I establish before printing ok if it actually exists so as to
> avoid this ex
[EMAIL PROTECTED] a écrit :
> Hello,
>
>
> I need to convert a 3 byte binary string like
> "\x41\x00\x00" to 3 int values ( (65,0,0) in this case).
> The string might contain characters not escaped with a \x, like
> "A\x00\x00"
>
>
> Any ideas?
>>> s = "\x41\x00\x00"
>>> [ ord(c) for c in s ]
Paul Sijben a écrit :
> Gabriel Genellina wrote:
>> Simply you can't, as you can't have 1 open files at once. Computer
>> resources are not infinite.
>
> sure but *how* fast they run out is the issue here
>
>> Do you really need so many threads?
>
> I might be able to do with a few less but
prk a écrit :
> Hi Folks,
>
> Is there any procesure for print messages with colors.
Yes, see:
http://www.google.fr/search?q=python+print+color
http://groups.google.fr/groups?as_q=python+print+color&num=100&as_ugroup=comp.lang.python
See also ANSI escape sequences for the more general subject
Bjoern Schliessmann a écrit :
> Sean Davis wrote:
>
>> The author of one of the python database clients mentioned that
>> using one thread to retrieve the data from the oracle database and
>> another to insert the data into postgresql with something like a
>> pipe between the two threads might mak
siggi a écrit :
> Hi all,
>
> when I rtry to install pygame (pygame-1.7.1release.win32-py2.4.exe, the most
> ciurrent version I found) it requires Python 2.4! Will I really have to
> uninstall my Python 2.5 and install the old Python 2.4 in order to use
> pygame?
Note: You can have both versions
,%20**kwargs)
Regards,
Laurent
CSUIDL PROGRAMMEr wrote:
> folks,
> I am trying to write a script that would open a download server and
> download all the files and store them in a list
>
> for example Download server is
> http://download.fedora.redhat.com/pub/fedora/linux/co
hg a écrit :
> hg wrote:
>
>> Hi,
>>
>> Is there a way ? ... select ?
>>
>>
>>
>> hg
> PS:
>
> import sys
> import select
>
> l_r = select.select([sys.stdin],[],[],0)
>
> gives me:
> File "select.py", line 2, in ?
> import select
> File "/home/philippe/Desktop/select.py", line 4, in ?
>
Hi,
I guess you could take a look at pydev extension for eclipse and if you
wan't an almost straight forward installation, you should consider this
link :
http://www.easyeclipse.org/site/distributions/python.html
Regards,
Laurent
W. Watson a écrit :
> I downloaded python-2.5
dn't discover:
> 1. Time is money.
> 2. Matter will be damaged in direct proportion
> to its value.
Have you take a look at the IDEs page in the Python Wiki (python.org)?
http://wiki.python.org/moin/IntegratedDevelopmentEnvironments
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
hg a écrit :
> Hi,
>
> Is there a way to do that ?
>
> Regards,
>
> hg
>
Some links:
Official doc:
http://docs.python.org/lib/mmedia.html
==> http://docs.python.org/lib/module-ossaudiodev.html
PyAudio (binding to portaudio):
==> http://people.csail.mit.edu/hubert/pyaudio/
Maybe with pyG
Jan Danielsson a écrit :
> Hello all,
>
>I have a backup system which produces files using the following pattern:
...
>
>Obviously, I have little need for *all* those files. What I want to
> do is to delete old files according to this pattern:
>
>- Keep all backup files which are two
stef a écrit :
> Laurent Pointal wrote:
>> W. Watson a écrit :
>>
>>> I downloaded python-2.5.msi and installed it. I believe its editor is
>>> IDE. I understand there's a Win editor called pythonwin. I believe it's
>>> in the download p
oks:
http://wiki.python.org/moin/PythonBooks
You may get more help in c.l.python about book choice by explaining to
readers what is your computer science knowledge level, and what is the
domain of this big program (text processing, network, GUI...).
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I known this can be impossible but what about an "HTML" GUI ?
Daniel Jonsson wrote:
> So, I've reached the point where my building pipeline tools actually
> needs to be used by other people in my company. By this reason I
> actually need to think about the usability, and I've come to the
> c
And using the codecs module
[CODE]
import codecs
f = codecs.open("show_btchina.user.js","r","utf-8")
modf = codecs.open("modified.js","w","utf-8")
for line in f:
idx = line.find(u"//")
if idx==0:
continue
elif idx>0:
line = line[:idx]+u'\n'
modf.write(line)
m
its very hard to ban people (or
better, ban out-of-subject posts) from non-moderated Usenet newsgroups.
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
Maybe you should take a look at sqlalchemy
king kikapu wrote:
> Hi to all,
>
> i have started a month ago to seriously studying Python. I am now
> looking at the databases stuff
> and i want the opinion of more experienced Python programmers (than
> me) at the following :
>
> I see that there a
le." -Calvin
>
>
> What about this:
> class Object(object):pass
> myobj=Object()
> myobj.newattr=5
>
> and it works !!!
> Python allows the dynamic creation of attributes for an instance of an
> object.
See previous discussion in this group "Re: Why don't have an object()
instance a __dict__ attribute by default?" (2007-01-30)
http://groups.google.fr/group/comp.lang.python/browse_thread/thread/a7e952d01b2eea68/961dec95bc20877e?lnk=st&q=&rnum=1#961dec95bc20877e
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
ardief a écrit :
> Hi everyone
> Here is my problem:
> I have a list that looks like this -
> [['a', '13'], ['a', '3'], ['b', '6'], ['c', '12'], ['c', '15'], ['c',
> '4'], ['d', '2'], ['e', '11'], ['e', '5'], ['e', '16'], ['e', '7']]
>
> and I would like to end up with something like this, i.e. wi
Neil Cerutti a écrit :
> On 2007-02-02, ardief <[EMAIL PROTECTED]> wrote:
> This is a job for... duhn-duhn-DH! Captain CHAOS!
>
> Er... I mean itertools.groupby.
>
> def key_func(t):
> return t[0]
Not needed: --> from operator import itemgetter
See in the example:
http://docs
nder Python 2.5, then
you can have both Python 2.4 and 2.5 installed and running some code.
Setup Pyro [1] on both, and go throught remote object invocation.
And if you dont need new Python 2.5 stuff in your code evolution, just
stay with 2.4, it works well.
A+
Laurent.
[1] http://pyro.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard a écrit :
> Laurent Pointal wrote:
>> For Python 3.0, AFAIK its a big rewrite and developers know that it will
>> be uncompatible in large parts with existing code.
>
> Wrong on both counts. ;-) Python 3.0 is not a rewrite. It's based on the
> same c
Jean-Paul Calderone a écrit :
> On Mon, 05 Feb 2007 10:19:26 +0100, Laurent Pointal
> <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] a écrit :
>>> When they have to ...
>>>
>>> One of the big things about Python is that its penetration sl
Diez B. Roggisch wrote:
> m=: >@(0&{)
> v=: >@(1&{)
> h=: >@(2&{)
> qu =: >@(3&{)
> z=: [EMAIL PROTECTED]:
> ret =: |[EMAIL PROTECTED]:
> init =: z;z;z;i.
> f1m =: (m,[EMAIL PROTECTED]);v;h;[EMAIL PROTECTED]
> f5m =: (z;(v,{:@m);h;qu,[EMAIL PROTECTED]) @ (f1m^:5)
> f1h =: (z;
Bruno Desthuilliers wrote:
> Gosi a écrit :
>> On Feb 5, 2:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> J has very many advanced operations.
>
> what's an "advanced operation" ?
An operation which dont stay in place.
--
http://mail.python.org/mailman/listinfo/python-list
Bart Ogryczak wrote:
> On Jan 7, 10:03 pm, gonzlobo <[EMAIL PROTECTED]> wrote:
>> Curious if anyone has a python cheatsheet* published? I'm looking for
>> something that summarizes all commands/functions/attributes. Having
>> these printed on a 8" x 11" double-sided laminated paper is pretty
>> c
test/choose one solution...
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252495
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203
...
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
0 - secs * 1000
... return "%(hours)02d:%(mins)02d:%(secs)02d,%(millis)03d"%locals()
...
>>> millisToFormat(185804 )
'00:03:05,804'
See chapter "3.6.2 String Formatting Operations" in the Python Library
Reference.
http://docs.python.org/lib/typesseq-strings.html
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> As mentioned above, my application deals with music training. I have a
> Tkinter GUI, which communicates via pyserial with an external device I
> built myself. The code reads in a MIDI file and converts the song to
> "output data " for the external device and the GUI,
Hi,
You need to have readline installed.
Laurent
ThomasC wrote:
> Hello,
>
> How to configure Python2.5's interactive interpreter to get command
> history ?
>
> I always got ^[[A and ^[[B .
>
> Thank you !!
>
> Thomas#
--
http://mail.python.org/mailman/listinfo/python-list
Captain wrote:
> Just bought a new PC with Windows XP Media Edition. I have two entries in
> the "Add or Remove Programs" section of Control Panel, but there is no
> corresponding item in the Start Menu. One entry says: Python 2.2.3 and
> the
> other says: Python 2.2 pywin32 extensions (build203
Mark Morss a écrit :
> On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote:
>> I am VB6 programmer and wants to start new programming language but i
>> am unable to deciced.
>>
>> i have read about Python, Ruby and Visual C++. but i want to go
>> through with GUI based programming language like VB.net
>>
>
joanne matthews (RRes-Roth) a écrit :
> I'm getting different results when I add up a list of floats depending
> on the order that I list the floats. For example, the following returns
> False:
> def check():
> totalProp=0
> inputs=[0.2,0.2,0.2,0.1,0.2,0,0.1]
> for each in inputs:
Gigs_ wrote:
> Is there any way to convert ocaml code to python? but not manually
For Python and ocaml, my bookmark contains this link:
http://www.programs4all.net/programs/Pycaml-Python-Embedding-API-for-Ocaml.htm
But no ocaml to Python compiler...
--
http://mail.python.org/mailman/listinfo/
e (and beginning by 0x it is interpreted as hexadecimal value).
You may use int construction from string, which allow to specify a base
(default to ten):
>>> int('00052')
52
>>> int('00052',10)
52
>>> int('00052',8)
42
Note: thi
Gabriel Genellina a écrit :
> En Wed, 21 Feb 2007 00:31:32 -0300, alf <[EMAIL PROTECTED]> escribió:
>> 2-list of supported encodings?
> I don't know how to query the list, except by reading the documentation
> for the codecs module.
>>> from encodings import aliases
>>> aliases.aliases
{'iso_
You help nothing by posting subjects unrelated to the *programming
language* Python into a usenet group about this language.
--
http://mail.python.org/mailman/listinfo/python-list
Dave a écrit :
> I need to read microphone input and determine frequency. Is there a lib
> for that?
>
> Thanks,
> Dave
Another possible solution, the PortAudio binding (pyportaudio).
http://people.csail.mit.edu/hubert/pyaudio/
--
http://mail.python.org/mailman/listinfo/python-list
MonkeeSage a écrit :
> On Dec 3, 8:58 am, Samuel <[EMAIL PROTECTED]> wrote:
>> On Mon, 03 Dec 2007 06:45:45 -0800, Giampaolo Rodola' wrote:
>>> dir.__doc__
>> This contains only the docstring one object (module, class,
>> function, ...). I was thinking more of the complete API documentation
>> that
Chris a écrit :
> On Dec 7, 2:31 pm, waltbrad <[EMAIL PROTECTED]> wrote:
>> I understand how D['say'] gets you 5, But I still don't understand
>> the line after the 5.
>>
>> How is the character 's' some special code? And I don't get what is
>> going on with the % character. I'm used to it's use
's a reference that stops at 2.3:
>
> http://rgruet.free.fr/PQR2.3.html
Remove the 2.3, and you get the 2.4 :-)
http://rgruet.free.fr/
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
Dale Strickland-Clark a écrit :
> Vim.
>
> Everything else is Notepad.
++, yes Notepad++ !!! (windows only)
See http://notepad-plus.sourceforge.net/uk/site.htm
:-)
>
> DeepBlue wrote:
>
>> Hi all,
>>
>> Can any one please recommend me an editor for coding Python. Thank u.
>> I have Komodo (
t;, line 1, in ?
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xbd' in
> position 0: ordinal not in range(128)
This is default encoding for evaluation of expressions in u"..."
strings, this has nothing to do with printing.
For the output encoding, see sys.stdout.encoding.
>>> import sys
>>> sys.stdout.encoding
'cp850'
>>>
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
):
The current date is
<% import time
print time.strftime("%d:%m:%y",time.localtime(time.time()))
%>
See http://karrigell.sourceforge.net/
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
Gregory Petrosyan a écrit :
> Hello!
> I have a question for the developer[s] of enumerate(). Consider the
> following code:
>
> for x,y in coords(dots):
> print x, y
>
> When I want to iterate over enumerated sequence I expect this to work:
>
> for i,x,y in enumerate(coords(dots)):
> pr
Andrew Robert a écrit :
> Hi Everyone,
>
> Is there a way to test if a file is binary or ascii within Python?
>
> I'd prefer not to text against file extension.
>
> Any help you can provide would be greatly appreciated.
May look at unix "file" command sources...
A+
L.Pointal.
--
http://mail
Thanks everyone...
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
To complement Henry Chang reply, you can also take a look at:
http://jpype.sourceforge.net/ (Java To Python Integration)
http://jepp.sourceforge.net/ (Java Embeded Python)
See my other Python/Java links at
http://w
x27;ve been used to
> doxygen in c++ land, and although it makes a reasonable stab with a
> python project in java mode, the output is a bit messy.
>
> Can any one suggest a more tailored tool? or do I risk a flamewar? :)
You can take a look at epydoc
http://epydoc.sourceforge.net/
Le Tue, 12 Feb 2008 10:05:59 -0800, castironpi a écrit :
> What is dream hardware for the Python interpreter?
Dream... I dont know, but hardware for the Python interpreter, yes.
http://www.telit.co.it/product.asp?productId=96
--
Laurent POINTAL - [EMAIL PROTECTED]
--
http://mail.python.
x27; %j)
Here are the results on a ext3 file system
time python test.py
real0m5.299s
user 0m0.939s
sys 0m3.539s
Regards,
Laurent
venutaurus...@gmail.com a écrit :
On Mar 18, 6:35 pm, Peter Otten <__pete...@web.de> wrote:
venutaurus...@gmail.com wrote:
Hello all,
I
I have the following list:
[ 'test\n', test2\n', 'test3\n' ]
I want to remove the '\n' from each string in place, what is the most efficient
way to do that ?
Regards,
Laurent
--
http://mail.python.org/mailman/listinfo/python-list
I had a simple loop stripping each string but I was looking for
something concise and efficient. I like the following answer:
x = [s.rstrip('\n') for s in x]
David Stanek wrote:
> On Mon, May 18, 2009 at 3:30 PM, Laurent Luce wrote:
>> I have the following list:
>&g
Thanks Casey. I like your solution.
Casey Webster wrote:
> On May 18, 3:30 pm, Laurent Luce wrote:
>> I have the following list:
>>
>> [ 'test\n', test2\n', 'test3\n' ]
>>
>> I want to remove the '\n' from each string in
Maybe you run the configure, make, make install without addind devel
packages on your system. I mean:
openssl-devel
readline-devel
...
Regards,
emallove wrote:
> I'm running into the below "No modules named _sha256" issue, with a
> python installed in a non-standard location.
>
> $ python
> Py
Hello,
A way to do it
===
from __future__ import with_statement
res = []
with open("sentences.txt","r") as f:
sentences = [elem for elem in f.read().split('\n') if elem]
for sentence in sentences:
res.append(sentence.split())
p
into Python", there is an online version,
translation in some languages other than english (if needed). It propose
a line by line explanation on many scripts targetting language and
libraries usage.
http://www.diveintopython.org/
--
Laurent POINTAL - [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
hat, given your available time,
> would you be proficient enough to teach it?
And if you want to do easy and simple 3D graphics programming, look at
VPython
http://www.vpython.org/
--
Laurent POINTAL - [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
ust a wrapper to
V4L2, so you must know what options and image format your camera support
and use these (you may have to convert image by yourself - see PIL and
Numpy for quick data processing functions). To find the supported options
you can use xawtv and give it ad-hoc cli option to make it verbose.
A+
Laurent.
--
Laurent POINTAL - [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
eric etc
>> etc...
>>
> You really want the struct module here.
If all data are same 16 bits integer values, you can also see the array
module (and the fromfile() method - see docs).
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
module here:
http://nojhan.free.fr/article.php3?id_article=22
Else, see other posts.
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Like in C we comment like
> /*
> Bunch of lines of code
> */
>
> Should we use docstring """ """
>
> Or there is something else too ??
>
> Every help is appreciated.
>
> Thanks
Hi,
Maybe this sounds simplier than regexp and so, just use the """ marker like
this :
"
t-py.sourceforge.net/
A+
Laurent.
--
http://mail.python.org/mailman/listinfo/python-list
x file and take information about the values \label and
\ref
Every comments (and patches) are much welcome !
Have a good day
Laurent
[1] http://www.gitorious.org/phystricks
[2] http://www.gitorious.org/latexparser
[3] http://www.gitorious.org/phystricks-doc
[4] http://www.gitorious.org/phys
I have a file called increment.py as follows:
#!/usr/bin/python
n = 0
while True:
n = int(raw_input(n)) + 1
This is easy to understand, but I want to pipe it's input/output
by another python program. (I will show what I
I have a program called increment.py as follows:
#!/usr/bin/python
n = 0
while True:
n = int(raw_input(n)) + 1
This is probably very easy to understand, but I want to run this program
from another python program.
Below is an attempt
Op donderdag 17-06-2010 om 12:51 uur [tijdzone -0700], schreef Back9:
> Hi,
>
> I have one byte data and want to know each bit info,
> I mean how I can know each bit is set or not?
>
> TIA
def bitset(x, n):
"""Return whether nth bit of x was set"""
return bool(x & (1 << n))
--
http://mail.pyt
Op donderdag 17-06-2010 om 13:01 uur [tijdzone -0700], schreef Stephen
Hansen:
> On 6/17/10 12:13 PM, Laurent Verweijen wrote:
> > How do I make sure the inputstream stays open after the first call to
> > communicate?
>
> This was just asked a few days ago in different
Op donderdag 17-06-2010 om 13:48 uur [tijdzone -0700], schreef Stephen
Hansen:
> On 6/17/10 1:42 PM, Laurent Verweijen wrote:
> > I tried putting what Ian Kelly said in my code, by it doesn't work for
> > me.
> >
> > Python 2.6.5 (r265:79063, Apr 16 2010, 13:5
Op donderdag 17-06-2010 om 23:09 uur [tijdzone +0200], schreef Laurent
Verweijen:
> Op donderdag 17-06-2010 om 13:48 uur [tijdzone -0700], schreef Stephen
> Hansen:
> > On 6/17/10 1:42 PM, Laurent Verweijen wrote:
> > > I tried putting what Ian Kelly said in my code, b
Op donderdag 17-06-2010 om 14:36 uur [tijdzone -0700], schreef Stephen
Hansen:
> On 6/17/10 2:09 PM, Laurent Verweijen wrote:
> > It just gives me an empty string.
> >
> > Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
> > [GCC 4.4.3] on linux2
> > Type
Op donderdag 17-06-2010 om 14:48 uur [tijdzone -0700], schreef Stephen
Hansen:
> On 6/17/10 2:40 PM, Laurent Verweijen wrote:
> > Op donderdag 17-06-2010 om 14:36 uur [tijdzone -0700], schreef Stephen
> > Hansen:
> >> On 6/17/10 2:09 PM, Laurent Verweijen wrote:
> &g
Op donderdag 17-06-2010 om 15:16 uur [tijdzone -0700], schreef Stephen
Hansen:
> On 6/17/10 3:06 PM, Laurent Verweijen wrote:
> >>
> >> In your other thread you include an actual traceback:
> >>
> >> Traceback (most recent call last):
> &
Since I was relatively new to python when python 3 was released (I'm
using it since python 2.5) I don't really care about the print
statement. Making print a function makes print less an exception since
all other functions need brackets.
I also like most of the other changes in python 3 like float
In contrast to java or c python seems not be able to use a random
delimiter.
In java, you can do:
Code:
import java.util.Scanner
Scanner sc = new Scanner(System.in).useSeperator(" ")
int a = sc.nextInt()
But in python there seems to be no other option then waiting until you
see a newline.
I
Hello,
Do you know if it is possible to write a plugin for windows explorer using
win32 module ?
The idea is to modify the way the folders/files are displayed in the explorer
window and also to provide some controls.
Laurent
--
http://mail.python.org/mailman/listinfo/python-list
for each unicode character: ie: /ufffdX
Should I format the data differently inside the xml so minidom is happy ?
Laurent
--
http://mail.python.org/mailman/listinfo/python-list
The xml data is generated on Windows (python 2.6.2) and sent using a post
request to a Django server. The django server is running on Ubuntu server with
python 2.6.2. The post data is passed to minidom for parsing.
Laurent
- Original Message
From: Mark Tolonen
To: python-list
301 - 400 of 406 matches
Mail list logo