If you don't *have* to use the actual socket library, you might want to
have a look at scapy. It's a packet manipulation program/library. It might
make things a little easier.
http://www.secdev.org/projects/scapy/
On Jan 22, 2013 9:17 AM, "Peter Steele" wrote:
> I just tried running you code,
n't think of many.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 8 Jun 2012 09:55:23 -0800
Tim Johnson wrote:
> See the thread titled "Python libraries portable?" you will note
> that Corey Richardson makes the statement that MySQLdb is a C
> extension. I accepted that statement, but upon looking at the
> directories
be limited.
>
https://github.com/petehunt/PyMySQL/ is your best option, when it comes
to using mysql without C extensions. I don't even know if it works, but
it's the only one I could fine.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
ssuming same
architecture and shared libraries, it will *probably* work, but no
guarantees. If any of those are different, even slightly, it will break.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
run it on a SPARC architecture or
> do we need to get the native libraries for SPARC?
>
Pure-python libraries should run wherever Python does, if it doesn't,
that's a bug. C extensions to CPython shouldn't have any platform
incompatibilities, but of course you'll need to rec
e 1, in
> IOError: [Errno 13] Permission denied: '/dev/sda1'
>
> how can i own the access to read sda1?
>
You need read privileges. Either change the permissions of /dev/sda1,
or run python as root.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 1 Jun 2012 15:38:58 +0530
prakash jp wrote:
> Hi All,
>
> Can some one suggest me a module to access SVN repository so that i
> could download any given branch.
>
> Thanks
Doing some basic googling, I found:
http://pysvn.tigris.org/
I imagine you could also sh
hehardway.org/book/ex33.html
Simplistic summary: it executes the indented code under the "while"
until stack evaluates to non-True.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
for broken symbolic links'
> >>> os.path.exists.__doc__
> 'Test whether a path exists. Returns False for broken symbolic links'
>
> Should have been one method:
> >>> os.path.exists(path, ignoreSymLnks=False)
It is.
/usr/lib64/python2.7/ntp
g each terminal 110
characters of breathing space. I still limit my lines to 78 chars though, if
not for any reason besides text is nice and easy to read at that width, and
everyone else is doing it. I have no reason to change. I've never desired more
characters than that.
--
Core
Excerpts from rantingrick's message of Fri Jul 22 02:40:51 -0400 2011:
> On Jul 22, 12:45am, Terry Reedy wrote:
> > On 7/22/2011 12:48 AM, rantingrick wrote:
> > > On Jul 21, 11:13 pm, Corey Richardson wrote:
>
> > Hmm. Archives are more like directories than fil
Excerpts from rantingrick's message of Fri Jul 22 00:48:37 -0400 2011:
> On Jul 21, 11:13pm, Corey Richardson wrote:
> > I agree, actually.
>
>
> Maybe i can offer a solution. A NEW module called "archive.py" (could
> even be a package!) which expor
e do not behave
> like proper file objects should.
>
I agree, actually.
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Stick to what you know please.
>
> Allow me.
>
> Tkinter sucks because it looks like an enfeebled Motif 1980s dawn-of-
> GUIs scratchy window with grooves and lines everywhere.
>
Themed Tk (TTK) has come a far way. I'll leave the research for you, however,
as I can not give t
ata). Inconsolata
looks great on paper, though. DejaVu Sans Mono isn't the prettiest thing
but it certainly gets the job done.
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
--
"", line 1, in
TypeError: 'Foo' object is not iterable
>>>
Which is tons more useful than
>>> assert isinstance(f, (list, tuple))
Traceback (most recent call last):
File "", line 1, in
AssertionError
>>>
--
Corey Richardson
&q
(Or maybe the search is more advanced than I use it). They aren't
exactly warts, it's useful information, but in the common case they probably
aren't desired (I always use Google to search around the python docs).
Not to mention that the search is slooowwww. It's plenty fast
ith *function* docstrings.
>
Ah. My bad, thank you for clarifying.
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
wxGlade for wxWidgets, QtCreator (And something new for their newer
system, don't remember the name), etc.
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
gt;> def foo():
... "Docstring"
... print __doc__
...
>>> foo()
None
>>>
What does yours do?
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
ame ds at it. Do you know what a docstring is?
def foo():
"""I am a docstring"""
pass
def bar():
ds = "I am not a docstring!"
def baz():
"I am a docstring too!"
pass
def qux():
'And even me! Quote type don't matter
is the real part, b is the imaginary.
Python uses j,
>>> 4+5j
(4+5j)
http://en.wikipedia.org/wiki/Complex_number
http://docs.python.org/library/stdtypes.html#typesnumeric
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham L
lst[i], lst[i+1] = lst[i+1], lst[i]
Untested, probably doesn't work either. See what's in there? An if. Nothing
"user-defined" at all. Sure, WHAT the if does is user-controlled with the
key, but that doesn't make that particular if a new control structure, and
it certain
Excerpts from H Linux's message of Fri Jul 01 16:02:15 -0400 2011:
> Dear all,
>
> I am currently fighting with a problem writing a set of Python
> extensions in C.
If you haven't seen it yet, Cython is a *very* nice tool for writing
C extensions. http://cython.org/
--
Cor
" would be useful.
But I'm not really certain that would make much of a difference.
I'll Cc this to d...@python.org.
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
as the new object you
create with []. It keeps that object around. The proper idiom instead of
> >>> def a(foo=[]):
> ... foo.append(1)
> ... print foo
> ...
is
def a(foo=None):
if foo is None:
foo = []
foo.append(1)
print foo
--
sing you're going to want to go through and edit Makefile.pre.in
and take out stuff you dont' want. Just make sure you know what you're
doing. That said, this was an educated guess, I don't actually know.
http://hg.python.org/cpython/file/c5b0585624ef/Makefile.pre.in
Best of l
ifference
http://wiki.python.org/moin/Python2orPython3
Pick one and learn it well. It'll be easy to switch to the other when/if
you need to. Right now lots of nice libraries only support 2.x, like
Twisted and lots of web frameworks (all? I think there's one or two that
use 3).
- --
Corey Richardson
r but
new challenge to my brain. Thank you for your work and for sharing.
- --
Corey Richardson
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
iQEcBAEBAgAGBQJN7ILhAAoJEAFAbo/KNFvpFjYH/A+5l58MURNwSkNkRvejcS83
GDCVkq7I9ojqkGdEMi4get4oz0z+TQnZ5PTjHNMpgZvbI+AM6esQ2NPKIUGQd4l
ies you jump over onto the edu-sig list.
- --
Corey Richardson
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
iQEcBAEBAgAGBQJN18oPAAoJEAFAbo/KNFvp9MwH/0zXSTTaxAwYPLSxhyirqr3X
DUxyulE5HRn+NIarWyomlDfoayip3boyUBG1GQDDKh+sIIzPT9ETfL7+ep9rwkL4
VA7XSDMLu+4DtUlnFjGlfx
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 05/17/2011 04:55 PM, Ethan Furman wrote:
> Apparently, it's not well documented. If you check PEP 358
> you'll find it.
>
> ~Ethan~
Agreed, it looks like it should be mentioned in bytes.__doc__ about the
single-integer
ss it
an iterable, ex:
>>> bytes([5, 6, 1, 3])
b'\x05\x06\x01\x03'
- From help(bytes):
| bytes(iterable_of_ints) -> bytes
| bytes(string, encoding[, errors]) -> bytes
| bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
| bytes(memory_view) -> byte
ror: name 'HelloError' is not defined". I don't know how to
> define the exception.
class HelloError(Exception):
pass
Of course, there are all sorts of other things you could do with your
exception.
http://docs.python.org/tutorial/errors.html#user-defined-exceptions
quot;BDFL"}
data = urllib.urlencode(data)
request = urllib2.Request(url, data)
response = urllib2.urlopen(request)
page = response.read()
So yeah, passing in a Request object to urlopen that has some
urlencode'ed data in it.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
harp.
>
Roll your own http://docs.python.org/library/string.html#string.Formatter
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
e: {0}".format(bar)
...
>>> foo = Foo()
>>> foo("Me!")
Name: Me!
Ok, nothing out of the ordinary. But what happens if
>>> foo.name.__call__("Corey")
Name: Corey
>>> eval("foo.name" + (".__call__" * 9001)
On 03/29/2011 01:17 PM, Benjamin J. Racine wrote:
> Hello all,
>
> Does anyone know of software that might be of use in an attempt to animate an
> object undergoing 6-DOF rigid body motions: surge, sway, heave, roll, pitch
> and yaw?
>
> Thanks so much,
> Ben Racine
s a rather extensive Python API that allows you to make
scripts that can access any part of the software, or almost any part of it.
Just look at http://en.wikipedia.org/wiki/List_of_Python_software
It's not a complete list either.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
rating or most downloaded as far as i can tell
Unknown Horizons is pretty OK, and the upcoming PARPG looks promising
(both use the FIFE engine).
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
On 03/15/2011 03:18 PM, gelonida wrote:
> o it seems another book or some other documentation would be great.
>
> Does anyone have recommendations?
>
http://krondo.com/?page_id=1327
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
On 03/10/2011 03:35 PM, Corey Richardson wrote:
> Middle button is Button-3 IIRC, and I think it'd be MouseUp and
> MouseDown. I'm really not sure though.
It's Button-2 rather.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
r any help!
>
> Dick
Middle button is Button-3 IIRC, and I think it'd be MouseUp and
MouseDown. I'm really not sure though.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
estion spawns from my ignorance: When would a functions
definition change? What is the difference between a dynamic function and
a fixed function?
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
uot;. I'm sure the same applies for Glade.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
it becomes more complete / more
examples/tutorials using it become available. Tkinter is easy to use and
comes right in the standard library.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
#x27;s a good start, so you're more familiar with the language
compared to the ones you currently know. And then you can try a web app
with Django, but I suggest Pyramid instead.
--
Corey Richardson
[1] - Well, kinda. You could have Django driving the back-end and maybe
use AJAX and have th
e players.
So look into XMPP (xmpppy or Twisted Words are your choices, I guess)
and learn up on Javascript.
That's my take on it, at least. I'm sure someone with more experience
could direct you more specifically.
Turn-based would be much easier.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
P script via a webpage, so are you trying to
use Python with the CGI to do this? If so, check out the actionscript
thing at [1] and just implement the server page with Python CGI instead
of PHP.
[1]
http://www.actionscript.org/resources/articles/82/1/Send-Email-via-Flash-and-PHP/Page1.html
--
Co
i in range(subsetrange):
multiplysubset.append(recursiveMultiply(elemlist, i, 0))
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
on filling them.
What are those gaps?
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
or smoothly shrink or grow?
>
> My working knowledge of Tkinter tells me that Tkinter's pack and
> grid layout techniques will not be optimal for the above type of
> animations.
The place geometry manager might suit your needs, but that can be a bit
PITA to work with. By can, I
bpython, etc? What key combination are you using?
My instinctive guess is that you are trying to Ctrl-C to copy something
in the interpreter, which actually just raises a KeyboardInterrupt
exception. However your additional symptoms seem to indicate otherwise.
A more verbose description is neede
compact_range = "5-7".split('-')
final_nums += range(int(compact_range[0]), int(compact_range[1]) + 1)
And then looping through your compact notation deciding when it's a
range notation and when it's a literal is all you have to do.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
On 02/25/2011 03:39 AM, Corey Richardson wrote:
> Also, if one understands how a unicode byte looks like in a string, it's
> pretty easy to understand, and looks a hell of a lot clearer than a
> bunch of chr()'s without any space between. That's just my two cents.
Err.
, 45, 15, 3, 0, 3)])
>
>> or even shorter, as a string constant:
>
>> sine = '\x0f-?-\x0f\x03\x00\x03'
>
> Now show your code to a 10 year old and see if he understands it...
When I was 10 all I knew was Logo (and very little of it)!
Also, if one understands how a unicode byte looks like in a string, it's
pretty easy to understand, and looks a hell of a lot clearer than a
bunch of chr()'s without any space between. That's just my two cents.
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
four months ago, correct?
See:
>> On Wednesday, August 04, 2010 7:40 PM ? wrote:
--
Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
On 02/11/2011 10:20 PM, Abhishek Gulyani wrote:
> When I write binary files in windows:
>
> file = open(r'D:\Data.bin','wb')
> file.write('Random text')
> file.close()
>
> and then open the file it just shows up as normal text. There is nothing
> binary about it. Why is that?
>
> Sorry if this
On 02/09/2011 04:50 PM, Paul Symonds wrote:
> Are there any good resources to learn OO Python from?
>
To my knowledge, all Python is OO. What specifically about OOP do you
want to know?
http://www.alan-g.me.uk/tutor/tutclass.htm
I've always liked Alan's site. Come over to the Tutor list if you
On 02/07/2011 05:27 PM, Richard Holmes wrote:
> I'm trying to create an image for use in Tkinter. If I understand the
> PIL documentation correctly, I first need to import Image, then
> create an instance of the Image class and call 'open'
Don't do that. This is wrong:
import Image
im = Image.Ima
In my journeys across the face of the Internet, I found this:
http://p2pu.org/general/python-challenges
Not sure what it's really going to be, but any new programmers/people
looking for something to do might be interested. I'm not quite sure how
a class can be organised around a web riddle, but it
tplotlib's source and put it in your own code, or even
just write it yourself.
~Corey
--
http://mail.python.org/mailman/listinfo/python-list
On 02/03/2011 03:15 AM, Markus wrote:
> Hi,
>
> As a beginner in python, I am looking for example code that would help
> me understand how to
> code following idea:
> 1. Start minimal http server
> 2. Send GET or POST data (url encoded, or from form) - example
> Name="Foo"
> 3. Analyze the GET/POS
On 02/03/2011 03:15 AM, Markus wrote:
> Hi,
>
> As a beginner in python, I am looking for example code that would help
> me understand how to
> code following idea:
> 1. Start minimal http server
> 2. Send GET or POST data (url encoded, or from form) - example
> Name="Foo"
> 3. Analyze the GET/POS
On 2/2/2011 2:44 PM, rantingrick wrote:
[snip]
py> flamer_group.append(troll_group.pop("Corey Richardson"))
Your moving up Corey. Keep up the good work!
I don't recall ever doing anything but injecting my honest opinion. If
my opinion may be flawed (or appears to be
On 02/01/2011 07:42 PM, Robert wrote:
> On 2011-02-01 10:54:26 -0500, Terry Reedy said:
>
>> On 2/1/2011 12:13 AM, rantingrick wrote:
>>> On Jan 31, 4:17 pm, Kevin Walzer wrote:
Rick,
>>
>>> Yes. IDLE is first and foremost a tool to get work done. However we
>>> should not ignore the fact th
On 02/01/2011 04:20 PM, Tracubik wrote:
> Hi all!
> i'm writing a notification program and i'm quite new to python.
> The program have to check every 5 minutes a particular website and alert
> me when a particular sentence ("user online") is in the html.
> i've thinked to use a text browser (lynx)
On 02/01/2011 03:05 PM, rantingrick wrote:
> On Feb 1, 1:35 pm, John Nagle wrote:
>> On 1/31/2011 2:17 PM, Kevin Walzer wrote:
>>
>>> It certainly would be interesting to see a fresh approach to IDLE...
>>
>> The future of "playing with Python" is probably Python in a browser
>> window, of which t
On 01/27/2011 09:53 PM, alex23 wrote:
> rantingrick wrote:
>> You'll need to read that snippet in context to understand what i was
>> talking about. Again, see my "tip of the day" in my last post to you.
>
> Pass. I'd have to see value in what you say inside of the endless
> masturbatory self-agg
On 01/27/2011 05:08 PM, rantingrick wrote:
>> wxPython is the best and most mature cross-platform GUI toolkit, given a
>> number of constraints. The only reason wxPython isn't the standard
>> Python GUI toolkit is that Tkinter was there first.
>> -- Guido van Rossum
>
> You forgot to put a date on
On 01/27/2011 04:10 PM, rantingrick wrote:
> On Jan 27, 2:00 pm, Terry Reedy wrote:
>> On 1/27/2011 12:54 PM, Octavian Rasnita wrote:
>>
>>> Everything that's not accessible is not recommended.
>>
>> By you. We get that.
>>
>> >Tkinter should be at most accepted because there is no better solutio
On 01/26/2011 01:18 AM, Octavian Rasnita wrote:
> From: "rantingrick"
> On Jan 25, 3:41 pm, Corey Richardson wrote:
>
>> Do you honestly think he was talking about the accessibility problem?
>> IMO that should move to another thread, because this one is simply
&g
On 01/25/2011 03:55 PM, Octavian Rasnita wrote:
>
>> this thread was a "psy-ops" (psychological
>> operations) trick to turn off wxPython adopters by associating it with
>> juvenile nonsense
>
> Do you think the need for accessibility is a nonsense?
> Or do you think it is something juvenile?
>
idea why, I've never used wxPython before today.
Unfortunately, it doesn't actually show the items in the directory.
Since I'm definitely not a wxPython user, would you mind making the
above work, rantingrick? Not trying to worm out of anything, but this
is way over my head.
On 01/23/2011 09:29 PM, rantingrick wrote:
On Jan 23, 8:07 pm, Corey Richardson wrote:
because imageIdx is just a dictionary,
No, imageIdx is an integer.
You're right.
imageIdx = self.imageMap[iconname]
I confused imageIdx with self.imageMap. But that still doesn't fix my
p
On 01/23/2011 08:28 PM, rantingrick wrote:
On Jan 23, 6:30 pm, Corey Richardson wrote:
On 01/23/2011 07:07 PM, rantingrick wrote:
On Jan 22, 6:07 pm, rantingrickwrote:
I await any challengers...
WxPython Challenge 1 code updated...
* Fixed tab traveral
* Removed hand
On 01/23/2011 08:50 PM, rantingrick wrote:
On Jan 23, 7:40 pm, Corey Richardson wrote:
Why can't we use a TreeCtrl? If we can't use all our widgets, why can
you use all yours?
~Corey
Columns Corey, the key word here is "columns". One more
time...COOLUUUMMMNNNSS
x27;t use all our widgets, why can
you use all yours?
~Corey
--
http://mail.python.org/mailman/listinfo/python-list
-challenges
Good luck!
Still doesn't fix the problem of the code not working on Linux boxes.
Maybe wxPython isn't the best option, it doesn't appear very cross-platform.
Still getting:
Loading Images:
-- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/file.bmp, file.bmp
-- /home/
.
Here is the output on my system (Linux Mint 64bit):
/home/corey/Downloads/Wx_Tk_Challenge/Bitmaps
Loading Images:
-- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/file.bmp file.bmp
-- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/folder.bmp folder.bmp
-- /home/corey/Downloads/Wx_Tk_Challenge/B
On 01/23/2011 04:05 PM, CM wrote:
In Python, is there a recommended way to write conditionals of the
form:
"if A and B but not C or D in my list, do something." ?
I may also have variations on this, like "if A but not B, C, or D".
Do I have to just write out all the if and elifs with all poss
On 01/23/2011 05:18 AM, rusi wrote:
Tried the code with debian sid and default python (2.6)
I get (after some loading... statements)
Segmentation fault
[Actually this is the first time in my 10 years of python that Ive
seen a pure python module segfault :-) ]
I also have a segfault. You sho
nd easy, comes built
into Python. Looks like you need two labels, an entry, and a button.
When I was learning Tkinter I used http://effbot.org/tkinterbook/.
Hope it helped,
~Corey
--
http://mail.python.org/mailman/listinfo/python-list
On 01/18/2011 11:15 PM, rantingrick wrote:
> On Jan 18, 10:10 pm, Corey Richardson wrote:
>
>> That is a pretty large dependency to rely on, and it is rather
>> undesirable IMO.
>
> And what exactly is undesirable? Unless you actually back up your
> statements with
On 01/18/2011 10:54 PM, Adam Skutt wrote:
> On Jan 18, 9:27 pm, Corey Richardson wrote:
>>
>> Why would you add in only a part of wxPython, instead of all of it? Is
>> the work to cut it down really an advantage over the size of the full
>> toolkit? From what I just che
On 01/18/2011 10:24 PM, rantingrick wrote:
> On Jan 18, 9:02 pm, Corey Richardson wrote:
>
>> If that's what you believe, I don't think many (if any) here have an
>> issue with replacing Tkinter with something that has more features and
>> is just as easy to use
On 01/18/2011 09:46 PM, rantingrick wrote:
> On Jan 18, 8:27 pm, Corey Richardson wrote:
>
>> You mentioned having a segment of wxPython in the stdlib earlier. If
>> this actually feasible from a legal standpoint, and would the
>> maintainers of wxPython be willing to p
On 01/18/2011 09:16 PM, rantingrick wrote:
> On Jan 18, 7:59 pm, Corey Richardson wrote:
>> On 01/18/2011 08:41 PM, rantingrick wrote:
>
>> >From that, it appears we need to:
>>
>> 1. Replace Tkinter with something more modern and feature-complete, but
>&g
On 01/18/2011 08:41 PM, rantingrick wrote:
> On Jan 18, 7:19 pm, Corey Richardson wrote:
>
>> I for one am quite pleased with Tkinter up to this point. It allowed me
>> to come in with extremely minimal GUI experience, and make something
>> that worked with minimal
hy should Tkinter
be replaced? Why was it added there in the first place? What should
replace it, and why? Instead of arguing about little piddly details like
the difference between a button and a hyperlink, just stick to the task
at hand that you yourself presented.
My two cents,
~Corey
--
http://mail.python.org/mailman/listinfo/python-list
On 01/15/2011 08:48 PM, Jean-Francois wrote:
> Hi,
>
> I try to match the following url with one regex
>
> /hello
> /hello/
> /hello/world
> /hello/world/
>
>
> world is a variable, I can put toto instead
>
> Thanks !
What was the regex you tried, and where did it fail? I'm no re guru, but
he
On 01/12/2011 07:39 PM, Corey Richardson wrote:
> On 01/12/2011 07:35 PM, Cathy James wrote:
>> Dear all,
>>
>> I hope someone out there can help me.
>>
>> The output string of my code is close to what i need, but i need it
>> 1)printed on one line a
On 01/12/2011 07:35 PM, Cathy James wrote:
> Dear all,
>
> I hope someone out there can help me.
>
> The output string of my code is close to what i need, but i need it
> 1)printed on one line and
> 2) reversed
>
> #mycode:
> s= input("Enter message: ")
> key=1
> for letter in s:
> num=(
On 01/10/2011 10:24 PM, Dan Stromberg wrote:
> On Mon, Jan 10, 2011 at 5:22 PM, Krzysztof Bieniasz
> wrote:
>>> Also depends on how one defines "popularity" in the context of
>>> programming languages.
>>
>> Tiobe quite clearly states what they mean by the name "popularity".
>> Namely the number o
ger.
>
>
> --
> I'm a pessimist about probabilities; I'm an optimist about possibilities.
> Lewis Mumford (1895-1990)
>
Seems to me to be a standard enforced by Windows itself, not any an
issue with the modules. What exactly are you doing?
~Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
> try:
> a = int(a)
> except:
> print("not an integer")
> exit(1)
>
Here it would be better to use:
if type(a) != int
print("Not an integer")
exit(1)
> count = 0;
> count = count + 1;
> if (x == a**2 + b**2):
>
> print "double square"
~Corey Richardson
--
http://mail.python.org/mailman/listinfo/python-list
;>>> for line in q_file:
> print line # prints nothing
>
> ...why does it print nothing?
IIRC, iterating through the lines in a file moves the cursor (is that
the correct term?) to the end of the file. After the first one, use
q_file.seek(0) to go back to the start. I
I moved from the API's. Should I change version just for
> these library's?
>
> Should I be learning Python on 3.1?
>
> Awesome!
>
> [snip]
I swapped from 3 to 2.6 a while back, better support for modules, and
not really losing much in the way of features.
~
e, and I learned a lot. #python recommends
http://www.greenteapress.com/thinkpython/html/index.html in the topic,
and the Python tutorial at http://docs.python.org/tutorial/ is quality,
you may learn quite a bit from it. If you have questions, I suggest you
look into the tutor mailing list, tu..
implementation of
Expect that claims to run on Windows also:
http://code.google.com/p/python-expect/
-Corey
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 120 matches
Mail list logo