Re: questions concerning cgi.FieldStorage(keep_blank_values=1)

2005-02-20 Thread Daniel Lichtenberger
ing (CGI stores the request string as an environment variable, you can retrieve it via os.environ["REQUEST_STRING"]), but why not add "=1" (or "=") to your keywords? bye, Daniel -- http://perplex.schmumpf.de/ [visit for regular email address] -- http://mail.python.org/mailman/listinfo/python-list

Re: assert 0, "foo" vs. assert(0, "foo")

2005-02-23 Thread Daniel Fackrell
> "Thomas Guettler" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > Hi, > Python 2.3.3 (#1, Feb 5 2005, 16:22:10) [GCC 3.3.3 (SuSE Linux)] on linux2 > >>> assert 0, "foo" Assert that 0 is true. If that fails, raise AssertionError("foo"). > Traceback (most recent call last): >

Socks-4 Client Example in Twisted

2005-02-23 Thread Daniel Chandran
I am looking for examples on how to write a Socks-4 client example using the Twisted framework. Has anybody attempted this or aware of examples? Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Arrow-keys bug.

2005-02-23 Thread Daniel Alexandre
c. Does anyone here knows how I can strip those keys? Thanks in advance. - -- Cumprimentos, Daniel Alexandre ( [EMAIL PROTECTED] ) Chave pÃblica PGP: http://student.dei.uc.pt/~dfcruz/pubring.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFCHMAEL3+DjgQV3LgRApyBAJ9iPL428O

Re: arrow keys bug

2005-02-24 Thread Daniel Alexandre
about that or the location of that in the python-docs, as I can't seem to find anything about that. Thanks in advance. - -- Best Regards, Daniel Alexandre ( [EMAIL PROTECTED] ) PGP Public Key: http://student.dei.uc.pt/~dfcruz/pubring.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2

Re: Flushing print()

2005-02-24 Thread Daniel Yoo
gf gf <[EMAIL PROTECTED]> wrote: : Is there any way to make Python's print() flush : automatically, similar to...mmm...that other : language's $|=1 ? Hello gf gf, Yes; you can use the '-u' command line option to Python, which will turn off stdout/stderr buffering. : If not, how can I flush it

Re: Why do descriptors (and thus properties) only work on attributes.

2005-02-28 Thread Daniel Dittmar
many think that overloading assignment is a bad idea. You probably find some dicussions when searching for "overloading assignment" in the newsgroup archive. >>>to an object or class. I think a lot of interesting things one can As in the chinese curse "May you live in inter

Re: My C module crashes

2005-02-28 Thread Daniel Dittmar
ounts of the list elements etc. Daniel Dittmar -- http://mail.python.org/mailman/listinfo/python-list

Re: Google Technology

2005-03-01 Thread Daniel Yoo
[EMAIL PROTECTED] wrote: : I am just wondering which technologies google is using for gmail and : Google Groups??? Hello Vijay, You may want to look at: http://adaptivepath.com/publications/essays/archives/000385.php which appears to collect a lot of introductory material about the client-s

Re: assigning a custom mapping type to __dict__

2005-03-01 Thread Daniel Cer
Why not just inherit from dict? That seems to work. >>> class M(dict): ... def __getitem__(self,key): ... return 42 ... def __setitem__(self,key,value): ... pass ... >>> class C(object): ...pass ... >>> c = C() >>> c.__dict__ = M() >>> c.__dict__['x'] 42 -Dan Steven Bethard wrote: I

Re: assigning a custom mapping type to __dict__

2005-03-01 Thread Daniel Cer
> > Why not just inherit from dict? That seems to work. > > Because that isn't the question - Steven knows how to make it work, what he's > curious about is why things are the way they are :) Sorry, didn't mean to be a pest :) I guess I assumed Steve already knew that he could inherit from dict.

Re: Regular Expressions: large amount of or's

2005-03-01 Thread Daniel Yoo
Kent Johnson <[EMAIL PROTECTED]> wrote: :> Given a string, I want to find all ocurrences of :> certain predefined words in that string. Problem is, the list of :> words that should be detected can be in the order of thousands. :> :> With the re module, this can be solved something like this: :>

rearrange text

2005-03-02 Thread Daniel Skinner
If I have the following text var = '1,2,3,4' and I want to use the comma as a field delimeter and rearrange the fields to read '1,3,2,4' How would I accomplish this in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: rearrange text

2005-03-02 Thread Daniel Skinner
ah thanks I couldn't figure out how to join it up very appropriately, had this loop ... yeeeaah .. :) Thanks for both comments -- http://mail.python.org/mailman/listinfo/python-list

"Static" python program

2005-03-04 Thread Daniel Frickemeier
Hi, I have a strange problem. I´m developing a small python-program wiht the mysql-python-module. The program should run on a server without any mysql-installation. Is there any posibility to "kompile" a python with static libaries? thanx Daniel -- http://mail.python.org/mailma

Re: Wrong with this script?

2005-03-05 Thread Daniel Fackrell
stead here. > if again!="yes": > mainloop = 0 This last line needs indented. And a couple of minor points: 1. Choose an amount of indentation per level and stick to it. 4 is rather common in Python code. 2. When posting to the list, make sure that the lines in your code are short enough that they will not wrap and be posted as broken code. 70 chars is usually safe. Daniel Fackrell -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong with this script?

2005-03-05 Thread Daniel Fackrell
k" out of the loop and continue executing. You may also want to look at the rest of your script for another place you can use "break" in order to eliminate a flag. Happy scripting, and welcome to the bliss that is Python. Daniel Fackrell -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe string escaping?

2005-03-07 Thread Daniel Bickett
quot;\0" ) >>> string 'foo\n\x00' >>> print string foo Hope this helps. -- Daniel Bickett dbickett at gmail.com http://heureusement.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: quick question

2005-03-07 Thread Daniel Bickett
..\"" >>> print string "If thou wert my fool, nuncle..." >>> if string.startswith("\""): string = string[1:] >>> print string If thou wert my fool, nuncle..." >>> if string.endswith("\""): string = string[:-1] >>

Re: parameter name conflict. How to solve?

2005-03-08 Thread Daniel Dittmar
Bo Peng wrote: def func(output=''): output(output=output) Naturally, I get 'str' object is not callable. Is there a way to tell func that the first output is actually a function? (like in C++, ::output(output) ) output_alias = output def func (output=''): outp

Python 2.4 OSX Package

2005-03-08 Thread Daniel Alexandre
.pkg format and it's compressed using Stuffit Expander (.sitx); both the Installer and Stuffit already come with OSX so no addicional applications are needed to install it. Download location: http://student.dei.uc.pt/~dfcruz/osxpkgs/ - -- Best Regards, Daniel Alexandre ( [EMAIL PROTECTED] )

Re: split a string with quoted parts into list

2005-03-10 Thread Daniel Dittmar
ies into a list of strings? Try the standard module shlex (http://www.python.org/dev/doc/devel/lib/module-shlex.html). It might be that the quoting rules are not exactly the ones you need, though. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I set up a timer as a subprocess?

2005-03-10 Thread Daniel Schüle
Hi > Trying to set up a timer function for my irc bot, which uses the python > irclib.py. > > If I use time.sleep(20), it tends to freeze up the bot completely for 20 > secs. That's not what I want though! I want the program to wait 20 secs, > then perform another function, but in the meantime be

Licensing Python code under the Python license

2005-03-11 Thread Daniel Keep
makes numerous direct mentions of Python and the PSF. Is there any acceptable way to simply say that a particular source file is under the PSF license (like you can w/ the GPL/LGPL), and would it even apply? Or am I just on the completely wrong track, and should I look elsewhere? :P Thanks. -- D

Re: Licensing Python code under the Python license

2005-03-12 Thread Daniel Keep
Wow. That was fast. PHP forums eat your heart out :P Thanks for the advice. I'll probably go with either the BSD license, or possibly the LGPL. But I'm leaning towards the BSD since it fits on the screen... -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expressions: large amount of or's

2005-03-13 Thread Daniel Yoo
: Otherwise, you may want to look at a specialized data structure for : doing mutiple keyword matching; I had an older module that wrapped : around a suffix tree: :http://hkn.eecs.berkeley.edu/~dyoo/python/suffix_trees/ : It looks like other folks, thankfully, have written other : implementat

Re: Regular Expressions: large amount of or's

2005-03-13 Thread Daniel Yoo
John Machin <[EMAIL PROTECTED]> wrote: : tree.search("I went to alpha beta the other day to pick up some spam") : could use a startpos (default=0) argument for efficiently restarting : the search after finding the first match Ok, that's easy to fix. I'll do that tonight. -- http://mail.python

Re: Regular Expressions: large amount of or's

2005-03-14 Thread Daniel Yoo
Daniel Yoo <[EMAIL PROTECTED]> wrote: : John Machin <[EMAIL PROTECTED]> wrote: : : tree.search("I went to alpha beta the other day to pick up some spam") : : could use a startpos (default=0) argument for efficiently restarting : : the search after finding the first match

Re: Licensing Python code under the Python license

2005-03-14 Thread Daniel Dittmar
commercial program than the GPL does? The BSD license offers less protection than the GPL. But it gives more rights to the buyer of the software, so it might be an easier sell. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: will it cause any problems to open a read-only file & not close it?

2005-03-14 Thread Daniel Dittmar
t to write a small function to that effect. It would perhaps be wise to acknowledge the existence of Jython and IronPython by allowing an additional flag for open to the effect "close when the end of the file is reached". This would prevent similar problems with iter (open (...)), which c

Re: Regular Expressions: large amount of or's

2005-03-14 Thread Daniel Yoo
Scott David Daniels <[EMAIL PROTECTED]> wrote: : I have a (very high speed) modified Aho-Corasick machine that I sell. : The calling model that I found works well is: : def chases(self, sourcestream, ...): : '''A generator taking a generator of source blocks, : yielding (

Question about string.printable and non-printable characters

2005-03-15 Thread Daniel Alexandre
s? Thanks in advance. If you can, please reply to my email. - -- Best Regards, Daniel Alexandre ( [EMAIL PROTECTED] ) PGP Public Key: http://student.dei.uc.pt/~dfcruz/pubring.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFCNv94L3+DjgQV3LgRAk0yAKDN5lzrXqsVY5zg

Re: Getting current variable name

2005-03-16 Thread Daniel Dittmar
27;is' instead of '=='. This will return true if the arguments are the same object: >>> l1 = [1, 2, 3] >>> l2 = [1, 2, 3] >>> l1 == l2 True >>> l1 is l2 False Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-16 Thread Daniel Dittmar
8.html). There have been other proposals where you could write 'for i in 5' etc. I find this 'creative use of overloading' rather awful. But what the heck, I find list comprehension rather awful. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-16 Thread Daniel Dittmar
ore common programming error I commit is passing a string where a list ist expected. And then I wonder why later operations work on one-character strings. Operator overloading is certainly an irregular verb: - I make the usage more intuitive - Yours may lead to misinterpretation - He obfuscates Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-18 Thread Daniel Dittmar
why later operations work on one-character strings. The standard answer to this seems to be to use unittesting. I do detect that there is a problem. It just takes longer to find the source of bogus data than to look at a stack trace. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Closing files

2004-11-29 Thread Daniel Dittmar
be quite easy should the need of a Jython port arrive, so why bother about it now? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Closing files

2004-11-29 Thread Daniel Dittmar
Timo Virkkala wrote: Daniel Dittmar wrote: And then there are a lot of people who think that changing all the readlines one liner would be quite easy should the need of a Jython port arrive, so why bother about it now? The problem with this approach is, when the time for the Jython port arrives

Re: pickle and py2exe

2004-12-03 Thread Daniel Bickett
> While looking into this, I had seen some mention of protocol option in > pickle. I > hadnt specified anything for protocol, so it defaults to 0 though I dont know > what that is. Its my first time using pickle and second with py2exe. If you think this might be your problem, then it would be bes

Re: installing wxPython on Linux and Windows

2004-12-03 Thread Daniel Bickett
> I have no way to build it on Windows though, as I don't have Visual C++ > 7.1, for that we must wait for Robin Dunn. Would it be too difficult of a task to try getting the build working with Dev-C++? That way those without enough incentive for purchasing Visual C++ (in excess of $100, I believe)

Re: Win32 Libs for 2.4

2004-12-06 Thread Daniel Dittmar
ght one is picked at runtime by checking sys.version. Creating one lib which is then linked to python2*.lib works most of the time, but you'll probably get a warning during loading of the module that the extension has been compiled for a different version of the API. Daniel -- http://mail.pyt

Re: Win32 Libs for 2.4

2004-12-06 Thread Daniel Dittmar
. zlib is also part of the Python sources on Windows, so it shouldn't be a problem to build it for PIL. I'm not sure what effort would be needed to build jpeg lib using MSC 7.1. My guess would be that there is hardly any effort if an nmake file exists and a bit more work if you only ha

Re: Win32 Libs for 2.4

2004-12-06 Thread Daniel Dittmar
ly if the definitions in MSC 6 and MSC 7.1 differ) - calling conventions: in the past, that was a problem mostly with functions returning structs. (Meaning caller and callee would implement it differently if they were compiled by different compilers) Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: regex syntax

2004-12-07 Thread Daniel Dittmar
quot;build.jpg", ".jpg"): ... 2.) Debugging regular expression: Just remove meaningful chunks from the end of the expression until you have an expected match. Then add them again one by one, most problems will become quite obvious. And how do I wish there was a debug mode that w

Re: os.system() inside a thread problem

2004-12-11 Thread Daniel Bernhardt
Fredrik Lundh wrote: > in the example you included, you use execv. which one is it? it should be system(). I just played a bit and forgot to change it back. > > just curious: do you really have to use a thread? why not just do > >os.system(command + "&") > No, i don't need to use a th

Skinnable/Stylable windows in wxPython?

2004-12-12 Thread Daniel Bickett
eally can't use that. I've combed through the demo countless times, but I really can't find any answers. So, the question: what is the best way (or is there one, rather) to achieve an end comparable to skinning my wx windows? Thanks for your help, Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list

Re: Best book on Python?

2004-12-12 Thread Daniel Bickett
:) But maybe that's just me. Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list

Re: Skinnable/Stylable windows in wxPython?

2004-12-12 Thread Daniel Bickett
), but it would be more useful, considering the fact that it is in fact a frame, and wouldn't have the problems that M.E.Farmer outlined above regarding controls on wxPopupWindows. Regardless, I'm happy that I've uncovered the answer, and I hope this helps someone else in the same situation :)

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-16 Thread Daniel Dittmar
cmd.exe, use doskey to create an alias or create a batch file. > is well. Is there some reason this shouldn't be the standard > installation > under cygwin? Hard links are available only with NTFS volumes. (OK, you could create a hard link with FAT*, but chkdsk will complain.)

os.system() inside a thread problem

2004-12-11 Thread Daniel Bernhardt
the thread. Can anyone tell me how I can fix this? Google told me simillar problems were fixed by upgrading to python 2.4. that is no option for me. Thanks, Daniel some example code: from threading import Thread runuo = StartUO(command) runuo.start() class StartUO(Thread): def __ini

memory leak

2004-12-21 Thread Daniel Wheeler
? Thanks - Daniel Wheeler Telephone: (301) 975-8358 -- http://mail.python.org/mailman/listinfo/python-list

Re: memory leak

2004-12-21 Thread Daniel Wheeler
11:41 AM, Fredrik Lundh wrote: Daniel Wheeler wrote: Can python leak memory even if the reference count for all the objects is not increasing? sure. For example: for i in range(N): print ref_count_all_objects() do_something() and every iteration the ref count is constant but the m

Re: memory leak

2004-12-21 Thread Daniel Wheeler
e.com/ASPN/Cookbook/Python/Recipe/286222 http://www.nightmare.com/medusa/memory-leaks.html On Dec 21, 2004, at 12:18 PM, Stephen Kellett wrote: In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes However, I would like to understand first if pure python can leak witho

Re: Skinnable/Stylable windows in wxPython?

2004-12-22 Thread Daniel Bickett
se it has not yet been caught blah blah", so I just wrapped the contents of OnMouseLeftUp in a try..except..pass. Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE problem :-(

2004-12-24 Thread Daniel Bickett
limited to the beginning of the prompt, and 'home' sends you beyond it. The only 'work around', so to speak, I can think to recommend is simply using a different shell for your purposes, i.e. python.exe (on windows). Daniel Bickett On Sat, 25 Dec 2004 09:55:10 +1030, Ishwor <[

Re: need some help with threading module...

2004-12-26 Thread Daniel Bickett
odified by one thread amd printed by the other.) Daniel Bickett NOTES: [1] Google killed my whitespace (as spaces _and_ tabs...) in the previews, so I pasted it on Nopaste: http://rafb.net/paste/results/KilM6t70.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Tricks to install/run Python on Windows ?

2004-12-26 Thread Daniel Bickett
towards the values of those that 2.4 uses and manually adding them) but I seriously doubt it involves any that your system's stability balances on. Daniel Bickett NOTES: [1] http://drpython.sf.net/ On Sun, 26 Dec 2004 19:43:24 +0100, StepH <[EMAIL PROTECTED]> wrote: > Hi, > >

Event-Driven Woes: making wxPython and Twisted work together

2004-12-30 Thread Daniel Bickett
a solution to this problem. Any help would be very much appreciated, Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list

PyPI errors?

2005-03-20 Thread Daniel Yoo
Does anyone know why PyPI's doesn't like my PKG-INFO file? Here's what I have: ## mumak:~/work/aho/src/python/dist/ahocorasick-0.8 dyoo$ cat PKG-INFO Metadata-Version: 1.0 Name: ahocorasick Version: 0.8 Summary: Aho-Corasick automaton implementation Home-page: http://hkn.eecs.berkeley.edu/~

Re: Regular Expressions: large amount of or's

2005-03-23 Thread Daniel Yoo
: Done. 'startpos' and other bug fixes are in Release 0.7: : http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/ahocorasick-0.7.tar.gz Ok, I stopped working on the Aho-Corasick module for a while, so I've just bumped the version number to 0.8 and posted it up on PyPI. I did add some prelimin

Re: inter threading info

2005-03-23 Thread Daniel Dittmar
have to send the data to the server first with a special tag, the server has to use that tag and send the data to the designated other client. It sounds a bit as if you want to build some kind of chat server and now you want to add private channels. Daniel -- http://mail.python.org/mailman

Re: The Running Time of += on Char Strings ?

2005-03-24 Thread Daniel Dittmar
nations is slow, instead you should: - use module cStringIO - or add all the strings to a list and do "".join (listvariable) How are you supposed to know? It's mostly Python folklore, some of which has been written down in the Python Cookbook (http://aspn.activestate.com/ASPN/Pyt

Re: Optimisation Hints (dict processing and strings)

2005-03-29 Thread Daniel Dittmar
or key in [k for (k, v) in hash.iteritems () if len (v) < 2]: del hash (key) This of course builds a list of keys to delete, which could also be large. - also: hash.keys()[:] is not necessary, hash.keys () is already a copy Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Optimisation Hints (dict processing and strings)

2005-03-30 Thread Daniel Dittmar
you iterate over it, this very often breaks the iterator. If you are memory bound, maybe a dabase like SQLite is really the way to go. Or you could write the keys to a remporary file in the loop and then write a second loop that reads the keys and deletes them from hash. Daniel -- http://mail

Re: System bell

2005-03-31 Thread Daniel Bickett
r, as the OP put it, the system "bell" . I can only speak as a Windows user however; I'm unaware of the prevalence of this feature across operating systems. -- Daniel Bickett dbickett at gmail.com http://heureusement.org/ -- http://mail.python.org/mailman/listinfo/python-list

Lambda: the Ultimate Design Flaw

2005-03-31 Thread Daniel Silva
Shriram Krishnamurthi has just announced the following elsewhere; it might be of interest to c.l.s, c.l.f, and c.l.p: http://list.cs.brown.edu/pipermail/plt-scheme/2005-April/008382.html The Fate Of LAMBDA in PLT Scheme v300 or La

Re: Case-insensitive dict, non-destructive, fast, anyone?

2005-04-01 Thread Daniel Dittmar
Ville Vainio wrote: I need a dict (well, it would be optimal anyway) class that stores the keys as strings without coercing the case to upper or lower, but still provides fast lookup (i.e. uses hash table). Store the original key together with the value and use a lowercase key for lookup. only a

Re: Case-insensitive dict, non-destructive, fast, anyone?

2005-04-01 Thread Daniel Dittmar
Ville Vainio wrote: "Daniel" == Daniel Dittmar <[EMAIL PROTECTED]> writes: Daniel> Ville Vainio wrote: >> I need a dict (well, it would be optimal anyway) class that >> stores the keys as strings without coercing the case to upper >> or lower

Re: very simple tkinter demo program

2005-04-09 Thread Daniel Bickett
# 2) making sure the path is a file print "Error!" Error! >>> -- Daniel Bickett dbickett at gmail.com http://heureusement.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Canceling/interrupting raw_input

2005-04-17 Thread Daniel Cer
For what it's worth, this looks like a Windows specific problem. The code below seems to work as expected on a Linux box. That is, everything terminates, including the "inputLoop", after sys.exit() is called, without the user needing to press 'enter' one last time. However, if I try to run the c

Re: Canceling/interrupting raw_input

2005-04-18 Thread Daniel Cer
string thread.start_new_thread(inputLoop, () ) time.sleep(3) print "\nTime's up exiting" win32api.TerminateProcess(-1, 0) -Dan Daniel Cer wrote: For what it's worth, this looks like a Windows specific problem. The code below seems to work as expected on a Linux box. That is, everythin

Re: pygtk and long running process

2005-04-24 Thread Daniel Cer
Robert wrote: I have a command line app that can take up to 20 minutes to complete and every minute or so updates it's status (spits it out to console). I am writing a front end for this app in python/gtk and was wondering what command I use to a) invoke the command and b) how to capture it's out

Re: pygtk and long running process

2005-04-24 Thread Daniel Cer
Daniel Cer wrote: Robert wrote: I have a command line app that can take up to 20 minutes to complete and every minute or so updates it's status (spits it out to console). I am writing a front end for this app in python/gtk and was wondering what command I use to a) invoke the command and b

Re: Multiple tuples for one for statement

2005-04-24 Thread Daniel Cer
Harlin Seritt wrote: I have three tuples of the same size: tup1, tup2, tup3 I'd like to do something like this: for a,b,c in tup1, tup2, tup3: print a print b print c Of course, you get an error when you try to run the pseudocode above. What is the correct way to get this done? For somethi

Re: Getting into Python, comming from Perl.

2005-04-25 Thread Daniel Dittmar
his for strings, regular expressions and the os and os.path modules. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Secure FTP

2005-04-27 Thread Daniel Bowett
I need to download files over a secure channel. I have been looking into Paramiko which seems to have the functonality I need. The problem is I need a FTP server which supports key based encryption to install on my windows server. Has anyone succeeded in doing this? If so - what FTP server did y

Re: [newbie] problem trying out simple non object oriented use of Tkinter

2013-12-06 Thread Daniel Watkins
Hi Jean, On Fri, Dec 06, 2013 at 04:24:59AM -0800, Jean Dubois wrote: > I'm trying out Tkinter with the (non object oriented) code fragment below: > It works partially as I expected, but I thought that pressing "1" would > cause the program to quit, however I get this message: > TypeError: quit()

Re: ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')'

2013-12-09 Thread Daniel Watkins
On Mon, Dec 09, 2013 at 12:41:57AM -0800, Jai wrote: > sql = """insert into `category` (url, catagory,price) VAlUES ('%s', > '%s', '%s')"""%(link1,x,y) > sql = unicodedata.normalize('NFKD', sql).encode('ascii','ignore') > cursor.execute(sql) > > ProgrammingError: (1064, "Y

Python.Exe Problem

2015-12-29 Thread Daniel Lee
Hello, When I try to run python.exe on my computer with Windows 8, I get the following error: "Python.exe - Entry Point Not Found" "The Procedure entry point ?terminate@@YAXXZ could not be located in the dynamic link library C:\Program Files\Python3.5\python.exe." What does this error mean and

Re: crash while using PyCharm / Python3

2016-03-18 Thread Daniel Wilcox
> > Host OS:Ubuntu Desktop 14.04 LTS / Unity > > System crashed while using PyCharm / Python3. > Booting takes forever and stuck at the purple screen with > the Ubuntu logo and the five dots cycling. > How to fix? > First off your machine not booting isn't really Python related. Python may ha

Re: WP-A: A New URL Shortener

2016-03-19 Thread Daniel Wilcox
=D On Wed, Mar 16, 2016 at 11:16 AM, Rick Johnson wrote: > On Wednesday, March 16, 2016 at 7:02:16 AM UTC-5, Daniel Wilcox wrote: > > I dare say I'm with Rick on this point[...] > > Contrary to "pseudo popular belief", it's perfectly okay to > agree with

Re: retrieve key of only element in a dictionary (Python 3)

2016-03-19 Thread Daniel Wilcox
I think you're looking for something like popitem(). >>> d = {'asdf':1} >>> d.popitem()[0] 'asdf' Cheers On Fri, Mar 18, 2016 at 2:33 PM, Fillmore wrote: > > I must be missing something simple, but... > > Python 3.4.0 (default, Apr 11 2014, 13:05:11) > [GCC 4.8.2] on linux > Type "help", "cop

About PyPi: ETA from publish to searchable?

2016-03-19 Thread Daniel Wilcox
Hello! I just recently published my first package to PyPi and was wondering -- how long will it take before I actually can see it if I'm searching for it? I imagine the indexes are on some schedule but I'm chomping at the bit -- about how long is that? Thanks, -D https://pypi.python.org/pypi/vc

Re: Obfuscating Python code

2016-03-19 Thread Daniel Wilcox
If you really want to learn about obfuscating python bytecode so it can't be reverse engineered (easily) -- there are people who are doing it. Search for 'pyasm' on github as a starting point. tldr; yes people are patching .pyc files. yes you can make them a nightmare to disassemble. and yes it sl

Re: WP-A: A New URL Shortener

2016-03-19 Thread Daniel Wilcox
rcise to see what you can escape into a URL that might get unescaped later (with hilarious insecurity for all). Then you'll want to either a) learn SQL escaping for your database of choice *really really well* or b) use an ORM. Be well, -D On Thu, Mar 17, 2016 at 4:46 AM, Vinicius wrote:

Re: WP-A: A New URL Shortener

2016-03-19 Thread Daniel Wilcox
tation, involved but might be fun -- and who knows it could spark a land rush to claim useful short URLs like wp-a.co/flask-tips. :) Speak up if you need any pointers! Daniel On Tue, Mar 15, 2016 at 12:56 PM, Vinicius Mesel wrote: > Hey guys, > > I'm a 16 year old Python Prog

Re: WP-A: A New URL Shortener

2016-03-20 Thread Daniel Wilcox
> > > +list >> >> > You will be far more welcome here if you intersperse your replies or > bottom post. Top posting is very heavily frowned upon. Thanks. noted. lol -- https://mail.python.org/mailman/listinfo/python-list

Re: crash while using PyCharm / Python3

2016-03-22 Thread Daniel Wilcox
Now as for *why* you needed to reinstall your graphics driver... did the graphics driver get updated before the crash? Or do we think something in the java runtime for PyCharm ate libglx or friends? I did find this PyCharm crash in which Java ate itself -- though didn't eat any library files (as

Weird bahaviour from shlex - line no

2013-09-27 Thread Daniel Stojanov
Can somebody explain this. The line number reported by shlex depends on the previous token. I want to be able to tell if I have just popped the last token on a line. import shlex first = shlex.shlex("word1 word2\nword3") print first.get_token() print first.get_token() print "line no", first.li

Re: JUST GOT HACKED

2013-10-01 Thread Daniel Stojanov
On 02/10/2013 12:05 AM, "Νίκος" wrote: > Thanks for visting my website: you help me increase my google page rank without actually utilizing SEO. > > -- > https://mail.python.org/mailman/listinfo/python-list 1) You need links, not page views to improve your Google rank. 2) I just signed up the t

Re: Stop posting HTML [was Re: I haev fixed it]

2013-10-01 Thread Daniel Stojanov
On 2 October 2013 12:40, Steven D'Aprano wrote: >>> Joel, you've been asked repeatedly to please stop posting HTML. > [...] > >> > class="gmail_extra">I'm very sorry. I didn't realize I was. I >> use gmail for this list, and I believe it replies with html if the >> previous message was written w

Help with pipes, buffering and pseudoterminals

2015-04-05 Thread Daniel Ellis
I have a small little tool I'd like to make. It essentially takes piped input, modifies the text in some way, and immediately prints the output. The problem I'm having is that any output I pipe to the program seems to be buffered, removing the desired effect. >From what I understand, I need t

Re: Help with pipes, buffering and pseudoterminals

2015-04-06 Thread Daniel Ellis
nd isn't that big of a deal. Thanks again for the explanation. I think I'm understanding a bit better now, or at least understanding why my current means of tackling the problem won't work. I'd still very much like to figure out the reading/writing to the master & slave stuff th

'NoneType' in contextmanager prevent proper RuntimeError to be raised

2015-05-20 Thread Daniel Gonçalves
When you decorate a function with contextmanager that didn't yield you got an AttributeError instead of a proper RuntimeError "generator didn't yield". For example: >>> @contextlib.contextmanager >>> def foo(): ... pass ... >>> with foo(): ... do_something() ... Traceback (most recent ca

Re: 'NoneType' in contextmanager prevent proper RuntimeError to be raised

2015-05-20 Thread Daniel Gonçalves
ibute 'next', instead of the proper RuntimeError, making it harder to debug. Anyways, I know that it's strange to have a contextmanager that didn't yield. I just stumbled upon this, by accident, and I think the way it's implemented looks wrong :) 2015-05-20 20:44 GMT

Re: Downloading Python

2015-10-06 Thread Daniel Bradburn
Hi Sharon, Here are the links for the Python 3.4.2 downloads: https://www.python.org/downloads/release/python-342/#download Regards 2015-10-06 6:49 GMT+02:00 Sharon MOrine : > Hello: > Can you please tell me how to download python 3.4.2 (or .3)? I am new to > programming and the website is

python doesn't install

2015-11-01 Thread Daniel Joffe
WinXP...32 bits...professional I keep getting message note also that there is no place on the install box to start...you just click somewhere, and the install started. -- https://mail.python.org/mailman/listinfo/python-list

same problem even after repair

2015-11-02 Thread Daniel Joffe
-- https://mail.python.org/mailman/listinfo/python-list

Writing SOME class methods in C

2015-11-17 Thread Daniel Haude
Hello, I'm trying to implement some (but not all) methods of a Python class in C. What I've found on the Net is: - how to implement entire modules in C so that I can import that module and use the C functions (successfully done it, too). - how to implement entire classes in C But I can't fin

failing to run python on my pc

2015-11-19 Thread Daniel Kasuza
to use it for some practice but i am failing. Please help Daniel -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >