User Profile

Collapse

Profile Sidebar

Collapse
luofeiyu
luofeiyu
Last Activity: Aug 31 '15, 11:59 AM
Joined: Jul 29 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • why can't upload file into ftp target directory with curl?

    The file `d:/upload.sql` in my local pc can be uploaded into `my_ftp_ip/public_html/upload_ftp_put. sql` with code1.
    Code:
    <?php
        set_time_limit(0);
        $host = 'xxxx';
        $usr = 'yyyy';
        $pwd = 'zzzz';
        $src = 'd:/upload.sql';
        $ftp_path = '/public_html/';
        $des = 'upload_ftp_put.sql';
        $conn_id = ftp_connect($host, 21) or die ("Cannot connect to host");
    ...
    See more | Go to post

  • how to check which Microsoft Visual C++ version in my win7?

    how can i check which Microsoft Visual C++ version is in my win7?
    See more | Go to post

  • luofeiyu
    started a topic how can i parse the chrome cookie with python?

    how can i parse the chrome cookie with python?

    chrome cookie
    My chrome cookie is in the C:\Users\pengsi r\AppData\Roami ng\Microsoft\Wi ndows\Cookies,t here are many files in it ,when i open the file pengsir@adobe[1].txt,

    What does the string mean?How can i parse it?

    s_vi[CS]v1|29F235DD852A 5228-6000010FE0001C5 9[CE]adobe.com/214748467234176 396803053579524 572552803038907 0*
    See more | Go to post

  • luofeiyu
    started a topic how to display the png file in firefox?

    how to display the png file in firefox?

    There is a png file whose dimensions is 400*400 .
    Why the html5 in chrome can not display the photo?

    Code:
        <!DOCTYPE html>
        <html>
        <head>
        <title>a photo</title>
        </head>
        <body text="blue">
            <image src="e:\\webs\\images\\Untitled.png" width="320" heigth="500">
        <h1>
    ...
    See more | Go to post
    Last edited by Rabbit; Aug 30 '14, 09:39 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

  • luofeiyu
    started a topic can't set font in firefox ?

    can't set font in firefox ?

    i have set DejaVu Sans Mono in my firefox :tool- options-content ,why is there still no DejaVu Sans Mono in my firefox when i open web ?
    See more | Go to post

  • luofeiyu
    started a topic why my photo can't be displayed in web?

    why my photo can't be displayed in web?

    there is a photo in c:/workspace/abbr.jpg.
    Code:
    <html>
    <body>
    
    <img src="file:\\c:/workspace/abbr.jpg" alt="Smiley face" width="42" height="42">
    
    </body>
    </html>
    why it can not be displayed in the screen?...
    See more | Go to post
    Last edited by Rabbit; Jan 6 '14, 04:37 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.

  • luofeiyu
    started a topic can i draw graph in xul?

    can i draw graph in xul?

    can i draw a graph ,such as y=sin(x) in xul ??
    can i get some codes about it ?
    for example:Adding menus and submenus
    Code:
    <toolbox>
      <menubar id="xulschoolhello-menubar">
        <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;">
          <menupopup>
            <menuitem label="&xulschoolhello.greet.short.label;"
    ...
    See more | Go to post

  • luofeiyu
    started a topic parse the html to get tr in python

    parse the html to get tr in python

    please download the attachments ,save as /tmp/A,run the following code,
    Code:
    import lxml.html
    sfile='/tmp/A'
    root=lxml.html.parse(sfile)
    t = root.xpath("//table[@class='yfnc_datamodoutline1']")
    trs=t.xpath(".//tr")
    for  i, tr  in  enumerate(trs):
        print i, len(tr),tr.text_content()
    the output is:
    0 1 StrikeSymbolLas tChgBidAskVolOp en...
    See more | Go to post

  • luofeiyu
    started a topic scrolled canvas ,strange problem

    scrolled canvas ,strange problem

    i have written a program in tkinter to draw stock graph,there are two strange thing i can't understand
    the attachment is 'AAU' data file(attachment 1).when you download it ,please save it in /tmp/AAU
    there is a scrolled canvas in it ,

    1.strang long line,please see my attachment.
    i have see my data ,my formulation ,no wrong,but the line is so long!!
    2.there is no motion event...
    See more | Go to post

  • luofeiyu
    started a topic strange partial function aciton

    strange partial function aciton

    code1 ok
    Code:
    from Tkinter import *
    from functools import partial
    fields = 'Name', 'Job', 'Pay'
        
    def fetch(entries,event):
        for entry in entries:
           print 'Input => "%s"' % entry.get()        
        print  event
        
        
    def makeform(root, fields):
        entries = []
        for field in fields:
            row = Frame(root)
    ...
    See more | Go to post

  • Code:
    from Tkinter import *
         
    def fetch(x):
               print x, type(x)
         
    if __name__ == '__main__':
               root = Tk()
               button=Button(root,text='Fetch')
               button.pack()
               button.focus_set()
               button.grab_set()
               button.bind('<Return>',fetch)       
               root.mainloop()
    add button.grab_set (),it's ok...
    See more | Go to post
    Last edited by bvdet; Aug 25 '11, 03:14 AM. Reason: Add code tags

    Leave a comment:


  • luofeiyu
    replied to What is your OS and Python Version
    ubuntu11.04,
    Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
    [GCC 4.5.2] on linux2
    See more | Go to post

    Leave a comment:


  • luofeiyu
    started a topic why no sound?

    why no sound?

    Code:
    from Tkinter import Frame
    Frame().bell()
    I'm on Ubuntu 11.04, with Python 2.7,when i run it,there is no sound?
    See more | Go to post

  • you lose f in rom (it is from),i made a try,it'ok,but there is still a problem,
    when i finish my first enter,it's ok,there is output ,
    when i have a try for the second time ,there is no output??
    See more | Go to post

    Leave a comment:


  • what's the difference between mainloop and app.mainloop and root.mainloop?

    Code:
    #code1
    from Tkinter import *       
    class Application(Frame):     
        def __init__(self, master=None):
            Frame.__init__(self, master)   
            self.grid()                    
            self.createWidgets()
    
        def createWidgets(self):
            self.quitButton = Button ( self, text='Quit',
                command=self.quit )               
            self.quitButton.grid()
    ...
    See more | Go to post

  • get event attribution

    Code:
    from Tkinter import *
    
    def fetch(x):
           print  x.type,x
         
         
    if __name__ == '__main__':
           root = Tk()
           root.bind('<Return>', fetch)
           root.mainloop()
    i can get output :
    2 <Tkinter.Even t instance at 0xb742986c>

    Code:
    from Tkinter import *
    
    def fetch(x):
           print
    ...
    See more | Go to post

    Leave a comment:


  • luofeiyu
    started a topic Tkinter event handlers and command callbacks

    Tkinter event handlers and command callbacks

    Code:
    from Tkinter import *
    fields = 'Name', 'Job', 'Pay'
    
    def fetch(event,entries):
       for entry in entries:
           print 'Input => "%s"' % entry.get()       # get text
           print  event.widget 
          
          
    def makeform(root, fields):
       entries = []
       for field in fields:
           row = Frame(root)                           # make a new row
    ...
    See more | Go to post
    Last edited by bvdet; Aug 24 '11, 01:02 PM. Reason: Assign a more descriptive title

  • luofeiyu
    started a topic scrape info from web:the .text problem

    scrape info from web:the .text problem

    hi ,everyone,i want to scrape something from
    http://search.dangdang .com/search_pub.php? key=python
    my code is :
    Code:
    import urllib
    import lxml.html
    down='http://search.dangdang.com/search_pub.php?key=python'
    file=urllib.urlopen(down).read()
    root=lxml.html.fromstring(file)
    tnodes = root.xpath("//div[@class='listitem detail']//li[@class='maintitle']//a")
    for i,x in  enumerate(tnodes):
    ...
    See more | Go to post
No activity results to display
Show More
Working...