473,545 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
1
181
thread by: Jean-Paul Calderone | last post Jun 27 '08 by: Ben Finney
On Mon, 16 Jun 2008 01:37:47 +0900, js <ebgssth@gmail.comwrote: I don't know about ports or macport, but Debian has recently switched to a different policy for python packages which does not involve as many Python version specific copies of things. You might want to look at "python-central" and stdeb. Jean-Paul
0
181
thread by: Alexnb | last post Jul 12 '08 by: Alexnb
Python.Arno wrote: Okay, well thank you very much for your help you answered all my questions :) -- View this message in context: http://www.nabble.com/like-py2exe%2C-but-on-a-mac-tp18424336p18424499.html Sent from the Python - python-list mailing list archive at Nabble.com.
0
181
thread by: Fredrik Lundh | last post Jul 15 '08 by: Fredrik Lundh
Victor Noagbodji wrote: one checks if the given object is not None, the other checks if it's a true value: http://docs.python.org/ref/Booleans.html#Booleans depends on what you want to test for, of course.
0
181
thread by: Alexandr N Zamaraev | last post Jul 16 '08 by: Alexandr N Zamaraev
header_sizes = (36, 26, 22, 18, 14, 12) if x not in header_sizes: raise Exception() else: h36, h26, h22, h18, h14, h12 = tuple( line if x == size else '' for x in header_sizes)
0
181
thread by: pruebauno | last post Jul 30 '08 by: pruebauno
On Jul 29, 11:56 pm, koblas <kob...@gmail.comwrote: I will only make a comment on automatic cModule importing. Some of what you are suggesting already happens (e.g. Elementree). In Python 3.0 more of the "legacy" modules (e.g. StringIO) should also work that way. I don't know what the current status for Pickle is because cPickle had some...
0
181
thread by: | last post Aug 11 '08 by:
I have tried calling a script containing the code below from a web browser and it did not get the text. #!c:/Python25/python.exe -u import StringIO f=StringIO.StringIO() f.write('<html><head><title>data analysis site</title></head><body>') f.write("<p>This is a trial test</p>")
0
181
thread by: Fredrik Lundh | last post Sep 4 '08 by: Fredrik Lundh
Robert Dailey wrote: dictionary lookups use the exact value. to make a case-insensitive lookup, use key.lower() instead of key when creating the dictionary, and then do if lib.lower() not in state_map: ...
1
181
thread by: hrishy | last post Sep 25 '08 by: sturlamolden
Hi Pardon my ignorance again but id ont see any join in python or did i miss something ? regards Hrishy --- On Thu, 25/9/08, sturlamolden <sturlamolden@yahoo.nowrote:
0
181
thread by: gordyt | last post Oct 3 '08 by: gordyt
Howdy Matthias! The delete operation will set the rowcount member of your cursor. Let's assume you have an sqlite3 database with a table called 'test' with an id column. It does have a record with id=1. It does not have a record with id=2. <sqlite3.Cursor object at 0x7f3450> 1 <sqlite3.Cursor object at 0x7f3450>
1
181
thread by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post Oct 18 '08 by: Mark Tolonen
Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. It is dropped, and os.getcwdb() has been added. Regards, Martin
0
182
thread by: Sells, Fred | last post Jun 27 '08 by: Sells, Fred
or for i in range(1,100): print ('fizz','','') + ('buzz','','','','') or i
0
182
thread by: Ethan Furman | last post Jun 27 '08 by: Ethan Furman
kj wrote: You might also look into using an editor that supports custom folding. Define docstrings as folds, then you only need open them when you want to read/edit them; the rest of the time, only one line is visible between the function header and the function. I like Vim. :) -- Ethan
0
182
thread by: Marcus Low | last post Jul 13 '08 by: Marcus Low
Opps here is the mail again, incase my formatting is lost, can someone explain to me why this code behaves differently when "lister" and "self.lister" is swap remarked. class abc : # remark this later and unremark "self.lister" lister = def __init__ (self, val): #self.lister =
0
182
thread by: norseman | last post Jul 21 '08 by: norseman
mercado mercado wrote: =================================== I started to import a module using its path and now see what you mean. Python is missing the concept: Programmer dictates what machine does. (I come from assembly. If the hardware can do it, so can I.) sys.path can be modified to switch between file sets (prod/test). if a...
0
182
thread by: Chris Rebert | last post Aug 29 '08 by: Chris Rebert
On Fri, Aug 29, 2008 at 11:25 AM, <dudeja.rajat@gmail.comwrote: You san simplify that line to just: if item.endswith('\\'): And you don't need the leading 0, so just use: item = item
3
182
thread by: Torsten Mohr | last post Sep 16 '08 by: Matimus
Hi, i use the module optparse to parse the command line: ------example #! /usr/bin/python import optparse parser = optparse.OptionParser()
0
182
thread by: D'Arcy J.M. Cain | last post Sep 29 '08 by: D'Arcy J.M. Cain
On Sat, 27 Sep 2008 18:47:16 -0400 default <default@defaulter.netwrote: What's the point of killfiling Google Groups if people like you are just going to respew this crap. Please consider the Delete key next time. -- D'Arcy J.M. Cain <darcy@druid.net | Democracy is three wolves http://www.druid.net/darcy/ | and...
0
182
thread by: Jean-Paul Calderone | last post Oct 7 '08 by: Jean-Paul Calderone
On Tue, 7 Oct 2008 12:10:44 +1000, James Mills <prologic@shortcircuit.net.auwrote: Probably, yes, but I think this just means the OP used funny language. Perhaps he will clarify, though. Jean-Paul
0
182
thread by: James Mills | last post Oct 7 '08 by: James Mills
On Tue, Oct 7, 2008 at 7:27 PM, Kurt Mueller <mu@problemlos.chwrote: Great! :) Wonderful clarification! cheers James -- -- -- "Problems are solved by method"
0
183
thread by: David | last post Jun 27 '08 by: David
Hi Vlasta. I had a look at your original mail. I think your simpler (than XML) format is a good idea for now. At a later stage you could change it to something like this: <CUSTOM_TAG KC=12 KNJ=13 VCC=0...etc>text goes here, some more text</CUSTOM_TAG> <CUSTOM_TAG KC=13 KNJ=14 VCC=1...etc>text goes here, some more text</CUSTOM_TAG>
0
183
thread by: Laszlo Nagy | last post Jun 27 '08 by: Laszlo Nagy
"The was it" -"The way it" Example: import os,sys mydir = os.split(os.abspath(__file__) os.chdir(mydir) # Option 1 - chdir to dir. containing your app sys.path.insert(0,mydir) # Option 2 - add to your sys.path Good things to know:
0
183
thread by: Saju Pillai | last post Jun 27 '08 by: Saju Pillai
On 28-May-08, at 9:49 PM, Gary Herron wrote: Also dir(object) will get you the list of attributes of that object. -srp
0
183
thread by: Aahz | last post Jun 28 '08 by: Aahz
In article <4bfb891d-7a7b-45bc-b126-1d485c9206ee@m44g2000hsc.googlegroups.com>, Damon Getsman <dgetsman@amirehab.netwrote: Guessing: This is either a source document of text where "@" is some kind of markup indicating a keyword (so that keywords can be e.g. bolded in the output) or this is a snippet of code from some kind of Python-based...
0
183
thread by: norseman | last post Jul 7 '08 by: norseman
I think I should have not used the 'reply' button but rather sent it back through the python-list@... So here here goes. =============== Hendrik van Rooyen wrote: ================================================== In case all else fails:
0
183
thread by: Nagu | last post Jul 8 '08 by: Nagu
Thank you very much Martin. It worked like a charm.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.